Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (howardR, 7th_zorro), 893 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 8 of 23 1 2 6 7 8 9 10 22 23
Re: C# wrapper 2.2.1 - RELEASE [Re: monotonic] #364717
03/20/11 08:58
03/20/11 08:58
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
I've uploaded an example which shows how you can call a C# function from lite-c, here's the link to the downloadable project link

i too think that using c# for the scripts is most likely easier than using lite-c!


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 2.2.1 - RELEASE [Re: Stromausfall] #364718
03/20/11 09:27
03/20/11 09:27
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Is a game written in C# using gamestudio faster or slower than writing it in lite-c?
A small test would be cool (a huge crowd of entities that perform a function).


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: C# wrapper 2.2.1 - RELEASE [Re: Dark_samurai] #364720
03/20/11 10:01
03/20/11 10:01
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
yes, would be interesting. i don't think there is much difference though. lite-c isn't a very optimizing c compiler.

Re: C# wrapper 2.2.1 - RELEASE [Re: Stromausfall] #364779
03/20/11 19:31
03/20/11 19:31
Joined: Mar 2011
Posts: 13
Yorkshire, England
monotonic Offline
Newbie
monotonic  Offline
Newbie

Joined: Mar 2011
Posts: 13
Yorkshire, England
@Stromausfall

Thank you very much laugh I will have a play around and see what I can do. I have noticed though that you (or at least I believe) can only load one script when opening the world as opposed to loading scripts at will. If this is the case then I will have to go with C# as the scripting language.

Re: C# wrapper 2.2.1 - RELEASE [Re: monotonic] #365250
03/24/11 20:46
03/24/11 20:46
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
I finally had time to look into your wrapper. I love it!

One bug I noticed:
The ent_nextvertex() method of the ENTITY class doesn't work if null is passed for the first parameter (contact). Although this is possible in Lite-C!

The most interesting example was the embedded engine window example. One problem I noticed is, that even if the parent window (the window the engin is embedded in) is active, I need to click into the engine window so that acknex detects my key strokes.
Is it possible to activate the engine window when the parent window is active?
I also didn't managed to get resizing of the engine window with the parent window to work... The panel is resizing correct. In the resize event of the panel I tried to change the engine resolution to the current panel size... without an effect (I used the threadsafe event of your scheduler of course).

Really great work!


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: C# wrapper 2.2.1 - RELEASE [Re: Dark_samurai] #365251
03/24/11 21:05
03/24/11 21:05
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
@Dark_samurai
thank you! I'll fix that bug in the next update !
about the embedded engine window - I've noticed that too ! If i find some time I'll look into this !


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 2.2.1 - RELEASE [Re: Stromausfall] #365256
03/24/11 21:29
03/24/11 21: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
For the window stuff...

To resize the engine to the resolution of the container, overload the WndProc and catch WM_RESIZE, then pass the call onto the engine grin Handling the 'Resized' event of a .NET control would also do grin

As for the keystroke stuff, It's something I have been trying to resolve for some time. This is a consequence of the SetParent call, as I've seen this behaviour in other apps unrelated to GameStudio. I think the function 'AttachThreadInput' may hold the key grin

A workaround is to simply overload the container WndProc, catch any WM_KEYDOWN, etc messages, and pass them onto the acknex window handler grin

good luck grin

Last edited by DJBMASTER; 03/24/11 21:31.
Re: C# wrapper 2.2.1 - RELEASE [Re: DJBMASTER] #365291
03/24/11 23:46
03/24/11 23:46
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
experimented a bit and came to the same conclusion as DJBMASTER ^^
works pretty good, but as DJBMASTER wrote, WndProc has to be overloaded smirk
It would be interesting to see how mouse interaction works with this method !


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 2.2.1 - RELEASE [Re: Stromausfall] #365377
03/25/11 23:28
03/25/11 23:28
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
I've experimented with the original method of embedding the window and after quite some time found a way to resize the window and also give the impression/(or even manage ^^) that the focus is correctly switched according to the mouse position and the status of the main form....
It uses some dirty tricks, but should works quite good (at least it does on my pc ^^)

ImprovedEmbeddedWindow.zip


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 2.2.1 - RELEASE [Re: Stromausfall] #365407
03/26/11 12:19
03/26/11 12:19
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Wow thank you very much!

Resizing works already perfect!

But I noticed a problem with the focus thing. If the main form creates a dialog that is placed over the engine window, you will be unable to click a button in this dialog.
Another problem of this solution is, that the mouse has to be over the engine window so that key strokes are recognized. I think I will use the keydown event of the form and forward the key strokes to the engine window if the mouse isn't over the window.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Page 8 of 23 1 2 6 7 8 9 10 22 23

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