When I started learning to code, the options were limited—lots of books (not even e-books), some very basic online tutorials, and a whole lot of experimentation.
Online learning has come a long way in the last few years. There are interactive courses, tons of online tutorials, and one of my personal favorite ways to practice coding: games.
While a game alone probably isn’t going to teach you everything you need to know about coding, it can be a really incredible way to practice the skills you’re learning. It makes practice fun. And if you’re anything like me, you might suddenly realize you’ve spent the last four hours reinforcing your coding skills without even realizing it.
I’ve tried out some of the most entertaining and useful games for learning to code. Check out my favorites below.
CodeMonkey teaches coding using CoffeeScript, a real programming language, to teach you to build your own games in HTML5. It’s aimed at kids, but it’s definitely fun for adults, too.
3. CSS Diner
CSS Diner is a simple but fun way to learn CSS. There are 32 levels that will teach you the basics of how CSS selectors work. Each level gets progressively more complex, building on what you’ve learned in previous lessons.
4. Flexbox Froggy
Want to learn how CSS flexbox works? Check out Flexbox Froggy. It has a simple interface that teaches you the basics of how things align in flexbox while you help Froggy and his friends.
5. Flexbox Defense
Flexbox Defense is another great way to practice your flexbox skills. This time, you’ll move gun towers into position along a path to defeat oncoming waves of enemies, using the same kinds of commands as Flexbox Froggy.
7. Ruby Warrior
If you want to learn Ruby, then Ruby Warrior is the game for you. There are beginner and intermediate tracks to suit your skill level. The lessons start out easy and go from there. You’ll need to login with Facebook to save your progress.
9. Code Hunt
Code Hunt teaches you coding in a unique way. To play, you identify code fragments, analyze them, modify code to match the fragments, and then capture the working code fragment. You can use it to learn Java or C#.
If you ever watched the show BattleBots, then Robocode is for you. You’ll learn programming skills by building virtual robot battle tanks in Java or .NET. Battles are then played out onscreen in real time.
11. CheckIO and Empire of Code
12. VIM Adventures
Vim is a highly configurable text editor used by programmers. If you want to learn how to use Vim, then VIM Adventures is a great place to start! Use common VIM keyboard shortcuts to navigate your way through a Zelda-like adventure game.
13. Cyber Dojo
14. Elevator Saga
15. Code Wars
Not quite ready to join in the games here? Check out Skillcrush’s free 10-Day Coding Bootcamp for a basic overview of what learning to code is all about!