Our custom controller will be able to play Frogger. It will use four pressure-sensitive lily pads as directional inputs. One going up, down, left, and right. Mimicking the movements in the original game. We went with this frog and lily pad idea to reference the original game with its visuals. In the game, the frog has to go either up, down, left, or right and avoid obstacles to reach its goal. We thought it would be interesting to bring that idea in a physical setting, and the player moves the frog in real life to move the digital one. Not to mention it would provide a more challenging experience with the player planning out the timing, direction, and movement. Each lily pad is designed with a circular pressure plate, encouraging the player to move an object, ideally a toy frog, to each of them for the player to move the character in-game. The controller will be wired and connected to the Circuit Playground, which'll also be connected to each of the four lily pads. It'll process the input signals for each pad and send movement commands to the game. We might potentially use a servo motor for better physical feedback in the game and a potentiometer for a few game adjustments. But for now, we just need the Circuit Playground, pressure plates, resistors, and the breadboard, along with alligator clips. The controller will enhance the original game experience with the player being a little bit more active and moving a physical object to each pressure plate.
Controller sketch
#include <Adafruit_CircuitPlayground.h> #include <Adafruit_Circuit_Playground.h> void setup() { // put your setup code here, to run once: //Start serial //Start the circuit playground //Run the Keyboard begin so keyboard inputs will be recognized. //set the keyboard layout //Set pinMode for pin(1) //Set pinMode for pin(3) //Set pinMode for pin(4) //Set pinMode for pin(7) //declare pressure sensor 1 //declare pressure sensor 2 //declare pressure sensor 3 //declare pressure sensor 4 } void loop() { // put your main code here, to run repeatedly: //If pressure sensor 1 has value greater then X //Then input W //If pressure sensor 2 has value greater then X //Then input A //If pressure sensor 3 has value greater then X //Then input s //If pressure sensor 4 has value greater then X //Then input D
}
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.