Cakes & Desserts & Liqueurs

Various projects at Royal HaskoningDHV

Projects

Old code

Various games / projects at Deltares

Older games

Augmented Reality / Graphics

Pompeii - Bike pump controlled water management game

Pompeii - The bike pumping game

Recently we developed a new game, using only typical Dutch bike pumps as the game controller. The aim of the game is to keep the waterlevels in the "green zone" by pumping the water to your neighbours or perhaps just have to wait. When all the waters are in the green, you also score double the points!

To start the game... pump three times smile.



How does it work?

An Arduino Pro Mini (3.3v) , NRF24l01, a joystick (configured to be two-directional), a 18650 battery holder+regulator for 3.3v, and microphone (MAX9814) are inside each pump. The bike pump's tube is actually going inside the box with the microphone. Using Arduino code the microphone is looking for certain threshold (peak) volume for a certain amount of time... When the bike pump goes "psssh! smile" this threshold is exceeded and some custom data is send to the gateway.

Data send can be anything, but for me it was just: PlayerId|PumpDirection|Strength. Also, these "player nodes" are all wireless and you could put them anywhere.

In the end the green node was closer to the TV as it started to have some connection issues for whatever reasons (could be very well my soldering and all the massive vibrations from the children being really though on these devices!!)

Gateway is an ESP8266 (as "serial gateway") also with NRF24L01 attached and three programmable LED strips. Everytime when data is received; the receive() function will dissect the input data so the appropriate LED strip can be triggered...

Pumping would generate a "wave" effect in the LED strips. The direction of the pumping would also change whether the wave would go from the player or to the player.

The ESP8266 is connected with only USB to a laptop. The game engine Unity is just processing the incoming packets directly on the serial port, and splitting the incoming data, etc:

3;0;1;0;23;1|0|123

which would be: Player 1, Direction 0, Strength 123. It would even ignore the rest of the standard MySensors information as I really didn't care and only would allow packets which would result in three values anyway. So that would trigger the "pump" in the game... either one of the two windmills or the steam pump.


Hardware

So, the game is using only some simple hardware to get things working:

  • NodeMCU ESP8266 for the MySensors gateway + NRF24l01 module, connected using USB to a laptop that runs the game
  • 3x Arduino Pro Mini with NRF24l01 modules, a microphone and a Li-On battery holder which can also charge the battery. It's pretty much a basic MySensors setup.
  • 3x per pixel programmable led strip
  • 3x Arcade Joystick
  • 3x Jumbo bike pump (the classical Dutch bike pump)
  • Some capacitors, resistors, etc...

Development of the game

Pompeii was created in Unity. We have been using Unity for 10 years now and it still is our preferred game engine. The world is just made of sime simple geometry and particle effects. The game reads input data on the serial port, which is the data that is received by the ESP8266 using the MySensors library, and then send over the USB cable using a simple text based data format.

The game was developed in a couple of days, and every now and then I took a screenshot of progress. Combining makes an interesting development timelapse.