Software Engineering
Maths, physics, engines, graphics and AI for building the client side of games.
A path through the technical core of client-side game development: game maths, rigid-body physics and collision, engines and languages, the graphics pipeline and lighting, game AI and modern physically-based and ray-traced rendering. It suits programmers who want to understand what their engine is doing, not only use it. Each subject links official documentation or a well-known free reference.
The subjects follow the roadmap.sh Game Developer roadmap.
The game running on the player's device: the main loop, input, rendering, audio, UI and simulation all have to fit in a 16 ms (or 33 ms) frame budget. This path covers the maths, physics, engines, graphics and AI behind that client; networking and servers live in the server-side roadmap.
Positions, directions, rotations and cameras are all linear algebra. You need to be fluent with vectors, matrices and transformations to move objects, aim cameras and write shaders without guesswork.
The maths of vectors, matrices and linear maps. In games it powers transforms, lighting, physics and camera maths; learn it geometrically, not only as symbol manipulation.
A quantity with direction and magnitude, used for positions, velocities and normals. Dot products give angles and projections; cross products give perpendiculars and winding; normalise before comparing directions.
A grid of numbers encoding a transformation. Games use 4×4 matrices for model, view and projection; multiplication order matters and row- vs column-major conventions differ between APIs.
Points, lines, planes, triangles and their distances and intersections. Most gameplay queries, such as line of sight or "is the player inside this zone", reduce to a geometric test.
A map that keeps the origin fixed and preserves addition and scaling: rotation, scale and shear. Any one of them is fully described by where it sends the basis vectors.
A space of points with no special origin, where subtracting points gives vectors. It explains why positions (w = 1) and directions (w = 0) behave differently in homogeneous coordinates.
A linear transformation followed by a translation, which a single 4×4 matrix can express. Model and view matrices are affine; projection matrices are not.
Turning 3D camera-space coordinates into 2D screen positions. The projection matrix maps the view volume into clip space, after which the GPU divides by w and maps to the viewport.
Distant objects shrink, defined by field of view, aspect ratio and near and far planes. Depth precision is non-linear, so push the near plane out or use reversed-Z to avoid z-fighting.
Orthographic projection keeps parallel lines parallel and size independent of distance. Used for 2D games, UI, isometric views, editor views and directional-light shadow maps.
How an object is rotated in space, stored as Euler angles, rotation matrices or quaternions. Each suits a different job: editing, transforming vertices or smooth, stable interpolation.
Four numbers representing a rotation compactly with no gimbal lock. Compose with multiplication, interpolate with slerp or normalised lerp, and renormalise to fight drift.
Three angles (yaw, pitch, roll) applied in a fixed order. Easy for humans and editors, but they suffer gimbal lock and interpolate badly, so convert to quaternions internally.
Parametric curves define camera rails, projectile arcs, roads and animation easing. Choose a curve type by whether it must pass through its control points and how smoothly segments join.
A piecewise polynomial curve built from segments joined with continuity guarantees. Engines expose spline components for paths and level design; use arc-length parameterisation for constant speed.
A cubic segment defined by two endpoints and their tangents. It gives direct control over direction at each end and underlies many other spline types.
Curves defined by control points that the curve approaches but generally does not pass through, evaluated with De Casteljau's algorithm. Quadratic and cubic forms are everywhere in UI, fonts and tools.
A spline that passes through every control point, with tangents computed from neighbours. Ideal for camera paths and waypoint routes; the centripetal variant avoids loops and cusps.
Real-time approximation of mechanics: integrate motion, detect collisions, resolve contacts and constraints, every fixed step. Stability and determinism usually matter more than physical accuracy.
How forces change motion. A rigid-body solver tracks linear and angular state per body and integrates it each step, typically with semi-implicit Euler for stability.
The average position of a body's mass, where forces cause no rotation. Offsetting it lower makes vehicles harder to flip.
Resistance to angular acceleration, stored as a 3×3 inertia tensor in 3D. It depends on shape and mass distribution; wrong values make objects spin unnaturally.
Rate of change of velocity, from summed forces divided by mass. Gravity is a constant acceleration applied every step regardless of mass.
Constraints that connect bodies: hinges, ball sockets, sliders, springs and fixed welds. Used for ragdolls, doors, vehicles and chains; long chains of joints need more solver iterations.
A push that changes momentum. Engines distinguish continuous forces from instantaneous impulses; applying a force off the center of mass also produces torque.
Bounciness: the ratio of separation to approach speed in a collision, from 0 (dead stop) to 1 (perfectly elastic). Engines combine the two materials' values with a min, max or average rule.
Rotation speed and axis as a vector. Integrate it into orientation each step via quaternion derivatives, and damp it slightly to keep simulations calm.
Speed and direction of the center of mass. Setting it directly is handy for character control but bypasses mass and other forces.
The upward force on a body in fluid equal to the weight of displaced fluid. Games approximate it by sampling submerged points on the hull against a water height.
Force resisting sliding, modelled with static and dynamic coefficients in the Coulomb model. Solvers clamp the tangential impulse to friction times the normal impulse.
Finding which objects touch and how: a cheap broad phase culls pairs that cannot collide, then an exact narrow phase computes contact points, normals and depth for the solver.
Continuous collision detection sweeps shapes along their motion to stop fast objects tunnelling through thin walls between steps. It costs more, so enable it only for bullets and fast bodies.
Quickly reducing n² object pairs to a short list of candidates using simple bounding shapes and spatial structures. A good broad phase keeps cost roughly linear in object count.
A simple shape enclosing a complex object (sphere, box, capsule) so overlap tests are cheap. Tighter volumes reject more pairs but cost more to update.
An axis-aligned bounding box: min and max on each axis, tested with six comparisons. Must be recomputed or enlarged when the object rotates.
An oriented bounding box that rotates with the object, fitting elongated shapes tighter than an AABB. Overlap is tested with the separating axis theorem on 15 axes in 3D.
Dividing space with grids, quadtrees, octrees or BSP trees so queries only check nearby objects. Uniform grids are simple and fast when objects are similar in size.
Sort object intervals along an axis and sweep through, reporting overlaps. Frame-to-frame coherence keeps the list nearly sorted, so insertion sort makes updates cheap.
A bounding volume hierarchy: a tree of volumes where each node encloses its children, so whole branches are skipped. Used for both collision and ray tracing.
A dynamic BVH that inserts, removes and refits moving objects incrementally, using fattened boxes to avoid updates every frame. Box2D and Bullet use this structure.
Exact tests on the candidate pairs, producing contact manifolds for the solver. Most algorithms assume convex shapes, which is why concave meshes are decomposed first.
Primitive tests such as ray–triangle, sphere–box and segment–plane. They power raycasts, picking and line of sight as well as collision.
Separating axis theorem: two convex shapes do not overlap if some axis separates their projections. Test face normals (and edge cross products in 3D); the axis with least overlap gives the contact normal.
The Gilbert–Johnson–Keerthi algorithm finds whether convex shapes overlap, or their distance, using support functions on the Minkowski difference. Works for any convex shape with a support function.
The expanding polytope algorithm runs after GJK reports overlap, growing a polytope inside the Minkowski difference to find penetration depth and normal.
A shape is convex if the segment between any two of its points stays inside it. Convex shapes allow fast, robust algorithms like SAT and GJK.
Spheres, boxes, capsules and convex hulls: the shapes physics engines simulate dynamically. Prefer them for moving bodies.
Shapes with dents or holes, such as terrain and level meshes. Engines usually allow them only as static colliders or approximate them with several convex parts.
The smallest convex shape containing a set of points, computed with Quickhull and similar algorithms. A cheap stand-in collider for detailed meshes.
Splitting a concave mesh into a handful of convex pieces, typically with V-HACD or CoACD, so a dynamic body can have a concave silhouette.
An engine bundles rendering, physics, audio, input, asset pipelines, an editor and platform export. Pick one by target platforms, team language and licence terms rather than feature lists.
A widely used C# engine for mobile, PC, console and XR, built around GameObjects and components with optional ECS (DOTS). A large asset store and documentation make it beginner friendly.
Epic's C++ engine with Blueprint visual scripting, known for high-end rendering (Nanite, Lumen). Full source is available, with royalties above a revenue threshold.
A free, MIT-licensed open-source engine built on a scene tree of nodes, scripted in GDScript or C#. Lightweight and strong for 2D, with steadily improving 3D.
Writing your own engine code on top of libraries like SDL, raylib or a graphics API. Full control and great learning, but you build tooling, asset pipelines and ports yourself.
Your engine largely picks the language. C++ dominates engine and AAA code, C# rules Unity and indie work, and scripting languages handle gameplay logic where iteration speed matters more than raw performance.
The language of engines, Unreal and console development. Learn memory layout, RAII, data-oriented design and how caches punish pointer chasing.
Unity's and optionally Godot's scripting language. Watch garbage collection in hot paths: avoid per-frame allocations, cache components and pool objects.
Memory-safe systems language with a growing game ecosystem, notably the Bevy ECS engine. Strong for tools and engines; fewer shipped commercial titles so far.
Used for prototypes with pygame, and widely for engine tooling and pipeline scripts in Blender, Maya and build systems. Too slow for most shipping game loops.
Godot's Python-like language, tightly integrated with nodes and signals. Use static typing for speed and editor help.
How images are produced from scene descriptions: geometry, cameras, light transport and how humans perceive the result. Real-time rendering trades physical accuracy for 60 frames a second.
Shooting rays from the camera into the scene and following them to lights, naturally producing reflections, refraction and soft shadows. Historically offline, now partly real-time on RT hardware.
Projecting triangles to the screen and filling the pixels they cover, with a depth buffer resolving visibility. The basis of nearly all real-time rendering.
The GPU stages: input assembly, vertex shading, optional tessellation and geometry, rasterisation, fragment shading, then depth/stencil tests and blending.
Turning continuous signals (geometry, textures, light) into discrete pixels causes aliasing. MSAA, TAA, mipmaps and texture filtering fight it; importance sampling reduces noise in path tracing.
Kajiya's integral describing outgoing light as emitted light plus all incoming light weighted by the surface's BRDF. Every lighting model approximates some part of it.
Skeletal skinning, keyframe blending, inverse kinematics and morph targets. Animation state machines and blend trees decide which clips play and how they mix.
Do lighting in linear space and convert to sRGB at output; mixing them causes washed-out or too-dark results. Understand colour spaces, gamma and HDR formats.
How the eye and brain interpret images: sensitivity to contrast and motion over absolute values. Rendering exploits it to spend effort where viewers notice.
Mapping a high-dynamic-range render to a displayable range with a tone-mapping operator such as Reinhard or ACES, often with auto exposure.
Small programs that run on the GPU for each vertex, pixel or compute thread. They implement lighting, materials and post-processing; most engines also offer node-based shader graphs.
Microsoft's shading language for Direct3D, also compiled to SPIR-V for Vulkan via DXC. Unity and Unreal shaders are written in it.
The OpenGL Shading Language, also used by WebGL and Vulkan (compiled to SPIR-V with glslang). Godot's shader language is closely based on it.
Khronos' binary intermediate representation for shaders, consumed by Vulkan and OpenGL 4.6. You compile HLSL or GLSL to it offline instead of shipping source.
How surfaces scatter incoming light, split into a diffuse and a specular part. Reflection models such as Lambert, Blinn-Phong and microfacet BRDFs approximate it.
Light scattered equally in all directions, proportional to the cosine between the normal and light direction (Lambert). It gives a surface its matte base colour.
Mirror-like highlights that depend on the viewer's position. Blinn-Phong uses a half vector and shininess exponent; PBR replaces it with roughness-driven microfacet models.
Using images to add surface detail without more geometry. UV coordinates map texture pixels onto triangles, and extra maps fake bumps, depth and self-shadowing.
Images sampled by UV coordinates with filtering and mipmaps. Use compressed GPU formats (BC, ASTC, ETC) to save memory and bandwidth.
Perturbing surface normals so lighting suggests detail. Normal maps store the perturbed normals directly in tangent space and are the modern standard.
Offsetting texture coordinates by a height map and view angle so surfaces appear to have depth. Steep parallax and parallax occlusion mapping ray-march for stronger effect.
Horizon mapping precomputes, per texel and direction, how high the surrounding bumps rise, so bump-mapped surfaces can shadow themselves cheaply.
Light types determine how illumination is computed; shadows tell the eye where objects sit. Real-time games mix dynamic lights, baked lightmaps and probes to stay within budget.
Illumination in a scene, usually split into direct light from sources and indirect bounce light (approximated with ambient terms, probes or global illumination).
An emitter defined by type, colour, intensity and falloff. Clustered or tiled shading lets a scene have hundreds of lights by only evaluating those affecting each screen tile.
Parallel rays from a fixed direction, like the sun. No position or falloff; usually the main shadow-casting light in outdoor scenes.
Emits in all directions from a position, with inverse-square falloff and a cutoff radius. Shadows need a cube map covering six directions.
A point light restricted to a cone with inner and outer angles for a soft edge. Shadows use a single perspective shadow map.
A light treated as infinitely far away, so its rays are parallel and its intensity does not fade with distance; the idealised model behind directional and sky lights.
Regions where light is blocked. Hard shadows come from point-like lights; soft penumbras come from area lights and are approximated with filtering like PCF.
Render depth from the light, then compare each pixel's light-space depth against it. Fight acne with bias and peter-panning with careful bias limits.
A single 2D depth texture rendered from one light view, used for spot and directional lights.
Six depth faces around a point light, often storing linear distance, rendered in one pass with layered rendering or six passes.
Several shadow maps covering slices of the view frustum at decreasing resolution, giving sharp shadows near the camera over large outdoor ranges.
Shadow volumes extruded from silhouettes and counted in the stencil buffer give pixel-exact hard shadows. Famous from Doom 3, now rare due to fill-rate cost.
The fastest triangle is the one never drawn. Culling removes objects outside the view or hidden behind others before they reach the GPU, and clipping trims what partly crosses the view volume.
Large, simple geometry (walls, terrain) used to hide what is behind it. Engines use low-poly occluder meshes and a depth or hierarchical-Z buffer to test other objects.
Skipping work for invisible things: frustum, occlusion, distance and back-face culling. GPU-driven pipelines now cull per cluster in compute shaders.
Cutting primitives against the view volume after projection, so only visible parts get rasterised. The GPU does it automatically; you add custom clip planes for portals or water.
Blending distant pixels toward a fog colour, by linear, exponential or height-based falloff. It adds atmosphere and hides the far plane where objects are culled.
The truncated pyramid the camera can see, defined by six planes. Testing bounding volumes against these planes is the cheapest and most important cull.
A flat shape bounded by edges; GPUs render everything as triangles. Polygon count and overdraw are key performance budgets.
A closed solid of polygonal faces. Convex polyhedra serve as occluders, collision shapes and view volumes like the frustum itself.
The interface between your code and the GPU driver. Older APIs (OpenGL, DirectX 11) manage state for you; explicit APIs (Vulkan, DirectX 12, Metal) hand you memory, synchronisation and command buffers for lower overhead.
Microsoft's API family for Windows and Xbox. Direct3D 12 is explicit and low-level; Direct3D 11 remains simpler for learning and smaller projects.
The long-standing cross-platform state-machine API, deprecated on macOS but still the easiest way to learn GPU fundamentals.
Khronos' explicit cross-platform API for Windows, Linux and Android (and macOS via MoltenVK). Verbose, but gives precise control over memory and threading.
The embedded subset of OpenGL for mobile and consoles; ES 3.0 is the base for WebGL 2. Mobile GPUs are tile-based, so avoid needless framebuffer loads and stores.
Apple's explicit graphics and compute API for iOS and macOS, with the Metal Shading Language based on C++.
OpenGL ES in the browser through JavaScript, usually via Three.js or Babylon.js. WebGPU is its modern, explicit successor.
Making non-player characters seem smart and fun, not optimal. Game AI covers moving through the world, choosing what to do and playing turn-based games, under a strict per-frame time budget.
Pathfinding with A* over navmeshes or grids, plus steering behaviours (seek, flee, arrive, avoidance, flocking) for smooth local motion.
Choosing an agent's next action from what it perceives. Designers need these systems to be debuggable and tunable, which is why simple, explicit structures still dominate shipped games.
A hand-authored tree of yes/no checks ending in actions. Fast and readable, but grows unwieldy for complex behaviour.
Explicit states (patrol, chase, attack) with transitions on events. Simple and predictable; hierarchical state machines keep transitions manageable.
A tree of selector, sequence and decorator nodes ticked each frame, returning success, failure or running. Modular and the standard in Unreal and many studios.
Reasoning with degrees of truth (0.7 "near") instead of hard thresholds, giving smoother behaviour. Utility AI scoring follows a similar idea.
States with probabilistic transitions, so the next state depends only on the current one. Useful for varied idle behaviour, procedural text and patrols.
Goal-oriented action planning (GOAP), from F.E.A.R.: agents search for a sequence of actions whose preconditions and effects reach a goal, producing emergent plans.
AI for turn-based, perfect-information games like chess or tic-tac-toe searches the tree of future moves. Depth is limited by time, so evaluation functions and pruning decide strength.
Assume both sides play optimally: maximise your score on your turn, minimise on theirs, down to a fixed depth scored by a heuristic.
Alpha-beta pruning skips branches that cannot change the minimax result. With good move ordering it searches roughly twice as deep in the same time.
Monte Carlo tree search grows the tree by sampling random playouts, balancing exploration and exploitation with UCT. Needs no evaluation function; the basis of AlphaGo.
Machine learning lets agents improve from data or experience instead of hand-written rules. In games it shows up in testing bots, animation, procedural content and occasionally shipped NPCs.
Learning a decision policy from outcomes rather than authoring it, for example training an NPC to choose actions from recorded play or rewards.
A probabilistic classifier assuming independent features. Cheap to train and run, it can predict player intent from observed actions.
Building a decision tree automatically from labelled examples by splitting on the most informative feature (ID3, C4.5, CART).
Many-layer neural networks for perception and generation. In games it drives upscaling (DLSS), animation synthesis and agents trained with reinforcement learning.
Layers of weighted units with non-linear activations, trained by backpropagation. Inference cost and unpredictability limit their use in shipped gameplay.
An agent learns by trial and error to maximise reward, as with PPO in ML-Agents. Great for automated playtesting; reward design is the hard part.
Modern engines combine physically-based materials with hardware ray tracing for reflections, shadows and global illumination. Both rest on the same energy-conserving light model.
RT cores traverse BVHs in hardware, enabling a few rays per pixel; denoisers turn the noisy result into clean reflections, shadows and GI. Usually mixed with rasterisation.
DXR adds acceleration structures, ray-generation, hit and miss shaders and inline RayQuery to Direct3D 12.
The cross-vendor VK_KHR_ray_tracing_pipeline, VK_KHR_acceleration_structure and VK_KHR_ray_query extensions, mirroring DXR's model.
NVIDIA's CUDA-based ray-tracing framework for offline and interactive rendering, used in tools and renderers rather than shipping games.
Materials described by albedo, metalness, roughness and normal maps, lit with microfacet BRDFs and image-based lighting so assets look right under any lighting.
Microfacet theory treats a surface as tiny mirrors; roughness controls their spread, via a distribution (GGX), a shadowing-masking term and a Fresnel term.
Transparent surfaces need sorted alpha blending or order-independent techniques; translucent ones scatter light beneath the surface, approximated with subsurface scattering for skin and wax.
Outgoing energy is capped by incoming energy, which means diffuse and specular split one budget. Shaders weight the diffuse term by (1 - F) from the Fresnel term, and normalised BRDFs keep rough highlights dimmer as they widen.
The metalness parameter: metals have no diffuse and tinted specular, dielectrics have coloured diffuse and about 4% white specular. Values should be 0 or 1 except at blends.