I’ve had a game idea bouncing around in the back of my head for a few years now. In fact, many of my goals in the past few years (i.e. watching more art films, learning to paint, and publishing a small game) have been in service of expanding my repertoire to be able to work on this larger meta project.
The game itself is structured as a puzzle-based adventure game, where solving puzzle challenges in effect unlock skills which can be used to advance the story. The puzzles themselves are supposed to be abstractions of programming challenges, but presented in a way so that non-programmers could complete them. I wanted to explore the space of manipulating a stream of data, rather than some kind of Turing complete programming environment like Shenzen I/O (which does that really, really well).
A short time ago, a member of my team at work showed me Rete.js, a framework for building node/graph editors in Javascript. This felt intuitively like how I wanted to construct puzzles, so in the spirit of some rapid prototyping, here are a couple demos working out the characteristics of this space.
Mechanics
As an example of what I was thinking about, I wanted to challenge players to construct a data flow system which would be given a set of "test runs" of data. Each run would have an expected output, and all tests would have to pass in order to advance the story.
The mechanics of building the system would be to connect the input data stream to the output data stream, passing through one or more nodes in order to construct the appropriate output. My expectation is that most of the puzzles will be hard in terms of constructing the right output, but that the best puzzles will be ones which encourage players to jump to conclusions and reach incorrect solutions which work for a majority of cases but not all of them.
Here's an example puzzle along these lines. The goal is to connect the input and output nodes in a way which will cause the desired output to be generated.
Use the buttons below to add Increment
nodes to the graph
which can be used to solve the puzzle. If you just want to see the solution,
press Show solution
below.
Each of the test inputs, expected outputs, and what the configured graph actually outputs for the test are displayed in the chart below. You have solved the puzzle when all of the outputs match the expected outputs.
Input |
---|
Expected |
Output |
This puzzle requires a little bit of experimentation - it turns out that the increment node does not roll over from 'Z' -> 'A', and that negative values are supportive. Understanding these principles are the key to solving the third case.
Split / Join
This puzzle introduces the idea of splitting and joining streams.
A solution here is far more special cased, and requires understanding how the split and join nodes handle different offsets for streams of different sizes. Keep in mind that you don't need to connect all outputs!
Input |
---|
Expected |
Output |
It feels like there’s some merit here. I’m looking forward to trying a few different iterations along this theme to see where I wind up!
Comments? If you have feedback, please share it with me on Twitter!