Ameen AltajerAI & Search Engineering

Precious Engine/05 of 9

Engine's Hierarchy

An object-oriented tree with a single Entity base class at the root.

I spent most of my time developing games with the Simple DirectMedia Layer (SDL), so when I wanted to make the engine I wanted to make sure that I followed most of the good conventions I really liked from there.

I constructed the engine to be highly object oriented, so most of the time you will see classes being inherited into new classes. My idea was to make a base class named Entity to be the father of all classes that are going to be shown on screen. So the base class holds the most important details of anything that is going to be rendered: position and dimensions, for example. Being a base class for everything in your game makes it easy to apply the same operations, like update or render, to different entities.

Most modules have abstract functions, forcing you the programmer to implement those in your derived classes.

You will probably say: these are few. But when you implement them you'll be amazed at how much you can accomplish with them.