For my game controller, I am going with a controller for the game "Nidhogg." This is a fencing game with five basic controls. Moving left/right, raising your sword stance up/down, and thrusting. This will make use of a potentiometer to measure angles and will be designed to be shaped like a sword. I currently don't have the schematic, as I need assistance with working out the math, but the sketch and pseudocode are below.
Sketch
Skematic
Pseudocode
Variables:
lightDetection, lightOnValue, tiltDirection, tiltAmount, twistDirection, controllerHeight, raiseAmount, lowerAmount, keyboardInputs
If lightDetection is greater than or equal to lightOnValue, enable all other controls
If tiltDirection is forwards and tiltAmount is greater than or equal to required amount, use attack key
If twistDirection is to the left, move the player to the left with proper keyboardInputs
If twistDirection is to the right, move the player to the right with proper keyboardInputs
If controllerHeight is greater than or equal to raiseAmount, rasie the player's tance
If controllerHeight is less than or equal to lowerAmount, lower the player's stance
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.