Game Engine Architecture
The machinery under every engine: the game loop and timestep, ECS and data-oriented layout, job systems, allocators and asset cooking. Senior interviews open here whichever engine you shipped on.
on this pageshowhide
explore
- Game Loop and Timestep6 questions
- ECS and Data-Oriented Design5 questions
- Scene and World Organization6 questions
- Memory Management Strategies6 questions
- Asset Pipeline and Streaming6 questions
- Multithreading and Job Systems5 questions
- Gameplay Foundation Systems6 questions
- Profiling and Frame Budgets6 questions
questions
page 2 of 2In an engine's job system, why does a job that must wait on other jobs mid-run push teams toward fibers, and what do fibers cost?
basics
~20 sA job that waits on other jobs blocks its worker, idling a core or deadlocking the pool. Fibers park the waiting job's stack so the worker runs other jobs and any worker resumes it later, costing a stack per fiber and thread-local pitfalls.
How do archetype storage and sparse-set storage differ in an ECS, and which suits a status that is added and removed every few frames?
basics
~20 sArchetype storage keeps entities with identical component sets in shared tables: dense multi-component iteration, but adding a component copies the whole entity. Sparse sets store each type separately: constant-time add and remove, indirect joins. A frequently toggled status suits sparse sets.
After a long hitch, a fixed-step game loop falls further behind every frame and never recovers; what is this spiral of death and how do you prevent it?
basics
~20 sThe spiral of death is a fixed-step loop whose catch-up steps cost more real time than they simulate, so each frame owes more steps. Clamping frame time, capping steps per frame and cheap steps prevent it.
Designer scripts run a per-entity update that calls into the engine thousands of times a frame and blows the budget; what does each scripting boundary crossing cost, and how do you fix it?
basics
~20 sEach crossing between script and engine pays for lookup, argument conversion, type and handle checks and often a temporary allocation. Fix it by crossing less: event-driven scripts, batched coarse-grained calls, cached lookups and hot loops moved into native code.
After a patch, players' save games fail to load or load with wrong values; how do you design an engine's saves so old files survive patches?
basics
~20 sSave games survive patches when they store tagged fields per object, a version per type, and stable persistent IDs instead of pointers, then run chained upgrade steps on load and test every shipped version's saves automatically.
A console game hitches mid-match on general-purpose heap allocations and runs out of memory after several level loads, though each level fits alone; how do you diagnose and fix it?
basics
~20 sTreat both as lifetime bugs: track allocations per frame and move mid-match ones into pools, frame allocators or load-time reservations; snapshot memory at one quiet point after each level load, then give level data an arena freed at once.
For gameplay queries such as all enemies within a radius in a large world, when do you choose a uniform grid, a quadtree or a loose octree?
basics
~20 sA uniform grid or spatial hash with cells sized to the usual query radius suits many moving objects spread fairly evenly; a quadtree adapts to very uneven density; a loose octree handles moving objects of very different sizes in full 3D without straddling.
In an open world that streams cells around the player, why do cells near a border load and unload repeatedly, and how do you design streaming decisions to stop it?
basics
~20 sA single distance threshold flips a cell's state every time the player crosses it. Use hysteresis — load inside a smaller radius, unload only beyond a larger one — plus velocity-based prediction, a minimum residency time and a per-frame activation budget.
A full content cook takes hours and blocks artists; what incremental-build and derived-data-cache strategy would you set for the team?
basics
~20 sTreat each conversion as a deterministic function, key its output by a hash of source, settings, platform, converter version and dependencies, and share that cache, kept warm by a farm that cooks every submit, so incremental cooks fetch instead of recompute.
When should a team adopt an ECS in an existing game built on inheritance-based objects, and how would you migrate it incrementally?
basics
~20 sAdopt an ECS where profiling shows hot loops over many similar objects stalling on memory. In a shipped game, start with one hot subsystem as an ECS island, bridged to the object model by ids, and expand only on measured wins.
How would you choose the fixed tick rate for a dedicated game server, and what does raising it cost the server, the network and the players' clients?
basics
~20 sChoose the lowest fixed tick rate that the game's pace and precision need, measured against per-tick cost at peak load. Raising it multiplies server CPU and often bandwidth, shrinks the time each tick may take, and changes tuning that clients share.
As the lead on a game shipping to several consoles, PC and dedicated servers, how do you set and enforce memory budgets per platform and per subsystem?
basics
~20 sBudget from each platform's retail memory, split by category with named owners and a held-back reserve, and make it measurable: tag every allocation, record per-level peaks in automated runs, fail builds that exceed. Dedicated servers budget per match process.
As a performance lead, how would you set and enforce frame and tick budgets across several target platforms and a dedicated game server?
basics
~20 sDerive each platform's budget from its target rate, keep headroom, split it into per-system millisecond lines with owners, validate worst-case scenes on reference hardware, and enforce with automated runs that flag regressions above noise. Set the server's tick budget at peak load.
What is a load-in-place asset layout, and how are its internal pointers fixed up after the file is read into memory?
basics
~20 sA load-in-place asset is cooked as a byte image of its runtime structures, so loading is one read into one allocation; internal pointers are stored as offsets and either patched to addresses through a fix-up table or kept as self-relative offsets.
As engine lead, how do you decide whether designers get an embedded scripting language, which kind of language, or data-driven tools instead?
basics
~20 sDecide by who writes gameplay logic and how fast they must iterate, then weigh run-time cost, platform limits on generated code, debugging tools, binding upkeep and sandboxing. Scripting earns its cost when designers own logic; otherwise tuning data may suffice.
For a new open-world game, how would you choose between automatic grid-based world streaming and hand-authored streaming sublevels, and which rules would you set for the team?
basics
~20 sNeither wins outright: a grid scales to large seamless worlds and lets many people edit at once, while authored sublevels group content by gameplay. Most large games mix both and set cell sizes, memory budgets, a top traversal speed and cross-cell reference rules.
showing 31–46 of 46