Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
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
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, Quad, EternallyCurious, 1 invisible), 726 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 9 of 32 1 2 7 8 9 10 11 31 32
Re: C# wrapper - RELEASE 1.1.0 [Re: Stromausfall] #281400
07/27/09 04:36
07/27/09 04:36
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...
Code:
EngVar.time_smooth.FloatValue = 0.666f;

            //CRASHES:: ?????
            //collision
            //EngVar.enable_polycollision.IntValue = (int)1;

            EngVar.floor_range.IntValue = (int)100;



This is a statement in my init code
and it now causes a crash, ( memory access error ).
I had to comment it out for the moment.
I dont know why it suddenly decides to cause problems that line
but it did not before.



Last edited by pararealist; 07/27/09 04:37.

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

Joined: Dec 2002
Posts: 616
Austria
Did u try if this error also occurs when you use the laterst version, 1.1.1.0 ?

If it still doesn't work, could u send me more code that surrounds this block of code, or a small demo where this error occurs ? Because i can't reproduce this error with these 3 assignments!


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: DJBMASTER] #281445
07/27/09 10:50
07/27/09 10:50
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Is it possible to let EngFun.engine_open() return an ENGINE_VARS struct? This way i think it might be possible to allow multiple instances of the engine to be used.

At first I thought multiple instances wasn't available because of accessing "acknex.DLL" simulataneously.You can create a C# app that runs the engine, and run the exe many and it will load seperate engine windows each time. The manual states the engine can be run many times even.

So i'm wondering which method could be used to load the engine multiple times, within the same exe? I'm in need of this for a MDI application, and i can't think of a way to get around it.

Or maybe you could explain to me why multiple instancing is not possible.

I know you said in an earlier post that functions like engine_frame() dont take an instance parameter, but if there was a way to return a structure or pointer from an engine_open call, then couldn't you use something like...

Engine_Ref ref_1 = EngFun.engine_open(null);
Engine_Ref ref_2 = EngFun.engine_open(null);

Then each engine could be referenced with ref_1 and ref_2. Don't know how possible this is, just a thought.

I know i'm asking a lot but i' see so much potential in this wrapper.

Thanks.

Last edited by DJBMASTER; 07/27/09 10:52.
Re: C# wrapper - RELEASE 1.1.0 [Re: DJBMASTER] #281448
07/27/09 11:25
07/27/09 11:25
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
hmmm now this is a good question, i have to admit that you will have to ask JCL regarding this topic.

I've read the "Starting the Engine" chapter in the manual. And it seems to me that starting the engine multiple times is possible but not from the same instance of an exe file. Engine_open() returns a pointer to a Engine_var struct, that's right, but there is no way (afaik) to tell the engine if a certain command like ent_create should be executed on Engine_ref1 or Engine_ref2.

What may be possible in your case is that your program creates one instance of the engine (like normal) and then it executes an exe file that also opens the engine (thus you would have two instances of your program). And then you could communicate between them with multiplayer commands (as stated in the manual). And thus it may be possible to embed the other instance into your main programm by passing the hwnd pointer - or something like 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 - RELEASE 1.1.0 [Re: Stromausfall] #281452
07/27/09 11:31
07/27/09 11:31
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
hmm, well thats pretty interesting. I was thinking about the workaround of opening an exe seperately and then embedding that window, but my main problem was how was i going to communicate between them.

I never thought of using multiplayer commands, its didnt really fall into that category, but now you mention it; it does seem like quite a good method.

I'm going off to experiment. I'll ask JCL regarding multiple instances...

Thanks.

Re: C# wrapper - RELEASE 1.1.0 [Re: Stromausfall] #281492
07/27/09 14:14
07/27/09 14:14
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...

EDIT::
Juist found in manual:


<<This variable must be set at the beginning of the main script before level loading.>>

SO:
I guess i will have to open engine with null, Init the vars and then load my level.
//
Will let you know.
Or you could try calling it (enable_polycollision) in the EngineInForm sample ( in IEnumerable MainFunction() ) to see the error.
So it seems now it is not an error in the wrapper.
//
ALL is good.




Last edited by pararealist; 07/27/09 14:36.

A8.3x Commercial, AcknexWrapper and VS 2010 Express
&#9675;pararealist now.
Re: C# wrapper - RELEASE 1.1.0 [Re: pararealist] #281494
07/27/09 14:21
07/27/09 14:21
Joined: Feb 2007
Posts: 353
A
amy Offline
Senior Member
amy  Offline
Senior Member
A

Joined: Feb 2007
Posts: 353
Couldn't you simply do all the var conversions in the properties (get/set)?

Does the scheduler handle my and you correctly? I took a quick glance at the code and didn't notice anything about my and you.

Did you write all the wrapper code manually or did you use some generator script or something for the repetitive parts?

Re: C# wrapper - RELEASE 1.1.0 [Re: pararealist] #281500
07/27/09 14:38
07/27/09 14:38
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
You dont need to cast them to (int) because it expects an int anyway. I've just tested "enable_polycollision" and i cant produce an error with it.

EDIT > posted this before i saw ur updated post. I didn't know that it had to be set before the level_load. Ok cool...

Last edited by DJBMASTER; 07/27/09 14:40.
Re: C# wrapper - RELEASE 1.1.0 [Re: DJBMASTER] #281505
07/27/09 14:57
07/27/09 14:57
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...
I know, but i like putting (int) there because it helps me to
see distinguish easilly between the type of variables
in my code. Mind you my code is coming from C++ project
so i left the casts in when i copied it.

Last edited by pararealist; 07/27/09 15:00.

A8.3x Commercial, AcknexWrapper and VS 2010 Express
&#9675;pararealist now.
Re: C# wrapper - RELEASE 1.1.0 [Re: DJBMASTER] #281506
07/27/09 14:58
07/27/09 14:58
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
@pararealist: ah didn't know that, cool ^^

@amy: in lite-c afaik my is always set to the entity that is scheduled at the moment. But in the wrapper my is not set automatically that means, that for things like IGNORE_ME or USE_BOX in a c_trace you have to set the EngVar me (same as my) to the entity that should be be "me".
The you variable isn't set by the scheduler afaik, but for example if an event like impact happens - that should work.

The var conversion could be set in the properties but then references(pointers) to variables would be impossible or would have to be updated each frame. I know it's not perfect to write .IntValue and .FloatValue, but else references aren't possible as easy as they are at the moment.

For the first version of the wrapper i wrote all by myself, for the next i let most EngFuns and all EngVars be generated by two small programms i wrote, but the problem is that there are many cases where this automatically created code has to be polished or doesn't mind all special cases - so it's only a small help, as many things have to be polished anyways after the creation smirk

Last edited by Stromausfall; 07/27/09 15:01. 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
Page 9 of 32 1 2 7 8 9 10 11 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