Devlogs
v0.4.6: I Have Added A Sword
Posted August 19, 2024 by Ian
#sword #weapon
Game's Got A Sword In It
I added a sword to the game as a playable weapon. I wanted to provide a melee option and I learned a lot doing this. The sword was generated by https://snoopethduckduck.itch.io/sword-maker. Really cool!
The sword is a basic PNG sprite, so I needed to learn how to "animate" it on my own using an AnimationPlayer. I think it looks ok!
Some stats:
- The sword is really big. I think this is funny, but it's also a balance thing. Bigger sword hits more stuff.
- You can swing your sword once per second and you have to click for each swing. Holding the button does not auto-swing. Fire Rate upgrades work as you'd think. (This is how the Rail Gun works.)
- Swinging the sword takes 0.5 seconds.
- Hitting an enemy with the sword deals 100 damage, which will clear every enemy for a while.
- The sword will cleave multiple enemies.
- Lifesteal works the same as with projectiles. If this weapon ends up being a lot worse than the others, I will likely buff it by adding some sort of baseline heal upon hitting an enemy.
- This does not yet have a sound attached. I want something satisfying and weighty.
- If you swing your sword and hit a projectile, you will reflect that projectile and send it back at the enemies.
- I have to work on this a little bit, since I am still not entirely sure the bounce is behaving the way I want it to. I'll spare you the details, it's vector math. Boring.
- Right now the projectile damage is increased by a factor of 10 when you fire it back. I have to consider how to make this scale alongside the base damage (which increases with upgrades as you'd expect).
- This makes the classic "PING!" sound we know and love, which is the sound I use for critical hits too. I will be changing the critical hit sound soon to reduce confusion.
Thanks. Game's got a sword in it now.