-
-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Buffed repair speed for wheels, hover and cyborgs #3705
base: master
Are you sure you want to change the base?
Conversation
Any values used in the game simulation calculations must be integers, and all math must be integer math. This cannot be merged as-is. (As you'll note for other values, a solution would be to store 1 -> 100, 1.25 -> 125, 2 -> 200, etc.) Also, since this has balance implications we'll need to get additional feedback / review. |
It makes no difference, even if I change the storage to integers, the calculations will still contain fractional numbers that will give the same results when rounded. As you see, the result is still integers, fractional numbers are only used in intermediate calculations (there's just no other way to do it because the numbers are so small). |
If you look through the codebase, you'll see that all game state calculations - even intermediate ones - very carefully use integer math and avoid floating point. As Per has noted in the past:
(Floating point math differences have been the cause of numerous desyncs in the past.) Some historical context: e3c051b (plus the long list of commits carefully removing any floating point math in game-state-related calculations) (Anything that is not game state related - ex. only local / display related - is excluded from this limitation. You'll find floating point math in that code.) |
@past-due I removed the floating-point math from the calculations, and the results are the same as they were. |
8db220d
to
90fff54
Compare
This PR increases the repair speed for low HP bodies. At first I was only planning to do it for wheels, but I decided to do it for everything else, including cyborgs, because it's more fair to them.
The main focus is on the wheels because they are pretty much useless in the game, if you don't like the rest of the changes in general we might as well not make them.
Motivation: primarily for wheels - units with low HP are destroyed very quickly on the battlefield: "If wheel units are faster to repair then they could more efficiently cycle between front and back line - but would remain at the front line less long due to reduced health." (C) PathForger
Changes:
The HP increment value is very low in Warzone (mostly +1hp or +2hp), which means multiplication will give the following result:
Wheels: 200% repair rate.
Hover: 150% repair rate.
Cyborgs: 125% repair rate.
...per cycle.
Note: any fractional
repairFactor
value between [1..1,25..1,5..1,75..2] is meaningless as it will be rounded anyway.P.S. Not sure about hovers: but it probably wouldn't hurt to make a buff too or do you plan to use them only for flamethrower rush 😄
Maybe swap numbers with cyborgs?