Games Engines
Starting developing a video game from scratch is a bad idea. Most video games share the same base that can be reused.
A game engine will deal with a lot of things related to the hardware (sound, io, graphics) and let us focus on our game (quests, inventory, levels).
Picking a game engine is usually a choice based on:
- The targeted platforms for our game π§
- The knowledge of the team π
- The features of the game engine π
- The price and/or the license constraints β¨
- The community, support, and documentation π
Some developers are building frameworks and tools on top of game engines called game templates. For example, MoreMountains.
Source: envato-tuts+ / Game Development
Basic Elements
Lifecycle and game loop
Most game engines have a similar lifecycle.
- It initializes the game elements
- It repeatedly calls the game loop
- We fetch the user input
- We update the game accordingly (update)
- We update the screen (render)
- We dispose of the game elements
Frames Per Second (FPS)
The Frames Per Second (FPS) represents the number of times the game loop is executed per second.
Unfortunately, the graphic card may not call the game loop with a constant time (e.g., not every 1ms). This may be because the update was slower, the render was slower, or they were too fast π.
The side effect is that moving objects may not move smoothly. To fix this behavior, we use the delta time (=time since when the last update) every time we are moving something. βοΈ
π» To-do π»
Stuff that I found, but never read/used yet.