This tutorial series is intended to help developers to create their own games using the
i6engine. The i6engine is an open-source game engine first developed at the
chair 6 (data management) at the FAU (Friedrich-Alexander University
Erlangen-Nuremberg) and later continued as a hobby project.
Following this tutorials, you will learn the basics to create your own game. We will
start with nothing but an empty text file and end up with a programm containing
many features you will probably need in your game. The programm will be very
minimalistic to make it easy for you to find errors and to increase the tutorial
speed. Of course, you are free to implement additional objects etc. during the
tutorial.
The tutorials of this basic series cover the following topics:
Now let’s take a look at the five functions implemented: Initialize(), AfterInitialize(), Tick(), ShutdownRequest() and Finalize(). These are the functions called by the engine on five different times, giving you the chance to execute your own code. Now follows a short description, when the functions are called. If you need detailed descriptions, please consult the API documentation.
These five functions should be enough for nearly every thing, you may want to do, but it is not very easy for some tasks. Therefor we have some more functions that are called on specific events. We’ll discuss them later. Furthermore, you can register for keyboard and mouse events as well as messages. How to do this is discussed later as well. We just want the smallest programm first. And we’re nearly done. What remains is a main function starting the engine. Here is an example for a small one 2.
Code Listing 2: First, we create an object of our application class MyApp. Then we tell the engine which subsystem should be started. You can specify your own subsystems using registerSubsystem(), but this is a really advanced feature. registerDefault() will be enough for most games. You have to pass a parameter indicating, whether you want to create a client or a server. Here we use false because we just want a client. This will register the default systems for Graphics, Object, Physics, Input, GUI, Audio and Scripting. Using true indicating a server, Graphics, GUI and Input wouldn’t be registered as they are normally not needed on servers. registerApplication() now registers our game in the engine. Now we can call start method on EngineController to run the engine and start our game.
In the next step we will add a GameObject to the scene so we can see something.