Folk Heroes - GUNS!

03 Nov 2019 - vidya

Things are starting to get more interesting…

I’ve yet to play a farming simulator with very fleshed out combat. Stardew has the mine and the monster farm, but the combat is a little… unexciting. Well, nothing spices things up like a rocket launcher, right?!

For this gif, the rockets are utilizing a tile-based targeting, which I didn't love--more on that in my last post.

Implementing ranged attacks was a little interesting. I had already setup an animation-based system for attacks and the instantiation of Effects based on the item used. But each of those Effects was taking place at the target point of the player’s mouseclick! Now I had a new form of implementation: creating a moving Projectile object whose Effects would take place only when the object collided with something (or reached its end-of-life).

Now, instantiating the Projectile, giving it its starting rotation and velocity, etc. were all things I was pretty familiar with from my last foray into Folk Heroes (as well as another, much earlier game project I haven’t really gone into on my site, BLOKK THE BRAVE). I decided to make a ProjectileSpawnEffect class that inherited from Effect. When a item fires off its Effects, I wanted to leave the possibility for a Projectile-spawning item to do effects at its own location (for example, a magic effect that both fires a laser at a target and emits a shockwave from the user). This makes it easy to simply mix in ProjectileSpawnEffects into the list of an item’s Effects–and even different Projectiles can be fired from one use!

Pretty pleased with how it turned out! Also had a lot of fun making the sprites for the muzzle flashes/explosions. I really don’t mention it enough, but pixel art is a whole lot of fun!! Animating especially.

I also started experimenting with Unity's Particle Emitter component and created this very Tarantino-esque blood splatter. Kickass!

Up next? Toning down the violence and returning to a bit of farming: planting and growing!!