Midterm project: Light Maze – Qianyue Fan – Eric

CONTEXT AND SIGNIFICANCE:

 In the previous research, we defined interaction as an activity that involves two actors and they affect each other by a cycle of listening, processing and responding. The outcome should be entertaining or utilitarian. From the perspective of being entertaining, I drew inspiration from the Speed Game in recitation. The high level of involvement of players and real-time feedback make game one of the most interactively entertaining activities. Based on that project, I came up with the idea of turning abstract count of button clicks into visible flash of LED lights, and small buttons into handy joysticks which give users a feeling of gamepads. The final version of our project is a game where players move their position with joysticks from the start to the end point, with various obstacles in their way. The LED lights indicate the current position, and the time they use will be recorded and displayed. The outcome is shown by both a signal light and a buzzer. The project is intended for everyone to have fun and challenge themselves either on their own or compete with friends, and it may also provoke nostalgia for arcade games in the past.

CONCEPTION AND DESIGN:

In order to create a relatively small device as the carrier of the game, we chose wooden box to put all the circuits in it. Transparent plastic might have been more modern, but the box would then look messy and puzzling. We designed the upper surface of the box as the main panel, for LED lights could steadily stay in the position and the lights can be seen more clearly. To make it easier for players to use joysticks as they like, we chose not to fix them on the box. Later we added reset buttons on breadboards to restart the game without uploading the code again, but the design proved to be oversized and cumbersome. However, we did not change them into built-in style due to the time limit. As for the coding, we include the position of players with the help of the professor and added different tunes of buzzers for success and failure. We also used millis() function to make a ranking list on the serial monitor.

FABRICATION AND PRODUCTION:

In the beginning, we made a box with laser cut and marked each piece of board in case we forgot their correct positions. But the box turned out too small and could not be put together due to a mistake in the original design.

marked boards

In the user test, we had to make do with the problem and just put the upper piece loosely on the top. People were interested in the game and competition, but the game supported only single player so they could not compete simultaneously. game supported only single player so they could not compete simultaneously.

first version

Also, the joysticks could be put in the wrong direction and there were no relevant signs for them. In fact, there was no instruction for the game and we needed to explain every time. Besides, the time counted in millisecond was complicated, the reset button was not handy, and the flash of signal light and buzzer made users believe that they failed while they actually reached the end point. In the there was no lose or win but only delay in the user testing version, and it was only a matter of time to reach the destination. Having received all these feedbacks, we first made a new box double size as the original one to support two players. The box was made more user-friendly with concise instructions on the front, and millisecond was changed into second. We stuck pieces of wooden arrows to the joysticks to show the right direction and used reset pins on Arduino boards to connect external buttons to them. We also improved the codes so that players would have the risk to fail when going the wrong way. Accordingly, we used separate light colors and sounds for failure and success. In that way, our project became more challenging and visually satisfying.

new version

CONCLUSIONS:

The goal of our project is to create an interactive and competitive game for users to enjoy themselves. As a game it fulfilled most of our requirements, but there are still defects that negatively affect the interaction. Users are quick to be proficient in the game. While it gives them the chance to improve skills, the game soon becomes unchallenging and is reduced to both players going the same path as fast as possible. If we had more time, we would provide more paths to increase difficulty and cancel the limit of moving right and down only, making it more like a maze game instead of one-way race.

In the whole process, we did well in time management and cooperation. Every step was precisely scheduled and we were quick to react to incidents in time. What we learned was something about the art of design. Despite the countless wires and LEDs we used, the game itself was not very entertaining compared to some other carefully designed projects. Interaction is the combination of art and logical designs, with proper appearance and creative thoughts. Complexity does not necessarily bring surprise and appreciation, creativity does. Interactive art is not aimed at imitating existing entertainment forms but making new forms, and only that makes the interaction meaningful.

Code:

(main code)

#include “pitch.h”
int currentPosition = 2;
int melody[] = {
NOTE_C4, NOTE_G3, NOTE_G3, NOTE_A3, NOTE_G3, 0, NOTE_B3, NOTE_C4
};

// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {
4, 8, 8, 4, 4, 4, 4, 4
};

void setup() {
// put your setup code here, to run once:
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10,OUTPUT);
pinMode(11, OUTPUT);
pinMode(12,OUTPUT);
pinMode(13,OUTPUT);
pinMode(A0, INPUT);
pinMode(A1, INPUT);

digitalWrite(2, HIGH);
digitalWrite(10, HIGH);
digitalWrite(12, HIGH);
Serial.begin(9600);

}

