Eat red! Blue is dangerous!

The concept of this project was to create a simple video game. The game consists of a dot that is moving a steady speed and has a starting diameter. In the surrounding there are five red and five blue squares. The goal is to control the direction of the dot by steering a potensiometer and drive it through all the red squares, without touching the blue ones. Every time the dot passes through a red square the square becomes deactivated, the dot’s diameter increases and the speed is increasing too in order to make the game more difficult.

If a blue square is entered the game automatically ends. A second potensiometer is used to change the color of the dot trail so keep it always visible.

 

 

02 0103

 

Arduino

The Arduino code is talking float values from two potensiometers. One of them is the steering and the other one is used to change the color value.

 

Processing

The inputs of the two potensiometers are remapped and used as the control variables for speed and fill color of the dot. The squares are drawn in specific locations to make sure there are not consequent squares of the same color. Loops with if conditions are examining the position of the dot and if it is in a red square then the specific square in redrawn as white and a variable is changed from 0 to 1 to deactivate the square in the next loop iteration. At the end of draw another if statement is examining if all the deactivation parameters of the five blue squares have remained unchanged. If any of them has changed from 0 to 1 then the game over screen is drawn over the whole sketch, as it would mean that the dot has entered a blue square.

 

 

 

 

The red hunter is a project of IaaC, Institute for Advanced Architecture of Catalonia
developed at Master in Advanced Architecture in 2016/2017 by:

Students:

Guoliang Zhang

Athanasios (Thanos) Zervos

Sotirios Yfantis

 

 

Faculty:

Angelos Chronis
Angel Muñoz