20i
Games where you can learn programming languages

18 websites where you can play games – and learn code

It’s always better to have fun when you’re learning. Here’s some of our favourites, suitable for all ages, from toddlers to longbeard pro developers.

Gamification engages the mind and helps you remember you things. The games below can teach you web development, or at the least, put you on the road to learning more: one of the aims of #NationalCodingWeek.

While there are some great educational games which are installed locally – I’m looking at you, Minecraft – I’m going to concentrate on browser-based games.

These online coding games are largely free – so there’s no excuse not to play and learn. Maybe you could learn game coding, and end up writing a game yourself! 😁

While there isn’t really a boundary between what’s suitable for kids vs. adults, I’ll cover both:

Simple code games for kids and teens (& adults!)

Coding games for adults (& some kids!)

Simple code games

Tynker

This site is jam-packed with games for all ages, and although they offer paid versions, you can start for free. They range from the basic ‘tap’ games for children aged 5-9, more complex block-based learning for those aged 10-13, then more advanced stuff for those aged 14+.

The more advanced games transition into HTML, CSS, JavaScript, Python, and Java.

Tynker website

Find out more at Tynker.com.

CodeCombat

Boasting 20 million players, CodeCombat is a multiplayer RPG-style combat game, where you use your coding skills to vanquish the monsters.

It has some great collaborative features, like being able to create ‘websites’ with your own custom levels, and has a feature-packed free version.

Codemonkey

Codemonkey have a range of children’s games, from the simple to advanced, illustrated by charming cartoon animals.

Their games use CoffeeScript – which compiles to JS – as well as Python. These games are subscription-based.

Blockly games

A cute but basic set of games aimed at the younger crowd, all completely free. You use block-based programming to carry out a number of different tasks. My favourite is ‘Bird’.

blockly coding game

Star Wars: Building a Galaxy With Code

More block-based programming, but with Star Wars, and officially-approved by the Mouse in the Big House.

Star Wars: Building a Galaxy With Code

It may be super-basic, but it has John Williams’ music and BB-8 in it, so it automatically wins. 😉

Scratch

Less a single game, but a whole ecosystem of games, created using the Scratch block-based language from MIT.

Scratch screenshot

It’s a little like a social network, where you can code a game or experience and release it for others on the platform. There are loads of fun (and bizarre!) creations.

More advanced games to learn code

While the following are still suitable for the young ‘uns (no naughty words, as far as I’m aware!), some programming knowledge is required. So these are placed put broadly under the category of ‘coding games for adults’ – but anyone can try them!

JS Robot

A side-scrolling platform game, JS Robot will have you using your JavaScript skills to ensure that the cute robot makes it to the end of the level.

JS Robot screenshot

SQL Murder Mystery

Learn and improve your SQL coding with this ‘whodunnit’ game from Knightlab – a real ‘killer app’…

SQL Murder Mystery

Codingame

Doing exactly what it says on the tin, Codingame teaches through single and multiplayer turn-based games and community challenges. Languages include: Bash, C, C#, C++, Clojure, D, Dart, F# and Go.

It has some very pretty graphics:

Attractive graphics from Codingame, a set of many challenges to learn coding

Flexbox Defense

On the other end of the graphic spectrum – but no less fun – Flexbox Defense is an addictive tower defence game created by Channing Allen.

Flexbox Defense screenshot

Position your towers using CSS, then let waves of attackers test your guns to their limits.

Untrusted

This is a fantastic JS-based adventure game from Alex Nisnevich.

Untrusted screenshot

It may be top-down, but it ain’t simple! The synthwave/chiptune music also gives it extra appeal.

Code Maven woman

Code Maven

We wouldn’t be in the coding world without some anime ladies…

In Code Maven from Crunchzilla, your wholesome friend guides you through the HTML DOM canvas API.

She is also alongside in Game Maven, a more advanced version.

Elevator Saga

This minimalist elevator (or ‘lift’ to Brits!) game teaches you to write and optimise your JavaScript. It’s a multi-level game where you need to write an algorithm to deal with an ever-increasing number of passengers.

They got the elavator music worked-out perfectly!

CSS Diner

CSS Diner helps you learn the basics of CSS selectors through the medium of cookery.

CSS Diner screenshot

Beware – it may make you hungry…

Flexbox Froggy

Another CSS flexbox game, this involves you guiding a hapless frog to jump on lilly pads. Thankfully, no major highways to cross for this frog.

Flexbox Froggy screenshot

It’s made by Codepip, who do a number of browser-based games for learning CSS, JavaScript and HTML, speaking of which…

Grid Garden

Learn CSS Grid by positioning carrots in a planter.

Grid Garden screenshot

Another popular and addictive code-based game from Codepip.

Code Wars

Are you a Samurai coder? In Code Wars, you can test your skills against others in this online multiplayer game.

Code Wars screenshot

It supports over 55 coding languages, so there’s something for everyone here.

Vim Adventures

More for learning a coding tool, rather than a language, Vim Adventures teaches you the keyboard shortcuts for the VIM IDE. It looks like a classic JRPG. Only the first three levels are free, but they’re worth it.

Vim Adventures screenshot

Have fun and learn

These games are just a selection of our favourites: there are tons more out there.

If you want to learn or improve your coding skills, we’ve never had it so good for the quantity of online coding games. There may be a course or two as well…but who wants to go on a course when the games are so good? 🙂

Do you have a favourite? Give it a shout-out in the comments and tell us why!

Are you interested in a coding career? Read how the developers at 20i first got the programming bug: How we got into coding.

Prefer to learn by video? Check out 10 of the best YouTube channels for learning programming.

Add comment