Programming games are often overlooked as a way to learn a new programming language or improve your knowledge of an existing one. Here are 23 of the best coding games worth a try if you want to level up your programming skills:
- Codingame
- 7 Billion Humans
- Robocode
- Halite
- Terminal
- CSS Diner
- CodeCombat
- Flexbox Defense
- CheckiO
- EXAPUNKS
- SQL Murder Mystery
- Screeps
- Ruby Warrior
- Untrusted
- Elevator Saga
- Vim Adventures
- Baba Is You
- Codewars
- Duskers
- Turing Complete
- Grey Hack
- Bitburner
- Set Up a Minecraft Server
CodinGame
CodinGame is one of the better-known free platforms for learning how to code through video games. The platform supports over 25 programming languages and comes with challenges that become gradually harder as you progress through them.
CodinGame is a community, too. You can solve challenges together with your friends or colleagues and learn how other players solve particular challenges.
7 Billion Humans
Tomorrow Corporation is an indie video game developer that specializes in programming games. They have three under their belt already: Little Inferno (2012), Human Resource Machine (2015), and 7 Billion Humans (2018).
7 Billion Humans gives the player sixty programming puzzles to solve in a programming language similar to assembly. Each time, you need to write a program that can most efficiently control all the humans in the puzzle.
Robocode
Robocode is a programming game where you need to program a robot battle tank that competes against other robots in a battle arena. You have no direct influence over the robot. Instead, you must write the AI of the robot so it behaves and reacts appropriately to events occurring in the battle arena.
Robocode is primarily used to learn Java, although you can also program in Kotlin and Scala. It’s a good way to learn how to program in these languages, but it’s also a good way to gain a basic understanding of AI.
Halite
Halite is an AI game where people write algorithms in a programming language of their choice to compete in an online multiplayer game. The game is on its fourth iteration and, since its launch in 2016, has been played by more than 15,000 people.
You play Halite on Kaggle, an online community of data scientists and ML practitioners. There is plenty of documentation on Kaggle explaining how Halite works, what its rules are, and how you can get started.
Terminal
Similar to Halite, Terminal is an AI game where you program algorithms and battle them against one another in tournaments. You can compete with other players and their algorithms for cash prizes, too.
You can play by hand, which requires no code, or play with the algorithms that you programmed. You can play against yourself, other players, or boss algorithms. Familiarize yourself with the game by watching it on Twitch.
CSS Diner
CSS Diner is a programming game where you learn about CSS selectors. The game has 32 levels and teaches you how to select a wide variety of DOM elements, with each next level building on the previous levels.
You’ll probably breeze through this if you’re an experienced programmer, but it's still a great game to train your CSS selector muscle memory.
CodeCombat
CodeCombat is a platform that gamifies Python, JavaScript, HTML, and the fundamentals of computer science. As you progress, you'll unlock heroes, pets, gear, and more.
The game is free for all its core levels, with a $9.99 a month subscription if you want access to its extra level branches plus 3,500 bonus gems a month. The game has a strong open-source community that helps with translations and creating more levels.
Flexbox Defense
Flexbox Defense asks you to stop incoming enemies from getting past your defenses. The catch is that you must position your towers using CSS flexbox code.
When it was released, Flexbox Defense went viral. It became the #1 game on producthunt.com and was picked up by several magazines, such as CSS-Tricks.com and TutorialZine.com.
CheckiO
CheckiO is a combination of programming games for both beginners and advanced programmers who want to learn Python or TypeScript. You land on an island and have to complete several programming challenges before another island unlocks.
CheckiO also has a forum where users can collaborate and help each other if they’re stuck. The company’s mission is to teach people how to code in a fun and engaging way.
EXAPUNKS
Zachtronics is an indie game development company that creates coding games. EXAPUNKS is their latest and user reviews on Steam have been overwhelmingly positive. You solve programming puzzles in a language similar to assembly.
Other Zachtronics games worth checking out are Opus Magnum, SHENZHEN I/O, and TIS-100. All three are programming games as well and have been reviewed positively by thousands of users.
SQL Murder Mystery
There’s been a murder in SQL City and you’re there to solve it. SQL Murder Mystery is a programming game to learn SQL concepts and commands. It’s not meant as a beginner tutorial, but more as a fun way to practice your SQL skills.
If you’re stuck, there’s a walkthrough to remind you of some key SQL concepts. With the help of the walkthrough and the schema diagram the developers offer on their homepage, you should be able to figure out who committed the murder.
Screeps
Screeps brands itself as an MMO strategy sandbox game for programmers. You write JavaScript to control your units in a single, persistent world where other players are continuously trying to attack you.
People enjoy playing Screeps because you're writing real code instead of pseudo-code. Some companies even use it as part of their recruitment process, because there's no single "right" solution to writing code in the game.
Ruby Warrior
Ruby Warrior is designed to teach the Ruby language and artificial intelligence in a fun, interactive way. You play as a warrior climbing a tall tower to reach the precious Ruby at the top level. On each floor you need to write a Ruby script to instruct the warrior to battle enemies, rescue captives, and reach the stairs.
After you have successfully cleared a level, you can still use the editor and modify your code. This lets you try out different ideas without immediately progressing to the next level. It’s a great sandbox for learning Ruby.
Untrusted
Untrusted is a meta-JavaScript adventure game written by Alex Nisnevich and Greg Shuflin. You need to write (or remove) JavaScript code to create a gap in the walls surrounding you.
Contrary to some of the other suggestions in this list, Untrusted is made for people already familiar with JavaScript. It starts easy, but the puzzles quickly become difficult. If you're up for a challenge, try Untrusted.
Elevator Saga
Elevator Saga requires you to program the movement of elevators by writing a program in JavaScript. You want to move people up or down in the most efficient way possible.
The better you do, the faster you'll progress through increasingly challenging levels. The code you write in the browser is saved locally, so you can close the browser without having to start over.
Vim Adventures
VIM Adventures teaches you VIM (no surprise there). More specifically, it teaches you all the shortcuts of a VIM text editor. You don't need any prior programming knowledge to play this programming game.
The game provides immediate error feedback, making it easy to understand what you did wrong and what you need to change to no longer make a particular mistake.
Baba Is You
Baba Is You is a highly-rated puzzle game that requires you to manipulate rules to allow the player character to reach a specific goal.
The game contains over 200 levels and won several indie awards, with some game reviewers considering this one of the best puzzle video games in recent years.
Codewars
Codewars is a platform where you learn a specific programming language by solving gamified challenges. The better you do, the higher your rank and honor.
The platform is suitable for both beginners and intermediate programmers, as many of its initial challenges are small and straightforward.
Duskers
Duskers is an indie strategy video game developed by Misfits Attic. You need to pilot drones into derelict spaceships to find the means to survive and piece together how the universe became a giant graveyard.
The game is played exclusively with the keyboard and is considered quite a scary game. While not a pure programming game, the graphics, the gameplay, and the atmosphere make this a game many programmers enjoy playing.
Turing Complete
If you’ve always wanted to understand how computers work, Turing Complete is your game. Everything starts with a single NAND gate, which you use to build increasingly complex structures until you’re building full CPU architectures.
After you’ve completed this game, you’ll have a thorough understanding of logic gates, a computer’s basic components, and assembly. It will also teach you how basic programming concepts like statements, loops, and functions work in assembly and hardware.
Grey Hack
If you’re interested in hacking (the white variety, of course), this one’s for you: Grey Hack is a massively multiplayer hacking simulator game. It has a player-generated internet that you can exploit in a wide variety of ways: social engineering, backdoor scanning, admin flaws, et cetera.
Grey Hack gives you a terminal that’s based on real UNIX commands, which you’ll use to carry out successful attacks. You use an in-game scripting language to modify existing commands and create new ones. The game is currently in Alpha, but is well-reviewed and popular.
Bitburner
Bitburner is a coding game where you use JavaScript to automate gameplay, learn skills, and solve puzzles. Story-wise, you’re an unknown hacker in a dark, dystopian world who needs to use his programming skills to get rich, augment his character, and hack a network of servers.
The programming game was released late 2021 and receives updates to this day. It has overwhelmingly positive Steam reviews. Even better, it’s free, so there’s nothing stopping you from trying it out.
Set Up a Minecraft Server
Everyone's familiar with Minecraft. But did you know you can set up a Minecraft server and run scripts on it? Doing so will teach you about AWS, Java, and possibly many other programming concepts.
So if you're a Minecraft fan and you want to level up your programming skills with a coding game, try and write a Minecraft script with the Mojang API.