I'll tell this story from the beginning.
I have over 300 coins. When the switch to newpunch happened, I never bothered to update my avatar. Even though I'd be more interested in a background, I never bothered with those either and so my coins piled up. But at one point it crossed my mind, what if I even was interested in spending my coins? What if I wanted my old avatar with a 80x80 resolution? How far would my coins get me? I know some math from my gymnasium(Danish equivalent of high school I think, not a gym where you go to work out) days and I think I was quite sharp at it back then, so I decided to give it a go.
I started considering how to approach this problem. First off I graphed the price of individual dimension increases. I'll refer to it as pixels, as I don't know a better term even though you're not buying individual pixels, rather an extra pixel in your chosen dimension. I know that the first extra pixel you buy costs 1 coin. Each extra costs 1 more coin than the previous pixel. This is just the integers starting at 0 and this is rather easily graphed by graphing the formula [ f(x)=x ].
https://vgy.me/E3Av0B.png
This doesn't really tell me much though. It is after all laughably trivial, to tell how much pixel [ n ] costs, it is just n. As long as you consider it as the extra pixels from 65 onwards. We could also say it's [ n-65 ] if we wanted to consider it that way.
Well the interesting problem here is, if I have [ x ] coins how many pixels will that buy me? This part got rather tricky for me, despite once knowing calculus. It's because I forgot it all and I was also not particularly methodical in applying the formulas this time around. I first considered it as a recursive problem. The cost of a pixel is of course, the cost of the previous pixel, plus the cost of the new pixel. I sadly did not spend enough time to really learn this area well enough though. Best I could come up with was that a formula would look something like [ f_n = f_(n-1) + n ], but I do not know whether it's even close to being the right notation, nor how I would graph it or convert it into an equation.
I next considered that I could find the price by taking the integral of the price formula. The price for pixel [ n ] is of course the price of each coin between 0 and n inclusive, added together. This corresponds to the area bounded by the x axis and the equation graph. Which is what the integral shows us. Now I honestly should've been rather busy with something else, so I really didn't do a very thoroughjob of this. I realized that the formula would have som component [ 0.5x^2 ], but graphing that didn't look right.
After fiddling with it, looking at the graph and considering things, I came to the realization that to properly represent the cumulative price of pixel [ n ] coins the equation would look like this [ g(n) = 0.5n^2 + 0.5x ]. This was just done by graphing some points I knew were right and then looking at the graph in relation to that. And indeed I was right, here's my graph for this equation.
https://vgy.me/Ow7Sb7.png
So there was my answer, but I wasn't really satisfied. My ability to do nice and pretty math had degraded pretty badly over time. So I decided why not ask Facepunch? This place is pretty dead now a days, so I might as well try to bring some life into it. It's not like you get banned for anything anymore either. So I'll put a 31 coin bounty (Because you can't give 3.14 coins, 314 coins was too much and pi times ten, rounded off is 31), on a nice mathematical answer, hopefully with pretty graphs. If anyone can model this problem nicely, I'll give you the coins.
I'd be interested if someone could replicate my answer but without doing shoddy guesswork and if people could show the equation as a reccurence relation and then graph it. But of course if you can present things in an interesting way, that isn't too over the top to the point where it's gibberish to me(Which will be hard for you to tell probably), I'll consider that too.
Some other questions that my own solution doesn't quite explain.
How many pixels could I buy with x coins?
This would be flipping the axes of the graph, but how would I change the formula to reflect that?
How many pixels more can you buy, if you instead of putting all your money in one dimension, put it in both directions?
I imagine there's some constant that would reflect it.
I hope at least there are some math people on fp.
Oh yeah and I'd be able to buy about 25 pixels worth of height with my 333 coins, costing me 325 coins.
Avatars are for chumps anyways
Didn't read the whole post cause you seem to be overcomplicating things, so I'll try to sum it up quickly.
Initial avatar size is 64x64. Each width/height upgrade increases one dimension by a pixel. The cost starts at 1 and grows by 2 with each upgrade. So the price for n upgrades, let's call it p(n) is
p(n) = 1 + 3 + ... + 2n - 1 = 2n * n/2 = n^2
If x is a given width/height you want to achieve, the price to get there is then (x - 64)^2
My original plan was to get back to 80x80, I've been trying since the switch happened and I'm only at 75x74 so far. Size is too damn expensive
can't you solve it with summation?
Like:
f(x) = x(x+1)/2 - a(a+1)/2
x being target pixel - base pixel
a being current pixel - base pixel
This only calculates one dimension.
*shrug*
i’m at 80x80
your donations can help me restore my funky Freeman to his former 80x160 glory
But how many pixels are you actually getting for your money? If you keep only expanding in one dimension, you'll get 64 * n extra pixels after n upgrades, but pay n^2 coins, so the price per pixel keeps going up as you increase the size of your avatar.
But what if you alternate between buying extra width and height instead? The number of pixels you get will then increase with each upgrade, since the rows/columns that you're adding keep getting bigger every time. So let's say you get n upgrades in both directions (which costs you 2n^2 coins), and here's a picture to make things clearer:
https://files.facepunch.com/forum/upload/209687/a7e94277-ab5c-4d2d-9f13-0a6fb2d924a5/pixels.png
The number of pixels you actually get for your coins is then n^2 + 128n or as n gets higher and higher the cost per pixel approaches 2.
I'm on 84*84 and my next pixel costs 41 coins
It was kind of the point though, I could easily figure out the answer, but what I really want is to see it calculated in a nice clean way.
only for one dimension at a time
√(a+(b-c)^2) - (b-c) = d
a = current coin
b = current pixel size
c = default pixel size (64)
d = amount of pixels you can buy
(a+(b-c)^2) - (d + (b-c))^2 = e
e = amount of coin you'll be left with
----
If you are looking to upgrade both (equal) sides, it essentially just means double the cost.
√(a/2+(b-c)^2) - (b-c) = d
((a/2+(b-c)^2) - (d + (b-c))^2)*2 = e
I'm not going not figure out the efficient purchasing for both varied sides. Ain't got time for that.
So what exactly do you want to know, how many pixels you can buy with the amount of money you have? If you want to maximize the number, you have to buy both width and height as mentioned. I already gave you the equations. So you plug in
#of coins that you have = 2n^2
and solve the quadratic, that gives you the number of upgrades you can buy.
The number of extra pixels you get is then n^2 + 128n
If you're buying just one dimension instead:
#of coins = n^2
solve for n, then you can calculate the number of pixels gained as 64n
FP died so I stopped caring about this thread. I'm just giving the coins to someone random, enjoy.
Sorry, you need to Log In to post a reply to this thread.