Shooting Game – Final Report

Maddie Fisher-Bernhut, Donato Liotino, Ola Soszynski

Code: https://github.com/ToxicDon/qyro-shooter-game-arduino

Our main inspiration for this experiment was arcade shooting games, where the player earns points by shooting various targets. However, we mostly wanted to work with some new sensors in Arduino. Specifically, we were very inspired to figure out the gyroscope accelerometer, and the Bluetooth connectors. Other things we wanted to work with were vibration motors in regards to some game concepts we had in mind.
The final productOriginally, we planned on having the game be competitive, with two players versing each other to earn more points, or to defeat the other. We wanted a fun, wireless shooting game, and were inspired by similar games, often seen in arcades. This would encourage friendly competition between players, and generally create an enjoyable experience. The experience would be inspired by sci-fi movies and shows, such as Doctor Who, and fantasy, such as Harry Potter. The two players would fight each other, trying to defeat the oppositions’ creature, also themed or inspired by their theme.

img_20181204_122401917For inspiration, we looked at how competition assists one’s performance, as well as if any games like this had been made in p5 before. This led us to https://www.bigfishgames.com/online-games/8942/shooting-range/index.html, for games similarly made, and a basic game on DOS named Shooting Gallery (https://youtu.be/incPLdf712M). https://www.theglobeandmail.com/life/health-and-fitness/why-a-bit-of-healthy-competition-is-good-for-everyone/article8749934/, and

https://www.psychologicalscience.org/news/minds-business/the-upside-of-rivalry-higher-motivation-better-performance.html helped us read into how competition helps, regardless of the fact we did not end up making a competitive game.

Final wiring setup
Final wiring setup

Goals of the Experiment:

1. Use and learn Bluetooth for Arduino

2. Use and learn the gyroscope accelerometer

3.  Use vibration motor to detect invisible targets

    • To initially figure out how the motor worked, we used a tutorial (https://www.precisionmicrodrives.com/content/how-to-drive-a-vibration-motor-with-arduino-and-genuino/)
    • working-with-the-vibration-motorAfter using the tutorial, the code is mostly made by testing out different values and intensity according to distance, originally tested through a light sensor and then implemented into the game code.
    • Sadly, we were unable to implement this aspect, due to clashing libraries in the code disallowing the Arduino to operate as anything more than from movement.

4. Create different movement paths for targets as one progresses

    • Coded in using sine and cosine waves
    • While we wanted to implement a highly difficult mode, perhaps with a basic AI which avoided the player, we did not have enough time or understanding to do so.
    • The presented version shifts the randomly moving target once hit.

5.  Have working gifs

6.  Be able to see and track player on the screen using colour detection

    • We wanted to implement Maddie’s code from experiment one, which involved colour tracking, to track the crosshairs of the players. However, this code runs much slower and faces many avoidable complications when trying to track two colours at once. Due to this we later cut the number of players down to one.
    • diffusing-the-ledLater on, we realized the program runs far smoother using the gyroscope rather than the colour detection. So, we used the gyroscope for tracking, with the trigger being implemented through colour detection.
    • Another issue faced with the colour detection was that the LED was too small to properly activate the code, so we needed to diffuse the light and make a larger trackable object. Due to this, we used a ping-pong ball. Due to availability, we were only able to access orange ping-pong balls, which caused difficulties with the colour detection, which would trigger the game when too close. This could be fixed by using a white ping-pong ball instead. Our short-term fix was to distance the gun, in a relatively dark location.

7.  Have the game shoot by moving the gun in a specific way

    • 20181201_204007We realized that by using movement to fire the gun, the targeting would be offset. So, we changed plans, having it trigger fire but pressing a button that would light the LED for the colour detection to activate, “firing” the gun and seeing if it hit the target. Furthermore, as a failsafe, we could program the button to be what tests for collision, if the colour detection decides to not work.

8.  Customize the controller

    • first-layerWe worked with spray paint for the first time. It isn’t the cleanest or nicest looking but it turned out exactly as we wanted with our current skills.
    • The addition of the ping-pong ball also assists with the aesthetic of the prop gun for the game, as we needed to keep school guidelines in mind as we worked.

 

 

9.  Create a working shooter game

    • Accomplished

Leave a Reply