top of page
Search

Rocket Science

  • seanmcgarry65
  • Sep 9, 2022
  • 2 min read

Sadly, I wasn't able to get much done this week. Due to the holiday, I had less time than usual. Additionally, the extreme heat wave has made it difficult to sleep, which has kept me from properly focusing. Lastly, on Friday morning, the fact that I had somehow forgotten to save combined with an internet connectivity glitch to mean that I had to redo some work that was previously already done.


However! I was still able to get -some- work done! This week, I implemented a powerup that allows the character to fly.


The powerup in question takes the form of a rocket pack. Mechanically, it works similarly to Tails from the Sonic games; holding the jump button while in the air will cause the player character to start flying. After a few seconds, they lose the ability to gain altitude and begin to glide instead. The player will not regain the ability to actually fly until they land. This prevents the player from flying infinitely, which could easily break the game entirely, by virtue of removing all challenge from platforming.



Here is the bulk of the code that handles how flight works. I might tweak this later to refine it, but as of now, the player has five seconds of active flight, which is replenished whenever they touch down. Once they run out of their ability to actively fly, the rocket pack still allows them to glide to a safe landing (presumably by running on fumes).


(Incidentally, this is the block of code that I forgot to save and had to rewrite)


Unfortunately, as I'm still working on the animations, I do not have an update for the actual game for you to try out the new powerup for yourselves.

 
 
 

Recent Posts

See All

Comments


bottom of page