Topic: Projected number of buildings that can be constructed

On the build page for planets, the text at the extreme right for any given building which shows how many buildings you can make with your current resources, is inaccurate. I think it simply divides the current resources by the displayed amount. It doesn't take into account the overbuilding price increase for each consequent building and I think it doesn't account for real(decimal) building costs either.

Re: Projected number of buildings that can be constructed

Jag, how can you actually fix that? I did a calculator once, and it simply averages the starting and max OB% which is easy, but if you do not know the max OB% the calculation is harder to make...I generally make a guestimate when I know I am overbuilding on a planet...

I give your invention the worst score imaginable. An A minus MINUS!
~Wornstrum~

Re: Projected number of buildings that can be constructed

you know the max OB because its limited by the number of resources on hand

Re: Projected number of buildings that can be constructed

Jag, I get your point, BUT tell me how to work out OB % for a planet that is 313 in size? Like what equation do you use to work out the cost?

I give your invention the worst score imaginable. An A minus MINUS!
~Wornstrum~

Re: Projected number of buildings that can be constructed

Write program code which behaves something like this
currentValue = 0;
minValue = 0;
maxValue = GreaterOf(PlanetMaxSize,BuildingsOnPlanet);

run a loop for currentValue from minValue to maxValue and find the highest currentValue that can be built before running out of resources
If you wanna make the algorithm more efficient, you can check for currentValue=maxValue first, divide it by 2, check again repeatedly(while moving currentValue halfway towards the direction of minValue or maxValue each check)  untill you find the max amount that can be built.


Should also be able to do it mathematically using integral x limit from 0 to GreaterOf(PlanetMaxSize,BuildingsOnPlanet). Not sure about how to form the exact equation havent used integrals since school sad Maybe someone else can.

Re: Projected number of buildings that can be constructed

bump