Saturday, September 1, 2018

Added Player/Car Collision and Sounds

I am still working on figuring out the code for slowing down the shopping cart and making it gradually accelerate.  I also want to learn how to use constants better so that I can utilize a difficulty setting in the title screen but for now I am working on general game play.

I still haven't animated the sprites (I cannot seem to get the code to work when I inject it into my program).  I am going to have to find some other examples.  What I did add was a collision detection between the player and the car.  This results in the loss of 10 points, randomly regenerated player one, and a noise.  I have also added sound for the collision between the cart and the car, with a different noise, and then a rumbling sound for the sound of the car.  I may try to add a kind of Doppler effect on the car noise to kind of give it a bit of dimension. I had also realized that all the collision sounds were the same because I had used the same variable. 

I had also added a function for the fire button to reverse the direction of the car to test out possible "power ups" or second player features. What I may do is randomly generate playfield pixels of different colors at different intervals.  These pixels may improve various aspects, like increasing the speed of the player, mirroring the player sprites, or give functionality to the fire button. I may also try to add second player functionality by allowing the second player to control the cart and the car.

I had also found a pretty cool screen capture software to play around with to provide better video.


No comments:

Post a Comment

Manatee Madness!

Stage work is coming along nicely, with the foundations laid down for the Rain, Snow, and Volcano stage. The Black Friday stage is proving ...