How Does a Video Game Actually Work?

TIME : 2016-01-08
How Does a Video Game Actually Work?

Underneath, a video game is a program running a loop extraordinarily fast, and almost everything else follows from that.

The loop

The console or computer repeatedly does three things: read your controller input, update the state of the game world, and draw the result to the screen. Do that sixty times a second and you get what looks like continuous motion. The "3D" of a 3D game is a projection — the machine calculates where shapes sit in a simulated space and flattens them onto a flat screen, changing colour and shading as your viewpoint moves. Nothing is actually three-dimensional; it is arithmetic producing the appearance of depth.

Where the data lives

The game's assets — models, textures, audio, code — sit on the disc or in the installed files. A laser or the drive reads them as needed. One correction to a common belief: saving is not exclusive to any single console. The PlayStation 3 does it, but so does every other system, using internal storage, memory cards, or the cloud depending on the platform.

Why it feels responsive

Your controller is not sending "move right." It is sending a state — stick position, buttons held — many times a second, and the game interprets that state on each pass of the loop. The tightness you feel in a well-made game is the result of engineers obsessing over that latency, shaving off fractions of a frame because players notice.