Candyland Bop- Interaction Lab Midterm Project

Candyland Bop

Creator: Isabella Liu                                                                      Instructor: Andy Garcia 

In my project, I combined what I learned in class about sensor models and interactive models to create a fun and engaging game. My understanding of an interactive project is that it involves the user engaging with the project and the project providing a response. With this in mind, I created an Arduino version of the popular “Bop It!” game. One of the things that makes my project unique and significant is its portability. By creating an Arduino version of the game, I made it easy for people to interact with it anywhere they go. This increases its accessibility and appeal to a wider audience, making it a valuable addition to the realm of interactive games. Although “Bop It!” is a well-known game, my contribution to its development lies in the Arduino version and its portability. By re-creating the game in this format, I added a new dimension to its functionality and appeal, which can attract new users and enhance the experience for existing players. I designed my project for anyone who enjoys interactive games and wants to have fun while engaging with technology. The portability of the game makes it especially valuable for people who are always on the go and want to have a fun activity they can easily bring with them. My project combines the concepts of sensor models and interactive models in a unique and engaging way, making it a valuable addition to the world of interactive games.

In designing my interactive “Bop It!” game, my understanding of how users were going to interact with the project informed several design decisions. For example for the user interface, I made sure to design a clear and easy-to-use interface that would allow users to understand how to interact with the game. I used simple and intuitive graphics on the LED display and chose a bright and attention-grabbing color scheme to make it easy for users to identify which button to press. For response time, I made sure to program the game to have a quick and random response time so that users could feel the game reacting immediately to their inputs. This added to the overall excitement and engagement of the game. For portability, as mentioned earlier, portability was a key design consideration for my project. I chose to use a small Arduino board, compact buttons, and a portable power source and condense them into a cardboard box to make the game lightweight and easy to carry. In terms of materials and elements, I used an Arduino board, buttons, an LED display, and a battery pack. I chose these materials based on their functionality and suitability for the project’s purpose. I also included real candies to decorate the cardboard box and added gummy bears onto the buttons to add a sense of sensory touch when users press the button. The Arduino board provided the necessary computational power to run the game, while the buttons and LED display allowed users to interact with the game and receive feedback in real time. I chose a battery pack to power the game because it made it more portable and eliminated the need for a wall outlet. An alternative option for power would have been a USB cable connected to a power source, but this would have limited the portability of the game. My design decisions were based on creating a fun and engaging game that was easy to use and portable. By understanding how users were going to interact with the game, I was able to make informed decisions about the design, materials, and elements that would best serve the project’s purpose.

During the production process of my interactive “Bop It!” game, there were both successes and failures that played a significant role in shaping the final outcome. As a solo project, I was responsible for all aspects of the project, including design, coding, and testing. One of the most significant steps in the production process was programming the game’s logic. I spent a considerable amount of time writing code that would accurately detect user input and respond with the appropriate action. This was a success because it was necessary for the game to function properly. However, I faced some failures in the process of wiring the electronics. I encountered several issues with the LED display not lighting up or buttons not functioning correctly. Through trial and error, I was able to identify the issues and fix them. This was a significant learning experience because it allowed me to gain a better understanding of electronics and troubleshooting. I also played a significant role in the design of the game’s user interface. I created several sketches and drawings of the interface before settling on a design that I felt was simple, intuitive, and engaging. I selected a bright and attention-grabbing color scheme and simple graphics to make it easy for users to identify which button to press. The user testing session was an essential part of the production process. During the session, I observed users playing the game and taking note of any issues or difficulties they encountered. I discovered that some users had difficulty identifying which button to press, which led me to modify the graphics on the LED display to make it clearer. Based on the user testing feedback, I also made adaptations to the response time of the game. I adjusted the programming to have a quicker response time, which led to an overall more engaging and exciting gameplay experience. Finn and I used a collaborative approach to work together, with each of us responsible for our individual part of the project but also working together when encountering issues with design and the coding process. The production choices I made for my project were based on my project goals of creating a fun and engaging game that was easy to use and portable. I relied on trial and error to identify and fix any issues with the electronics, and I worked to ensure that the user interface was simple and intuitive. User testing played a significant role in shaping the final product, and I made adaptations to the game based on the feedback received. Essentially, my project’s production process was a combination of successes and failures that allowed me to create a final product that met my project goals.

The goal of my project was to create an interactive version of the “Bop It!” game using Arduino that was portable, fun, and engaging. My definition of interaction involves users engaging with the project and the project providing a response. In that sense, my project results align with my definition of interaction, as users were able to play the game and receive a response based on their actions. However, there were also some aspects of my project that did not fully align with my definition of interaction. For example, the game did not provide any feedback on user performance, such as a score or time limit, which could have added to the interactive experience. During user testing, I observed that users interacted with the game in a variety of ways, including some who were immediately engaged and others who required some instruction. Ultimately, most users were able to understand the game’s mechanics and enjoy playing it, which aligns with the expectations of my audience’s response. If I had more time, I would improve my project by adding more interactive features, such as a scoring system or additional game modes. I would also work to refine the game’s user interface to make it even more intuitive and engaging. Through setbacks and failures in the production process, I learned the importance of troubleshooting and the value of persistence in solving technical issues. I also gained a deeper understanding of electronics and programming, which will be valuable in future projects. In conclusion, my interactive “Bop It!” game project was a success in creating an engaging and portable game that aligned with my definition of interaction. Although there were some aspects that could be improved, overall, the project met its goals and provided valuable learning experiences.

