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
1 registered members (7th_zorro), 529 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 10 of 32 1 2 8 9 10 11 12 31 32
Re: C# wrapper - RELEASE 1.1.0 [Re: Stromausfall] #281513
07/27/09 15:17
07/27/09 15:17
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...
Have you noticed any performance issues when
the form (not fixed) is resized?
I have a mainform containing toolstrip container, menu and 2 toolbars.
Then my panel, a splitter and a propertygrid.
When the main form is sized there is some delay
in sizing the rest or is this C# NET?


A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.
Re: C# wrapper - RELEASE 1.1.0 [Re: Stromausfall] #281514
07/27/09 15:34
07/27/09 15:34
Joined: Feb 2007
Posts: 353
A
amy Offline
Senior Member
amy  Offline
Senior Member
A

Joined: Feb 2007
Posts: 353
Yes, Lite-C stores/restores my and you at each wait(). So in my opinion it would make sense if your scheduler did that too. It's no big deal though.

Hm... Couldn't you do something like always having two versions of each property. For example time_step and time_step_as_reference. I think most commonly variables don't get used as references. It would make sense to make the most common case easy and clean from the user perspective. If you want to use a variable in a panel you can add _as_reference.

Re: C# wrapper - RELEASE 1.1.0 [Re: amy] #281531
07/27/09 16:29
07/27/09 16:29
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
@pararealist >>> You shouldn't really see a performance decrease because the engine is running on a seperate thread. Are you using the "embedding" sample from the manual? If you want to resize the engine when the form resizes then you will have to use the Resize event handler or you can override WndProc and handle the WM_RESIZE message. Then you will need to use the win32 call "SetWindowPos" to set the size of the engine window.

PM me if you want me to give you a "resizing" demo.

@amy >>> I think the way it uses Vars at the moment is pretty good, if not fine. Having time_step and time_step_as_reference would be overkill i think, and more work on Stromousfall's part. I think it also serves as a helper to use IntValue and FloatValue to stop you eg, passing a float to a function that wants an int, thus preventing errors.

@Stromausfall >>> I looked over the multiplayer functions in the manual and after some consideration decided not to go that way because a number of errors could occur (ip settings etc) and the engine's network functions don't have a reputation as being useful.

I wanted to go a bit more 'low-level' and operate on windows messages, so i decided to create a method of sending custom messages to the exe window. Then the window can handle it and do whatever it wants. It works fine...



...and i can control each instance seperately by passing values to each window.

LMAO, i have learnt more win32 in the past 3 days than ever before. At least we now have multiple instances running.

If anyone wants the code for running more than one instance of the engine, then ask here or PM me.

Thanks.

Last edited by DJBMASTER; 07/27/09 16:29.
Re: C# wrapper - RELEASE 1.1.0 [Re: amy] #281534
07/27/09 16:38
07/27/09 16:38
Joined: Feb 2007
Posts: 353
A
amy Offline
Senior Member
amy  Offline
Senior Member
A

Joined: Feb 2007
Posts: 353
If he uses code generator scripts anyway it shouldn't be much work to add the _as_reference feature.

In what cases do you need references? Panels? What else? These rare cases where you need a reference shouldn't prevent streamlining the wrapper API in my opinion. Stromausfall did a great job so far but i still find the API a bit ugly. It's not wrist friendly to always have to type that much.

I think lengthy code which isn't easy to read leads to more errors than passing floats to ints. :p

Another question... I have never tried this but if you make a .NET dll out of this wrapper it should be usable from other .NET languages, right?

Re: C# wrapper - RELEASE 1.1.0 [Re: amy] #281543
07/27/09 17:00
07/27/09 17:00
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
@DJBMASTER looks great! You're progress is really fast!

@amy I'm sorry but Var will stay the way it is now, as long as i don't find a solution that truly is easier for the user (and of course not too much work for me to implement ^^). The problem with your concept is, how would one pass a reference of a Var that the User created - your concept would only work for EngVar and maybe Vars in Engine Objects and it would also be confusing, as one would have "two" variables that represent the same but are of different types.

Regarding the .net dll, i have to admit that i have actually less to no knowledge about this topic. The only thing i know is that all .net languages compile to the same language.


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 1.1.0 [Re: Stromausfall] #281546
07/27/09 17:09
07/27/09 17:09
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
in my opinion fixed point variables aren't that great. the user of the c# wrapper shouldn't be forced to ever create one himself. they are relics from a time when cpus didn't have floating point units. smile it shouldn't be necessary to think about vars at all. the issues with panels and other cases where references to vars are needed can be solved differently.

Re: C# wrapper - RELEASE 1.1.0 [Re: Stromausfall] #281548
07/27/09 17:12
07/27/09 17:12
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
yeh, if you write the wrapper to be CLI compliant then it should be accessible though-out all .NET languages because they all run on the CLR.

If you can get unmanaged code into C#, then getting the C# into VB should be no problem, you don't have to worry about marshalling etc.

I agree that Var shouldn't change and if you really want to use ints and floats implicitly then you can write your own helper method/macro.

I think this would work...

Code:
public void SetVar(ref Var sender, object value)
        {
            if(value.GetType() == typeof(int))
            {
                sender.IntValue = (int)value;
            }
            if (value.GetType() == typeof(float))
            {
                sender.FloatValue = (float)value;
            }
        }



Last edited by DJBMASTER; 07/27/09 17:23.
Re: C# wrapper - RELEASE 1.1.0 [Re: DJBMASTER] #281550
07/27/09 17:23
07/27/09 17:23
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
My intention in using float and int is, that the engine uses these with it's var variable.
And thus also the user should use them if he interacts with the engine ^^


Last edited by Stromausfall; 07/27/09 17:23. Reason: typo ^^

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 1.1.0 [Re: Stromausfall] #281580
07/27/09 19:25
07/27/09 19:25
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Does anyone know how to hide the start-up window completely. When using engine_open() the engine window flashes up. I've got "-nwnd" as the command line.

Re: C# wrapper - RELEASE 1.1.0 [Re: DJBMASTER] #281604
07/27/09 20:08
07/27/09 20:08
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
http://www.galep.com/beta/a-black.htm
according to this page you it's a pro feature, do you have pro ?


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 10 of 32 1 2 8 9 10 11 12 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