Skip to the content ForoHackers
Log inJoin

Game engines: start here

Game engines
#477 · Ophuscado · · Report

A game engine is the reusable software under a game: it draws, plays sound, reads input, simulates physics, loads assets and runs scripts, so a team builds the game and not the machinery. Engines range from small libraries to full editors. Studying one teaches how a large real-time program is organised.

Key concepts

  • Main loop and subsystems: rendering, audio, physics, input and scripting, each updated in a defined order.
  • Scene representation: a tree or a set of entities and components describing everything in the world.
  • Asset management: loading, streaming, caching and releasing models, textures and sounds without stalls.
  • Scripting layer: gameplay written in a higher-level language or visual graphs on top of the native core.
  • Editor and tools: where designers place objects and tune values without recompiling.

Vocabulary

  • Scene graph: a hierarchy where children move with their parents.
  • Component: a data-and-behaviour part attached to an entity, such as a mesh or a collider.
  • Draw call: one request to the GPU to draw a batch; too many slow a frame.
  • Hot reload: changing code or assets while the game runs.

What to study, in order

  1. Use an existing open engine to make a small game, and read how its project is laid out.
  2. Write a minimal engine core yourself: window, loop, input, and sprite or mesh drawing.
  3. Add a scene structure, a resource manager and a simple scripting hook.
  4. Profile a frame: find what takes the time on the CPU and the GPU.
  5. Read the source of an open engine's renderer or physics module, and trace one frame through it.

Related tags

#game-development #rendering #gpu #design-patterns

Log in or join to reply.