surprise math...

Spoiler

i just noticed how the world tier levels are calculated... who still remembers (a^2 + b^2 = c^2)? because i've been out of school long enough to be surprised that it came to me.

for clarification (x axis squared) + (y axis squared) then take the square root of the answer, round it down, and you have your tier level.

... i might be bored while farming red crosses... might need to take a break from the game for a night or 2 xD

Posted Jul 25, 2021, 7:45 AM UTC

313
kakjit•

Am i misunderstanding? The tier level is based on the furthest x or y distance from the axis.

3
Berufius•

Which is exactly what the root of c would be. The distance from the axis to both x and y is a straight line, which makes axis-current point-x a triangle. Hence Pythagoras can be used to calculate the distance from the axis to the current point.

2
kakjit•

I mean, sure, that's how the Pythagorean theorem works, but that's not what op was saying. The OP was saying that the tier level is C, where your position on x and y are A and B. This is not true. Your tier level is whichever is greater, x or y. If I go to (48,37) and use a²+b²=c² then we'll get 2304+1309=c² or 3673=c² or √3673=c which is roughly 60.6. the tier level isn't 60, though. It's 48.

Or am i misunderstanding what the OP was trying to communicate?

3
Berufius•

Then it's simple, OP really needs to go to bed ;)

3
Spac3HeaterOP•

that may have been VERY true, but it didn't stop the sleep deprived, idiot version of me from being right for some god-forsaken reason... didn't stop me from hoping though ;D

1
Spac3HeaterOP•

i have been lied to and i don't appreciate it... so i spent about 10 minutes finding a (48,37) to check if this was true... low and behold! my tier level ended up being 60!

well played good sir! you either messed something up in game, or you are a douche. either way, lots of respect for making me question my sanity xDDD

2
kakjit•

Oh shit, i may have made the mistake. I'm looking at (-37,48) and i thought earlier it confirmed me. I'm looking again and I'm wrong and you're absolutely right.

Womp womp. I think i know how I messed up, i was looking at points too close to the x or y axis to start then went off to find something more obscure to do the math and just assumed i was right without actually looking at the tier level when I found a further out point. Sorry!

2
Rasip•

That is what i thought. It only cares about the highest of x or y.

1
iceseck•

But I get a higher tier if I go slightly to the left then if I go just up, but I'm higher then that I am into -x

2
Spac3HeaterOP•

when you square a negative number, it comes out as an positive number, because when you multiply 2 negatives, it becomes a positive. and squaring a number is just multiplying with a copy of itself.

this won't mean too much change in gameplay. the farther away from the origin point you are, the higher the tier level gets. the difference is that now i know that every point is on an invisible grid point, and that the fastest way to progress, is diagonally (aka. pick a corner and go)

i really hope i was reading that right and that was the issue. because someone else here has already succeeded in making me question my, already low, sanity xDDD

1
GermapurAppsDeveloper•

Wait, no, or?

Tier is simply the length of the vector. In my code:

tier = (int)(new Vector2(x,y).magnitude);

Magnitude is the length of the vector, so diagonal should not make a difference. Maybe only +-1 because of rounding.

Let me know if this is no the case, then I will have a look again.

2
Spac3HeaterOP•

if magnitude is the length of the vector, then it fills in "c" within the Pythagorean theorem (a^(2) + b^(2) = c^(2)). because the theorem can be used for this purpose on square grids, you just need to create a right triangle out of the given coordinates by drawing a line from said point to either the x or y axis.

the diagonals matter more due to how everything is set according to grid squares. if i take a path that goes diagonally down and right, that path is naturally going to be longer than a path that just goes 1 down or 1 right. over the course of a thousand jumps, that tiny difference becomes massive. for example: the location of (1000,1000) comes out to tier 1414, and can be theoretically achieved in the same number of jumps as (0,1000) which comes out as tier 1000. i say theoretically, as it seems like the lines are randomly generated.

if you don't want diagonals to make a difference, then you either need to change to a circle grid, remove diagonal movement altogether, or remove any diagonal movement that is greater than a (1x,1y) movement.

​

tldr: i found that your code bases tier level on the distance from the center, so i used my (limited) knowledge of the Pythagorean theorem to give myself an edge in traversing the map. if it makes you feel better, i NEVER thought that the math i learned over a decade ago would ever amount to anything... and yet here we are.

1