What's a Game engine?

Game engine

I found this picture a while back on envato-tuts+ / Game Development. This is quite easy to understand that a game engine will deal for you about a lot of things related to the tech/hardware (sound, io, graphics) and let you focus on your game (quests, inventory, levels, ...).

Picking a game engine is usually a choice based on

  • The supported platforms for the released game 🧐
  • If the team know about this game engine 😎
  • If this game engine is proving most of the features you want 🚀
  • If the price, and/or the license is matching your needs ✨
  • If it is documented, easy to learn, and you got great support ✨

Lifecycle and game loop

Usually, in any game, you got the following lifecycle (structure/cycle de vie). First, the game is initialized, then the core of the game is run, called game loop

  • input: check what button/keys were pressed
  • update: update the game, according to the state and the input
  • render: redraw the screen

And when the user closes the game, we are disposing of everything.

In a lot of libraries and even inside game engines, you can find references to this with methods called render or update.

Input and FPS

The value called Frames Per Second (FPS, images par second) is the number of times in one second the game loop is looping. Unfortunately, the graphic card may not call the game loop with a constant time (ig: 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 you may see something teleport, or not moving smoothly. To prevent that from happening, you need to use the delta time (=time since when the last call) every time you are moving (or rotating/...) something.

TL;DR: check for something called the "delta time" when you are updating the values of something, to make sure that you are moving something at a constant speed, etc.

User Interface (UI)

The UserInterface (UI) is representing everything that we are showing to the user, such as a health/stamina/mana bar, a minimap, shortcuts for skills, an in-game chat, a settings icon, dialogs, looting messages, etc.

The three majors aspects when dealing with UI are

  • Usability (easy to learn, easy to remember actions, easy to use)
  • Aesthetics (esthétique, match the style of your game, immersive, look good)
  • Entertaining (Microinteractions, feedback)

When there isn't much interface (ex: Skyrim), we are talking about diegetic interfaces, by opposition with Non-diegetic interfaces (ex: WOW).