Hyperspace
Made by Ian Lee, Ruolan Xia and David Hoysan
Made by Ian Lee, Ruolan Xia and David Hoysan
Develop a connected game to bring people together across time and space.
Created: February 10th, 2016
To operate the game two identical devices are required. Each device consists of a galactic game board, planet game balls, particle photon MCU, FSR, LED status indicator and solenoid actuator. When a game ball is shot by Player 1 on Board 1, an FSR reads and captures the planet in the "wormhole" and sends the planet through hyperspace to Board 2 where the force is reapplied via a solenoid actuator. Player 2 can then see the resulting play and and once the planet is successfully transported an LED indicator on Board 1 informs Player 1 of a successful play.
Our design process began with a brainstorming activity of various problem areas and POGs that could be addressed by an intimate IOT device. This included the creation of an affinity diagram.
From here, the team focused in on 3 areas and created more detailed use-case outlines of the problem solved and how these solutions would work. These included ideas for connecting people through music, parents and children through bedtime stories, and parents and children separated through prison.
Finally the team zeroed in on a concept of connecting children, initially those separated by divorce, in a way that would build strong sibling relationships through play.
// Hyperspace Game
// David Hoysan, Ian Lee, Ruolan Xia
// Design IOT, Carnegie Mellon University
// Feb 2016
// Identify the pins
int fsrPin = A0;
int solenoid = D0;
int currentPressure = 0;
int ledPin = D1;
// General setup fun!
void setup() {
// What's input and what's output
pinMode( solenoid , OUTPUT ); // sets pin as output
pinMode( fsrPin , INPUT); // sets pin as input
pinMode( ledPin, OUTPUT); // sets pin as output
digitalWrite(solenoid, LOW); // Set solenoid off
digitalWrite(ledPin, LOW); // Set LED off
// Listen for any published event with the name "diot2016/il/position-change"
// When triggered, pass any info from this event
// to a function called 'handlePositionChange'
Particle.subscribe( "diot2016/il/position-change" , handlePositionChange );
Serial.begin(9600);
}
void loop()
{
// read the value from the sensor
int currentPressure = analogRead( fsrPin );
Serial.println( currentPressure );
// If the sensor is triggered publish an event
if (currentPressure < 500)
{
Particle.publish( "diot2016/dh/position-change");
delay(1000);
}
}
// Function to handle the event this device subscribed to
void handlePositionChange(const char *event, const char *data)
{
// Turn on solenoid & LED for 1s then turn them off
digitalWrite(solenoid, HIGH);
digitalWrite(ledPin, HIGH);
delay(1000);
digitalWrite(solenoid, LOW);
digitalWrite(ledPin, LOW);
}
Click to Expand
Throughout this project, the team faced a number of hurdles and learning curves that we were able to overcome. By far the greatest challenges revolved around the game code and debugging and deducing issues related to networked devices and particle cloud commands. In particular, establishing a networked command system for the solenoids was an extreme challenge that required numerous hours of code review, online video tutorials, and some remote help to figure out. Eventually, the team ended up reworking the entire structure of our code to reflect a more simplified structure found online that ultimately proved to be a key part of the solution.
At the end of the project, the team was able to achieve all key objectives and create a connected game that is functional and fun to play. The devices communicate, commands are published and received via the cloud and the lag between the two boards is minimal yielding a satisfactory game experience, although there is a great deal that could be improved with additional time and technical expertise.
Looking ahead, there are numerous areas of the game that could be improved upon in additional releases.
Notably:
1. Relative Force Responses: Currently, the solenoids respond in a binary fashion to the remote FSR. To create a more realistic game of skill, it would be nice to implement a system in which the solenoid response is relative to the FSR reading. This would allow for players to have true control over their shots and provide a much richer and challenging gaming experience.
2. Game Score Indicator: Currently, the game only provides a visual indication to the remote player that their shot has been successful but does not provide any additional context related to shot score, force impact, or overall game score. The addition of an LED display would allow for the presentation of richer game data and help further the connection between the two players.
3. Audio Connectivity: The ability to communicate and "trash talk" the competition is a key social element of gaming and one not currently supported. The addition of a microphone and speaker would allow for player-to-player communication.
This course charts the emergence of the now "connected world" to explore the possibilities for future products and connected spaces.
Develop a connected game to bring people together across time and space.