Reading — step 1 of 5
Read
~1 min readGame Loop
What Game Engines Solve
A game engine is the runtime that powers a game:
- Rendering: draw graphics on screen.
- Input: keyboard, mouse, gamepad.
- Audio: sound effects, music.
- Physics: collision, gravity.
- AI: NPC behavior.
- Scripting: gameplay logic.
- Asset loading: textures, models, sounds.
- Network: multiplayer.
Real engines:
- Unity: C#, cross-platform, dominant in indie + mobile.
- Unreal: C++/Blueprints, AAA + Fortnite.
- Godot: free, GDScript or C#, lightweight.
- GameMaker: 2D-focused.
- Bevy: Rust, ECS-based.
- MonoGame (XNA reborn): C#, lower level.
Smaller / specialty:
- Pico-8: fantasy console.
- Construct: visual scripting.
- RPG Maker: turn-based RPG.
We'll build a toy engine: game loop + ECS + simple rendering. By the end you understand the runtime architecture of every modern engine.
Reference: Bevy source, Game Engine Architecture (Gregory).
The Heart: The Game Loop.
loop:
handle_input()
update(dt) # AI, physics, gameplay
render()
That's the simplest possible game. Real engines layer features on top.
We'll start with the loop, then add:
- Time management (fixed vs variable timestep).
- Entity-Component System (ECS): the modern way to organize game state.
- Asset management.
- Rendering pipeline.
Modern games: 60-144 FPS, dozens of subsystems running in parallel, gigabytes of assets streamed in real-time. The engine is the substrate.
Discussion
Ask a question, share an insight, or help someone who’s stuck.
Sign in to post a comment or reply.
Loading…