So I am working on a simulator game but I need a formula to calculate the price of the rebirths. I would like the player to be able to get up to 20 million rebirths with the price increasing for each rebirth. I have tried adding 10% to the last cost but that gets too high too quickly. The formula I tried using is
price = price * math.pow(1.1, currentRebirths)
This gets the price up to 4 googol (4 with 400 zeros) at only 10,000 rebirths. I have tried lowering the percentage to 5% but that still gets to 2 googol at 10,000 rebirths. I would preferably like the rebirth at 20 million to cost about 10 Decillion (30 zeros after) coins but I also don’t want the rebirths at the start go up in 1 dollar increments (it starts at 1,000,000 for the first rebirth). Does any one have any formulas I can use that would help me achieve this?
So what I ended up doing is increasing it exponentially (by a percentage) but I halfed the percentage it increases by at certain numbers. In this case it halfs at 100 and then doubles it to get the next number so it halfs at 100, 200, 400, 800, 1600, 3200 etc. Here is the script I used
local RebirthStartingPrices = {
[1] = 1000000,
[10] = 10000000,
[100] = 100000000,
[1000] = 1000000000,
[10000] = 10000000000,
[100000] = 100000000000,
[1000000] = 1000000000000
}
...
local HalfingNumber = 100
local currentMultiplier = 0.05
local currentPrice = 1000000
for i=0, PlayerCurrentRebirths do
if i == HalfingNumber then
currentMultiplier /= 2
HalfingNumber *= 2
end
currentPrice *= (1 + currentMultiplier)
end
for numOfRebirths, _ in pairs(prices) do
prices[numOfRebirths] = currentPrice * numOfRebirths
end
If you decide to use this then play around with the starting percentage and the number it starts to half at