The Path of the Game Dev — Day 17

Saving progress…

— —

Anyone else see a giant health bar on a boss in a game and think to themselves: “Man, I’m gonna need more potions”?

Dodge this

That’s kind of how I felt working through this boss today. Because I had the UI for the thruster charge I thought it would be easy to apply that knowledge to a similar element to represent the health of the level end boss. Nope!

It did have the same set up as the charge but there were some key differences that changed how I coded it. First was that the boss’s health does not regenerate over time — so I only wrote out a DepleteHealth method. Second was the int values used to define the boss’s health vs. float values used to define the thruster charge. And third was that this slider is only a visual representation (like the player health we worked on earlier in the course) and changes value when the boss is damaged, not when a certain key is held down.

In addition, I worked more on the boss’s attacks. Currently it has a triple laser akin to the player’s, a pair of homing missiles, and six beams that follow the boss as it rotates in place. Lastly, I’m working through the spawn manager to get the boss to only spawn on wave 10, stopping all other enemy types from spawning.

Biggest takeaways from the day: You can stop coroutines! Either use a StopCoroutine() to stop a specific one or StopAllCoroutines() to stop all in the behavior script.

— —

Progress saved!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store