Tuesday 1 May 2012

Madnight Engine - Primitive Shapes

An engine, something every game needs to function correctly. Some companies like to outsource their engine and some companies will create an in-house engine. We are the sort of people that like to get things done ourselves and that is why we are developing the Madnight Engine, or MNE for short.

The MNE is completely written from scratch using the C/C++ programming language. With the MNE we are aiming to create a flexible engine that will work across multiple platforms for multiple types of game. We want to be able to use MNE whether we are making a 2D game, a 2.5D game or a 3D game.

Eventually, we want the MNE to be able to use multiple rendering devices, starting with OpenGL and eventually moving on to DX9/10/11. We are using OpenGL as our main rendering device as this gives us the most flexibility when it comes to porting the MNE to different platforms and/or different operating systems.

Without going into all the nitty gritty stuff we are now at the stage where the engine can draw primitive shapes to the OpenGL rendering device, process input from the operating system and plug into in another project, such as a game, easily. This will come in handy for making technical demos and getting started on the actual games that will be using the MNE.

The Madnight Engine is capable of drawing primitive shapes (Triangle, Square, Rectangle)
Once we knew that we could get the engine to draw primitive shapes, we then proceeded to add a simple "look at" camera, enabling us to see the shapes from any point of view that we required. However, for us to actually get this working as intended, we needed to start creating 3D shapes so that we knew the camera was doing what it should be doing.

This was our next step, and within a couple of hours we were now able to create 3D versions of the primitive shapes with ease.

After a little bit of work, we were able to turn our 2D primitives into 3D shapes
Now able to properly test our camera, we added in camera movement using either the keyboard or mouse whilst the program was running. However we weren't satisified with that, as we had to choose between using 2D and 3D shapes before the program was compiled. The last thing we did was to add a toggle into the engine so that, at the touch of a button, we could switch between drawing simple 2D shapes or 3D versions of these shapes.

That is all that we can bring you for now, but hopefully it gets you interested in what the MNE has to offer for our games. We will update our blog once we have some more solid progress in development.

No comments:

Post a Comment