Game engine

On this page 7

A game engine is a reusable software framework that provides the core runtime systems a video game needs, such as rendering, physics, audio, input, animation and scripting, together with the editor tools used to assemble content. In gaming, the engine separates the general-purpose technology that every project needs from the game-specific content and rules that make each title unique.

Within the topic of game engines, the term covers both commercial products such as Unreal Engine and Unity, open-source projects such as Godot, and proprietary in-house engines built by large studios. What unites them is the same architecture: a main loop that reads input, updates the simulation and draws a frame many times per second.

How a game engine runs a game

Every game engine is built around the game loop, a cycle that repeats for each frame. The loop polls input devices, advances game logic and physics by a time step, updates animation and audio, and then submits draw calls to the GPU. At 60 frames per second the whole cycle must finish in about 16.7 milliseconds; at 120 frames per second the budget shrinks to about 8.3 milliseconds.

Most engines run physics on a fixed time step, for example 50 or 60 updates per second, while rendering runs at a variable frame rate. Decoupling the two keeps the simulation deterministic and stable even when the frame rate drops, and the renderer interpolates between physics states to keep motion smooth.

Around the loop, the engine organizes the game world in a scene graph or entity model. Classic engines attach components to objects in a hierarchy, while newer designs use an entity component system (ECS), which stores component data in contiguous arrays so the CPU cache is used efficiently when thousands of objects are processed.

The following table lists the main subsystems found in a typical engine and the work each one performs.

SubsystemMain responsibilityTypical technology
RendererDraws meshes, lights, shadows and post-processingDirectX 12, Vulkan, Metal
Physics engineCollision detection and rigid body dynamicsIntegrated or third-party solver
Audio systemMixing, 3D positioning and streaming of soundMiddleware or built-in mixer
Animation systemSkeletal blending, state machines and inverse kinematicsBlend trees, animation graphs
Scripting layerGame rules written by designers and programmersC#, C++, visual scripting
Asset pipelineImports and converts models, textures and soundsCooking and compression tools
Core subsystems of a game engine

The editor and the asset pipeline

A modern game engine is as much a content creation environment as a runtime. The editor lets level designers place objects, artists tune materials and designers wire up behavior, often with live preview inside the same viewport the player will see. This integration is a large part of why studios adopt an engine rather than writing their own technology.

Raw assets from tools such as 3D modeling packages are not loaded directly. The asset pipeline imports them, generates mipmaps and level-of-detail meshes, compresses textures into GPU formats and packages everything for each target platform. This step, often called cooking, can take minutes for a small project and many hours for a large open world.

Shaders follow a similar path. A material authored in a node editor is translated into shader code, compiled for every graphics API and permutation, and cached. Shader compilation is a frequent source of long build times and of brief stutter when a shader is compiled at runtime instead of in advance.

Types of game engines and how they compare

Game engines differ mainly in licensing, source access, target platforms and scope. The comparison below describes the main categories rather than ranking individual products.

Engine categorySource accessTypical usersMain trade-off
Commercial general-purposePartial or full, under licenseIndie to large studiosBroad features but royalties or fees
Open-source general-purposeFull, permissive licenseIndie teams, educationNo fees but smaller ecosystem
Proprietary in-houseInternal onlyLarge studiosTailored tools but high upkeep cost
Specialized 2D or genre engineVariesSmall teams, hobbyistsFast for one genre, limited elsewhere
Framework or libraryUsually fullProgrammersMaximum control but no editor
Main categories of game engines

A framework such as a graphics or multimedia library is not a full engine: it supplies building blocks but leaves the loop, tools and content workflow to the programmer. The line is blurry, yet the presence of an integrated editor and asset pipeline is the usual dividing feature.

Neighboring terms describe parts of an engine rather than alternatives to it. A shader is a GPU program that the renderer runs, and a physics engine is one subsystem that may be built in or licensed separately. Unreal Engine, Unity and Godot are specific engines, each with its own scripting language, rendering features and license model.

Choosing a game engine for a project

Engine choice is a long-term commitment, because code, assets and team skills accumulate around it. Switching engines mid-project usually means rebuilding most systems, so the decision should rest on the requirements of the whole production rather than on a single impressive feature.

Project needSuitable choiceReason
High-end 3D visualsCommercial engine with advanced rendererMature lighting and streaming tools
Small 2D gameLightweight open-source or 2D engineFast iteration and small builds
Broad mobile reachEngine with strong mobile exportTested device support and size control
Unusual simulationCustom engine or frameworkFull control over data and algorithms
Long-lived franchiseIn-house or source-licensed engineIndependence from vendor decisions
Engine selection by project need

Teams should also weigh license terms, including revenue royalties, per-seat fees and runtime fees, as well as the availability of experienced developers for hiring. A practical approach is to build a vertical slice, a short playable section at final quality, before committing to the full production.

Limitations and common pitfalls

A general-purpose engine is optimized for common cases, and projects that depart from them pay a cost. Large numbers of physics objects, unusual camera models or massive multiplayer worlds can expose architectural limits that require engine modification or workarounds.

SymptomLikely causeTypical remedy
Stutter on first effectsRuntime shader compilationPrecompile or cache shader permutations
Low frame rate with many objectsToo many draw calls or scripts per frameBatching, instancing, data-oriented code
Long build timesLarge asset cooking and shader setsIncremental builds and fewer permutations
Breakage after upgradeEngine API or format changesLock engine version per milestone
Large download sizeUncompressed or unused assetsAsset audits and platform compression
Frequent engine-related problems
  • Upgrading the engine late in production often introduces regressions; most teams freeze the version before content lock.
  • Relying on default settings for lighting and post-processing can make games look generic and run slower than necessary.
  • Vendor dependence means pricing or license changes affect the studio directly, which is a strategic risk.

Stripped to the essentials

A game engine is like a fully equipped film studio for making games. Instead of building cameras, lights and sound stages from scratch, a team moves into a studio where all of that already exists and focuses on telling its own story.

The engine handles the hard technical work that almost every game needs: drawing pictures on screen, making objects fall and collide, playing sounds and reacting to the controller. The developers add the characters, levels and rules. The engine is the shared foundation, and the game is what is built on top of it.

Where it is applied

A studio of twelve people plans a third-person adventure game for PC and consoles with an 18-month schedule. Writing its own renderer, physics and tools would consume most of that time, so the team adopts a commercial general-purpose engine with a visual material editor and built-in console export.

In the first three months the team builds a vertical slice: one level at final quality running at 60 frames per second on the weakest target console. Profiling in the engine reveals stutter from runtime shader compilation, which the team fixes by precompiling shaders during the loading screen.

The team freezes the engine version after the slice and ships on schedule. Most of its effort went into levels, characters and gameplay rather than core technology, which is the main reason studios of this size rely on an existing game engine.