12 Games that Teach you How to Code
Yesterday we saw how I prefer game thinking to create new processes, if compared to the mere gamification of an existing process, and quoted some examples. Today let’s make a focus at a specific category, which is games that teach you how to code. Here’s my personal list of favourites. 1. CodeMonkey CodeMonkey is an […]
Yesterday we saw how I prefer game thinking to create new processes, if compared to the mere gamification of an existing process, and quoted some examples. Today let’s make a focus at a specific category, which is games that teach you how to code.
Here’s my personal list of favourites.
1. CodeMonkey
CodeMonkey is an online game-based learning platform that teaches kids aged 5-14 how to code using real programming languages like CoffeeScript, Python, and Scratch, and allows players to build their own games in HTML5. Courses are designed to align with today’s educational standards and develop computational thinking, collaboration, and problem-solving skills, and CodeMonkey’s Classroom Dashboard makes it easy for teachers to manage students, track progress, and access detailed lesson plans. CodeMonkey offers webinars, documentation, and video tutorials to support teachers in implementing the curriculum.
Courses include:
- Grades K-2: CodeMonkey Jr. and Beaver Achiever introduce block coding concepts using Scratch;
- Grades 2-5: Dodo Does Math and Coding Adventure teach text-based coding in CoffeeScript;
- Grades 6-8: Banana Tales and Coding Chatbots cover Python programming fundamentals and advanced concepts;
Game Builder is the environment where students can create, share, and modify their own games using CodeMonkey elements.
2. CodinGame
CodinGame is designed for developers to enhance their coding skills through increasingly difficult puzzles and multiplayer programming contests, timed challenges, artificial intelligence competitions, and code golf challenges. It supports over 25 programming languages, including Python, Java, C++, JavaScript, Ruby, making it accessible for learners at various levels, from beginners to experienced programmers.
For organizations, CodinGame offers customizable coding assessments, allowing employers to evaluate candidates’ skills through tailored tests and challenges.
3. CSS Diner
CSS Diner is an interactive game designed to teach users about CSS selectors in a fun and engaging way, particularly beneficial for beginners looking to grasp the basics in a practical context.
Players navigate through various levels, each presenting a unique challenge that requires the use of CSS selectors to select specific elements from a virtual dinner table. The game consists of 32 levels, each progressively increasing in complexity. As players advance, they learn how to apply different CSS selectors, including class selectors, ID selectors, and attribute selectors. Each level provides a visual representation of a dinner setting, where players must write CSS code to select items like plates, fruits, and utensils based on given instructions. For example, a level might ask players to select all apples or to select items based on their position relative to other elements.
CSS selectors are patterns used in Cascading Style Sheets (CSS) to select and style HTML elements on a webpage. They are fundamental to web design, allowing developers to apply specific styles to desired elements based on various criteria.
4. Flexbox Froggy
Again in the realm of CSS, Flexbox Froggy is an interactive web-based game designed to teach users about CSS Flexbox, a powerful layout module in CSS. The game is ideal for beginners and provides a fun way to learn how to position and align elements on a webpage using Flexbox properties.
Players help Froggy and his friends reach their respective lily pads by writing CSS code. Each level presents a unique challenge that requires the application of different Flexbox properties, gradually increasing in difficulty. The game provides a visual layout of the flex container and its items, making it easier for players to understand how different Flexbox properties affect the positioning and alignment of elements.
CSS Flexbox, short for “Flexible Box Layout,” is a layout model in CSS that provides a way to arrange and align elements within a container. It was introduced in CSS3 and is particularly useful for creating responsive web designs that adapt to different screen sizes.
5. CodeCombat
Aimed at students from grades 3 to 12 and their teachers, CodeCombat teaches Python, JavaScript, and other languages through a fantasy adventure where players write code to control their characters. Players solve puzzles and challenges that require coding skills to progress in the game.
The platform offers a structured curriculum that aligns with computer science education standards. It provides a comprehensive learning path, making it suitable for both beginners and those looking to enhance their programming skills, and it’s designed to be accessible to teachers with no prior programming experience, enabling them to introduce coding to their students effectively while they learn it themselves.
6. Untrusted
Untrusted is a meta-JavaScript adventure game where players guide the character Dr. Eval through a mysterious Machine Continuum. To progress, players must literally edit and re-execute the JavaScript code running the game in their browser to alter reality and find freedom.
The game presents a roguelike-like playing environment and a console window with the JavaScript code generating each level. As loaded, each level is unbeatable and most of the JavaScript is blocked from editing: the challenge is to open a path to the next level using only the limited tools left open for editing. It was created by Alex Nisnevich and Greg Shuflin, and uses the rot.js library for the game engine and CodeMirror for the code editor.
7. Robocode
Robocode is a programming game in which players create and control virtual robots in a competitive battle arena. Players act as programmers who write the AI for their robots, which will autonomously navigate a battlefield and engage in combat with other robots. The gameplay emphasizes strategy and coding skills, as players must develop algorithms that dictate their robots’ movements and actions. The primary goal is to code a robot that can outsmart and defeat other robots in Java or .NET, providing a fun and interactive way to learn programming.
The game can run on any operating system that supports Java, including Windows, macOS, and Linux.
Initially developed by Mat Nelson and later taken over by Flemming N. Larsen, Robocode is an open-source project that allows for continuous improvements and contributions from the community, ensuring the game remains up-to-date and relevant.
8. CheckIO
CheckIO is an online strategy game platform that teaches to solve problems using Python or JavaScript through engaging coding games and collaborative challenges. Players write code to solve puzzles and progress through different levels, while encouraging collaboration and knowledge sharing. It provides several learning paths, each focusing on a specific aspect of programming:
- Elementary: introduces basic programming concepts and syntax;
- Home: covers more advanced topics and problem-solving techniques;
- Incinerator: challenges players with complex coding problems;
- Polygon: allows users to create and share their own coding challenges.
It offers a free version with limited access to missions and features. Premium plans are available for individuals and organizations, providing access to more missions, classroom tools, and priority support.
9. VIM Adventures
VIM Adventures is an online game designed to teach players how to use the VIM text editor through a Zelda-like adventure, focusing on keyboard shortcuts and commands. Players navigate through a 2D world, interacting with characters and solving puzzles to progress through the game, gradually increase in complexity, introducing new VIM concepts and challenges. As players advance, they encounter obstacles that can only be overcome by using specific VIM commands. Players can view their collected VIM keys and their corresponding functions by accessing an in-game keyboard. This feature serves as a quick reference for the commands learned so far.
It was developed by Doron Linder.
Vim, short for “Vi IMproved,” is a highly configurable and powerful text editor that is widely used in programming and text editing. Developed by Bram Moolenaar and released in 1991, Vim is an enhanced version of the original Unix text editor, vi. It is available across multiple platforms, including Unix, Linux, Windows, and macOS.
10. Elevator Saga
Elevator Saga is an interactive programming game that challenges players to write JavaScript code to control elevators in a simulated environment with the objective to efficiently transport passengers to their desired floors while optimizing for time and wait conditions. The game requires writing functions that dictate how elevators should behave based on various scenarios, and consists of multiple levels, each presenting unique challenges that increase in complexity. Players must adapt their code to meet specific criteria and write JavaScript code to define two main functions: init (to set up the elevators and floors) and update (to manage the elevators’ movements during the game). The game runs simulations based on the provided code, allowing players to see the results of their logic in real time. As players apply their code, they receive immediate feedback on performance metrics, such as the number of transported passengers, elapsed time, and average wait time.
11. Cyber Dojo
Cyber Dojo is an online platform that provides a web-based environment for practising coding and test-driven development (TDD). It allows users to write code and tests directly in the browser, submit their solutions, and receive immediate feedback on whether the tests pass or fail. Cyber Dojo supports collaboration by allowing multiple users to work on the same coding problem simultaneously. It displays the status of all participants’ tests, promoting a shared understanding of the problem. Every 5 minutes, Cyber Dojo automatically prompts users to rotate to a different computer, encouraging collaboration and knowledge sharing among the entire group.
The platform currently supports a wide range of programming languages, including C#, C++, C, Java, JavaScript, Objective-C, Ruby, Perl, Python, and PHP.
Cyber Dojo can be used in the following contexts:
- Coding Dojos, which are collaborative coding events where developers practice programming techniques together;
- Pair Programming, where two developers work together on the same coding problem;
- Coding Interviews, as it provides a standardized environment for candidates to write and test code.
- Learning and Practice, for Individual developers who wish to practice coding exercises, learn new programming languages and improve their test-driven development skills.
12. Code Wars
Codewars is an online platform designed for software developers to improve their coding skills through practice and competition. It features a wide array of coding challenges known as “kata,” which are designed to help users ranging from beginner (8 kyu) to expert (1 kyu): each kata includes a problem statement, input data, and expected output, challenging users to write a function that meets the requirements. After solving a kata, users can compare their solutions with those of others, including “Best Practice” solutions that highlight optimal coding techniques. This feature encourages learning from peers and exploring different coding approaches.
Codewars supports over 55 programming languages, allowing users to practice in the language of their choice or learn new ones. Popular languages include Python, JavaScript, Ruby, Java, and C#.
Do you know any other games that teach programming? Tell us in the comments!