Understanding the game program structure
A typical and simple game program usually has three phases – game initialization, game loop, and game end – and Unreal Engine handles these internally.
Unreal Engine offers a range of programming interfaces, including base classes, APIs, and systems, empowering developers to create highly immersive and interactive games. Leveraging these interfaces, developers write C++ code that integrates their custom functionality into the game.
The following flowchart illustrates the fundamental game flow and should give you an idea about writing game code for functional modules:
Figure 4.4 – Game program structure
Let’s take a look at some of these ideas:
- Game initialization happens when a game program starts. All the initialization tasks, such as setting the display mode, loading required contents, spawning game objects, and so on, are done during this phase.
- Game loop is the main...