It's a Uzebox implementation of a physical board game that my kids and I would like to play, but most of the time the pieces do not make proper electrical contact with each other, so trying to play the physical game is almost impossible. Therefore, I needed to turn it into a Uzebox game before we could enjoy it.
For each circuit, arrange the tokens to form a continuous pathway from VCC to GND that lights up the designated LEDs. All tokens must be used, and there can be no loose ends, except on the SWITCH and GND tokens. There is a built-in rule checker to help. The normal rules of electrical current and LEDs apply. Avoid creating short circuits.
After solving a circuit, you can choose to move on to the next circuit, or you can continue experimenting with the tokens on the solved level.
- 60 levels: Beginner, Intermediate, Advanced, and Expert
- Background music
- 6 PCM sound effects
- Context-sensitive help
- Built-in rule checker
- Quick netlist-based circuit "solver"
- Mouse pointer acceleration (for precise movement)
- RAM tile-based popup menu
- Uses EEPROM to track progress
- Unlock secret ending when all circuits have been solved
If you press the START button during the game, you'll get a nice popup menu that allows you to reset the tokens, switch circuits (and see which ones haven't been solved yet), and toggle the music on or off. I added a brief "How to play" section, which you can access from the title screen, and I also added a built-in rule checker that ensures you solve each puzzle correctly using all the tokens, without any short circuits, and no "loose ends" (on pieces that can't have loose ends).
Knowing myself, I made sure to completely finish up the framework and UI before I even started working on the solver (though to be completely honest, it was mainly me procrastinating while trying to figure out how to create the solver). The solver looks at the board, prunes or "degenerates" any pieces with loose ends, and then sends out "electrons" from the pieces of interest still left on the pruned board in order to build up a matrix that represents the netlist. I then convert this matrix into a 27-bit number which represents the entire circuit. Once I got to a point where I could arrange the tokens on the board and have the whisper console spit out a netlist, I tediously arranged the tokens to build as many different circuit configurations that I could think of (that result in at least one lit LED), and then manually combined each 27-bit netlist with the correct LED on/off bits. I then ran each of those combined netlists and LED on/off states through a program that generates all possible permutations of those netlists with the LED colors swapped around. This more robust set of netlists and LED on/off states is then sorted by netlist, and stored in flash memory where a binary search can be performed on it whenever the board changes.
Instead of randomly deciding which direction to go when hitting a branch (like my Laser Puzzle games did), this game systematically chooses branches so it can generate a netlist in far fewer iterations. I use the EEPROM to store which circuits have been solved, and I included an "epic win" screen that you can unlock by solving all 60 puzzles. I generated my own "Tada!" sound by arranging notes in Rosegarden, and then rendering that MIDI to a WAVE file with various different instruments until I found one that sounded good when the PCM was resampled down for the Uzebox. I also discovered a great book called Arcade Game Typography, so I was able to really step up my font game (no more blocky ATARI font!). I included a bunch of different PCM sound effects (6 in total), and again I tediously transcribed a song frame-by-frame from a YouTube Synthesia video and arranged it using Rosegarden. Since I was forced to use so many RAM tiles, I was also able to use a bunch of RAM tile effects, like smoothly fading certain text in, single pixel-level manipulation of the RAM tiles, faked "transparency" in certain spots, etc...
Many thanks to CunningFellow for his suggestions throughout the development process, for being my sounding board, and for helping me test out various iterations of the game. And thanks to everyone for providing feedback on my previous games. I tried to address as much of that feedback as possible during the creation and polishing phase of this game.
Wiki entry for the game: http://uzebox.org/wiki/Circuit_Puzzle
If anyone ends up building a circuit where an LED isn't lit up when it should be, please let me know via screenshot or photo, and I can easily add it to the database.
Edit: Updated .uze and .hex files, because I moved the non-offset lock/rotate overlay icon over by 1px to center it horizontally in the green.