My controller is a potion bottle, themed after the holy water from the game Castlevania. In the game, holy water is a very useful item and can be used to easily defeat the bosses. It would operate by tilting the bottle left, right, forward, or backward to move (reflected as a,d,w, and s respectively), shaking the bottle to pause the game, corking the bottle to jump, and shouting to attack. I might switch the attack and jump binds only because you need to attack a lot in the game and I feel like you would not want to continuously shout over and over again.
PSEUDOCODE
void setup() {
// put your setup code here, to run once:
//initialize variables
//initialize pin that breadboard is attached to
//initialize accelerometer
//initialize sound sensor
}
void loop() {
// put your main code here, to run repeatedly:
//use mg to check tilt forward, backward, left, right (accel)
//if tilt forward, keyboard w
//if tilt backward keyboard s
//if tilt left keyboard a
//if tilt right keyboard d
//check for shake (accel)
//if shake keyboard (emulator start key, default is I
//check audio level (sound sensor)
//if audio level = shouting threshold (TBD), then keyboard attack key (default k)
//check input on breadboard pin
//if yes, keyboard jump (default j)
}
Questions:
1. How can I house/attach the breadboard and CPE and still be aesthetically pleasing?
2. Should I have the cork be attack or jump? (Whatever isn't bound to the cork will be bound to shouting.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.