Minecraft Party

Another Birthday Request

My son requested a Minecraft theme for his 8th birthday party. After the success of the interactive idol from his Indiana Jones themed party last year, I wanted to create another interactive element for this year’s party.

The core of the idea was a scavenger hunt, but with some technology elements behind the scenes that would bridge real-world interaction with the virtual Minecraft world.

The Story

The game centers on a story about Herobrine trying to build a portal between the Minecraft world and our real world. He plans to use this portal to capture these creatures called “humans” from our world, pulling them into the Minecraft world to create an army.

Steve finds out about Herobrine’s plan, destroys the portal, and Herobrine flees. In the rubble, Steve finds Herobrine’s diary, from which he learns that the portal was working and that Herobrine was able to send some blocks into our world. He also learns that because of these blocks there is still a link between the worlds, which Herobrine could use to follow through with his evil plan.

The Setup

Some of the blocks stacked all together
Some of the blocks stacked all together

As party decorations, a number of 4x4x4 cardboard boxes covered in Minecraft art were scattered around the house and the surrounding yard.

While the guests were arriving, the TV displayed a view of a Minecraft world. Near the center of the view stood a redstone block. Steve would occasionally wander onto the screen, walk around a bit, and walk off screen again.

To start the game, all the guests were gathered in front of the TV, then the narrator read the story of Herobrine’s portal and how Steve destroyed it. Toward the end of the story, on the TV behind the narrator, ┬áSteve walked into view carrying a small redstone block in his hand. Suddenly the redstone decoration block in the room started talking. It was Steve, communicating through one of the blocks Herobrine sent to our world.

Steve explained that although he could talk through the redstone blocks he couldn’t see or hear anything. He begged whoever could hear to help him find the three blocks that Herobrine sent over to our world. He said that if the blocks could be found and brought to the talking redstone block he could break the link, and if he could break all three links then Herobrine’s plan would be foiled.

Steve continued, telling the guests that Herobrine didn’t directly say which blocks were sent over, but instead wrote clues in his diary. Steve said he didn’t understand the clues but maybe the listeners could. ┬áHe then read the first clue, which was is in the form of a riddle.

A Walkthrough Of The Game

With the exposition out of the way, the guests had a clear set of goals: solve the riddle, find the block, bring it back, and set it on top of the redstone block. While they were doing this, Steve continued to walk around, occasionally coming back to the redstone block to repeat the clue and to ask for help.

When the guests found the correct block and set it on the redstone block, the block in Steve’s hand changed to the selected block. Steven acknowledged that the block is the correct answer to the riddle and then started a deactivation ritual. During the ritual, lighting flashed in the Minecraft world, and the redstone in the real world lit up while playing a series of sound effects.

This pattern repeated for the remaining two blocks: Steve read a clue, the riddle was solved, the block was found, and the block was deactivated. The visual and audio effects got bigger each time, with more lighting flashes, faster light sequences on the block, and higher & longer sounds effects. And between the solutions the booming voice of Herobrine warned Steve to stop what he is doing.

After the final block was deactivated, Herobrine showed up, admitted defeat to Steve, and fled. At that point Steve thanked the guests for helping him defeat Herobrine and walked off screen.

How It Worked

These were the major components for this project:

  • The portal block
  • The special blocks
  • The Minecraft client
  • The Bukkit Minecraft server
  • The game server

Each one of these will be describe in more detail below.

The Portal Block

The portal block, through which Steve can speak
The portal block, through which Steve can speak

The portal block represented Steve in the real world. It contained a Raspberry Pi with a WiFi dongle, a battery powered string of LED lights connected to the GPIO pins of the RPi via an opto-isolator, a battery powered audio amplifier, a USB RFID reader, and a USB battery to run the RPi.

Magnets were used to hold the portal block's doors closed
Magnets were used to hold the portal block’s doors closed
The components in the portal block
The components in the portal block
The RFID reader mounted on the top of the enclosure. You can also see the lights glued to the walls.
The RFID reader mounted on the top of the enclosure. You can also see the lights glued to the walls
One side of the lights
One side of the lights

The string of lights was glued so that individual lights fit into holes in the cube that lined up with the red pixels in the redstone block, making those pixels glow. Since the string of lights had its own battery pack, an opto-isolator was used to ensure that no power crept back into the RPi via the GPIO pins.

The RPi ran a custom Javascript program via Node.js that would accept socket connections over the WiFi and then process received commands for playing audio and displaying light patterns. Down the same connection It would also send back status reports on what the RFID detected and when an audio sample had completed.

The audio samples were stored locally on the RPi. I used Samba during development so I could deploy new audio as needed.

The Special Blocks

The three decoration blocks referenced in Herobine’s diary (the special blocks) contained an RFID tag. Since the tag reading distance was short, all the tags were attached to the inside, bottom of the special blocks and all of the blocks (both normal and special) left the bottom uncovered (i.e. no artwork was applied) so that it was clear which side of the block was the bottom.

The Minecraft Client

This was just a regular Minecraft client, connected to the server and displaying on the TV.

Since the laptop used for the Minecraft client was rather old, the Bukkit and Game servers were run on another machine, allowing the Minecraft client to use all the cycles the laptop had available.

The Bukkit Minecraft Server

Bukkit is a community built Minecraft server with a plug-in architecture and a number of useful plugins. For this project the Denizen plugin was used to be able to control the NPCs with the Steve and Herobrine skins, as well as to control lighting strikes.

The Game Server

The final piece of the system was the game server. The game server connected to both the Bukkit server and the portal block. The game server was responsible for running the state machine for the game, listening to the RFID messages from the portal block and sending the appropriate action commands to both the Bukkit server and the portal block.

The game server was written in Javascript running under Node.js. It also acted as an HTTP server, serving out the script for the narrator to read, which included a link that would advance the game server from the “Steve randomly walking on and off the screen” state to the start of the game. This allowed narrator to time things so that Steve talking to the guests appeared as an interruption to the telling of the story, and for narrator to act surprised that Steve was talking.

The Kids Loved It

As soon as Steve told the kids what to find, they all scattered into the yard and around the house, bringing the blocks back to the TV. They gathered around the block while Steve broke the links, and everyone had a smile on their face.

Lessons Learned And Improvements

The audio amplifier I used was not up to the task. During development it was easy enough to hear, but in the midst of all the party noise you could not hear it clearly beyond a foot or two. This meant not everyone could hear what Steve was saying, so I had to repeat it for the kids.

For another project I used a Bluetooth wireless speaker that has a built in USB batter: the Soundfreaq Sound Spot. If I were to do it over now I would replace the USB battery and amplifier from the original project with the Sound Spot, powering the RPi from the amplifier’s USB port.

Another problem had to do with the difference between how I imagined the game would play out and how it actually played out.

I estimated the entire experience taking about 15 to 20 minutes because I imagined that the kids would work as a group to find each block as Steve read each riddle. What actually happened was that the instant Steve said to find the blocks, the kids all scattered individually, found every single block, and carried them all back to the TV before they even tried to solve the first riddle. That cut the entire experience down to about 10 minutes.

In retrospect the blocks should have been better hidden and the clues should have been for both the hiding place and the kind of block. That would have forced them to focus on each individual block and would have made it more engaging.

Closing Thoughts

This was a fun project to build because it combined four things that I love: my son and his interests, electronics, programming, and story telling.