DEV Community

Cover image for Learn To Code By Playing These Games
John Selawsky
John Selawsky

Posted on

Learn To Code By Playing These Games

Apart from an ambition to become a programmer and have an interesting well-paid job, there are plenty of reasons to learn coding even for those who see themselves in other professions.

Programming can be helpful in many areas. It develops a structured and creative approach to problem-solving. If you know how to code, you also know how to break a problem down to smaller tasks with specific actions and measurable results.

Your way of thinking becomes more logical and organized. Coding broadens your mind, so you start to see problems in the light of solutions. And of course, it teaches to be patient. Logic, problem-solving, persistence: sounds like a great set of skills for almost any professional.

Of course, coding isn’t something you can easily master by simply memorizing theory. It is important to practice programming skills from the very beginning, especially if it is your dream job. It takes hundreds of hours of practice, before you can apply for the real job. So, what options are there in learning how to code?

There are various opportunities to learn programming, such as self-teaching guides, offline and online courses. The trend of recent years is gamified online learning. It might be the best way to learn programming from scratch because you need to be highly motivated to learn programming the old-fashioned way, while gamification allows you to play and study.

Here are six gamification platforms for learning the most popular programming languages with different approaches. Choose the one that suits you the most.

1. Java: CodeGym.cc


qeIv6rNygoYrUXBwG7uA2lPpLSj2-b0239j4.png

It’s a gamified online course strictly for learning Java. The course is divided into four quests, each one has 10 levels. A user begins with level 0, in alternative futuristic reality. It is the year 3018, a galactic team crushes on a planet inhabited by wild robots. The only way to get out is to teach the young robot how to code, so he can educate others and help the team pull the spaceship out of the stone heap and return to Earth. The space crew teaches Amigo the basics of Java programming and gives tasks to complete.

The course contains lectures with just a fair share of theory and 1200+ tasks of different complexity. All tasks have instant verification option. After a student writes a solution, he gets an immediate review of every stage and suggestions how he can improve his code. If the task is tough, a user can get help from other students in “Help” section.

The course is entertaining, with constant progress and motivation. A big plus is a lively community. CodeGym is just right for beginners with zero experience in programming and for those who have a background in other programming languages.

2. JavaScript: Screeps


qeIv6rNygoYrUXBwG7uA2lPpLSj2-aajz39rq.png

This is an MMO for players who already know the basics of JavaScript and want to become better at programming. Screeps is the real-time strategy game, where a player needs to develop his own colony by mining resources, building new units, protecting his territory and conquering new.

The main game resource is energy, collected by “creeps”. The colony center is a “spawn”. Each user has one spawn at the beginning and can increase their number. The thing is that there's no need to play 24/7: a player can write commands for his spawns and creeps in advance. It is the game without a certain finishing point, because the universe is endless, and everyone can continue playing, conquering new territories and changing landscapes as they want. It seems to be a good simulator where a user can practice coding. Subsequently, as he becomes more proficient, his colony will grow.

The game reality is thought out to the last detail. Before you start, it’s recommended to read well-prepared manuals which explain the nature of game objects, possible actions and strategies a user can choose, types of commands one needs to write the story of expanding colony.

3. CheckiO: Python and JavaScript


qeIv6rNygoYrUXBwG7uA2lPpLSj2-jclk39or.png

CheckiO is a gamified project for beginners and advanced programmers, that aim to learn Python and JavaScript (clearly, right now Python’s world looks more advanced). The storyline for both languages is basically the same. A user begins the game on his home island, where he already has a set of tasks he needs to solve to move on.

The islands are scattered in the ocean. They are temporarily closed, until user solves tasks on his home island (or, later, buys a subscription to get access to the most complicated tasks). Each task is marked with a level of complexity like “elementary”, “simple”, “moderate”, “challenging” labels and navigation tags: “math”, “matrix", “logic”, “parsing”, “array”, etc.

Tasks have instant verification and “hints” to help a user out. The unique feature of CheckiO is that the project develops partnership relations with different IT companies, so, for example, if you choose to learn Python, you’ll have a chance to discover Sendgrid. Dropbox, Hubspot islands, etc.

CheckiO allows not only to have a single play, but also to create separate educational classes, where every student’s progress counts.

4. VIM adventures: VIM


qeIv6rNygoYrUXBwG7uA2lPpLSj2-jxof39wq.png

VIM isn't actually a programming language. It is a text editor, which is often described as an editor that comes with its own language and certain commands. VIM adventures game teaches a player how to use VIM’s keystrokes. It was quite popular a few years ago. Though the graphics is very simple, the game is still engaging. It has 13 levels, during which users learn more than 60 commands and motions. The main aim is to use the right commands, use them quickly and do as little actions as possible.

A user appears in a text-based world inhabited by tiny people (but ruled by bugs) as a blinking cursor. From the very beginning, he discovers that there is an old prophecy that he’s expected to bring order to the world. On the first level user learns how to use h, j, k, l buttons to move, and gradually, on each stage, he practices using other commands. If something looks complicated, try typing :help for any hint.

"VIM adventures” is an entertaining game, despite of its simplicity, and suitable for anyone who wishes to learn how to work with VIM from scratch.

5. JavaScript, Java, Python, PHP, Ruby and many more: Cyber-Dojo


qeIv6rNygoYrUXBwG7uA2lPpLSj2-yls6390c.png

Cyber-Dojo is a gamified platform with exercises and challenges for practicing almost 30 programming languages with at least one or several testing frameworks per each. There are more options for popular languages like Java, JavaScript, and Python.

