Space Trouble#

"Space Trouble is in development as a game to be played during a space-themed party (unfortunately delayed until after the Coronovirus apocalypse). It is my way of learning embedded development past the quick examples seen on Arduino tutorial projects. The project itself takes inspiration from the party game app Space Team.

The idea of Space Trouble is that each of three players has in front of them a panel of buttons and knobs, along with a screen instructing them what control needs twiddling to keep the ship sailing smoothly.

Picture of panel Prototype panel. One thing I learned from the prototype is that the buttons I use on the left have built-in debouncing, but sometimes require more effort than expected to register a "push". The final panel will most likely have an LED next to the buttons to give feedback to the user that the button was pressed enough to register.

The catch is that although your panel's screen might be telling you to "Enable the Gelatinous Darkbucket", the Gelatinous Darkbucket control may in fact be on someone else's panel. Therefore, players must communicate with each other (which often takes the form of chaotic yelling).

Current Status#

Currently, I have developed a prototype panel which runs the game in its entirety, which is shown below. The next step will be to create three such panels, each with a module to enable wireless communication with the others.

The game flow goes as follows:

  • The system is turned on. The user gets a "Press any button to start."
  • The game begins. The user is given directions. If they perform an incorrect input, they lose two hull points. If the timer runs out before performing the input, they lose 4 hull points.
  • The "distance" is constantly increasing, working as a score.
  • When the hull finally hits zero, there is a game over screen showing the score for five seconds.
  • Then the system goes back to "Press any button to start."

Implementation#

Image of Inside of Box Wiring The wiring on the inside of the box.

The prototype panel has been implemented using a Feather M0 development board. The software itself is implemented in Rust.

Some general ideas regarding programming this in Rust:

  • Early on, there were some hickups getting the item to upload. I think this is because, despite the fact that the Feather M0 is a well-supported board, some of the documentation for it is copy-paste and led me down a rabbit hole to try to upload using different boot loader instructions. I'm trying to verify that this is the case and will create an issue if that is the case.
  • The Rust crates out there split between using hal-embedded and not, but the ones that do make it easy to put stuff together.
  • Once I hit a point where I was able to constantly get things working, I found that I was able to do massive refactorings until I compiled, plug it in, and things "just worked."