Why Ice Raindrop Shouldn't Work (but does anyway)
7 years ago
jongyon7192p
He/Him, They/Them
7 years ago

Raindrop is done by walking into wall so that you are exactly 1 pixel into the wall, after which the wall pulls you into the wall by another pixel. Even if you're 0.00000000067 of a pixel off from this position, you either will just stay slightly inside the wall (the wall neither push or pulls you), or you push too far, and the wall pushes you back out, in which you will "align" with the wall, and you can't drop into that wall anymore.

Now this is about ice raindrop, so here's ice physics. Your speed is incremented by 0.03 px/frame. That's it, really. If you start walking, your speed goes 0.03, 0.06, 0.09, and if you stop walking from full 3 px/frame speed, you go 2.97, 2.94, 2.91, 2.88, ... 0.06, 0.03, 0.00. Yes, that's 100 entire frames of slowing down. La-Mulana ice is super slippery!

So ice raindrop is just walking into a wall exactly 1 pixel in despite the ice physics' subpixel shenanigans. (subpixels is any value less than 1 pixel. It usually refers to developer-intended fixed numbers or decimal multiplications.)

RainDropDry found that, to do the ice raindrop, you grapple on a wall, which puts you 2 pixels away from the wall, then you just walk for exactly 10 frames, then let go. Let's see here... .03 + .06 + .09 + .12 + ... .24 + .27 + .30 + .27 + ... + .06 + .03. = What? Exactly 3 pixels! Now you're exactly 1 pixel into the wall, you're pulled, and now you can raindrop! So that's it, right...? Well...there's the developers-UNintended fractions, and this is personally where I lose my mind.

(Just wanna note that you don't need hermes boots. Ice doesn't care AT ALL. Even if you land on ice with 2.4px/frame speed (hermes boots speed), if you keep walking, the ice will increase your speed until you're at 3px/frame (default walking speed). If you land with higher speed (like grapple walljump) the ice sets your speed to 3, hermes or no.)

See that line up there? From here on, we're going deep. And I mean, you thought 0.03 pixels is small, you didn't see anything yet.

Floating point values (floats) are used to conveniently represent extremely small and extremely large numbers. But not all is perfect, because floats represent fractions in binary, meaning it has to use 0.5 (1/2), 0.25 (1/4), 0.125 (1/8), and so on. When a number like 1/5 is represented in binary, it'll be an infinite string of "1100"s, and floats will simply have to be rounded after 23 decimals.

What is our position and speed represented with? Floats. Why? ...Dunno. But it sure makes my job harder!

Remember that 0.03? It's not exactly 0.03. It's 0.030000000000000002. Or 0.03 + (1 / 424 quadrillion). Yes. 400 quadrillionth of a pixel. That is our floating point imprecision (fpi)!! Now don't worry, this was just an example. In our ice physics situation, our fpi will only go as far as 26 millionth of a pixel, so it's not as bad! ¤faints¤

To calculate fpi, I just take the exact float value I got, subtract the "intended" part, then throw just the "imprecision" part into wolfram alpha. And I get the exact fraction of the imprecision! That's it? Ezpz! (Wolfram Alpha basically does all your math homework to the first 2 years of college, so everyone should be using it by now.)

In the numbers [0.03, 0.06, 0.09, 0.12, 0.15, 0.18, 0.21, 0.27, 0.30, 0.27, 0.24, 0.21, 0.18, 0.15, 0.12, 0.09, 0.06, 1.03], I will line out all their fpi! (the last number is 1.03 cuz the wall pulls you in by 1 pixel at the same frame you do that last movement. I know, it's weird. No, it doesn't affect our calculations. I checked. Trust me on this wild ride.)

In terms of 26,214,400ths of a pixel: -7, +11, +4, -3, -10, +8, +1, -6, +12, +5, -13, -6, +1, +8, -10, -3, +4, +11, -7

You see something repeated here? 0.03 (or 1.03) to 0.24 all appear twice, and both times, they have the same fpi. No, they don't cancel each other out. And if they did, it would actually make all raindrops impossible because that 0.30 only appears once, and its fpi (which is guaranteed to exist) can never be canceled out using any sort of deliberate movement by an RTA player.

No, the truth of the canceling out FPIs is way weirder. (Or only slightly weirder. Look, I'm trying to keep your attention, alright?!)

If we add all the positive numbers, it adds up to 65. If we add all the negatives? -65. They cancel out...but why? I...HONESTLY don't know.

I mean, we can look at it this way, combining the repeating parts. 2¤ (-7 +11 +4 -3 -10 +8 +1 -6) +12 +5 -13 That is = 2¤(-2) +12 +5 -13 = 17 - 17 = 0

I don't know...but I think we got really lucky that the 21 FPIs happened to cancel out like this. How much time does this ice raindrop save?

I think this is the most useful I've been, researching floating point values, and that's just from picking up someone else's work and trying to find "WHY?"

Whaddya guys think? With just the fact that ice acceleration is 0.03 px/frame^2, this level of deduction is possible for Mulbruk~! Ohohoho~! (/uminekoMemes)

편집한 사람 작성자 7 years ago
Timopy 이것을 좋아함
게임 통계
팔로워
64
런들
116
플레이어
28
최근 쓰레드
게시 일자 2 years ago
2 개의 답글
게시 일자 7 years ago
1 개의 답글
게시 일자 7 years ago
5 개의 답글