Computer Fundamentals

Frames Per Second

Animation is just pictures shown fast. The game loop: read input, do the math, draw the next frame, 60 times a second.

Frames Per Second — interactive video preview

What you'll learn

  • FPS
  • Game Loop
  • Input → Update → Draw

In this video

Here's a secret about every cartoon and game you've ever watched. Nothing is actually moving! Look — it's just one still picture, and then another, and another. Flip them quick enough and your brain glues them together into a walking person.

So how fast is fast enough? Watch these three. The one on the left only gets five new pictures every second — see how he stutters? The middle one's smoother. And the one on the right? Sixty pictures a second. Buttery. That's why FPS matters so much.

But where do those pictures come from? Every game runs the same little dance, over and over. First it checks what buttons you pressed. Then it figures out what changed. Then it paints the next picture. Then it shows it on screen. And then — right back to step one. Sixty times a second.

Now here's the tricky part. Sixty frames a second means each one only has sixteen milliseconds — that's a tiny sliver of time. All four steps have to squeeze in there. And look — when the work spills past that green line? The game can't keep up. It stutters.

Your turn! Grab the slider and drag it. Watch what happens to the kid, the dog, the bird, the car, the fish — when you sample everything at five frames a second, they all freeze and lurch. Crank it up to sixty? Suddenly they're all alive. Same animation underneath. The ONLY thing changing is how often the picture updates.

So that's the whole magic trick. Read what you pressed. Update the world. Draw the picture. Show it. Loop back and do it again — sixty times every single second. Next time a game feels smooth, you'll know exactly what's happening behind the curtain.

Topics

#FPS#Game Loop#Input → Update → Draw

Ready to try it yourself?

Frames Per Second is a hands-on interactive video — watch it, then play with the idea live in your browser. Free, no sign-up.

Open in Kekula →