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

Antimatter/sec display midgame-lategame rework suggestion #1727

Open
WaitingIdly opened this issue Jul 25, 2021 · 1 comment
Open

Antimatter/sec display midgame-lategame rework suggestion #1727

WaitingIdly opened this issue Jul 25, 2021 · 1 comment
Labels
area: antimatter dimensions formerly normal dimensions feature All your dumb ideas QoL Any quality of life or visual changes that don't alter gameplay balance up-for-grabs

Comments

@WaitingIdly
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Past early game, antimatter gain per second is useless

Describe the solution you'd like
On android, they switch to Your antimatter increases by [x] every second. eg *876 or *2e27.

@WaitingIdly WaitingIdly added QoL Any quality of life or visual changes that don't alter gameplay balance feature All your dumb ideas area: antimatter dimensions formerly normal dimensions labels Jul 25, 2021
@kajfik
Copy link
Collaborator

kajfik commented Jul 27, 2021

I wasn't able to figure out a formula that would accurately calculate this so I used exponential moving average, the code looks like this:

private val antimatterEma = BigExponentialMovingAverage()
private var lastAntimatterAmount: BigDouble = B_1.copy()
...
if (PlayerProgress.infinityBroken) {
    val viewUpdatesPerSecond = 1000.0 / player.options.updateRate
    val antimatter = Currency.antimatter.value
    antimatterEma.addValue(antimatter.Divide(lastAntimatterAmount).pow(viewUpdatesPerSecond).clampMin(B_1))
    lastAntimatterAmount = antimatter.copy()
    setText(antimatterPerSecond, "You are getting ${formatX(antimatterEma.average, 2)} antimatter per second.")
} else ...

and the code for the exponential moving average looks like this:
BigExponentialMovingAverage.txt

If you figure out a better way to do this please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: antimatter dimensions formerly normal dimensions feature All your dumb ideas QoL Any quality of life or visual changes that don't alter gameplay balance up-for-grabs
Projects
None yet
Development

No branches or pull requests

4 participants