Inspiration
I was inspired to build this project when I decided to mess around with connecting my Wii Fit Balance Board to the computer about a month ago. I was instantly fascinated at the measurement it could send to the computer to be processed. When I went through a bunch of different ideas for Gunnhacks, I decided to figure out how to integrate the Wii Fit Balance Board's center of mass measurement with character movement to create a game that could be controlled using the board.
What it does and How I built it
WaveBoard uses a lightly modified version of a pre-made Python 2 script called wiiboard.py to connect to the Balance Board through Bluetooth and the python bluez library. From there, it transmits the data via a local TCP socket to Godot (the game engine I'm using) and it's Python 3 + GDScript code. From there, the user can calibrate the center of mass data for their gameplay style. Then, when the user wishes to start the game, a game animation transition begins and starts the game. In the game, the user is tasked with avoiding brown barrels (-10 points) and going on light-blue waves (+10 points). In addition, if the player jumps (detected through sudden changes in the Balance Board's center of mass) at the right moment about every five seconds, they get an extra 5 points. I also used bfxr to make some sound effects for the game.
Challenges I ran into
wiiboard.py only worked under Python 2, so I couldn't directly integrate it within the Python 3 Godot receiver code. I instead launched it as a subprocess and established inter-process communication through a simple TCP socket running on localhost. I also needed to figure out a good way to calibrate the board as otherwise the balance board would not be a suitable method at all for controlling an in-game character.
Accomplishments that I'm proud of
I'm especially proud that I was able to figure out how to use a Balance Board originally used for the likes of Wii Fit and Wii Fit Plus for my game. It's very cool using my body to tilt around to control the in-game boat.
What we learned
Bluetooth is cool and tuning old hardware to connect to and control a video game running on the PC is really fun and interesting. I also learned how to integrate Python code within the Godot game engine (I previously just used it's built-in scripting language GDScript). Finally, I learned how to use and calibrate the Wii Fit Balance Board to be used as a controller, graphing the center of mass and translating it into player movements using the specified player calibration constants.
Built With
- bfxr
- gdscript
- godot
- python
Log in or sign up for Devpost to join the conversation.