Home / Minor / Core Engine / Designing the core engine

Designing the core engine

Posted on

Setting the conditions of satisfaction

As stated in the introduction, the core engine should be fully modular. This means that it should only contain a few bare-bone components and leave the rest up to separate plugins/libraries to implement. To do this some sort of API is required, which should preferably be cross platform, but for now can be windows only. Aside from this, the engine should be easy to work with, and not require too much effort to get up and running. Any game that is build with the engine should also be able to define it’s own modules to the API, which means the engine either needs to be delivered uncompiled, or allow for the game to load it’s modules before beginning the main loop.

To quickly recap, the conditions of satisfaction for the engine are:

  • Barebone engine.
  • Support 3rd party modules.
  • Easy to work with.
  • Supply easy API for game developers.
  • Games can also easily add functionality.

Defining the components

As previously defined, the engine should not contain that what it does not need to do that what it needs to do. 🙂 But what does the engine actually need to do?! In my opinion an engine should not do more than provide an API for a game to work with, run a main loop that other modules can hook into and provide some basic things such as Transforms and a GameObject.

This should allow the engine to be usable for many different situations, with many different plugins/libraries to add extra functionality such as rendering, networking capabilities, physics and more of such. But yet keep the engine itself clean and small.

The public API

For the public API a Lua interface will be supplied, although a C# interface might also be an interesting option. However, the C# option would require far too much time to currently implement and is therefore not a valid option for my minor. This leaves the Lua interface as only way for the developer to create games, and as that does not sound very feasable to me, the engine shall be a simple DLL that allows developers to write their own executable using the core engine.

Of course once more, it is very important that the supplied lua engine allows for easy expansion of available libraries and functions.

Allowing external modules

This will perhaps be the most annoying/difficult part in the core engine to create, as it needs to be able to support a very wide variety of external systems, of which the aformentioned rendering physics and networking capabilities are just a small part… So the API for this needs to allow for this, but yet remain simple and small, but most importantly easy to use…