1. 73

I’ve been out of programming practice and not feeling very motivated for building something real, so I’m looking for programming games that are fun. I’ve tried a few, I think I’d like something that has a REPL or notebook interface as well as or instead of a file-based interface.

Here are some I’ve tried:

Using a general-purpose programming language:

  • bitburner - this is quite fun, though there’s quite a lot going on
  • hackmud - this seems fun and interesting, though the community is small now. This was my introduction to JS dependency hell.

Special purpose languages:

  • The many Zach-likes - I’ve enjoyed these a lot, but I want something a bit more open than puzzle-y
  • Else.heart.break - This was quite fun, but a very slow start and then I broke the quest triggers by skipping right to the end of the game once I got the hacking device.
  • colobot a cool classic educational programming game where you’re an astronaut controlling lots of robots - I remember the missions feeling a lot easier to solve without much programming, but apparently there’s a new mission pack…

Anyway! Interested to hear your recommendations!

  1. 25

    Human Resource Machine teaches assembly-level programming as you manage a conveyor belt of boxes. It might be simple for this audience, but it’s by the guy who made the stone-cold-classic “World Of Goo” and has the same oddball sense of humor.

    Also, there are several tabletop board games in which you program robots, the originator being “RoboRally”. The “programming” here is mostly just sequences of moves; the challenge is that all player’s programs run concurrently, and stuff other robots do will inevitably mess up your careful plan and send your robot veering into a pit of flame or something. (I.e. this is a game you play for the race conditions not the algorithms.)

    1. 10

      The sequel 7 Billion Humans to Human Resource Machine is also fun - nice for building intuition for SIMD and GPU programming.

    2. 22

      Elevator Saga is a classic.

      1. 5

        Well I’m not getting any work done today. Please submit this as a story!

      2. 19

        TIS-100 doesn’t fit all the criteria but definitely the game end of programming.

        On a slightly different tangent, things like PICO-8 is pretty fantastic for programming for fun. :)

        1. 5

          I’ll add that TIC-80 is great if you don’t want to pay for PICO-8.

          Also, the CHIP-8 family (CHIP-8, SCHIP, and XO-Chip) are great if you enjoy programming in assembly with no stack, multiplication, or division.

          1. 3

            TIS-100 is really good. Steam tells me I’ve played 149 hrs in the past 2 weeks, but I kind of just alt-tab and leave it open. Surely, I’ll beat it soon…

          2. 18
            1. 17
              • The Deadlock Empire isn’t a programming game so much as a debugging game: you’re given snippets of code and walk through them to trigger race conditions. Good fun.

              • Untrusted: modify Javascript code to break the game. Played it back in 2014 and have very fond memories.

              • The Natural Number Game is a game for learning a formal proof language, in the process slowly building out all the rules of arithmetic.

              • I recently watched a review for the game Duskers which might be in that alley but apparently overstays its welcome after a few hours.

              1. 3

                I quite liked Duskers! I think my total playtime was 10-20 hours. The gameplay does get a bit repetitive later on (primarily because everything breaks, like weapons in Breath of the Wild), but it never lost the tension of not knowing exactly where the threats on the ship are.

                I would classify Duskers as a programming-lite game. You type in commands with arguments into a terminal, but there are no conditional statements or loops.

                1. 2

                  deadlock empire

                  cute … but it’s all seq cst :)

                2. 11

                  This isn’t exactly a recommendation, but since we are talking about programming games, I must mention the very first one created: Core War. You write programs in assembly (Redcode) that directly battle other programs in a shared memory space. I never got around to actually playing it, but it blew my mind when I first read about it in Scientific American.

                  Oh, and I played Omega a little back in the day.

                  1. 4

                    For a slightly modern Core War built on top of the excellent radare2, see r2wars.

                    1. 3

                      Core War

                      I haven’t played for a very long time but this was the first thing that came to my mind, and in my book it’s definitely a recommendation. It’s super interesting and the architecture of the online machine is simple enough that it’s fun but also foreign enough that it’s interesting.

                      The only sort of unpleasant thing is that it’s so old by now (it’s gonna be fourty in another two years!) that lots of things have been tried, so it’s hard to come up with something that hasn’t been tried before (and, therefore, with a program that won’t lose to just about anything posted on the Internet). But it’s also rewarding enough to play by yourself, and if you’re playing with a couple of friends who are just starting out, too, it’s pretty fun.

                    2. 9

                      I lost many an hour in exa punks, which is a Zachtronics game.

                      1. 8

                        I think Screeps is still going. https://screeps.com/

                        1. 6

                          If you want a truly open low-level programming game, check out Virtual Circuit Board. It’s a true sandbox without any scenarios, just the tools to make all the different logic gates (and therefore the ability to make circuits as complex as you are willing to design).

                          A game with a programming-lite system is Baba Is You. It’s reminiscent of very basic visual programming (e.g., Scratch). You can modify the behavior of game objects by pushing blocks around in the environment. It’s much more of a puzzle-based game, and requires much less thinking than the aforementioned Virtual Circuit Board.

                          1. 6

                            More on the computer engineering side:

                            • Turing complete is a remarkably solid “gates to CPU” game. It is a little weird (simulation limits around things like latches) but quite fun and a good way of practicing climbing the tower of abstraction.
                            • MHRD is basically Verilog/VHDL: The Game. Better documentation than Turing complete.

                            Programming:

                            • Code Romantic is basically a young adult novelization of crushes and PR reviews. It’s cute and a decent way to kill an afternoon. Maybe good for a kid.

                            Game development:

                            • The Magic Circle isn’t quite on the programming side, but is a neat way of seeing what you can do with an entity-component system. It’s also a delightfully dark take on game development hell.
                            1. 4

                              If you’ve got an Apple II or would emulate, Rocky’s Boots is a neat digital logic game for kids.

                              Robot Odyssey extends the concept hugely to an electronics wiring adventure game. There are six levels—you can beat level 1 as a kid, 2 as a programmer, 3 as a professional… but you probably need a degree in electrical engineering to finish. I have only seen up to level 4. Amazing challenge.

                              1. 4

                                Microcorruption is a great learning experience if you are interested in assembly.

                                https://microcorruption.com/login

                                “Scattered throughout the world in locked warehouses are briefcases. You will help steal the briefcases by breaking into the Lockitall electronic lock devices. Lockitall locks are unlockable with an app. The Lockitall devices work by accepting Bluetooth connections from the Lockitall LockIT Pro app. We’ve done the hard work for you: we spent $15,000 on a development kit that includes remote controlled locks for you to practice on, and reverse engineered enough of it to build a primitive debugger. … Should be a milk run. Good luck. We’ll see you on a beach in St Tropez once you’re done.”

                                1. 4

                                  alert(1) to win is fun:

                                  The code below generates HTML in an unsafe way. Prove it by calling alert(1).

                                  1. 1

                                    the author also made return true to win, which now has five (?) seasons

                                  2. 3

                                    swarm recently had an alpha release.

                                    a 2D, open-world programming and resource gathering game with a strongly-typed, functional programming language and a unique upgrade system

                                    1. 3

                                      http://alex.nisnevich.com/untrusted/ Is amazing (JavaScript)

                                      1. 3

                                        Robot odyssey!

                                        1. 3

                                          It’s not out yet, but Retro Gadgets seems to have potential.

                                          1. 2

                                            Quadrilateral Cowboy is a first-person game about hacking into secure locations using a portable pc. The programming is very simple but it’s the mix of programming and fps elements that makes it interesting: https://www.blendogames.com/qc/

                                            1. 2

                                              I’ve had lots of fun with the synacor challenge. You get a binary file and the description of the architecture of a machine which could execute it, and start by writing a vm to run the file. Can’t recommend it enough :-)

                                              1. 2

                                                Can’t recommend Hacknet enough. I’ve never played hackmud, but they seem similar at first glance.

                                                1. 1

                                                  Do you do any programming in Hacknet? It seems to just have a simple terminal interface and I don’t see a way to write any programs or scripts.

                                                2. 2

                                                  Silicon Zeroes was fun. It isn’t quite programming. More like basic IC building. The scaffolding from early levels to later levels was really well planned out. Feels like an intro text book but fun :)

                                                  1. 1

                                                    I’ve played this! It’s a great off-brand Zachtronics game :)

                                                  2. 2

                                                    Infon is a FOSS game akin to Corewars or Screeps using Lua as it’s scripting language.

                                                    1. 2

                                                      This is definitely not in the true spirit of the question, but Pony Island is a fun, short game that also can give non-programmers a sense of the experience, through reverse-engineering scenarios (highly simplified and humorous).

                                                      1. 2

                                                        Pony Island is also a great local co-op game! (I think we plugged in two mice? or two keyboards? It was for the bit with the beam)

                                                        1. 1

                                                          I seem to recall some sort of battling-robot sort of game from ages ago, where the robots were just stdio-based separate programs. What appeals to me there is that your bot could use whatever language you liked, as long as the bot-runner could call it. I can’t recall a name, and would love to see a modern version.

                                                          1. 1

                                                            You might be thinking of Robocode (Java)?

                                                            1. 1

                                                              Thanks, but no. I know I played the Amiga port of CROBOTS, but didn’t think that was it either. In that game, it used a subset of C, and did the compiling in-game. Maybe it was all a dream. ;)