We can use this function to find the cost of any time between 1hr and 1 day. We can thus specify a function for such a line segment. Using Clash of Clans' data, let's say for example you want 1hr (3,600 seconds) to cost 20 gems, and 1 day (86,400 seconds) to cost 260 gems. With this information, we're ready to start substituting values. We start simple enough with the basic formula to find the equation of a line:įrom there we can work out the equation of a line between 2 points (x i, y i) and (x i+1 , y i+1). So let's turn it into a formula that we can turn into a graph. The nice thing about using a linear segment graph is that it allows you to set and tweak specific price points. If you change your mind later and decide that 1 day should cost more, all you need to do is update 1 value. Everybody knows what it feels like to have to wait a day. It's also very easy to tune. Breaking the pricing down into chunks of time that make sense to humans (hour/day/week) makes it easy to visualize. To start, all we need to do is create a neat little table like this with your desired prices, and then I will show you how to use linear interpolation to calculate any other price. My testing has shown that the pricing algorithm graph consists of a series of linear line segments. They are not simplified versions of curved graphs. Skipping more time costs more money, but you get a better deal. Think of it as a set of increasing discounts. Think of it in terms of cost in gems to skip 1 second. Let's try interpreting the data differently. The values are so bunched up you can't tell them apart anymore. But it's hard to tell what's going now in the bottom-left corner now. The horizontal time axis is scaled evenly. Switching from line graph to a scatter graph gives a more truthful picture. The time is increasing exponentially and it's distorting the data. This is misleading! It only looks that way because the difference between 60 seconds (1 minute) and 604,800 seconds (1 week) is so vast. It looks like the price increases exponentially. This line graph shows how many gems it costs to skip time. Let's start off by comparing some graphs. I set out to learn more about the hidden formulas at work and then blogged about it on my site.
0 Comments
Leave a Reply. |