08 March 2025

Team 8 Scaffolding: Progress Review

The controller we have decided to go with is our Mortal Kombat one with the DDR-like pressure pad and the hit pressure pads. This controller works with our game and helps immerse the player well because it has you do the actions for the game in real life in order for the game to register your attacks. The controller has 2 punching pads, one for punching and one for kicking. When those are hit, impact sensors will read the pressure and trigger the dedicated action in game. There are also two distance sensors: one at the top of the controller, and one at the bottom. When you duck in real life, the sensor on top will register that there is nothing there within four feet and trigger the duck mechanic. The bottom sensor will do the same for the jump mechanic. The pressure plates on the ground will also trigger the forward fast/slow, and the backward fast/slow (WASD). There is a pull handle that, when you grab it and pull it past a 45 degree angle, it will trigger a grab in game. Once you release it, it will return to its starting position and stop the grab.

Sketch of controller:



Schematic:



 Pseudo code:

//The game we are using is Mortal Kombat 1992
//the actions are kick, punch, block, duck, jump, and WASD but with a joystick
//refer to prototype drawing for details on what each thing does/looks like
#include <Adafruit_CircuitPlayground.h>
#include <Adafruit_Circuit_Playground.h>

//associate buttons with physical controls
//add booleans and ints for different actions

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  delay(1000);


  CircuitPlayground.begin();
  //initialize any other aspects that need to be initialized when parts come in

}

void loop() {
  // put your main code here, to run repeatedly:

  //top sensor:
  //if pressure is above 25kg of force, trigger punch

  //bottom sensor:
  //if pressure is above 30kg of force, trigger kick

  //top distance sensor:
  //if nothing is detected within 4 ft, trigger duck

  //bottom distance sensor:
  //if nothing is detected within 4 ft, trigger jump

  //far left pressure plate:
  //if pressure is more than 25kg, trigger fast back

  //left pressure plate:
  //if pressure is more than 25kg, trigger slow back

  //far right pressure plate:
  //if pressure is more than 25kg, trigger fast forwards

  //right pressure plate:
  //if pressure is more than 25kg, trigger slow forwards
  //if no pressure plates read any pressure, character remains in same place

  //pull handle:
  //if handle is past 45 degree angle, trigger block
  //when handle is in rest state/0 degree angle/less than 45 degrees, let go of block


}

No comments:

Post a Comment

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