My New Cross-platform Game Engine

Engine Demo Screenshot
A little test application showing some features of the engine

I’ve been writing a cross-platform game engine in C++ recently. The ultimate aim is to create a game engine, so it’s easy to create games without having to worry about coding any image, text, music, event handling or window creation support. I’m using the SDL library, which makes writing this really easy. Right now, the engine supports sprites, images, music, text and keyboard and mouse control. I am still working on adding collision detection and image rotation, and then I will able to start making the actual game.

The game I intend to make, called “Eclipse” will be a remake of an asteroids game I made for a school IPT project, which we were forced to write in Visual Basic (ugh..).

To make a new game with the engine, you just need to make a new project (and add the SDL dependencies), add the engine source files, and then make a file with a few functions that the engine will call on, like GameInitiliase, GameStart, GameEnd etc. In the initialisation function, you make a new instance of the game engine like this:

GameEngine* _pEclipse;

bool GameInitialise()
{
	_pEclipse = new GameEngine("Eclipse", 800, 600, 32);

	if(_pEclipse == NULL)
		return false;

	_pEclipse->SetFrameRate(30);

	return true;
}

Then you can add sprites, images, music, sounds and text in a similar fashion.

As you can see, the engine currently has a fixed frame rate. I’m not sure if I should make it dynamic, but I better decide before I start the game, as changing it would break all the velocity values at the moment.

One Response to “My New Cross-platform Game Engine”

  1. Daniel says:

    You are one heck of a cool geek!

    See you at church tomorrow.

    D

Leave a Reply