Earlier this year, I wrote about CodeCombat, a web game intended to teach the concepts of object-oriented programming. Today, I’d like to introduce two others with similar approaches. These websites gamify learning JavaScript or VIM with objectives on each level that teach you about syntax or commands.
Untrusted
Untrusted is a game on Github to teach JavaScript. It’s a little lacking in the graphics department but its “teaching” is less hidden. Essentially you have hacked into a system keeping you prisoner and you can make changes to the code to adjust the environment, such as moving the wall 3 spaces to the left, so that you are outside of the cell.
The levels have puzzles that can involve simply learning to comment out a section of code or understanding the functions so that you can figure out a way to manipulate the variables to achieve your goal. It will make more sense after you play through a few levels.
Vim Adventures
VIM Adventures shines a bit more when it comes to the presentation. It looks like a standard, top-down game where you play a cursor and learn different Vim shortcut keys to move around the environment and solve puzzles. It’s not that fun that you would want to play the game on its own but if you’re wanting to get better at Vim, it’s a fine way to distract yourself from just reading documentation.
VIM Adventures is an online game based on VIM’s keyboard shortcuts (commands, motions and operators). It’s the “Zelda meets text editing” game. It’s a puzzle game for practicing and memorizing VIM commands (good old VI is also covered, of course). It’s an easy way to learn VIM without a steep learning curve.
You play a blinking cursor appearing one day in a semi text based world of Textland inhabited by little people but ruled by bugs. You soon discover that your arrival was foretold by an old prophecy and that you’re expected to restore order to the world (in case you didn’t make it to level 2 yet…).
After reaching the end of a level, unfortunately, you will be prompted to pay for a license. You can buy a 6 month license for $25 to continue through the 13 levels in the game to learn and practice shortcuts from Vim.