How to Learn Game Coding (For Kids)
I recently got a list of questions from a friend’s elementary school-aged son, asking about game programming.
I’m posting my answers here because I know it’s a popular topic for young people.
Q: How do you make a game from scratch?
There are a lot of ways to make a game nowadays, but I would recommend PICO-8. It has everything you need to make small, fun games using code.
By using it, you’ll learn about the different parts that make up a game.
For example, “sprites” are the images for things like spaceships, characters, and explosions. You can program them to move around and animate when you press a button.
You will also learn how “collisions” work, like how to make a ship explode when a bullet runs into it.
Once you learn those things, you can try making bigger games using more advanced languages, or just keep getting better at making cool PICO-8 games.
Also, making a game involves other fun things aside from coding — like art, storytelling, music, sound effects, and interaction design (making a program easy to use). You can learn all of those things just by making games. You might even find out that you like them better than coding.
Q: How do you learn to code?
I believe the best way to learn to code is:
1) Pick a language that is easy for beginners (like PICO-8 or Python), and
2) Make a small program or game that interests you
Programming takes a lot of trial and error. Bit by bit, you add new lines of code to your program.
It’s like a snowball that gets bigger as it rolls down a hill. You start with a tiny program and add more as you go.
This takes a lot of patience, because you’ll spend a lot of time fixing mistakes (also known as “bugs”).
That’s why it’s important to work on a project that you like! If you just learn coding from a book, you might get bored and give up more quickly.
It’s also important to pick a project that is small. A lot of people try to make games that are too big, so they spend a lot of time and never finish them. Even a small game can take many days or weeks to finish, but it will teach you a lot.
Q: Why did you start coding?
I started learning the BASIC programming language when I was about 7.
Like most kids, I did it because I wanted to make games. When I got older, I became interested in making cool web sites and that’s where I learned more advanced programming.
I still write code because programming lets me be creative and I can make things that other people can use.
Q: What kind of code do you like the best?
I try to write code in a way that is easy for me to understand when I come back to it later. Sometimes it’s not easy to figure out what code does, even if I wrote it myself!
Writing code is kind of like writing in English. You want to write things in a way that is easy to understand.
There is no one programming language that is the best. I use the languages that let me build the ideas that I have.
I even created my own programming language called THT so that I could use it to make websites more quickly.
- Simpler Programming Lingo
- Little Idea Elves
- Creating With Concept
- How to Name an App or Anything Else
- My Favorite Computer Games
Joe has been designing and developing games and web apps for about 20 years. He is a self-taught programmer, and creates art and games in his spare time.
He currently works as a User Experience Prototyper at Netflix, on the Interactive Design team that created Bandersnatch.