1
$\begingroup$

I'm developing a game where I've come to the point where I need a formula to calculate the gold cost of a resource. I want the gold to get lower the more resources are sold, so if A is gold and B is the resource, the higher B gets, the lower A needs to be. I'm posting this here because I'm looking for some different options and the math board seems like a logical place to ask for help with a formula.

Thanks for reading,

Kevin

$\endgroup$

1 Answer 1

0
$\begingroup$

One of the simplest formulas would be $A=\frac{c}{B^{n}}$ where $c$ and $n$ are arbitrary constants. As $n$ increases, the magnitude of the rate at which $A$ decreases with increasing $B$ increases. $c$ works similarly, but not identically. You can experiment and plug in values to decide what is best.

$\endgroup$
2
  • $\begingroup$ I'll try implementing this formula and let you know how it turned out, thanks alot in advance. $\endgroup$ Jan 28, 2013 at 11:24
  • $\begingroup$ This works perfectly, thank you. $\endgroup$ Jan 28, 2013 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.