Description:
Our controller is designed for the puzzle game Fireboy and Watergirl, where two players must work together to navigate levels and collect gems. The controller consists of three parts, one for each character and one that connects the two. This design is meant to reflect the cooperative nature of the game by separating the controls for each character. The part that connects the two character controllers contains two potentiometers to control the mouse x and y movement. And has a photoresistor to act as a left click.
The Fireboy controller will be colored red and the Watergirl controller will be colored blue, matching the characters they represent. Both controllers will be shaped like a diamond, inspired by the collectables found in game. The visual design helps connect the controller to the game's environment and narrative.
The Watergirl controller includes a microphone/sound sensor that allows the players to jump by making a sound, along with a potentiometer for left and right movement. The Fireboy controller also uses a potentiometer for movement, but jumping is triggered by shaking the controller using an accelerometer.
Sketch:
Schematic:
Pseudo Code:
//Normal Game Controls//Watergirl---------------------------//(W) = Jump//(A) = Move Left//(D) = Move Right//Fireboy---------------------------//(Up Arrow) = Jump//(Left Arrow) = Move Left//(Right Arrow) = Move Right//Pseudo Code//Initialize Circuit Playground Express//Set mouse X-axis potentiometer value to be an analog pin.//Set mouse Y-axis potentiometer value to be an analog pin.//Set photoresistor value to be an analog pin.//Set Watergirl potentiometer pin to be an Analog Input.//Set Fireboy potentiometer pin to be an Analog Input.//Set sound sensor as Analog Input.//Start accelerometer on Circuit Playground Express.//Define movement thresholds for potentiometers for both Watergirl and Fireboy.//Define mouse movement thresholds for potentiometers for mouse x and y axis.//Define threshold for photoresistor for left mouse click.//Define sound threshold for jump.//Define shake threshold for accelerometer.//Start a Loop//Read Watergirl movement with potentiometer value.//If potentiometer value is less than left threshold://Send keyboard key "A" (Watergirls left).//Else if potentiometer is greater than right threshold://Send keyboard key "D" (Watergirl right).//Else://Release Keyboard key "A" and "D" (Stops Watergirl from moving).//End If.//Read Fireboy movement with potentiometer value.//If potentiometer value is less than left threshold://Send keyboard key "Left Arrow" (Fireboy left).//Else if potentiometer value is greater than right threshold://Send keyboard key "Right Arrow" (Fireboy right).//Else://Release keyboard key "Left Arrow" and "Right Arrow" (Stops Fireboy from moving).//End If.//Read sound sensor value//If sound value is greater than sound threshold://Send keyboard key "W" (Watergirl jump).//Delay may be needed to prevent jumping multiple times.//End If.//Read accelerometer values for (x, y, z)//Calculate total shake force.//If shake force is greater than shake threshold://Send keyboard key "Up Arrow" (Fireboy jump).//Delay may be needed to prevent jumping multiple times.//End If.//Mouse Controls//Read x-axis potentiometer value.//Map potentiometer value to mouse x-axis speed.//if value is less than center threshold://Move mouse left.//Else if value is greater than center threshold value://Move mouse right.//Else://Stop all x axis mouse movement.//End If.//Read y-axis potentiometer value.//Map potentiometer value to mouse y-axis speed.//if value is less than center threshold://Move mouse down.//Else if value is greater than center threshold://Move mouse up.//Else://Stop all y-axis mouse movement.//End if.//Read photoresistor value.//if light level is below click threshold://Have it press "Left Mouse Button".//Else://Release "Left Mouse Button".//End if.


No comments:
Post a Comment
Note: Only a member of this blog may post a comment.