Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, Aku_Aku, 1 invisible), 579 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 32 1 2 3 4 31 32
Re: C# wrapper - RELEASE [Re: amy] #277480
07/09/09 11:58
07/09/09 11:58
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
A Var that doesn't contain a value, but a pointer is for example needed if you want to add a digits element to a panel. There you need to give a Var pointer to the engine - to ensure that the value is displayed in the panel that the Var object in C# has. Without a pointer in the Var it also wouldn't be able to display the current time in a panel - you would have to update the time every frame, with pointers you don't have to worry about this.

The scheduler i wrote created a thread for every function that was called by the engine (for example a function one gives as parameter if you create a ENTITY object). After an engine_frame it started to stop the current thread and started a thread in the list, after that thread ended or reached a wait, the current thread was stopped and the next thread in a list was started ...
But in the end it was just too slow to be usefull ^^

The difference between calling functions every frame and a scheduler is afaik, that if you have a scheduler you can use wait, and thus, when the function's turn has come, it doesn't need to go through the whole function, but may start after the wait command.


get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Re: C# wrapper - RELEASE [Re: Stromausfall] #277481
07/09/09 11:59
07/09/09 11:59
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline
Senior Member
pararealist  Offline
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
Thx very much.
Was playing with a previous wrapper posted here
adding more acknex stuff but will try
this one as ALL acknex is already added.
//
My level will not load, either from the level folder
in the project folder
Code:
a7.EngFun.level_load( (String)"..\\gsDefaults\\default.wmb" );


or directly from the project folder
Code:
a7.EngFun.level_load( (String)"default.wmb" );


So i am off to check why.
//
Everything else is fine though
and thanks again for your work.


A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.
Re: C# wrapper - RELEASE [Re: enrike] #277488
07/09/09 12:07
07/09/09 12:07
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
hmmm afaik this error may be thrown if the paths aren't correct. You didn't write the commands under quotation marks or (this would be wrong) ?

P.S.: you should really update Acknex to 7.77 because the wrapper is built towards 7.77


get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Re: C# wrapper - RELEASE [Re: pararealist] #277489
07/09/09 12:10
07/09/09 12:10
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
the second version should work, did you put the wmb file into the Debug/bin folder of your project ?


get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Re: C# wrapper - RELEASE [Re: Stromausfall] #277496
07/09/09 12:26
07/09/09 12:26
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
thanks for working on this! having a c# wrapper for a7 is very nice. i also would try to reduce the amount of unnecessary verbosity though. i am no c# expert but i am sure it's possible to make it much more convenient to use.



def_debug_pan.setdigits(0, 0, 12, "fps%5.0f", ackfont, lambda: def_dfps * 16)

in python using pointers isn't possible at all so i use lambda expressions for panel elements. internally i have a big var array for panels which gets updated each frame by calling the lambdas that got registered for panel elements. it works great and even is much more powerful than simply passing a pointer. for example it supports local variables and arbitrary expressions.

lambdas are available in c# too.



i wouldn't use threads for the scheduler. the lite-c scheduler doesn't use threads either. it uses coroutines. coroutines can be simulated by generators in python and c#. you could look into the source of my scheduler. it's really simple.



just some ideas. smile

Re: C# wrapper - RELEASE [Re: ventilator] #277507
07/09/09 12:52
07/09/09 12:52
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
Thank you ventilator for your input !
I will look into coroutines - they could be the key ^^

your approach to simulating pointers is also quite interesting ! the c# wrapper is able to get a pointer of a local variable but not of arbitrary expressions - lambda may be worth a look ^^.


get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Re: C# wrapper - RELEASE [Re: enrike] #277510
07/09/09 12:59
07/09/09 12:59
Joined: Aug 2005
Posts: 512
Bayern
Schmerzmittel Offline
User
Schmerzmittel  Offline
User

Joined: Aug 2005
Posts: 512
Bayern
Originally Posted By: enrike
i think i did all steps correct but i get this error... any ideas? i am using VStudio 2008 and GameStudio Pro 7.06



Use a legal version, then it works.


A7 Com V7.80
Re: C# wrapper - RELEASE [Re: Stromausfall] #277546
07/09/09 15:19
07/09/09 15:19
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline
Senior Member
pararealist  Offline
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
@Stromausfall
Tried in all the places
project folder
debug/release folder
(my) gsdefaults folder

but they load in my original c# project
so i know i' just need to look a little closer
at the problem.
No worries, will definately solve this when i get time
to concentrate

OK- fine now
should be in debug folder, but settings were to release folder
(knew it was something simple).

Last edited by pararealist; 07/09/09 18:38.

A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.
Re: C# wrapper - RELEASE [Re: pararealist] #277646
07/09/09 23:38
07/09/09 23:38
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline
Serious User
MichaelGale  Offline
Serious User
M

Joined: Aug 2005
Posts: 1,230
I hate being negative about something, but I see a few issues with your wrapper that would stop me (personally) from using it:

1. your code doesn't follow the C# coding conventions at all and this is a really big issue as far as I am concerned because, especially in larger projects, continuity of style is important to ensure maintainability
2. there is no validation whatsoever anywhere in your wrapper
3. nested classes should not be used in the way you used them
4. the statement in your first post "withouth the use of unsafe code !" is obviously wrong since most of your code is unsafe and when the methods in your wrapper are called, unsafe code is executed - it's just less obvious.

Michael


Your friendly mod is at your service.
Re: C# wrapper - RELEASE [Re: MichaelGale] #277676
07/10/09 05:58
07/10/09 05:58
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
about points 1-3 i will look into them, i have to admit that i don't have yet any knowledge about these mentioned points, but i will try to learn about these points and integrate them in the next rewrite of the wrapper!
about point 4, actually i wanted to say the user of the wrapper doesn't need to use unsafe statements, that didn't imply that the wrapper doesn't use unsafe code ^^

Thanks for your input, these seem to be points that i should learn about!


get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Page 2 of 32 1 2 3 4 31 32

Moderated by  TWO 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1