void loop() {

int xvalue = analogRead(A1);
int yvalue = analogRead(A0);

boolean moveRight = false;
boolean moveLeft = false;
boolean moveUp = false;
boolean moveDown = false;

if (xvalue < 270) {
moveRight = true;
} else if ( xvalue > 750) {
moveLeft = true;
} else if (yvalue < 270) {
moveUp = true;
} else if (yvalue > 750) {
moveDown = true;
}

// Position 2
if (currentPosition == 2) {
if (moveRight == true) {
currentPosition = 3;
digitalWrite(3, HIGH);
delay(500);
}
if (moveDown == true) {
currentPosition = 8;
digitalWrite(8, HIGH);
delay(random(0, 1000));
}
} else if (currentPosition == 3) {
if (moveDown == true) {
currentPosition = 4;
digitalWrite(4, HIGH);
delay(500);
}
if (moveRight == true) {
digitalWrite(13,HIGH);
Serial.println(“You fail!”);
tone(9,1000,500);
digitalWrite(9,LOW);
delay(700);
digitalWrite(9,HIGH);
tone(9,1000,500);
Serial.end();
}
} else if (currentPosition == 8) {
if (moveRight == true) {
currentPosition = 4;
digitalWrite(4, HIGH);
delay(500);
}
if (moveDown == true) {
digitalWrite(13,HIGH);
Serial.println(“You fail!”);
tone(9,1000,500);
digitalWrite(9,LOW);
delay(700);
digitalWrite(9,HIGH);
tone(9,1000,500);
Serial.end();
}
} else if (currentPosition == 4) {
if (moveRight == true) {
currentPosition = 5;
digitalWrite(5, HIGH);
delay(500);
}
if (moveDown == true) {
currentPosition = 7;
digitalWrite(7, HIGH);
delay(random(0, 1000));
}
} else if (currentPosition == 5) {
if (moveDown == true) {
currentPosition = 6;
digitalWrite(6, HIGH);
if (currentPosition = 6) {
digitalWrite(11, HIGH);
Serial.println(“You win! Let’s check the time!”);

for (int thisNote = 0; thisNote < 8; thisNote++) {
int noteDuration = 1000 / noteDurations[thisNote];
tone(9, melody[thisNote], noteDuration);
int pauseBetweenNotes = noteDuration * 1.30;
delay(pauseBetweenNotes);
noTone(9);
}
}
}
} else if (currentPosition == 7) {
if (moveRight == true) {
currentPosition = 6;
digitalWrite(6, HIGH);
if (currentPosition = 6) {
digitalWrite(11, HIGH);
Serial.println(“You win! Let’s check the time!”);

for (int thisNote = 0; thisNote < 8; thisNote++) {
int noteDuration = 1000 / noteDurations[thisNote];
tone(9, melody[thisNote], noteDuration);
int pauseBetweenNotes = noteDuration * 1.30;
delay(pauseBetweenNotes);
noTone(9);
}
}
}

}
float millisecond = millis();
float second = millisecond/1000;
if (digitalRead(6) == HIGH) {
Serial.println(“You used ” + String(second) + ” seconds”);

Serial.end();
}
}

(“pitch”)

#define NOTE_B0 31
#define NOTE_C1 33
#define NOTE_CS1 35
#define NOTE_D1 37
#define NOTE_DS1 39
#define NOTE_E1 41
#define NOTE_F1 44
#define NOTE_FS1 46
#define NOTE_G1 49
#define NOTE_GS1 52
#define NOTE_A1 55
#define NOTE_AS1 58
#define NOTE_B1 62
#define NOTE_C2 65
#define NOTE_CS2 69
#define NOTE_D2 73
#define NOTE_DS2 78
#define NOTE_E2 82
#define NOTE_F2 87
#define NOTE_FS2 93
#define NOTE_G2 98
#define NOTE_GS2 104
#define NOTE_A2 110
#define NOTE_AS2 117
#define NOTE_B2 123
#define NOTE_C3 131
#define NOTE_CS3 139
#define NOTE_D3 147
#define NOTE_DS3 156
#define NOTE_E3 165
#define NOTE_F3 175
#define NOTE_FS3 185
#define NOTE_G3 196
#define NOTE_GS3 208
#define NOTE_A3 220
#define NOTE_AS3 233
#define NOTE_B3 247
#define NOTE_C4 262
#define NOTE_CS4 277
#define NOTE_D4 294
#define NOTE_DS4 311
#define NOTE_E4 330
#define NOTE_F4 349
#define NOTE_FS4 370
#define NOTE_G4 392
#define NOTE_GS4 415
#define NOTE_A4 440
#define NOTE_AS4 466
#define NOTE_B4 494
#define NOTE_C5 523
#define NOTE_CS5 554
#define NOTE_D5 587
#define NOTE_DS5 622
#define NOTE_E5 659
#define NOTE_F5 698
#define NOTE_FS5 740
#define NOTE_G5 784
#define NOTE_GS5 831
#define NOTE_A5 880
#define NOTE_AS5 932
#define NOTE_B5 988
#define NOTE_C6 1047
#define NOTE_CS6 1109
#define NOTE_D6 1175
#define NOTE_DS6 1245
#define NOTE_E6 1319
#define NOTE_F6 1397
#define NOTE_FS6 1480
#define NOTE_G6 1568
#define NOTE_GS6 1661
#define NOTE_A6 1760
#define NOTE_AS6 1865
#define NOTE_B6 1976
#define NOTE_C7 2093
#define NOTE_CS7 2217
#define NOTE_D7 2349
#define NOTE_DS7 2489
#define NOTE_E7 2637
#define NOTE_F7 2794
#define NOTE_FS7 2960
#define NOTE_G7 3136
#define NOTE_GS7 3322
#define NOTE_A7 3520
#define NOTE_AS7 3729
#define NOTE_B7 3951
#define NOTE_C8 4186
#define NOTE_CS8 4435
#define NOTE_D8 4699
#define NOTE_DS8 4978

Leave a Reply