This is my submission for DIG 3602 FALL 2022
Project 1: Switches and Knobs
The Start:
I started this project with writing the code. The code is attached below. It is a game attempting to emulate a bow shooting game.
Players start at 5 HP and each time an enemy is not shot down, increments down 1 HP. Green is 5 HP, Yellow Green is 4 HP, Yellow is 3 HP, Orange is 2 HP and Red is 1 HP. The 4 lights captioned as enemy are the positions an enemy can be at. Enemies will start to blink with increasing speed until they finally hit the player. Players can shoot enemies by twisting the potentiometer located at the top. The strength of the shot is controlled by how far the knob is twisted and only a perfect aim will fell an enemy. A shot is executed only when players "release the tension of the bowstring" by twisting the knob back to rest position. Players cannot shoot again until the knob is fully at rest position (0), indicated by a yellow light. Once all lives are lost, the lights will show how many points were obtained, 1 for each enemy defeated. Each light indicates 10 points. As you gain points, the game will speed up.
Physical Hardware Integration:
I started with an attempt to carry light with foil inside straws but quickly abandoned the idea. It was getting messy in implementation and was getting hard to see the lights. I decided to just go ahead with a cardboard interface directly on top of the circuit with holes.
Some wiring is hidden behind corners of the top of the box.
Future improvements that I would like to have would be a better interface for the potentiometer; some sort of rebound where the knob will snap back once the knob is released.
Comments