Katie and Taswar

Content

 

For our two player race game, the goal is to get a circle to the finish line first. Each player controls one circle. The controls are a motor which rotates moving the circle forward and a touch sensor to make the circle jump. If you hit any of the grey obstacles with your circle, your position is reset and you start at the beginning again.

 

We had it so the rotation of the motor determined the horizontal location of the circles. The touch sensors determined the vertical locations of the circles by using a case statement. If the touch sensor was being pressed the vertical location would be one constant, and if it was not being pressed it would be a different constant and hence a different location.

 

We used the draw rectangle to create the finish line. Then we compared the horizontal locations of the circles and the finish line to determine if a player controlled a circle to cross the finish line. If the circle touched the finish line, it displayed a text saying “WINNER!!” in the middle of the screen. We wanted to incorporate the program so that it ended when one of the crossed the finish line but we could not understand how to do it.

 

We then used an array to create 4 circles as the obstacles. We then compared both the horizontal and vertical locations of the two players to each circle and if they touched, it would reset the motor.  We also incorporated background music too.

 

One thing that was problematic with our game was that the players could keep the switch used to jump the circles pressed and avoid hitting the obstacles by traveling over all the obstacles. We initially did not know how we could stop this but later thought that if we have obstacles on the top in the gaps between the obstacles, the players would be forced to drop the circles to the ground and they would not be able to just hold down the touch sensor to have the circles be forever floating above the circles. We also thought we could have timed it so that when you pressed the touch sensor it only stayed jumping for a certain amount of time.However, both of these we could not implement either.

 

***The video of the screen while people were playing was glitchy due to recording and LabVIEW at the same time taking up too much space***

Gallery
Video
Attachments
AttachmentTypeSize
code_582a687e520dbCode.vi52.79 KB
nitromemusic-skywiregame_582a6a0460498Nitrome music- Skywire (Game).wav30.73 MB

Leave a Reply

Your email address will not be published. Required fields are marked *