Each task has a described challenge to complete and an example of how user’s solution might look. A student can either start an individual or group session, choose language he wants to practice and choose exercises. Other users can join a group session.

During the session, users write code and click test to see if they pass. Each test has a traffic light: red means that one or more test failed, amber means that tests have syntax errors and green means that all tests have passed.

Unlike other gamified courses, the aim of Cyber Dojo is not to finish the game by reaching the final level but to improve skills. It is widely used for coding sparring and group competitions, as it created for programmers who are familiar with coding at least on the basic level.

6. Ruby warrior: Ruby


qeIv6rNygoYrUXBwG7uA2lPpLSj2-ufu139fe.png

This is a game for those who want to learn Ruby programming language. A player can choose whether he wants to start with a beginner or an intermediate track. He plays as a warrior who needs to reach the top of a high tower and get the Ruby.

The main feature is that on each level a student needs to write a code that meets the requirements, push the button and see what happens next. The first level is simple: a warrior needs to walk through the hall and climb up the stairs. Then the challenges get more complicated, with battling enemies and rescuing captives. This requires more advanced coding skills. At the beginning user’s warrior has a limited set of skills, but with each level, he advances his “actions” and “skills” abilities.

The good thing is that the game is clear and consistent. You write code – the warrior executes commands. A player can’t change the code in the middle of the level. If it fails, a player needs to restart, so one should think of every option that might happen. The game can help to learn Ruby, even from the basics, but it’ll be easier for a player who’s familiar at least with a programming logic, so he could redeploy the conditions of passing a certain level into a code.

Considering that motivation and persistence are the major soft spots in self-education, engaging gamified courses seem to be the right choice for beginners in programming world. Obviously, they cannot completely replace traditional education, but practice is extremely important in coding.

(Originally published here)

Top comments (16)

Collapse
 
individualit profile image
Artur Neumann

I'm teaching ICT once a week in a small school in Nepal. After a couple of python lessons I gave the students the homework to play codecombat.com they love me for that
Then I discovered codingame.com myself and got addicted

Collapse
 
milandhimal325 profile image
Milan Dhimal

Hello !! I am also from Nepal. I really felt good hearing your experience. Codecombat is not free i guess . right?

Collapse
 
individualit profile image
Artur Neumann

It's free for the first part CS1, then you have to pay

Collapse
 
damianesteban profile image
Damian Esteban

Another good one is Code Combat - codecombat.com

Collapse
 
milandhimal325 profile image
Milan Dhimal

Is it free ??

Collapse
 
yehanny profile image
Yehanny Olivares

Yup, it's a great game thanks for sharing, please add this game to the list is awesome!

Collapse
 
clozach profile image
Chris Lozac'h • Edited

Thanks for shring this list! Re: your middle recommendation…

Oh man, I struggled so hard to get through the built-in vim tutorial before stumbling across VIM Adventures. Where the former put me to sleep, the latter was properly fun and addictive. By the time I'd finished the last level, I found myself able to navigate text more efficiently than colleagues who had been using vim as their primary editor for years.

vim-adventures.com/ is free to try, but at some point you'll be hit with a pay wall. Pay it! At $25, this thing's more engaging, more entertaining, and more effective than any other code-related class you'll come across.

(Sorry for gushing. Promise I haven't been paid for this glowing endorsement. 😬)

Collapse
 
clozach profile image
Chris Lozac'h

P.S. Just finished "Chapter 4" of Flexbox Zombies at mastery.games/courses, and am now ready to gush some more!

I've read the mozilla docs for CSS flexbox more than once, and I've tried a tutorial or two. Every time, it seems like only one real lesson has stuck with me: Flexbox is annoying and convoluted and ARGH!

This course, which is free (!), well-structured, and super easy to follow, has flipped that script on its head. Now I can't wait to get through Chapter 12, at which point I suspect I'll be able to whip out display: flex; solutions with without having to look up a single piece of syntax.

If you've had as much trouble grokking flexbox as I used to, you owe it to yourself to spend 10 minutes walking through Dave Geddes' creation!

Collapse
 
memitaru profile image
Ami Scott (they/them)

I've used simple games like flexbox froggy with my students to help them learn early on. It's really cool to see a list of more involved games as well! Sometimes splashing some fun into your learning is exactly what you need to stay motivated.

Collapse
 
jeikabu profile image
jeikabu

On Steam most games by Zachtronics are also good. Not so much "learn to code" as "think like a coder". M. Acton, long-time programmer at Insomniac Games, once quipped that SpaceChem was the closest thing he'd ever seen to PS3 SPU programming (sorry, no source- it was a long time ago).

P.S. they're also free for education

Collapse
 
russcloak profile image
Russell Cloak

Another option for programming fundamentals is TIS-100, which is on steam. It is in assembly, but it's a fun game to teach lower level programming. Find it here on steam

Collapse
 
wealagend profile image
WEaLagend

You provided Really a great list of best games to play for every learner learning these languages. Thanks for sharing this list. I appreciate your hard work.
WEaLagend

Collapse
 
codemouse92 profile image
Jason C. McDonald

How is CodinGame not on here? It's one of the best! codingame.com/

Collapse
 
skelcat profile image
Cat

Greetings,

Ty for sharing. Used codingame.com/start too and it was fun.

Thanks,
BR
Cat

Collapse
 
patsyjmoore1 profile image
Patsy J. Moore

Nicely done and with all the right info. Google