Monday, 19 April 2010

Borealis- Game Engine



Hi all,

It has been a long time since my last post, and I just thought I would fill you in on what I have been up to. I have been working on a lot of projects lately, but the one which has taken the majority of my time up has consistently been one for Interactive3D Graphics. I am making a game engine, which I have affectionately named "Borealis". That is also the reason for this post today, as I have made quite a lot of progress with this engine lately.

The game engine itself uses DirectX 9.0c for rendering and makes use of the Win32 API for the application side of this engine. Due to this it is compatible only with Windows OS installed computers with the DirectX 9.0c drivers or later.

There are a great many features of this engine which I have added in, and the first one that you may notice is that I have the ability to load meshes from file, which in itself is quite a simple task. The truth is that I am loading the mesh into a data structure of my own, the BMesh, which contains a DirectX mesh, but also has several other data members. The first is a shader, which is a small program that can be run on the graphics card. It also has a large number of textures and materials, which are stored in dynamic arrays. It has a position too.

The interesting part about the shader I previously mentioned is that I have made my own data container for that too, BEffect. In fact, quite a lot of the areas that my game engine uses DirectX functions from are covered in my own, so that I can make the engine multi-platform and more universal.

With the shaders, I have been able to make particle effects, phong shading for meshes, terrain lighting, and more. Some of the results I have been able to achieve are shown in the images displayed above. The first image (the red skull) is actually an error which I received from a badly programmed shader. The reason for it being so badly shaded is that I had incorrectly set the materials and normal vectors, so the entire lighting and shading of the object was incorrect for the Phong model. The reason I have included it here is because I thought it had a certain visual aesthetic to it, which made it interesting.

The particle effects that can be seen within the above images are entirely processed on the GPU (Graphical Processing Unit) instead of the CPU (Central Processing Unit), leavint the CPU to perform other tasks. This is the reason that the frame counter sticks at a constant 60 FPS throughout the imagery, even though thousands of particles are being processed.

There are many areas of this engine which I am not displaying in this post, as they are not yet entirely complete, however I hope this gives an insight into the development of a game engine. I will update with another post containing more feature demos soon. Expect to see bump mapping, environment mapping and much more next time. Thanks for reading,

Richard

4 comments: