Skip to story
ELI5 Yahaaa

Redrawn sixty times a second

How Does a Video Game Work?

A game is not a moving picture. It is a still picture, worked out from scratch dozens of times every second.

It reads what you are pressing It works outwhere everythingnow is It draws a whole new picture Sixty timesevery second
Nothing moves. It is redrawn.
  1. Step 1 of 5

    Nothing in a game actually moves.

    1 You hold right2 The positionnumber goes upa little3 A new pictureis drawn there

    The character is a set of numbers saying where it is. Each time round the loop the numbers change a little and a new picture is drawn. Fast enough, and your eye reads it as motion.

  2. Step 2 of 5

    The loop has to finish in time.

    Time available per framesixteenthousandths of asecondA slow calculationthe frame islate — itstutters

    At sixty pictures a second, everything — controls, physics, enemies, drawing — must be done in about sixteen thousandths of a second. Miss the deadline and the game stutters.

  3. Step 3 of 5

    The world is built out of triangles.

    A smooth character onscreen Thousands of flattriangles underneath

    Every surface in a three-dimensional game is a mesh of flat triangles with pictures stretched over them. Curves are just triangles small enough that you cannot see the corners.

  4. Step 4 of 5

    A separate chip does the drawing.

    The main chip A few fast workers, onejob eachThe graphics chip Thousands of smallones, all at once

    Working out the colour of two million pixels is the same simple sum done two million times. A graphics chip has thousands of small processors doing them all at once, rather than one after another.

  5. Step 5 of 5

    The rules are chosen, not discovered.

    How a jump feelsToo floaty andit feelsweightlessToo heavy andit feelssluggish

    Game gravity, friction and jumping are numbers someone picked because they felt right, not because they are real. That tuning is why one game feels sharp and another feels like treacle.

    Games often cheat where it will not be noticed — things far away are drawn crudely, and things behind you are not drawn at all.

The short version

A game reads your controls, recalculates its whole world and redraws the screen — around sixty times a second.

Try it yourself

Wave your hand in front of a screen showing fast motion. The stutter you see is the frames arriving one at a time.

Topics