23 October 2024

Fancy Pants Controller: Team 8

Anna Grant and Karina Vazquez

The game that we have decided to go with is called Fancy Pants. We have designed the controller to be used with a tilting motion in which lets the character move left and right when the controller is tilted along the x-axis. We will use the Adafruit Circuit Board Express’s accelerometer to achieve this. We will also use the y-axis functions to allow players to crouch by tilting the controller down and open doors by tilting the controller up. We decided that we want to add a switch to the design so that the player is able to pause the game if necessary. We will also add a sound sensor to our controller, so when players make a noise at a certain volume, the in-game character will jump. The design that we decided to go for in the controller is a circular controller with the character of the game designed on top so that the player can see the character on the controller as they play, we will have the circuit playground inside the controller so that the player never sees the circuit but is still able to use its motions to play the game. The switch will be put at the top corner of the controller so that the player is able to use it if needed. 

Pseudo Code


Switch motion


IF switch is turned left

  • Pause

  • Display pause menu

Else

  • Un-pause 

  • Don’t show pause menu


Accelerometer


WHILE tilted left on x axis

  • Character will move left 

ENDWHILE

  • Circuit playground is set to a balanced middle


WHILE tilted right on x axis

  • Character will move right 

ENDWHILE

  • Circuit playground is set to a balanced middle


WHILE tilted upwards on the y-axis

  • Character will jump 

ENDWHILE

  • Circuit playground is set to a balanced middle


WHILE tilted downwards on the y-axis

  • Character will crouch and roll downhills to kill enemies

ENDWHILE

  • Circuit playground is set to a balanced middle


Jump Function


WHILE sound surpasses a threshold of 15

  • In game character will jump

ELSE sound is under a threshold of 15

  • In game character will stay idle / not jump







No comments:

Post a Comment

Note: Only a member of this blog may post a comment.