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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 972 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Aum41 [Re: George] #33784
09/24/04 03:48
09/24/04 03:48

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Hi, I like your magazine.

@All for those who have Pro: If you had looked at "DLL Version Of The Engine" under "Hot Features" in AUM 41, if you're going to try out the DLL using .net, then you will need to be aware that the Acknex.dll doesn't have a support for COM on which you can add the dll as a reference in Visual Studio .net. So in that case, you will need to write a wrapper class like so:

Code:
using System;

using System.Runtime;
using System.Runtime.InteropServices;

namespace ManagedAcknex
{

/// <summary>
/// This is the main Acknex class for 3D GameStudio.
/// </summary>
/// <example>
/// // C#
/// using System;
/// using ManagedAcknex;
///
/// class MyClass
/// {
/// // Main entry point for your program.
/// static void Main()
/// {
/// Acknex A6 = new Acknex("MyLevel.wmb", false);
/// while(Wait(0));
/// Exit();
/// }
/// }
/// </example>
class Acknex
{

/// <summary>
/// The engine will be opened automatically. If not, then a
/// user/programmer can open the engine manually by calling
/// startTheEngine();
/// </summary>
/// <param name="bOpen">
/// If set to true, the engine will start with null.
/// If set to false, the engine won't start.
/// </param>
/// <see>startTheEngine();</see>
public Acknex ( bool bOpen )
{

if ( true ) startTheEngine ( null, false );

}

/// <summary>
/// The engine will be opened automatically by a given
/// file name. If not, then a user/programmer can open
/// the engine manually by calling startTheEngine();
/// </summary>
/// <param name="strArgs">
/// If a file name is given in (), then the engine will
/// open the level that you've provided. If not, then
/// the engine will open with no level loaded, so a
/// user must open the level with level_load() (although
/// this is not implemented).
/// </param>
public Acknex ( string strArgs )
{

if ( strArgs != String.Empty )
engine_load ( strArgs );
else
engine_load ( null );

}

/// <summary>
/// The engine will be opened automatically by a given
/// file name. If not, then a user/programmer can open
/// the engine manually by calling startTheEngine();
/// Also, a user can specify if a game will wait depending
/// on if a game uses double- or triplebuffering.
/// </summary>
/// <param name="strArgs">
/// If a file name is given in (), then the engine will
/// open the level that you've provided. If not, then
/// the engine will open with no level loaded, so a
/// user must open the level with level_load() (although
/// this is not implemented).
/// </param>
/// <param name="bTripleBuffer">
/// If a game uses triplebuffer, then set the parameter to true.
/// This will execute Wait() per frame 3 times. Otherwise, set
/// it to false if triplebuffering is not set to on.
/// </param>
public Acknex ( string strArgs, bool bTripleBuffer )
{

if ( strArgs != String.Empty )
engine_load ( strArgs );
else
engine_load ( null );
if ( bTripleBuffer )
{

for ( int i = 0; i < 3; i++ )
engine_frame ( );

}
else
{

for ( int i = 0; i < 2; i++ )
engine_frame ( );

}

}

[DllImport ( "acknex.dll" )]
private static extern Boolean engine_load ( string args );

[DllImport ( "acknex.dll" )]
private static extern Boolean engine_frame ( );

[DllImport ( "acknex.dll" )]
private static extern Boolean engine_close ( );

/// <summary>
/// The engine will be opened automatically by a given
/// file name. See the load parameter for more information.
/// Also, a user can specify if a game will wait depending
/// on if a game uses double- or triplebuffering.
/// </summary>
/// <param name="load">
/// If a file name is given in (), then the engine will
/// open the level that you've provided. If not, then
/// the engine will open with no level loaded, so a
/// user must open the level with level_load() (although
/// this is not implemented).
/// </param>
/// <param name="bTripleBuffer">
/// If a game uses triplebuffer, then set the parameter to true.
/// This will execute Wait() per frame 3 times. Otherwise, set
/// it to false if triplebuffering is not set to on.
/// </param>
public void startTheEngine ( string load, bool bTripleBuffer )
{

try // Try to load the level.
{

engine_load ( load );

}
catch // Handle the exception if a programmer didn't enter
// the name of the level.
{

engine_load ( null );

}
if ( bTripleBuffer )
{

for ( int i = 0; i < 3; i++ )
engine_frame ( );

}
else
{

for ( int i = 0; i < 2; i++ )
engine_frame ( );

}

}

/// <summary>
/// Specify how many frames to wait.
/// </summary>
/// <param name="wait">
/// Specify how many frames to wait.
/// </param>
public void Wait ( int wait )
{

if ( wait > 0 )
for ( int i = 0; i < wait; i++ )
engine_frame ( );
else engine_frame ( );

}

/// <summary>
/// This will de-initializes DirectX and
/// closes down the engine.
/// </summary>
public void Exit ( )
{

engine_close ( );

}

}

}



