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