loading

Well it is not exactly a Pac-man, but it basically moves along a long LED strip to collect good things and avoid bad things. So you get the idea!

A group of middle-school kids have been learning and playing Arduino, NodeMCU and MQTT with me over the weekends, and as I heard about a Maker-Faire event, it is a perfect opportunity for us to make a cool game with what we have learned so far.

So the kids came up with the colorful gems to be collected, we call them Emerald, Gold, etc., and introduced an alarming wasp to chase you around. The game is very simple to get started, but quite challenging to get high score. You move a segment of LEDs along the strip, push left to collect gems and right to knock out wasp, but timing is significant in determining your score, which I will explain later in game mechanics.

Step 1: Build Components

We use an Arduino Mega board to run game basics: joystick, LED strip, Sparkles, Wasp, random appearance and disappearance, collision and game events, scoring.

NodeMCU bridges game with Internet. The events and scores are published to a MQTT channel, so interested app can receive and process the information.

Android App listen to MQTT channel, and display the score board as the game progresses. When a game is over, it let you save the game score and display in the game leader board.

The MQTT channel and messaging are transient in nature, so the leader board is also kept in a cloud database, so whenever Android App starts up, it will get the leader board as of now.

<p>A youtube video to show how the game is played out: https://youtu.be/qtlGWh3Vr88</p>
<p>That looks like a lot of fun! :)</p>

About This Instructable

1,808views

18favorites

License:

More by RaymondX:Pacman On A String 
Add instructable to: