06 April 2022

Scaffolding: Progress Review

    


    

    For my project I decided to create a controller for the game Downwell. Downwell is a game where you play as a boy with gun boots that jumps in a bottomless well full of monsters. The controls for this game are very simple, just A and D for left and right, and space to both jump and shoot. I initially wanted to used one touch pin and one large "touch pad" of tin foil and see if i could vary the resistance so that tapping on different points on the foil would give different inputs, despite only using one pin. I faced some difficulty getting that to work in my test and then saw that we're not supposed to use the touch pins as buttons anyway, so instead i'll be using the accelerometer to track left/right tilting for movement, and a pin hole in the center of the controller lined up with the photo sensor to use light, or the lack of light, as my jump/shoot "button". I created a simple cardboard version of my controller and modeled it after the gun modules in the game.

My questions are:
    Do you think that the controller model I have is too big?
    What other method of input could I use that would make my controller more interesting?



the left is my original design, the right is the current design with the hole for the light sensor.






#include <Adafruit_CircuitPlayground.h>
#include <Adafruit_Circuit_Playground.h>

void setup() {
  initialize libraries and keyboard output
}

void loop() {
  
    read light level input
    track highest light level to set better mapping range
    map light level from 1-0, either dark or light.

    if(light level is low) {
      space bar input to jump
    }

    read x axis roation

    if (x rotation < 0 + some deadzone buffer value) {
      "A" key input to move left
    } else if (x rotation > 0 + some deadzone buffer value) {
      "D" key input to move right
    }
}

No comments:

Post a Comment

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