Inside the Machine

What a CPU Does While You Play

See what game work lands on the processor, from logic and physics to preparing graphics instructions, and what cores, threads and clock speed actually mean.

On this page
  1. The processor’s role
  2. The work that lands on the processor
  3. What the numbers on a CPU mean
  4. Why single-core speed still matters
  5. When the processor is the limit
  6. The processor also shares the load with other software
  7. Heat and power
  8. Summing up

The processor’s role

The central processing unit, or CPU, is the general-purpose part of a computer. It follows instructions one after another, very quickly, and it can do almost any kind of calculation. In a game, it is the part that decides what happens. The graphics card then works out how it should look.

That split is a useful starting point, though real games blur it. Modern games use the graphics card for some calculations that are not about drawing, and the processor does some work that affects visuals. But as a rule of thumb, the processor handles the game’s rules and the graphics card handles its pictures.

The work that lands on the processor

During every frame, the CPU typically deals with tasks like these.

Reading your input. Your keyboard, mouse or controller sends signals that the processor reads and turns into game actions: move, jump, fire, open a menu.

Game logic. This is the code that implements the rules of the game: how health works, what happens when you pick something up, when a door opens, which quest step comes next. It also covers how the different parts of a game fit together, an idea explored in the article on game systems.

Artificial intelligence. Enemies, allies and crowds need to decide what to do. Pathfinding (working out a route around obstacles) and decision-making for non-player characters are processor work. Some of the techniques are described in the discussion of game AI.

Physics. Collisions, falling objects, ragdolls, vehicles and destruction all need calculation. The basics are explained in the article on game physics. Some physics work can run on the graphics card, but a good deal still runs on the processor.

Preparing the scene for drawing. The processor works out which objects are visible and tells the graphics card what to draw, sending a batch of instructions every frame. If the scene contains many separate objects, this preparation can take a long time.

Audio, networking and file handling. Mixing sounds, sending and receiving data in online games, and requesting data from storage as the world streams in all involve the processor too.

What the numbers on a CPU mean

Cores

A core is an individual processing unit inside the chip. A processor with several cores can work on several tasks at the same time. Modern gaming processors commonly have several cores, but the exact number varies by model.

More cores are only useful if the game can divide its work among them. Some tasks are naturally easy to divide, such as updating many separate characters. Others depend on earlier results and must be done in order. That is why a game does not simply run twice as fast on twice as many cores.

Threads

A thread is a sequence of instructions that the operating system can schedule to run. A game creates several threads, for example one for the main game loop, others for audio, loading and physics. Some processors can run two threads on each core at once using a technique often called simultaneous multithreading. This helps use the core more fully but does not double its power.

Clock speed

Clock speed, measured in gigahertz, indicates how many cycles a core runs each second. A higher number generally means more work done each second on the same design. But it is not a complete measure. Different processor designs get different amounts of work done per cycle, so comparing clock speeds across different families can mislead.

Cache

Processors include small, very fast memory called cache, built into the chip. It holds data the processor is likely to need again soon, so that it doesn’t have to wait for the much slower system memory. Games often benefit from generous cache, though how much depends on the game.

Why single-core speed still matters

Many games have one main thread that coordinates everything else. If that thread cannot finish its work quickly, the other cores end up waiting for it, however many there are. That is why the speed of an individual core remains important for games, even in an era of many-core chips. Over time, developers have been spreading work across more threads, so the balance shifts, but it varies a lot from game to game.

When the processor is the limit

A processor limit is easier to understand with the frame in mind. The graphics card cannot draw what it has not been told about. If the CPU is still busy with logic, AI and physics, the graphics card sits partly idle, and the frame rate cannot rise however powerful the card is. This situation is one of the commonly discussed hardware bottlenecks.

Games differ in how much they ask of the processor. Large strategy games with thousands of units, games with big simulated worlds and games with many characters on screen at once tend to be processor-heavy. A fast-paced shooter with simple scenes may depend more on the graphics card. Changes to graphics settings often reveal which is which: if lowering the resolution does not raise the frame rate, the processor is likely the limit.

It is worth remembering that this is a general pattern and that exact behaviour depends on the individual game.

The processor also shares the load with other software

The processor is also running the operating system and anything else open in the background: a web browser, chat programs, recording or streaming software. If you are doing game streaming while playing, the extra work of encoding video can take noticeable processor time, unless the graphics card handles that part. Background tasks can also cause occasional stutters when they briefly demand attention.

Heat and power

Under heavy load a processor produces significant heat, and it is designed to slow down if it gets too hot. This is related to how cooling works and to thermal throttling. A good cooler lets the processor keep higher speeds for longer.

Summing up

The processor is the game’s decision-maker: it reads your input, runs the rules, directs the characters and prepares the instructions for the graphics card. Cores let it do several things at once, but a game only benefits if its work can be divided. When you ask what a CPU is doing during play, the answer is that it is keeping the whole game moving, one frame after another.

The complete guide to inside the machine

How a Gaming Computer Works Inside
Read the guide

Keep exploring

Guides from other topics

All topics →