Then when you compile this code as a DLL called ManagedAcknex.dll, you can be able to write your own code in either C#/VB.net/C++.net or any other .net-supported languages and run the engine. Note that this is just a small wrapper and doesn't have a level_load or anything in the DLL and I don't know what data types the functions, variables, pre-defined variables, etc. have inside the DLL. I was just assuming that the three functions, engine_load(), engine_frame(), and engine_close() uses a BOOL data type, which is equavilant to Boolean in C#.

I know I'm getting off-topic but I just want to let every Pro users (for those who looked at "Hot Features" in AUM 41) know before they get into programming with their own .net languages with the Acknex.dll.

Re: Aum41 #33785
09/26/04 04:18
09/26/04 04:18
Joined: Sep 2003
Posts: 1,037
Budapest, Hungary
DEX Offline
Serious User
DEX  Offline
Serious User

Joined: Sep 2003
Posts: 1,037
Budapest, Hungary
Please George, try to find some time and make article about second level loading, making cutscenes between (cutscene is in different file), and puting all together. There are so litle informations or tutorials around here about that issue.
I dont mean simple loadLevel(), I mean what we should take care of, what kind of script should have a callen file, does he have a main() function also, do we have to create separate view for each level.
As I now understend 3dgs It's the best that first level should have the main script and second, third, etc. level should have attached script with only specific actions and functions that are not present in first level file.

Do we need to include script from all levels in our first level at the begining of the game. Uf there are so many questions.

I will be more than happy if you could explain that to me if you have little time. Or if you now some tutorial around...
Many thanks

Re: Aum41 [Re: DEX] #33786
09/28/04 00:28
09/28/04 00:28
Joined: Sep 2003
Posts: 1,037
Budapest, Hungary
DEX Offline
Serious User
DEX  Offline
Serious User

Joined: Sep 2003
Posts: 1,037
Budapest, Hungary
Hi George I just found your level changing code in some earlier AUM and all my problems disapierd ;-)
It is unbelivable that one row of code can turn your life into nightmare:
me=null;

That's right I needed that 7 letters command and everything start to work just as I want to.
How can it be that such important thing is not stated in a manual with double BOLD letters, and without it you a helpless with changing your levels, especially if you have multiple cameras in it, they simply refuse to obey commands if you dont use me=null, hmmm....

Now I see how we need a good manual, and how good the engine is. You can make whatever you can imagine only if you can find how operate some part, and how to put stuff and where.

And George I think that it is about time for you to sit down and write a 3DGameStudio Bible book and make our lives better.

We can live for few months without AUM, and we will help you contributing all you need, just make that book and explain to us every single detail of the engine, how work this, how work that, where to put that code, where to put this code. etc.

I'll try to make a pol in the forum right now just to show you that you will get 100% support from all of us.

Thanks again

Re: Aum41 [Re: DEX] #33787
06/30/05 06:27
06/30/05 06:27
Joined: Jan 2003
Posts: 1,142
California
Daedelus Offline
Senior Developer
Daedelus  Offline
Senior Developer

Joined: Jan 2003
Posts: 1,142
California
George, what does it mean when the explosion code in this issue produces the following error:
"ERROR 1340- Not enough entities reserved (300)"

Thanks


Formula Games - A place to buy and sell Indie games.
Re: Aum41 [Re: Daedelus] #33788
06/30/05 07:16
06/30/05 07:16
Joined: Sep 2004
Posts: 1,214
Austin, Texas
Josh_Arldt Offline
Senior Developer
Josh_Arldt  Offline
Senior Developer

Joined: Sep 2004
Posts: 1,214
Austin, Texas
it means you are creating more entities than you have the nexus set for...
I suggest either cutting back on the number of enetities created or remove them more quickly... that way people don't have to have a lot of RAM to play your game...

The nexus is the minumum amount of required RAM that is needed to run the game.
I suggest setting it to 255 so that a more variatey of computers can run your game.

Re: Aum41 [Re: Josh_Arldt] #33789
06/30/05 07:26
06/30/05 07:26
Joined: Jan 2003
Posts: 1,142
California
Daedelus Offline
Senior Developer
Daedelus  Offline
Senior Developer

Joined: Jan 2003
Posts: 1,142
California
Thanks, Josh.
I put about 7 more of those exploding barrels in the regular office level just for testing.
It was pretty much gib-city so that makes sense.


Formula Games - A place to buy and sell Indie games.
Re: Aum41 [Re: Daedelus] #33790
06/30/05 07:29
06/30/05 07:29
Joined: Sep 2004
Posts: 1,214
Austin, Texas
Josh_Arldt Offline
Senior Developer
Josh_Arldt  Offline
Senior Developer

Joined: Sep 2004
Posts: 1,214
Austin, Texas
Quote:

Thanks, Josh.
I put about 7 more of those exploding barrels in the regular office level just for testing.
It was pretty much gib-city so that makes sense.




No problem.
Sounds pretty cool. lol

Re: Aum41 [Re: Josh_Arldt] #33791
06/30/05 10:19
06/30/05 10:19
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline OP

Expert
George  Offline OP

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
Josh suggested the proper thing to do. Simply increase your nexus to 50 or 100.

Page 2 of 2 1 2

Moderated by  adoado, checkbutton, mk_1, Perro 

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