28 March 2021

Progress Review - Game Controller

Game: Root Beer Tapper

https://archive.org/details/arcade_rbtapper 


I decided to go with my first controller concept since it was the most developed out of my other ideas. Conceptually, I took inspiration from "arcade-style" controllers that could be bought for home consoles, since Root Beer Tapper is an arcade game. Additionally, my controller will also have a physical tap that will be used to fill mugs in-game. The inside mechanics feature a CPE that is suspended with rubber bands, two potentiometers, and string attached to the tap and a rubber band. Each potentiometer will control a direction that the bartender moves; one will control his vertical movement while the other will control his horizontal movement. When the tap is flipped down, a string will pull one of the rubber bands to tilt the CPE on the x-axis. If the CPE is tilted, the mug will fill, and the player must lift the tap again to release the CPE and toss the mug once it is full. The potentiometers will be capped with knobs to make them more user-friendly, and the box will be labeled and decorated to match the aesthetics of the game.






//Libraries

#include <Adafruit_CircuitPlayground.h>

#include <Adafruit_Circuit_Playground.h>

#include <Keyboard.h>


//Code by Paulina Weintraub 2021


//Variables

int moveVert = 1;

int moveHor = 1;


void setup() {

  // put your setup code here, to run once:


  Serial.begin(9600);

  delay(1000);

  CircuitPlayground.begin();

}


void loop() {

  // put your main code here, to run repeatedly:


  //Receive analog values from the accelerometer

  float x = CircuitPlayground.motionX();


  //The value r which is from 0 to 255, mapped to the value x, which is from -10 to 10

  int r = map(x, -10, 10, 0, 255);


  //Potentiometer input

  moveVert = analogRead(A2);

  moveHor = analogRead(A3);

  

  //Potentiometer mapping

  moveVert = map(moveVert, 1, 1024, 1, 255);

  moveHor = map(moveHor, 1, 1024, 1, 255);


  //Potentiometer 1

  //If turned to the left, move tapper left (hold left arrow key)

  //If turned to the right, move tapper right (hold right arrow key)


  //Potentiometer 2

  //If turned to the right, move tapper down one space (tap down arrow key)

  //If turned to the left, move tapper up one space (tap up arrow key)

  //There will be a zone where the player can turn the potentiometer back to "release" the key


  //Tilting on the x-axis

  //Tapper must be standing against the tap 

  //While the CPE is tiled to the right, begin filling a mug (hold left ctrl)

  //Release to send mug to customer

  //If released too early, mug won't be full

  

}

 

For my peers: Is there a way I could make the knobs to be more thematic? Would the rubber bands be too flimsy? If so, is there a better way to achieve the tilt function I described? 

No comments:

Post a Comment

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