16 March 2026

Scaffolding: Progress Review - Team 17

 Our controller is meant to look like a stun gun from Resident Evil. We chose this design because weapons play an important role in the gameplay, so making the controller resemble one helps connect the physical controller to the actions happening in the game. It also makes the experience feel more immersive, since the player is holding something that resembles a weapon while playing. Since the game focuses on survival and defending yourself from enemies, using a controller shaped like a weapon fits well with the theme and overall atmosphere.

The controller uses several inputs that align with the game’s mechanics. Buttons control forward and backward movement, while a potentiometer is used for left and right movement. A switch allows the player to run, and a sound sensor is used to shoot the weapon. Other sensors provide additional functions, such as using a tilt switch for quick turns and a temperature sensor to open the inventory. Pressing both movement buttons at the same time opens the menu, where the same controls can be used to navigate options.


#include <Adafruit_CircuitPlayground.h>

#include <Adafruit_Circuit_Playground.h>

#include <Keyboard.h>

#include <KeyboardLayout.h>

#include <Keyboard_da_DK.h>

#include <Keyboard_de_DE.h>

#include <Keyboard_es_ES.h>

#include <Keyboard_fr_FR.h>

#include <Keyboard_hu_HU.h>

#include <Keyboard_it_IT.h>

#include <Keyboard_pt_PT.h>

#include <Keyboard_sv_SE.h>


// Get Adafruit Circuit Playground libraries

// Get keyboard libraries


// Movement variables


// DECLARE variable equal to forward button

// DECLARE variable equal to backward button

// DECLARE variable equal to potentiometer

// DECLARE variable equal to switch

// DECLARE variable equal to tilt switch


// Shooting variables


// DECLARE variable equal to light sensor

// DECLARE variable light baseline equal to light sensor value

// DECLARE variable equal to sound sensor

// DECLARE variable sound baseline equal to sound sensor value


// Menu variables


// DECLARE variable equal to temperature sensor

// DECLARE boolean inventory open set to FALSE

// DECLARE boolean menu open set to FALSE


void setup() {

  //In setup:


  // Initialize libraries

  

}


void loop() {

  // While looping:


//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


  // Movement controls


  // READ forward button

  // IF forward movement button is pressed, THEN send forward input signal to computer


  // READ backward button

  // IF backward movement button is pressed, THEN send backward input signal to computer


  // READ potentiometer

  // MAP potentiometer so its values are split into three zones: Left, Middle, and Right zones

  // IF potentiometer values are in the left zone, THEN send player left rotation input signal to the computer

  // ELSE IF potentiometer values are in the right zone, THEN send player right rotation input signal to the computer

  // ELSE do nothing


  // READ switch

  // IF switch is equal to its on position, THEN send run/sprint input signal to the computer

  

  // READ tilt switch

  // IF tilt switch is equal to tilted, THEN send quick turn input signal to the computer


//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


  // Shooting controls


  // READ light sensor

  // CALCULATE and STORE difference of baseline subtracted from the light sensor value

  // MAP light zones using baseline

  // IF difference is in lower zone (darker), THEN send aim/ready weapon input signal to the computer


  // READ sound sensor

  // SET difference of baseline subtracted from the sound sensor value

  // MAP sound zones using baseline

  // IF difference is in upper zone (louder), THEN send shoot input signal to the computer


//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


  // Menu controls


  // READ temperature sensor

  // SET baseline variable equal to the input

  // IF temperature sensor values are greater than baseline (hotter) AND inventory open is TRUE, THEN send close inventory input signal to the computer and set inventory open to FALSE

  // ELSE IF temperature sensor values are greater than baseline AND inventory open is FALSE, THEN send open inventory input signal to the computer and set inventory open to TRUE


  // READ forward button and READ backward button

  // IF forward button AND backward button is pressed, THEN store time pressed

  // If time pressed subtracted from current time is greater than or equal to 3 seconds, THEN send escape menu input signal to the computer and set menu open to TRUE


  // READ forward button

  // If forward button is pressed AND inventory open is TRUE OR forward button is pressed AND menu open is true, THEN send scroll up input signal to the computer


  // READ backward button

  // If backward button is pressed AND inventory open is TRUE OR backward button is pressed AND menu open is true, THEN send scroll down input signal to the computer


  // READ potentiometer

  // IF potentiometer values are in the left zone AND inventory open is TRUE OR potentiometer values are in the left zone AND menu open is TRUE, THEN send left input signal to the computer

  // ELSE IF potentiometer values are in the right zone AND inventory open is TRUE OR potentiometer values are in the right zone AND menu open is TRUE, THEN send right input signal to the computer

  // ELSE do nothing


  // READ light sensor

  // CALCULATE and STORE difference of baseline subtracted from the light sensor value

  // IF difference is in the lower zone (darker), THEN send select input signal to the computer


}



 
Controls- 
Buttons – forward and backward movement; in menu, scroll up/move up and scroll down/move down
Potentiometer – move left and right; in menu, move left and right
Light sensor – ready weapon; in menu, select
Switch – run
Sound sensor – shoot
Temperature sensor – open inventory
Tilt switch – quick turn
Menu control – pressing both movement buttons at the same time opens the menu




No comments:

Post a Comment

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