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.