3D Game Builder SDK

SDK Functions

gameLoop( void )

Description

This is the entry (starting) point for the game. You must create this function in your project so that 3D Game Builder can call and run your game code.

Specification

int gameLoop( void )

return value

= 0 for success, 1 for fail

Notes

3D Game Builder will give the message "cannot find gameLoop" if it fails to find this function when it opens your game DLL.

For Example

#include "3dgamebuilder.h"

// exported game function
DLL_EXPORT int gameLoop(void)
{
	// game loop
	while(1)
	{
		// read the controller
		gamePadRead();

		// start drawing
		gameStartRender();

		// show a message
		gameMessage( "hello world" );

		// end of drawing
		gameEndRender();
	}

	return 0;
}

See Also

(no related functions)

Go Back

SDK Functions