A university coursework to create an action rpg game, that just happens to look suspiciously like pokemon

I was asked to create a game using OpenGL and C++, or, XNA and C# with a team of 3 other people for a university assignment. Due to reasons I shall not go into 2 of those team mates dropped out of university before being able to start work. I then took a leading role in architecting the game engine with my colleague using C++ and OpenGL.

Basic Design & Implementation

Everything is encapsulated properly, and Object factories are used for various purposes such as creating enemies and other objects. An MCV architecture is used also.

In order to manage all the objects, a global object is used which will represent the game engine as a whole. This ‘engine object’ shall take care of the object events and the internals of making the engine tick. Since all game objects of note are inherited from CGameObject* without exception, and these are passed in as pointers, it would be fair to say that every pointer should be unique to minimize problems with mutliple additions of a single object. For this purpose a set container rather than a list or vector type container will be used to keep track of game objects.

Drawable objects on the other hand will need special treatment as a game object may not wish to be drawn to the screen. Thus IObjectRenderer pointers are also be tracked.

World Objects

class CVertex3f {
    GLfloat x;
    GLfloat y;
    GLfloat z;
    // various helper methods and operator overloads

All calculations are done based on world co-ordinates and then translated into screen co-ordinates as late as possible in order to be rendered.

World specific classes are used as bases for objects that occupy physical locations:


Leave a Reply
