Christoph's 2 Cents

A Backup for My Brain!

Oracle Developement

APEX & Raspberry Pi Game

This is a proof of concept for a multiplayer game in Oracle APEX. Players log into an APEX application and choose a team (Blue/Red). Then the game presents each player with a page and a randomly chosen math problem. The page however is “locked” by a modal page telling the player that the game is paused.

The button the the Raspberry Pi controls the game state: Stopped, Ready, Running. When the game is stopped or ready, the player’s screens are blocked with the modal window.

A breadboard with a LED and two buttons is connected to the Raspberry Pi (the blue button doesn’t do anything).

The red button cycles through the games states. When the game is in Running state, the modal window goes away, and the players can answer the math question. When the button is pressed again, the game goes into Stopped state, and the modal window pops up, preventing the players from answering more questions.

In addition, the LED also shows the game state: Off- game stopped, Blinking – ready, On – running.

The interaction between the Raspberry Pi and APEX is done through Node.js utilizing Node4ORDS and socket.io.

This video shows me cycling through the three game states. There are four players connected: Red team on phones, Blue team on separate browsers.
At first the game is Stopped (LED off, modal window up), the first button press puts the game in Ready state (LED blinks, modal window up). The second button press puts the game in running state (LED on, modal window disappears). The final button press puts the game back int Stopped state (LED off, modal window up).

[youtube https://www.youtube.com/watch?v=v7ze56dbotQ&w=560&h=315]

2 thoughts on “APEX & Raspberry Pi Game

  • it would be interesting to get a good tutorial about this project in order to practise wey well

  • I’m working on it. I’ve just been too busy to post more. Please stay tuned. 🙂

Comments are closed.