A sport engine is the software program {that a} sport runs on: it attracts the graphics, performs the sound, simulates the physics, reads the controller, and runs the sport’s personal code, each body. Nearly each business sport immediately is constructed on one, whether or not it’s a public engine resembling Unity, Unreal Engine or Godot, or an in-house engine like Valve’s Supply 2. For a programmer serious about a profession in video games, understanding engines is step one.
This information explains what a sport engine is, what’s inside one, and the way its core loop works, with a small C++ program that reveals the concept. Then it compares the engines you’re almost definitely to fulfill in 2026, with their licences, languages and best-known video games, and helps you select one to be taught. Variations and licence phrases had been checked towards the engine makers’ personal websites in November 2026.
What Is a Recreation Engine?
A sport engine is a software program framework for constructing and operating video video games. It supplies the methods most video games want, resembling rendering, physics, audio, enter, animation, scripting and networking, plus an editor and instruments for importing artwork. Builders write the sport’s personal guidelines on prime of it as an alternative of constructing these methods from scratch.
Recreation engines at a look
| What it’s | A framework for constructing and operating video games |
|---|---|
| Core methods | Rendering, physics, audio, enter, animation, scripting, networking, editor |
| Coronary heart of it | The sport loop: enter, replace, render, current |
| Most used engines | Unity, Unreal Engine, Godot |
| Predominant languages | C# (Unity), C++ (Unreal), GDScript, C# and C++ (Godot) |
| Free choices | Godot (MIT); Unity Private; Unreal till $1M income |
| In-house examples | Supply 2, Frostbite, id Tech, RE Engine, Decima |
| Newest variations | Unity 6.4, Unreal Engine 5.8, Godot 4.7 (2026) |
A Brief Historical past of Recreation Engines
Within the Eighties, most video games had been written from scratch for every machine. The thought of a reusable engine took maintain within the Nineties, when id Software program separated the core know-how of Doom (1993) and Quake (1996) from the sport content material and licensed it to different studios. Different video games might then be made by swapping in new ranges, artwork and guidelines.
From there, a handful of engines formed the business:
- 1998: Epic Video games launched Unreal, and with it the Unreal Engine, which it quickly licensed to different studios.
- 2004: Valve shipped Half-Life 2 on its Supply engine.
- 2005: Unity launched as a Mac-only engine and grew into essentially the most extensively used engine for indie and cellular video games.
- 2014: Godot, created by Juan Linietsky and Ariel Manzur, was launched as open supply below the MIT licence.
- 2015: Epic made Unreal Engine 4 free to obtain, charging a royalty solely on profitable video games, and Valve introduced Supply 2.
- 2022: Unreal Engine 5 launched with Nanite geometry and Lumen lighting.
At present, huge publishers nonetheless run their very own engines, resembling EA’s Frostbite, id Software program’s id Tech, Capcom’s RE Engine and Guerrilla’s Decima, whereas most different studios license Unity or Unreal Engine or use Godot.
What’s Inside a Recreation Engine
An engine is a group of subsystems that work collectively. The names range, however practically each engine has these:
| Subsystem | What it does |
|---|---|
| Renderer | Attracts every body via a graphics API resembling Direct3D 12, Vulkan or Steel, with supplies, lights, shadows and post-processing |
| Physics | Simulates collisions, gravity, inflexible our bodies and typically material and autos |
| Audio | Performs and mixes sounds and music, usually in 3D across the listener |
| Enter | Reads keyboard, mouse, gamepad and contact, throughout platforms |
| Animation | Performs and blends skeletal animations for characters |
| Scripting / gameplay | Runs the sport’s personal code, in a language resembling C#, C++, GDScript or a visible scripting system |
| AI and navigation | Pathfinding and behavior for non-player characters |
| Networking | Retains sport state in sync between gamers in multiplayer video games |
| Editor and asset pipeline | Lets designers construct ranges and imports fashions, textures and sounds into quick, ready-to-load codecs |
| Platform layer | Hides the variations between Home windows, consoles, cellular and the online |
How a Recreation Engine Works: The Recreation Loop
On the centre of each engine is the sport loop. Every time across the loop, the engine reads enter, updates the sport, renders a body and reveals it, 30 to 120 or extra instances a second.
Frames don’t all take the identical time: a busy scene takes longer to attract. If physics superior by nonetheless lengthy the final body took, a sluggish body might make objects leap via partitions, and the sport would behave in a different way on quick and sluggish computer systems. So most engines run their updates with a mounted timestep, a way popularized by Glenn Fiedler’s article “Repair Your Timestep!”. Unity’s FixedUpdate, for instance, runs at a hard and fast price in precisely this manner.
This C++ program is a minimal model of that loop. It simulates a falling ball, runs physics at precisely 60 steps a second, and attracts “frames” that take completely different quantities of time:
// The center of each sport engine: a fixed-timestep sport loop.
// Physics updates at precisely 60 Hz, nonetheless quick or sluggish frames are drawn.
#embody <cstdio>
struct Ball {
double y = 10.0; // peak in metres
double vy = 0.0; // vertical pace in m/s
};
// One physics step: gravity, then a bounce that retains 80% of the pace.
void replace(Ball& b, double dt) {
b.vy -= 9.81 * dt;
b.y += b.vy * dt;
if (b.y < 0.0) {
b.y = 0.0;
b.vy = -b.vy * 0.8;
}
}
// Drawing solely reads the state. `alpha` blends the final two physics states
// so movement appears to be like easy when frames and physics steps do not line up.
void render(const Ball& prev, const Ball& curr, double alpha, int body) {
const double y = prev.y * (1.0 - alpha) + curr.y * alpha;
std::printf("body %2nd: ball drawn at %.3f mn", body, y);
}
int fundamental() {
const double step = 1.0 / 60.0; // mounted physics timestep
// Simulated body instances in seconds: a sport would measure these with a clock.
const double frame_times[] = {0.016, 0.033, 0.008, 0.050, 0.016, 0.016, 0.100, 0.016};
Ball prev, curr;
double accumulator = 0.0;
int steps = 0, body = 0;
for (double frame_time : frame_times) {
accumulator += frame_time; // 1. add the actual time that handed
whereas (accumulator >= step) { // 2. run as many mounted steps as match
prev = curr;
replace(curr, step);
accumulator -= step;
++steps;
}
render(prev, curr, accumulator / step, ++body); // 3. draw as soon as
}
std::printf("%d frames drawn, %d physics steps runn", body, steps);
}
Just a few issues to note:
- The accumulator collects actual time. Every body, the loop runs as many mounted 1/60-second physics steps as slot in it, which may be zero, one or a number of.
- A sluggish body (the 0.100-second one) is adopted by a number of physics steps in a row, so the simulation catches up as an alternative of taking one huge, unstable step.
rendersolely reads the sport state. It blends the final two physics states withalpha, so movement appears to be like easy even when frames and steps don’t line up.
After we ran it, this system printed:
body 1: ball drawn at 10.000 m
body 2: ball drawn at 9.992 m
body 3: ball drawn at 9.988 m
body 4: ball drawn at 9.952 m
body 5: ball drawn at 9.936 m
body 6: ball drawn at 9.916 m
body 7: ball drawn at 9.739 m
body 8: ball drawn at 9.702 m
8 frames drawn, 15 physics steps run
How we examined it: we compiled this program with g++ 13 and clang++ 18 as C++17, with all warnings turned on and handled as errors, and each builds printed precisely the output above. It additionally ran clear below AddressSanitizer and UndefinedBehaviorSanitizer. The eight frames add as much as 0.255 seconds, and the loop ran 15 physics steps (0.255 ÷ 1/60 = 15.3), with the leftover fraction carried into the following body.
An actual engine wraps the identical loop round way more: enter occasions from the working system, a whole lot of objects with scripts, physics from a library resembling Jolt or PhysX, and a renderer that sends work to the GPU. To see what that rendering half entails, learn our information to graphics applied sciences in AAA sport improvement with C++.
The Recreation Engines You’re Most More likely to Use in 2026
| Engine | First launched | Developer | Licence | Predominant languages | Recognized video games |
|---|---|---|---|---|---|
| Unity | 2005 | Unity Applied sciences | Proprietary; free Private plan, Professional wanted above $200,000 in income or funding | C# | Hole Knight, Outer Wilds, Pokémon Go |
| Unreal Engine 5 | 2022 (Unreal Engine: 1998) | Epic Video games | Supply-available; free till a sport earns $1 million, then 5% royalty | C++, Blueprints | Fortnite, Tekken 8, RoboCop: Rogue Metropolis |
| Godot | 2014 (open supply) | Godot Engine group | MIT (free and open supply) | GDScript, C#, C++ | Brotato, Dome Keeper, Buckshot Roulette |
| Supply 2 | 2015 | Valve | Proprietary; not licensed publicly | C++ (C# in s&field) | Dota 2, Half-Life: Alyx, Counter-Strike 2 |
Unity
Unity is essentially the most extensively used engine for indie, cellular and mixed-reality video games. Its editor is approachable, it exports to PC, consoles, cellular and the online, and its Asset Retailer sells ready-made fashions, instruments and methods. You script video games in C#, and its built-in visible scripting system, which started because the Bolt plugin, helps you to construct logic with out code. The present era is Unity 6, with updates resembling Unity 6.4 in March 2026. Unity Private is free; companies with greater than $200,000 in annual income or funding want Unity Professional (Unity plans and pricing). Unity additionally cancelled its unpopular per-install Runtime Price after builders protested. See our Unity engine profile.
Unreal Engine 5
Unreal Engine powers lots of the best-looking video games on PC and consoles. Its Nanite system renders film-quality geometry, Lumen supplies dynamic international illumination, and Blueprints let designers script gameplay visually, whereas programmers work in C++ with the engine’s full supply code on GitHub. It’s free to make use of till a sport earns $1 million in gross income; after that Epic takes 5%, and gross sales via the Epic Video games Retailer are royalty-free (Unreal Engine licensing). Unreal Engine 5.8 arrived in June 2026, and Epic has stated it is going to probably be the final 5.x launch earlier than Unreal Engine 6. See our Unreal Engine profile.
Godot
Godot is the main free and open-source engine. Its MIT licence means no charges or royalties in any respect, and its small obtain and quick editor make it widespread with indie builders and lecturers. You may script in its Python-like GDScript, in C#, or in C++ via GDExtension. Godot 4.7, launched in June 2026, added HDR output and space lights, and upkeep releases adopted via the summer season (Godot 4.7.1 launch notes). See our Godot engine profile.
Supply 2
Supply 2 is Valve’s in-house engine, the successor to the Supply engine behind Half-Life 2, Portal and Counter-Strike: World Offensive. It runs Dota 2, Half-Life: Alyx and Counter-Strike 2, and helps Vulkan and Direct3D 11. Valve doesn’t license it publicly, however modders can use its Hammer editor and workshop instruments, and Facepunch’s s&field, a Garry’s Mod successor constructed on Supply 2, launched on Steam in April 2026 with a licensing deal that lets creators publish standalone video games (PC Gamer on s&field). See our Supply engine profile.
How you can Select a Recreation Engine
| If you wish to… | Begin with |
|---|---|
| Make your first 2D or 3D sport, totally free, with no strings | Godot |
| Make cellular, indie or VR/AR video games and use an enormous asset library | Unity |
| Make high-end 3D video games, or work at a AAA studio | Unreal Engine (be taught C++) |
| Construct mods and ranges for Valve video games | Supply 2 instruments |
| Find out how engines work below the hood | A framework resembling raylib or SDL, or your individual small engine in C++ |
Whichever you select, the abilities carry over: the sport loop, scenes and objects, physics, and the maths of 3D graphics work the identical manner in all places.
Frequent Misconceptions About Recreation Engines
- “Most sport engines are free and open supply.” The 2 most used engines, Unity and Unreal Engine, are proprietary. They’re free to begin with, however they arrive with licence phrases. Godot is the best-known absolutely open-source engine.
- “Unreal Engine is open supply.” Its C++ supply code is on the market to licensees on GitHub, nevertheless it isn’t open-source software program: Epic’s licence and royalty apply.
- “Supply is essentially the most highly effective sport engine.” “Strongest” is determined by the sport. Supply 2 is spectacular, nevertheless it’s Valve’s personal engine and isn’t publicly licensed, so most builders can’t select it.
- “With an engine, you don’t must program.” Visible scripting helps, however most business video games nonetheless want programmers to jot down gameplay, instruments and performance-critical code.
- “You need to write your individual engine first.” Writing a small engine is a good way to be taught, however for transport a sport, an current engine saves years of labor.
Recreation Engine Alternate options: Frameworks and Your Personal Engine
Not each sport wants a full engine. Frameworks resembling raylib, SDL and MonoGame provide you with home windows, enter, graphics and sound, however go away the sport loop and construction to you. They’re lighter, they usually train you ways engines work. Writing your individual engine is sensible when a sport wants one thing no engine does effectively, which is why many giant studios preserve their very own.
For a lot of extra engines, from huge names to small open-source tasks, browse our listing of C++ sport engines. When you’re planning a profession, our information to constructing a profession in sport programming covers the abilities studios search for.
Key Takeaways
- A sport engine is a framework for constructing and operating video games, with rendering, physics, audio, enter, scripting and instruments in-built.
- Each engine runs a sport loop: learn enter, replace the sport, render and current, often with physics on a hard and fast timestep.
- Unity, Unreal Engine and Godot are the engines most builders meet, with C#, C++ and GDScript as their fundamental languages.
- Their licences differ: Unity is free till $200,000 in income or funding, Unreal Engine expenses 5% after $1 million, and Godot is free below MIT.
- Many huge studios use in-house engines, resembling Supply 2, Frostbite and id Tech.
- Select by your aim, however the core abilities carry over from one engine to a different.
Conclusion
Recreation engines deal with the laborious, shared issues of constructing video games, so builders can give attention to what makes their sport completely different. Underneath the editors and asset shops, all of them run the identical loop you noticed above. For a programmer, the most effective begin is to select one engine, make one thing small with it, and be taught the way it works inside, from the loop to the renderer.
For extra engines, tutorials and guides, browse our sport improvement hub.

