Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
I'll try implementing this formula and let you know how it turned out, thanks alot in advance. –  Kevin Peters Jan 28 '13 at 11:24
    
This works perfectly, thank you. –  Kevin Peters Jan 28 '13 at 11:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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