Multi-target and Explosions!

For the past couple of weeks, I was busy tooling around with a couple of side-projects. One of the projects is an interface for a friend who is trying to make an analytics platform. Another is a NodeJS app that runs a chron-job to scrape some apartment websites and records the data in Firebase for me to visualize later.

After I got a little bit of that out of my system, I came back to my game. I left it in a state nearly a week and a half ago where I sort of had targeting multiple enemies working, but not quite.

I had to revisit how I was handling targeting enemies and allies. Instead of passing a single target to an event object, I changed the interface to always pass arrays of enemies. That way if we have a spell that targets multiple enemies, it will iterate through each enemy and apply the spell effect.

In addition to that refactoring, I also added battle cursors! So now you don’t traverse a list of bad guys’ names, you actually traverse the bad guys (or good guys, if you’re casting a beneficial spell…).

In addition to that, I also added a new spell, Flame All. Flame All does precisely what you think it does –attacks all enemies with fire! Flame All is a perfect showcase for multi-targeting, visible cursor, and the last thing I added, called primaryAnimationEffect. This effect plays before the actual spell effect on the targeted enemy. In this case, I made a cool (reusable!) explosion effect. Take a look at all the features in action!

Burn slimes, burn!!!

Leave a comment