Colby Heaton

The FlashBox

The second project of IGME-470 required us to create a unique controller that could interact with a digital game. The controller would be made with the Arduino, and the digital game could be a pre-existing application, or a game of our own design. For maximum control, I decided to create a game specifically for my controller. As a result, the workload for this project was a little above average, but I'm happy with what I learned.

The Idea

The basis of this project was the controller itself - I tried to think of a controller first, and then develop a game around it. When looking at the Arduino Starter Kit, I was evaluating the different sensors based on how fun or natural their forms of input were. Ultimately, I settled on using the phototransistor as my main form of input. Therefore, the game would need to feature light as a prominent gameplay gimmick. With a light-based controller, I presumed the player could shine a flashlight on the sensor to make something happen in-game. This lead to the finalized design of the controller, titled, "The FlashBox." It's a standard flashlight attached to a 5in x 5in x 5in cardboard cube. The cube blocks a majority of the outside light, and the Arduino sits inside this cube. The Arduino's phototransistor will communicate with the game to convey when the flashlight is on or when it's off. Additionally, the Arduino has a piezo on it, which will be used by the game to communicate information to the player. The game, made in p5.js, is called "Phantom Flash." Players scare ghosts with the FlashBox to earn a high score. The closer the ghost, the more points are earned. Since you're in a dark room, you cannot see the ghosts - instead, a noise will play from the piezo to alert the player that a ghost is near.

Development

After presenting our pitches in class, we were given the opportunity to team up with another student to accomplish the project. I decided to team up with my roommate, and we began developing the FlashBox and "Phantom Flash." My roommate built the physical controller, and I created the game and controller's software. The Arduino had a phototransistor as analog input, and a piezo speaker for output. The game assets were drawn in p5.js. Serial communication was a big learning experience, connecting the Arduino to p5.js using a serial monitor. You can see the code here, and play the game here. See the schematic and parts list.

In Retrospect

I am very happy with the work I have put towards this project, but there are definitely areas that need to be improved. The novelty of the controller is the main draw, but the game itself could use more personality and challenge. Adding more directions for ghosts and improving conveyance would enhance the experience.

References

“Lab: Serial Input to P5.Js Using the P5.Serialport Library.” ITP Physical Computing, itp.nyu.edu/physcomp/labs/labs-serial-communication/lab-serial-input-to-the-p5-js-ide/.

Fitzgerald, Scott, and Michael Shiloh. Arduino Projects Book: Everything You Need for Your First Arduino® Projects. Arduino, 2015.