Day 11: Stubborn Determination

Brittany Lumanlan Martin
2 min readDec 8, 2020

This was an extremely tough day for me. I’m on Phase I of the 2D Game Development course, working on a task requiring the player’s shield (once collected) to absorb damage from three enemy hits before powering down on a fourth hit. The key here is that this effect must be shown visually, which can be done a number of ways, but I have chosen to demonstrate this through changing the color of the shield sprite. The goal: one hit and the shield turns green, a second and it turns magenta, a third turns it red, and a fourth hit destroys the shield.

After many hours of trying to arrange this both in Unity and in script, I managed to get the player itself to cycle through these colors, but not the shield. When the work day came to a close, I decided to take a break before pushing forward. I couldn’t relax and kept thinking about how to solve the issue at hand, and so I hopped back onto my laptop and tried again. And again. And again.

Finally, at the end of the night, seemingly by an absolute miracle, my plan worked out. Well, sort of — the powerup shield now cycles through three colors before disappearing, but the shield function itself isn’t working and the player absorbs the damage and dies. Despite this, it’s a much smaller problem to tackle and I feel confident in my ability to fix it next. Learning to code hasn’t been the easiest journey, but it’s important to revel in the small victories everyday.

--

--