Annex

IMG_7844 2 

Link to video:

https://drive.google.com/file/d/1MrvdZDzYGrh8rFH6PN5o35JPczqh_1eo/view?usp=sharing

Code:

“`cpp
int ledPin1 = 7;
int ledPin2 = 8;
int ledPin3 = 9;
int Startbutton = 5;
int Resetbutton = 6;
int flexSensorPin = A1;
int touchSensorPin = A2;
int slideSensorPin = A0;
int long ranDelay = 0;
int sensorValue = 0;
float realTime;
int buttonPressed = 0;
int state = 0; // 0 to start game, 1 is game playing
int randomSensor = 0; //the sensor that correlates with the LED
long startTime;
int randomLight;
const int sensorPin = A0; // Slide sensor pin
const int threshold = 20; // Movement threshold value
int previousValue = -1; // Previous sensor reading
int score = 0;
int finalScore;

void setup() {
Serial.begin(9600);
pinMode(ledPin1, OUTPUT);
pinMode(flexSensorPin, INPUT); //sets up all the buttons and sensors
pinMode(ledPin2, OUTPUT);
pinMode(slideSensorPin, INPUT);
pinMode(ledPin3, OUTPUT);
pinMode(touchSensorPin, INPUT);
randomSeed(analogRead(A5));
}

void loop() {

if (state == 0) {

Serial.println(“”);

Serial.println(“Push the Kiss to Start Game!”);

randomLight = randomLight = random(7, 10); //the random LED
//randomLight = 7;
Serial.println(randomLight);

while (digitalRead(Startbutton) == 0) { //while loop sets Sensorpin as the game starting button
}

state = 1;
buttonPressed = 0;
startTime = millis();
Serial.println(“Let’s go”);

score = 0;
}

if (state == 1) {

// if (randomSensor == 0) {

//Serial.print(“previousValue: “);
//Serial.println(previousValue);

if (randomLight == 9) {
sensorValue = analogRead(flexSensorPin);

// Read sensor value
if (previousValue != -1 && abs(sensorValue – previousValue) >= 4) { // Check for movement
Serial.println(“Flick detected!”); // Output message
score = score + 1;
Serial.println(score);
tone(13, 600, 200);
delay(400);
tone(13, 715, 300);
tone(13, 785, 300);
digitalWrite(9, LOW);
randomLight = random(7, 10);
previousValue = -1;
delay(1000);
} else {
previousValue = sensorValue; // Store current sensor value as previous value
delay(50); // Wait for 50 milliseconds before next loop iteration
}
}

if (randomLight == 8) {
sensorValue = analogRead(touchSensorPin); // Read sensor value
if (sensorValue >= 400) { // Check for movement
Serial.println(“TAP DETECTED!”); // Output message
score = score + 1;
Serial.println(score);
tone(13, 400, 400);
delay(400);
tone(13, 715, 500);
tone(13, 785, 600);
digitalWrite(8, LOW);
randomLight = random(7, 10);
previousValue = -1;
delay(1000);
} else {
if (previousValue == -1) {
previousValue = sensorValue; // Store current sensor value as previous value
delay(50); // Wait for 50 milliseconds before next loop iteration
}
}
}

if (randomLight == 7) {
sensorValue = analogRead(slideSensorPin); // Read sensor value
if (previousValue != -1 && abs(sensorValue – previousValue) >= 450) { // Check for movement
Serial.println(“Slide detected!”); // Output message
score = score + 1;
Serial.println(score);
tone(13, 600, 200);
delay(400);
tone(13, 715, 300);
tone(13, 785, 300);
digitalWrite(7, LOW);
randomLight = random(7, 10);
previousValue = -1;
delay(1000);
} else {
if (previousValue == -1) {
previousValue = sensorValue; // Store current sensor value as previous value
}
delay(50); // Wait for 50 milliseconds before next loop iteration
}
};

realTime = millis();

digitalWrite(randomLight, HIGH); // turns light on
}

if (millis() – startTime > 30000) { //runs the code when the time is up
Serial.print(“Game finished”);
state = 0;
tone(13, 500);
delay(600);
tone(13, 650);
delay(750);
tone(13, 500);
delay(600);
tone(13, 820);
delay(920);
tone(13, 910);
delay(1000);
noTone(13);

Serial.println(“⇨ Thanks for Playing! ⇦ “);
Serial.println(“”);
Serial.println(“⬇ Here is your final score ⬇”);
Serial.println(score);
Serial.println(“”);
delay(3000);
Serial.println(“Play Again? Press the Reset Kiss”);
if (digitalRead(Resetbutton) == 1) {
state = 1;
}
}
}

 

 

 

/*

Serial.println(“”);
Serial.println(“Get Ready!”);
delay(500);
Serial.println(“Get Set!”);
delay(1000);
ranDelay = random(3000);
delay(ranDelay);

 

realTime = millis();
digitalWrite(randomLight, HIGH); // turns light on

while (digitalRead(randomButton) == 0) { //recognizes when buttno is pressed
}
digitalWrite(randomLight, LOW); // turns light off after press

Serial.println(“Your time was”);
realTime = millis() – realTime;
Serial.print(realTime / 1000, 2);

Serial.println(” seconds”);
delay(2000);
*/
//}
“`

Leave a Reply

Your email address will not be published. Required fields are marked *