You can start programming at nearly any age, infants aside. Still, if you want to get kids into coding, the earlier they start, the more likely it is they’ll be hooked. The trick is actually getting them interested in the first place.

Kids aren’t often interested in starting off with the fundamentals of a language. They probably won’t be interested in a simple “Hello World” example either. Instead, get them started with something fun so they have a reason to learn programming.

Minecraft needs no introduction. Even if you’ve never played the game, you’ve no doubt heard about it. The game is on nearly any device you can think of these days, and kids can’t get enough of it. That popularity alone makes it one of the best coding games for kids.

While Minecraft is a game, it’s also a tool for making games within the overall games. This makes it a great option for kids, as they’re probably already hooked on it. Kids will stay motivated by the ability to create their own games in a game they love. It’s also simple enough that even younger kids will be able to pick it up fairly quickly.

Download: Windows | Mac | Linux | iOS | Android ($6.99 to $26.95, depending on version)

As the name implies, CodeCombat is a game that sees you writing code in order to control a hero on an epic quest. This is a community project built with teachers in mind. That makes this game especially well-suited to introducing programming in schools.

Unlike some games which use either pseudocode or their own simplified programming languages, CodeCombat uses existing languages. JavaScript and Python are supported, both of which are some of the most popular languages today. Experimental support for CoffeeScript, a simplified dialect of JavaScript, is available as well.

Aside from Minecraft, this is probably one of the best-known games on this list. LEGO Mindstorms have been around for years, combining the icon toy blocks with code to make working robots. As technology has improved, so have Mindstorms kits, and the newer models are truly impressive.

Kids don’t even need a computer in order to program the newer EV3 kits. The EV3 Programmer app, available for iOS and Android devices, lets you build and program your robot with nothing more than a tablet.

A puzzle game at its core, Lightbot aims to teach programming skills without the player even being aware that they’re learning. While it isn’t Minecraft or LEGO levels of popular, it has done quite well so far. More than 20 million kids have played Lightbot to date, according to the game’s website.

This doesn’t focus on teaching an actual programming language, but instead focuses on concepts related to programming. Topics kids will learn playing Lightbot include sequencing, overloading, procedures, recursive loops and conditionals.

Download: iOS | Android ($2.99)

It may look somewhat spartan at first, and that’s because it is. The titular code monster sits at the top of the screen, walking you through a series of code exercises in the text boxes below. The goal is to guide you toward experimenting with the code on screen.

Over time, this could potentially ignite the spark in kids to start exploring different programming concepts on their own. For example, instead of pointing out what a variable is, it starts using one, then invites the player to figure out how it works. This won’t be ideal for everyone looking to introduce coding for kids, but this more exploratory approach is absolutely worth trying.

On its website, Blockly Games describes that the series of games are explicitly meant for kids who have no prior programming experience. Like Lightbot this doesn’t teach actual programming, but instead focuses on related concepts. Some of the games just feel like abstract games more than puzzles related to programming.

Some of the games seem similar to the concepts of other games on this list. Others are their own sorts of puzzles. This is a great place to start for beginners, but you’ll approach them in order, as concepts are introduced gradually. If kids skip to the end or even in the middle, they may miss key information.

RoboZZle is another game that teaches programming concepts, but not an actual language. In this case, you’re programming steps into a robot by placing commands in a series of blocks. You start off fairly simply, but the game quickly introduces concepts like subroutines and recursion. These are key concepts for anyone looking to learn programming.

This is a game that is simple enough that younger kids may pick it up easily, but it’s still fun for older kids. Even adults who enjoy logic puzzles may get a kick out of it. This is thanks to the player-submitted puzzles, which constitute the real meat of the game. These can get devious rather quickly.

Unlike the majority of the games on this list, CodeMonkey seems to be meant exclusively for teachers. That means that the price is rather steep. The game is more expensive than Minecraft, though it’s not as pricey as a Mindstorms kit.

Like most of the games here, CodeMonkey works entirely in the browser. Gameplay-wise, it’s similar to some of the others, only you’re guiding a monkey instead of a nameless hero. One thing to note is that the game seems to rely on Chrome. Running it in other browsers can lead to unexpected behavior or the game just plain not working at all.

On its website, Machineers’ developers refer to it as an educational puzzle adventure. In many ways, this is one of the more proper “games” on this list. Though it will help teach programming logic, it’s also just a fun puzzle game.

This is one of the few games here that you need to download in order to run. Fortunately, it’s available for Windows, macOS, and Linux so you don’t have to worry about which platform you want to use to run it.

Download: Steam ($4.99)

Cargo-Bot is special in a few ways. The first is that it’s the only iPad-exclusive game here. The second is that it’s not just exclusive to the iPad, but was actually created on one as well. Cargo-Bot’s creator programmed the game using the Codea app. We’ve taken a look at this app before, and Codea is a great way to create apps on your iPad.

How Codea Lets You Create Your Own iPad Apps How Codea Lets You Create Your Own iPad AppsCodea is a $15 purchase from the App Store, and it allows you to create your own iPad apps with ease.READ MOREThe game consists of 36 puzzles, which are solved in a manner similar to RobuZZle and a few other games on this list. Cargo-Bot is a great “gateway game” to get kids more interested in programming.

Download: iOS (Free)

Scratch is more than a programming game. Instead, it’s an entire platform that lets users play games submitted by other players as well as submit their own. Similar to Minecraft, most of the fun for kids here comes from making their own games, not playing others’. When it comes to coding for kids, this is great motivation.

Created by the Lifelong Kindergarten Group at the MIT Media Lab, Scratch is available completely free of charge. It’s far from the only free app on this list, but it’s definitely one you should check out. Not only may it be great for your teaching purposes, but you may even have fun with it yourself.

Other Ways to Get Kids Into Programming

The above games and others are a great way to get kids interested in programming, but they aren’t the only way. While plenty of kids will need the reward system of a game to keep them coming back, other kids may be interested in coding for coding’s sake. For these kids, the game elements may even get in the way.