T O P

  • By -

Dasioreq

#đź‘Ź FLOATING #đź‘Ź POINT #đź‘Ź ERROR


Ponsole

floating point error, my beloved. https://preview.redd.it/pu7x4w70011d1.png?width=252&format=png&auto=webp&s=6eacac68993305f6d9629c3ba6c646b98aca5bc2


Breyck_version_2

What is the picture supposed to mean


Alderan922

I assume it’s meant to be a sphere whose rendering stopped working due to floating point precession errors


InevitableAd4156

Yup, it's from a video showcasing floating point errors and how they work


Haha_funny746

In short, the game can’t make an accurate number to display your model correctly, so it guesses


Gamekid53

There’s a name for this? I’ve always called it glitch speed


GlauberJR13

It’s not really related to speed but distance. Unless you mean the UI going all around or getting left behind, that one is speed yeah


Gamekid53

I thought objects were glitching out from going really fast. It’s happened to me in Roblox and I didn’t know there was a term for it so it called it glitch speed


i_verye_smowt

it can happen in any game if you go extremely far out. That's how the farlands formed in minecraft along with all the wonky behaviour that came with travelling millions of blocks out


guttertank_ultrakill

It happens in almost every game.


Ponsole

Actually the UI in this game is rendered on a 3d space so the floating point error is also affecting it, being leave behind is effectively caused by speed.


Proxy_PlayerHD

the UI is rendered in the world, so it also glitches out based on distance and not speed


OogaBoogaHeh

I always called it the null zone


clingledomber

roblox has this famously too


Dasioreq

Every game that uses floats and/or doubles (though to a lesser degree) experiences this - it's an error that comes naturally with the floating point standards


FistfulOFragsEnjoyer

classic case of vertex snapping going to extremes when you travel far from an origin. happens in plenty of games edit: floating point error is the name of it


Cordi-SepS

duh that happens in every game


Ultra_CUPCAKEEE

except not really! some games move the environment around you instead of you around the environment, so this ends up not happening (im pretty sure). there are definitely going to be other problems tho


AdResponsible7150

Then this error happens to the environment rather than to you


Ultra_CUPCAKEEE

honestly i have no idea, because youre just making the position variables closer to 0, so arent they actually gaining precision instead?


AdResponsible7150

I know outer wilds is one game that centers the world on the player, and in that game when you fly too far from the solar system the planets start to get funky


GlauberJR13

Like they said, it just moves around where the imprecision happens, so in outer wilds it happens to other planets. Smaller games like those rpg maker games though? Probably the environment isn’t even big enough for the problem to occur


Alpha_minduustry

yeah did the similar but in sandbox with like 400 sharpshooters helicopter boost


JaozinhoGGPlays

Puppet V1


pixelanceleste

This is typical in Unity, and likely in other game engines too. Something similar happens in Super Mario Odyssey even


MMilan_13

Also happens in Cruelty Squad


pixelanceleste

That one was made in Godot i believe. Interesting.


Proxy_PlayerHD

it's not really engine related. for example Outer Wilds doesn't have this exact issue and is also made in Unity. it's more a thing with how you handle coordinates and positions of objects in the world/map of the game. they are multiple different approaches that are all engine-independent and have their own up- and down-sides.


pixelanceleste

Interesting- could you describe some of these approaches?


Proxy_PlayerHD

I'm sorry for this wall of text, i just kept writing... :( . well first let's describe 3D in general. and why this even happens. world space is where all 3D objects are placed into. all vertecies that makes up the polygons of the level, enemies, effects, etc. they are all relative to the center of world space (where that center, ie 0,0,0, is located doesn't technically matter but it's best near the actual center of the map) then there is view space. its center (ie 0,0,0) lies exactly where the camera is located in world space. everything that is supposed to get rendered and is visible by that camera gets it's coordinates translated/transformed from world space to view space. . the main issue is that floating point numbers only have so many bits in them, and those bits have to be shared between the whole and fractional part of the number it's supposed to store. floats are designed to maximize precision, so the whole part of the number gets the absolute minimum amount of bits assigned to it while the rest gets assigned to the fractional part. this of course means that as the whole part of the number grows, the fractional part has to shrink to make space, loosing precision in the process. this can continue to the point where there isn't even a fractional part anymore. and when doing math with floats the result always gets "snapped" (aka rounded) to the nearest valid value. for example imagine a float like this, 8 decimal digits with the decimal point being able to freely move around the number, though it always tries to be as far to the left as possible to maximize precision: `.00000000` with the whole part of the number being "0", this gives you 8 digits for the fractional part, so the smallest possible step between 2 values is 0.00000001 (1/100M). but if the whole part is larger: `6418.0000` suddenly you only have 4 decimal places to work with. so the smallest step between 2 values is 0.0001 (1/10k). if you now imagine taking this number and adding it to 2 seperate values: `6418.0000 + 0.00004` `6418.0000 + 0.00005` because the large number only has 4 decimal places, the smaller values get rounded either up or down before being added. in this case `0.00004` gets rounded down to `0` and `0.00005` rounded up to `0.0001`. so the final results are: `6418.0000` and `6418.0001`. so, even though both `0.00004` and `0.00005` only had a distance of `0.00001` between them, because of the rounding they are now 10x further apart from eachother! worse, if the values were both `0.00001` higher or lower, both values would be rounded up/down equally, making the distance betweem them `0`. this is what causes the warping/wobbling effect of models and such when floats become less precise. rounding! . #TL;DR of the above part is: floats get less precise the further you move away from 0. in games where worlds are rather small, or split into multiple seperately loaded maps/levels like Ultrakill, this can be completely ignored as the player will never get far enough away from the world center to notice it. this does become a problem in large open world-like games. and maybe you're already thinking: "wait if the issue is that floats become too large as you move away from the center of the world/map, but view space always has it's center where the camera and the player is. then why not do everything in view space and simply not use world space?" and if you did think that, then congrats! that's pretty much exactly what outer wilds is doing. though it still seperates world and view space, the center of world space is always where the player is... or rather the player itself is locked to the center of the world and everything else moves around them. this has the advantage that the player is always in the high-precision range of the floats no matter where they are in the world, but the downside is that now objects far away from the player will experience the low-precision rounding issues of floats instead. plus the actual math for moving things around is a bit more complicated and more taxing on the system. . another idea is to not solve the problem but to just shove it further out by using `double`s instead of `float`s. they have a larger memory footprint (64, instead of 32 bits) but also boast as MUCH larger range and therefore take longer before rounding becomes visible. . one different option is to get rid of floats in world space and do everything with integers instead, and only convert to floats for view space (since most graphical APIs like openGL, Vulkan, etc. require floats). this is less memory efficient as you need an integer large enough to make each "unit" in the coordinate system small enough so that players won't notice it. but unlike floats the overall precision is constant no matter how far away you are from 0 (because it's just a regular integer). . if you would like to have fractional numbers but still avoid floats then you can use fixed point numbers. it's basically exactly the same as the idea above by just using a large integer. but instead of using the entire integer for whole numbers you dedicate a certain amount of bits for a fractional part (similar to a float) as well. difference to a float being that the amount of whole/fractional bits never changes, keeping precision constant as well. This is what DOOM and Quake use. (Quake used floats for rendering, but fixed point for movement, level geometry, physics, etc) for example let's take ultrakill. let's say we'd use Q48.16 (meaning 48 bits for the whole part, and 16 bits for the fractional part, using a 64 bit integer). go into sandbox mode and make a cube of size 1x1x1. each line on this cube is 1 in-game unit in size (1u). now imagine that 1u = 1 whole number in our fixed point value. that means that each line on the cube is split into 2^(16) (aka 65536) steps. that is the total precision the game would have. every model, object, etc. would snap to one of those values when moving between in-game units. it's not a lot but might be enough to not become noticable during regular gameplay. with "only" 48 bits for the whole number part, maps would be limited to a total width/length/height of 281.474.977.000.000 (281.5 Trillion) in-game units. which is more than enough i believe! though if that range is not needed you could assign a few more bits to the fractional part, making it more fine-grain at the cost of shrinking maximum level size (Q40.24 for example, 256x more precision but 256x less level size (1.1 Trillion in-game units)) . those are a few examples i could think of from the top of my head. there are likely many more on how to deal with coordinates and such.


Super_Lorenzo

Me vibing to the music: https://i.redd.it/s6zgzatet01d1.gif


sentry_inventor

something similar happens in roblox when you go too far from the map


WingDairu

...*but before we can talk about that, we need to talk about* ***PARALLEL UNIVERSES.***


Low-Salad-2400

It's hell duh


PushingFriend29

Farlands


Sammer_Pick-9826

Floating point imprecision, not errors per se. Just the standard for floats in all sorts of computing. It's the reason why 0.1+0.1+0.1 equals 0.30000000000000004 with most programming languages (not just JavaScript lol). Binary works great with powers of 2, otherwise not so much when it comes to decimal values. Think of how base 3 has no problem representing 1/3 but base 10 does. This problem is exacerbated by very large floating point values, as when the value to the left of the point requires more bits, the point "floats" to the right, leaving fewer bits for an accurate representation of the value to the right of the point.


_C18H27NO3_

yep. i found this one out on the sandbox, posted a quick vid of it a while back, it can get worse, way worse


Xirio_

It's a floating point error but are you moving fast?


RandomExcaliburUmbra

Oh my god! You’ve reached floating point error! I do it all the time in Resonite but it’s funny to see in Ultrakill.


Billy177013

My favorite way to get that is stacking dual wields and sharpshooter helicoptering


staticvoidliam7

I LOVE FLOATING POINT PRECISION ERRORS


[deleted]

roblox farlands


ImaginaryMovie9018

V1's got a real bad case of the heebie jeebies


InitialJotaro

Is this Cruelty Squad?


Mako_sato_ftw

this is just like those roblox glitches i used to see a lot back when it was much easier to get flung unbelievably far distances upward. you could see some real shit there


Due-Assist346

this is what happens when v1 puppets hell itself


OogaBoogaHeh

I've only seen this in roblox dang


jack848

v1 got a severe case of heebies jeebies


lordPyotr9733

mmmmm floating point error


Hsnkyu

Hell doesnt want you to leave


niggs_the_b_buster

One time I left my PC running and I did this before I hopped off, brother my game looked like geometrical shapes and colors


Familiar_Location948

you can do this in Mario Odyssey too, there’s a glitch you can do in the Darker Side of the Moon where you cap a frog and do some funky video game shit and you can fall endlessly through the void, beyond the kill barrier


milgos1

When i saw this without reading the caption i thought this was ultrakill with some vr mod, the ui moves kinda similar to vr games.


Old-Difference-2230

He’s got a real case of the heeby jeebies


Radigan0

This happened to me in the sandbox when I supersized a Hideous Mass, I was going so fast that my hud was a few pixels When I got far enough, my weapon became completely incomprehensible


dQw4w9Wg

roblox has precisely the same pretty much unfixable bug


fizio900

Try this - Set radiance to be forced and at tier 2000 - Spawn a V2 below you (or even Soldiers if on Brutal) - Reach heaven


Sprinty_

Floating point precision error


SatisfiedBucket

as far as im aware this happens in all unity games (if not other game engines) and is called the floating point error. basically unfixable fucky wucky


VitaGon666

Welcome to Farlands


ciuccio2000

Looks like normal ULTRAKILL gameplay to me


Foxy57537

Common Unity engine symptoms.


susnaususplayer

Fuck forgor to post mine


Specter_Knight05

CREATURE OF STEEL, STOP YOU ARE BRE-BRE-BRE-BREAKINGGGGGG UGGGGG TTThis PLACEEEE Apart, STOOOOOOOOOOOOOOOOOP


SokkaHaikuBot

^[Sokka-Haiku](https://www.reddit.com/r/SokkaHaikuBot/comments/15kyv9r/what_is_a_sokka_haiku/) ^by ^Specter_Knight05: *CREATURE OF STEEL, STOP* *YOU ARE BRE-BRE-BRE-BREAKINGGGGGG* *UGGGGG TTThis PLACEEEE Apart, STOOOOOOOOOOOOOOOOOP* --- ^Remember ^that ^one ^time ^Sokka ^accidentally ^used ^an ^extra ^syllable ^in ^that ^Haiku ^Battle ^in ^Ba ^Sing ^Se? ^That ^was ^a ^Sokka ^Haiku ^and ^you ^just ^made ^one.


Smekkstinksofciggies

minecraft farlands looking ass


reppeProtcoD

I was fighting COKM and got flung like that