I am trying to make a Cookie Clicker-like game using libGDX in Java. In Cookie Clicker games there is something called cPs, what is cookies/points per second. And that number can be huge. But instead of adding X points per second, the game is adding 1 point X times per second.
I am trying to do same thing using double variables. It looks something like this right now:
if (deltaTime > (1/pointsPerSecond)) {
score += 1;
deltaTime = 0;
}
But with numbers like 300 points per second, the counter just can't keep up with adding points. What is the best solution to this?
