Weekly Update – April 17, 2021

Improved Player Status UI

Player health and gold indicators got a visual upgrade. They used to be shown in a single text control as numbers, which worked but wasn’t visually appealing. I moved player health to a health bar. I moved the gold counter to the inventory panel. I don’t think it’s necessary for players to always see their gold amount, so I removed it from the main screen. For both the health bar and gold counter, linear interpolation (lerp) is used to smoothly transition to new values.

Player and nonplayer health bars
Gold indicator

Evolving AI 

Now that basic AI is in place for enemies, I occasionally encounter (pleasantly) surprising behavior during testing. 

For example, a skeleton archer kept trying to shoot the player when the player ran out of the room and was no longer visible to the archer. I checked all of the associated code and still couldn’t figure out why the archer was shooting. Then I realized the archer wasn’t shooting at all; it determined it couldn’t shoot the player, so it was throwing the arrows in its inventory instead (the player visibility check for thrown items wasn’t implemented yet). 

Another time, an archer ran out of arrows and started moving toward the player for a melee attack. It walked over an arrow that had missed the player, picked it up, and shot it at the player. I had no idea that would happen. Turns out, the item pick up code was used by both the player and non-players.

Miscellaneous

Lots of small-scale refactoring, improvements, bug fixes this week.

I haven’t planned out next week yet. One thing I need to get done soon is the scope of the next playable version. Without a specific set of features to work toward, I’ll never get to “done.”


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *