top of page

1 day in 1/2019:
The Night Before Submission

In The Dark

processing.png
arduino.png
GitHub-Mark-Light-64px.png
in_the_dark_edited_edited.jpg

Engine/Software
Languages
Roles
Notable Features Worked On

: Processing, Arduino
: Java, C++
: Programmer
: Averaging and Validating Microphone Input, Entity Component System, Echolocation

About

In The Dark was made for the final project assignment of a class on Arduino. This game made with Processing follows with the same concept as a Digipen Singapore game, Lurking, where you have to use echolocation to see your surroundings. This is done through making sound into an Arduino setup with a microphone. It uses ASCII characters as all its graphics, and the visibility of the level is done through each text's brightness value.

 

I created an Arduino setup that utilises a microphone to capture sound. In addition to that, a buttons act as a controller to move, but you still have to use your keyboard to control the direction of movement. Different coloured LED buttons tell the player which direction they are currently moving in. Creating sound will send out a "wave" that illuminates your surroundings based on the volume of the sound made. This "wave" dissipates over distance, and over time your surrounding will also become less visible.

 

Check out the video demo below to see it in action. I am whistling to create sound into the microphone. As I whistle, you can see the environment on the screen begin to light up. Note in the second level an exclamation mark will chase and kill the player if it catches them.

Development

Receiveing the audio signals and sending player orientation between Processing and Arduino is done through serial communication. Audio signal is captured and averaged to prevent ambient sounds from triggering any echolocation and is also capped to prevent the echolocation from being too strong.

For this game, I also began experimenting with creating an Entity Component System architecture. Components are therefore simply data structures which uses bitwise values to identify them. Entities then simply contain Components, and Systems handle the logic of these Components.

To create the level, a simple text file specifying the dimensions of the level, and the level built with numbers is read. When Processing receives an audio signal, it creates noise entities that have a noise value from the player's location in every direction that is empty. These noise entities then check for walls around it to increase their brightness based on its noise value. It then checks around for empty spaces and creates a new noise entity with a lowered noise value and destroys itself. This repeats until the carried over noise value gets low enough, at which point the noise entities stop creating new ones.

bottom of page