skip to main content

MIT Explains: How to Make a Video Game

5 minutes

It's me, Carmelo.

(Describer) Sitting by a screen....

Video games are fun. Have you ever wanted to make one? How can I make a character run and jump by pressing some keys? Just like websites or apps on your phone, video games are just computer programs. We make them by giving instructions to a computer or to a video game console.

(Describer) He ejects a disk from one.

And these instructions can be stored in your laptop hard drive or even in a CD-ROM. There are things like

(Describer) Inside a Mario game...

make a character appear in the middle of a screen,

(Describer) Carmelo does.

or when the player hits the up-arrow key, make the character jump. When we give instructions to another person, we use a language like English or Italian. Unfortunately, we cannot speak to a computer the same way because computers can only understand simple instructions, and they're very picky about words. To give instructions to a computer, we need a programming language. Just like human languages, programming languages can be different from each other. Many rely on text, so programmers can write words that give instructions to a computer. Let's say I wanted to create a simple game where a character moves around the screen.

(Describer) A cartoon cat.

I need to tell the computer that when I hit a certain key, the cat goes up. Using the Python programming language, I could write instructions like this. This language looks foreign, but it's not that complicated. Here is where I say that whenever the computer detects any key press, if the key is the up-arrow key, move the player, our cat, zero pixels horizontally and five pixels up. To understand the directions in Python, the computer translates them into more simpler instructions. Eventually, these instructions get translated into machine language, whose alphabet is made of zeros and ones. The processor, which is the computer brain, can understand and execute machine language, sending back the right graphics to the screen. Even a simple instruction like "move up five pixels" gets translated into hundreds or thousands of simpler instructions in machine language before the computer can understand and respond. This happens in fractions of a second. Other programming languages like Scratch, developed here at the MIT Media Lab, are visual programming languages. Instead of using words, in Scratch, you can drag and drop blocks together

(Describer) He does.

in order to make something happen on the screen. If I want to move a cat around, I would do something like this. If I wanted my cat to go up five pixels, I would snap together two blocks. I can do the same with the left, down, and right-arrow keys. Also, I can play with instructions. I can say that when I click on the cat, I can change its color. And also, I can make him...


A game like Space Invaders looks simple, but it's not. It includes player movement, like what we programmed, but also characters moving by themselves, music and sounds, shooting, collisions, keeping score, and that's where programming gets interesting. Making something move up five pixels may not sound exciting, but basic instructions like this one are the building blocks to create video games. What kinds of instructions would you use to create something like a memory game, Tetris, Angry Birds, Minecraft? A professional video game might have millions of instructions written by lots of people all working together to bring the game to life. Human languages have grammar and basic words you can combine together to create things like stories, novels, poems. In the same way, programming languages have grammar and basic instructions you can combine together to create not only video games, but also animation, simulations, and interactive stories. Visual programming languages like Scratch make it easier for anyone to learn how to program. So instead of just playing video games, now you can make them. So go make one.

(Describer) Title: Made with love at MIT. Accessibility provided by the US Department of Education.

Accessibility provided by the U.S. Department of Education.

Transcript Options

Now Playing As: Captioned (English) (change)

Report a Problem

Video games are fun to play, but how do they work? A graduate student at MIT visits the MIT Media Lab and demonstrates how anyone can learn how to create video games. One of the keys is teaching machines through programming languages.

Media Details

Runtime: 5 minutes

Ask a Scientist
Episode 10
1 minute
Grade Level: 10 - 12
Career Connections
Episode 52
4 minutes
Grade Level: 10 - 12
Career Connections
Episode 73
4 minutes
Grade Level: 7 - 12
Career Connections
Episode 74
6 minutes
Grade Level: 7 - 12
When Am I Ever Going to Use This?
Episode 4
22 minutes
Grade Level: 7 - 12
When Am I Ever Going to Use This?
Episode 5
20 minutes
Grade Level: 7 - 12
27 minutes
Grade Level: 6 - 12
Franja Metro (Spanish)
Episode 13
12 minutes
Grade Level: 4 - 8
Great Unsung Women of Computing
Episode 2
18 minutes
Grade Level: 7 - 12
Great Unsung Women of Computing
Episode 3
12 minutes
Grade Level: 7 - 12