23 October 2024

Scaffolding: Progress Review Run and Gun Controller

 

We have chosen to create a game controller for the game Doom.  For our controllers design we want to create a handle of a gun where the player can use the switch to interact with objects, use the potentiometer to look left and right, and use a shaking motion to fire the weapon with an LED lighting up whenever the player is firing.  Along with this we have given the player four floor buttons that will control the players movement.  With these design features we wanted the player to feel as if they are in the game with the feeling of firing a weapon and having to move your feet in order to run around the map of the game.  The accelerometer will be linked to the scroll wheel of the mouse so that the player will be able to switch weapons as well.  Doom is a run and gun type of game, so we wanted to use that concept to create a controller emphasizing this type of game style.


Sketch


Schematic


Pseudo Code

#include <Mouse.h>

#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>

void setup() {
  // put your setup code here, to run once:
  keyboard.begin(); // initalize keyboard library
  CircuitPlayground.begin(); // initalize keyboard library
  mouse.begin(); // initalize mouse library
}

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

  // Floor buttons will be linked to arrow keys or WASD for player movement

  // Controller is shook to fire in-game weapon along with a LED lighting up whenever the gun is firing

  // AccelerometerX is linked to mouse scroll wheel up/down to swich weapons

  // Potentiometer is linked to mouseX input to adjust where the player is looking

  // Switch is linked to spacebar for player use/interaction button

}




No comments:

Post a Comment

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