Blog Post: Weapon Weight System


Author: Austin Pereira

3/8/2024

Weapon Weight System


Initial implementations of the Weight system were causing some issues when it came to the players speed. To briefly describe the system, the idea is that each weapon added to the game will have a set "weight" value that will slow that player down a bit,  meaning that the heavier the weapon equipped the slower the player becomes. To test if the system was working in a way that was fair and balanced, I timed how fast the player moves without sprinting from spawn to the other side of the map, both before implementing the weight system to have a base time and after each implementation to see how much of a difference there was. On my first attempt at implementing the system, the players speed decreased massively, so much so that even when sprinting, the zombies were still faster than the player with that system implementation. With my second implementation attempt, you couldn't even tell that there was a decrease in speed unless I said something, which isn't what I wanted the weight system to be. The weight system was designed to slow you down but a small amount, but just enough that you could notice it. This was a problem that needed to be solved or else what would even be the point of having the system in place if the effect is either to much or barely noticeable.


On my third and final implementation effect, I was able to get the weight system done correctly with a small, but noticeable speed difference when compared to the speed before the system was implemented. With some changes to the numbers I was working with as well as calculating the speed decrease, the system now slows the character based on the weight of the weapon the player currently has equipped. Now the user will be able to see the decrease in speed when they equip a heavier weapon, which applies to both base movement speed and sprinting. The new solution was to take the equipped weapons weight, which is a single number between 1 and 4, then multiplying that number by 15. Then when the player's speed is changed, whether by beginning to move or start sprinting, that calculated number is then subtracted from the new number. 

Get Deadlands Duel: Time Rift Rumble

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

(+1)

I love how each gun will have weight and will edit out movement speed. Cant wait to see it implemented

(+2)

This is unique I can't wait to see your integration when you're done.

(+2)

Heavy stuff.

(+2)

Nice stuff