18 websites where you can play games – and learn code

Games where you can learn programming languages

Gamification takes the intimidation out of learning something new, engages the mind and helps with retention.

Here’s our pick of the most engaging and fun resources for aspiring web developers:

  1. Coding games for kids and teens
  2. Coding games for adults

Note: Adults will be able to learn plenty from the kid/teen resources and vice versa. We’ve separated the child-friendly themed resources from the text heavy adventures and murder mysteries.

Simple code games

Tynker

Tynker website

Get started for free and enjoy programming-focussed games. The range covers basic ‘tap’ games for children aged 5-9, more complex block-based learning for ages 10-13, then more advanced challenges for those aged 14+. You can even build your own Minecraft mods!

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

Find out more at tynker.com.

CodeCombat

The main game is a ‘multiplayer RPG-style’ game, where you use your coding skills to help you in your adventures, vanquishing monsters and much more.

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

Python, JavaScript, HTML, CSS, C++ and AI are all covered.

Find out more at https://codecombat.com/home.

Codemonkey

CodeMonkey, winners of the 2024 Best of STEM Award in the AI category, have a polished range of learning-games suitable for users from 7 years old.

Their games focus on CoffeeScript – which compiles to JS – and Python. These games are subscription-based, and a free trial is available for you to test if it’s the right fit for your use case.

Find out more at https://www.codemonkey.com.

Blockly games

blockly coding game

A completely free, cute set of games aimed at younger children. Carry out block-based tasks and learn the basics of how sequencing in programming works. We particularly enjoy ‘Bird’.

Find out more at https://blockly.games.

Code.org

Star Wars: Building a Galaxy With Code

Code.org have some of the best, free computer science education resources on the internet. Alongside their 5-11 and 11+ content, they have an appealing range of licensed materials, including a Star Wars block-based programming game complete with John Williams’ music and BB-8!

HTML, CSS, JavaScript, Python and concepts that span all programming languages and tools are covered.

Find out more at https://studio.code.org.

Scratch

Scratch screenshot

Program or partake in fun games, art and animations for free using the Scratch block-based language from MIT. Sharing your creations and getting involved in this

Find out more at https://scratch.mit.edu.

More advanced games to learn code

Some programming knowledge is needed to get the most out of these resources, so we’ve curated them in the category of ‘coding games for adults’.

WarriorJS

Screenshot from the WarriorJS homepage

A text-based JavaScript adventure that will put your skills to the test as you defeat enemies, rescue captives and climb the tower in your quest to reach ‘The JavaScript Sword’ at the top level.

Find out more at https://warriorjs.com.

SQL Murder Mystery

SQL Murder Mystery

Solve a crime and sharpen your SQL sleuthing skills. SQL Murder Mystery drops you into a database-driven detective story where you’ll query tables, uncover clues and crack the case. It’s hands-on, addictive and perfect for levelling up your database detective abilities.

Find out more at https://warriorjs.com.

Codingame

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

Codingame turns programming into competitive fun with its turn-based puzzles, singleplayer campaign, multiplayer battles, community challenges and global leaderboards.

Take part in Bash, C, C#, C++, Clojure, D, Dart, F#,  Go, Groovy, Haskell, Java, JavaScript, Kotlin, Lua, Objective-C, OCaml, Pascal, Perl, PHP, Python 3, Ruby, Rust, Scala, Swift, TypeScript and VB.Net.

Find out more at https://www.codingame.com/start.

Flexbox Defense

Flexbox Defense screenshot

Presented by IndieHackers co-founder, Channing Allen, your job is to stop the incoming enemies from getting past your defenses. Unlike other tower defense games, you must position your towers using CSS, then let waves of attackers test your guns to their limits.

Find out more at https://www.flexboxdefense.com.

Untrusted

Untrusted screenshot

Enjoy a synthwave/chiptune soundtrack in this fantastic meta-JavaScript adventure from Alex Nisnevich and Greg Shuflin where you tweak JavaScript to guide Dr. Eval through a strange ‘machine continuum’ using the ultimate tool: code.

Find out more at https://untrustedgame.com.

Code Maven

Crunchzilla's Code Maven avatar

Crunchzilla’s Code Maven interactively walks you through HTML, CSS and JavaScript basics, which you can then put to work in Game Maven’s fun, interactive projects. Code Monster, which you can also find at the URL below, is a great place to start for those with less experience.

Find out more at https://www.crunchzilla.com.

Elevator Saga

Write JavaScript code that moves people. Program the elevators to transport people in an efficient manner as you deal with an ever-increasing number of passengers. “Only the very best programs will be able to complete all the challenges.” Do you have what it takes?

Find out more at https://play.elevatorsaga.com.

CSS Diner

CSS Diner screenshot

CSS Diner serves bite-sized challenges that teach you CSS selectors in a fun, visual way. Quick, addictive and perfect for sharpening your front-end chops.

Find out more at https://cssdiner.com.

Flexbox Froggy

Flexbox Froggy screenshot

This coding game from Codepip sees you guiding cute, coloured frogs to their lilypads while you learn CSS flexbox.

Find out more at https://flexboxfroggy.com.

Grid Garden

Grid Garden screenshot

Another popular and addictive code-based game from Codepip. Grid Garden teaches CSS Grid through playful planting puzzles. Water the right rows and columns to keep your carrots thriving as you master modern layouts.

Find out more at https://cssgridgarden.com.

Code Wars

Code Wars screenshot

Sharpen your skills and solve real-world challenges (‘katas’) in 55+ languages. Climb the ranks and join a global community of developers. This is competitive coding at its best.

Find out more at https://www.codewars.com.

Vim Adventures

Vim Adventures screenshot

Where learning how to use the VIM IDE meets classic JRPG: VIM Adventures gamifies keyboard shortcuts in a retro-style world that’s perfect for anyone who wants to boost their productivity in the terminal. Play the first three levels for free.

Find out more at https://vim-adventures.com.

Have fun and learn

The quality and quantity of online coding games has never been greater.

These games are just a selection of our favourites: there are many more out there. Do you have a recommendation? Share your shout-outs in the comments section below!

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.

Previous Article

Everything you need to know about WordPress Full Site Editing

Next Article

How we got into coding

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *