Who Said Gaming can’t be Educational? : Learn to Code Through These Games

Katana Tran
8 min readSep 6, 2019

--

As a child who had their first desktop at age 5 and an elder brother to show me the world of gaming, I naturally grew up loving to play all kinds of games like Guild Wars, League of Legends, Persona 5, and more. Needless to say, I was scolded daily for playing games instead of doing something more educational and my mother would often quipped me with a classic phrase, “Games, games, games, can you make money out of playing games?!”

In honesty, it was actually endless hours browsing the Apple App Store for games which lead me to my new venture of programming. As my friends were already in the field, I used coding games and apps to understand more about the career they lived in. As I played more (and learned more) I realized my joy for programming and signed up for a software engineer bootcamp! The impact of gaming on me was clear as my first CLI app was a dungeoneering game that I designed with the help of a partner. Seeing the final game with our combat mechanics and the ASCII art we made instead of lines of codes was worth all the hours we spent on the project. Not only did games kickstart my career in programming, but keeps it fun everyday as I continue learning more and more about the field!

So what exactly makes games so effective? The reward systems games often utilize causes you to want to continue playing them as they ping the reward center in your brain and increase levels of dopamine. The continual ‘good-feeling’ that we get when we solve a puzzle or beat an especially hard level makes games an amazing tool and motivator when learning to code.

“ Interactive, collaborative and competitive games tend to motivate and encourage student participation in the learning process… Students “need to be engaged more and to be put at the centre of the learning experience to change from ‘passive vessel’ to ‘active participant’” — Karen Milczynski, msu.edu

Lucky for us, many games have already been made by developers to teach others how to program! While there are so many out there, these ones were the most appealing to me due to the languages they offer or the set up of the gameplay itself.

1. CodeCombat

Learn to code in Javascript and Python! Play it HERE.

Code Combat teaches you by giving you a set of methods to play with which interacts with your character, put them into the correct sequence and you win! You’ll be able to do fun things like customization of your character and equipping different items which follow a RPG-style play. However, it does require some playing around as you’re thrown right into the methods without any proper reading, but the lessons will teach you syntax, writing statements, etc.

Code Combat also supports classroom mode for younger kids! As a teacher you’re able to track the progress of your kiddos as they learn to code too!

Code Combat gameplay

2. Codewars

Codewars has a large selection of languages to test your knowledge with! Try it HERE.

Codewars is a great tool for developers who already have general knowledge of a coding language and want to continue learning to solve algorithmic questions. It isn’t so much a game but it does have points that you can earn. The premise is that you train on programming challenges known as Kata and test your skills against others. You’ll be able to check each others solutions at the end as well.

Codewars supports a high number of coding languages

3. Flexbox Froggy

Learn CSS and flexbox HERE.

Flexbox Froggy is a cute and simple game to help you learn how to use CSS and the flexbox property! You’re helping a frog jump to the safety of a lily pad by writing code. There are alternatives to Flexbox Froggy like Flexbox Defense. Check them both out! Also try CSS diner if you’re more experienced and need help with CSS primarily.

Get to that lily pad!

4. CodinGame

CodinGame has tons of languages to choose from to hone your skills in. Play it HERE.

You’re required to know some coding prior to playing this game but it has a great concept and also scores your code so you can benefit from learning to do more algorithm-like questions. It is visually appealing but can be a bit difficult to navigate. This website plays the most similarly to a real game and has a decent flow to what you’re inputing as code into the field.

Gameplay and set up for CodinGame

5. CheckiO

Continue your voyage on the Python and Javascript ship HERE.

CheckiO is more helpful for learning and completing algorithms. It is littered with appealing images so that you’re not staring at code all day long! It does have a point system when you solve problems, but is lenient and offers hint and “Elementary” (back to the basics!) to assist your learning.

Also has a teacher option on this one!

CheckiO website looks like this!

6. Vim Adventures

Ready to start increasing your speed with Vim? Start HERE.

It is no wonder why so many professional developers use Vim to some extent. It is a powerful way to write tons of code without using much of your system’s resources. It is fast and utilizes your keyboard commands to move through your text and edit at will. In Vim Adventures you’ll be using h, j, k, l to move about and the game will help you adapt to learning how to use only your keyboard to code!

Move through the maze and train your keyboarding skills!

7. Ruby Warrior

Ready to become knighted in Ruby? Start HERE.

Ruby Warrior’s language is… you guessed it! Ruby! It’ll be a bit difficult to start off as a pure beginner in this game but it allows you choose to be a beginner or an intermediate Rubyist at game’s start. The website looks well made and motions are fluid and appealing.

Write code in an attractive environment and proceed onwards!

8. Regex Crossword

Want to learn regular expressions? Start HERE.

Learning regular expressions is scary, uncomfortable, and downright confusing. Regex Crossword helps you along with a more visibly appealing layout that we are familiar with… crosswords!

Learn how to read regex!

9. Humble Bundle

This is a great option for aspiring game developers. Check them out HERE.

Humble Bundle is a website that sells games and books as bundles for a cheaper price than purchasing them separately. The starting tier for each bundle is at 1$, then the other tiers are based on how many people are purchasing this bundle, it is still often less than 15$. Almost monthly they’ll have bundles that are geared towards learning to become a game developer or additional reading on other coding aspects. At the time this article was written they had a mixed (games and books) game development bundle and a books bundle about IT and security. Humble Bundle also donates a portion of their sales to charity, so pick your favorite and feel a little less guilty while you support your learning!

Also insanely awesome prices for regular games if you just want a few games to take home too! No judgment here.

Game and Book bundles on Humble Bundle

10. Dungeons & Developers

For the experienced, pro CSS, HTML, and JS masters, we got something for you HERE.

Do you ever find yourself longing for a skill tree in your adventure towards learning to code? Ever feel that something is amiss without having a tree-like structure to tell you what you can upgrade next? I PRESENT TO YOU, DUNGEONS & DEVELOPERS. Not even a game! But, will solve your intense cravings, guaranteed.

Aside from the gorgeous layout, it actually has lots of reading and resources that you can reference! Definitely give this a shot if you’re looking to learn a littttttle something more. Nerds.

The skill tree you didn’t know you needed.

Alongside these games, there are so many other helpful tools to help you learn, here are a few extra:

Testing your code:

  1. codepen is great for testing CSS, with JS and HTML.
  2. Repl.it provides a way to test out code quickly without making new files on your computer!
  3. Leetcode is great for testing yourself on interview algorithm problems, it’ll calculate your run time and compare you to other people who have solved the problem.

Learning apps:

  1. I really enjoy sololearn because it can be available as a website or on your phone as an app, it gives you lessons in learning languages like Python or Java and has an extensive community so you can ask for help easily!
  2. I’ve also heard great things about Udemy and their software development courses. Though it is paid content, the amount of hours of teaching you’re getting for 10–15$ is worth it! An alternative to this is Codecademy and Codecademy Go (phone app) or Khan Academy which has multiple software engineering courses, available on the phone and online.

Setting up as a beginner:

  1. I am currently using Visual Studio Code as my text editor! I use the Dracula extension as it is a bit more clear for text highlighting purposes. I’ve also downloaded erb for embedded ruby highlighting in vscode as well.
  2. If you’re looking to replace the bash terminal on your Mac, look iTerm2. There is so much functionality there and it is easier on the eyes compared a white background.

Gone are the days of reading textbooks after textbooks to learn how to code. (However if you learn better that way, kudos to you!) Today we are in the midst of an era of technology and modern problems truly require modern solutions.

--

--

Katana Tran

Currently learning the ropes on programming through Flatiron School. Here on Medium to document my journey through a newfound joy!