Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Monsterovich
Copy link
Contributor

@Monsterovich Monsterovich commented Mar 24, 2024

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.

Change: +1hp → +2hp
Change: +2hp → +4hp

Hover: 150% repair rate.

Change: +1hp → +2hp
Change: +2hp → +3hp

Cyborgs: 125% repair rate.

Change: +1hp → +1hp
Change: +2hp → +3hp

...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?

@KJeff01 KJeff01 added the PR: Needs Review Check if this PR is still relevant or needs minor tweaks to be ready to merge label Oct 2, 2024
@past-due
Copy link
Member

past-due commented Oct 27, 2024

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.

@past-due past-due removed the PR: Needs Review Check if this PR is still relevant or needs minor tweaks to be ready to merge label Oct 27, 2024
@Monsterovich
Copy link
Contributor Author

Monsterovich commented Oct 27, 2024

@past-due

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.)

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).

@past-due
Copy link
Member

past-due commented Oct 28, 2024

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:

we have by design tried to prevent floats from being used anywhere that would impact game state [to avoid desync issues]

(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.)

@Monsterovich
Copy link
Contributor Author

@past-due I removed the floating-point math from the calculations, and the results are the same as they were.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants