Greg Beaudoin Devlog #5 (5/1/2023)


While I don't have any huge updates for today, since we are currently in the midst of getting the last changes and additions in for the beta launch next week, I wanted to take some time to discuss some small fixes and adjustments that I've made to my game within the past week. 

One of the biggest changes that I've made is how the collision detecting works for the asteroids and the spaceship. In the past, whenever an asteroid would hit the ship, it would bounce off and then the ship would take damage. However, the damage wouldn't always be consistent, with the ship taking damage some times and other times not registering a hit at all. This was mainly due to the fact that the collision code was grouped under a function called OnCollisionStay2D. This would only trigger whenever two colliders would be overlapping for a small period of time. While this worked originally, with harder difficulties and slightly faster asteroids, this proved to be more of a problem. At first, when I tried to resolve this issue, after changing the method to OnCollisionEnter2D (this activates once two colliders are overlapping), it wouldn't register any damage at all. Upon further inspection, I discovered that the bugs were arising from an issue with my damage cooldown. The variable currentTime was never registering as less than the value for the variable damageCooldown, meaning the ship was never registering any damage. So after making some minor changes to how it detects damage cooldown, I was able to get the collision detection working again. Now, when an asteroid hits the ship, the ship takes damage immediately and the asteroid gets destroyed on impact. 

Outside of this big fix, I added other features such as an instructions screen explaining how to play my game as well as some updated font to suit the retro vibe of our game more. Currently, I'm in the process of adding the remainder of the upgrades to my game as well as working out some issues with the pause menu for my game. Stay tuned for a big update next week, once our beta launch happens. 

Get Space Mail (2023)

Leave a comment

Log in with itch.io to leave a comment.