Timeline for What dynamic range of numbers do games typically use?
Current License: CC BY-SA 4.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 8, 2022 at 9:46 | comment | added | Chris Thorne | @Madman, yes that is a good way to put it. And , yes the "floating origin" I use is the real one: the player never moves. There are many so-called floating origin solutions but they move the player up to a threshold distance from the origin like origin rebasing of Unreal. That said, any reference system for data held as maps or on server is still more conventional: higher precision and divided into sectors/chunks. | |
Dec 8, 2022 at 7:48 | comment | added | Roy Ward | @ChrisThorne That's really nice! So your "local" coordinates are around the player rather than around (say) Pluto. That's similar in some ways to the approach that I'm using, although I allow the coordinates around the viewpoint to lag a bit and not be updated every frame. I do have to have a global coordinate system as well (64 bit ints, although I possibly could have gotten away with 32 bit ints, but 32 bit floats would have been inadequate) otherwise the procedural generation becomes non-deterministic. | |
Dec 8, 2022 at 4:00 | comment | added | Chris Thorne | @MadMan, that is one of mine. I don't use separate local coordinates or any sectorized map of absolute coordinates - for the moving player. I use dynamic virtual spaces. The coordinate system around the stationary traveler never changes. However, the player may exist in multiple virtual spaces at any time. Travel is via relative movement (differentials) and the precision limits don't apply. | |
Dec 7, 2022 at 21:42 | comment | added | Roy Ward | @ChrisThorne They must be doing some local relative coordinates for that. If you just used floats in a single coordinate system based at the Sun (or Earth), Pluto is about 5*10^12 meters away (depending where it is in its orbit), floats have 24 bits of precision, so 1 ULP would be about 300km. If you are prepared to keep changing your coordinate system, floats will give you the universe. | |
Dec 6, 2022 at 23:15 | comment | added | Chris Thorne | @rwallace Although "the limiting factor is precision" is the way I, and most people started, this is not actually true. You can travel the Solar system as one continuous space with just float, evidence: youtu.be/_04gv3CnjDU. The limiting factor is how we think about it and the resulting design we apply. | |
Dec 6, 2022 at 20:35 | vote | accept | rwallace | ||
Dec 6, 2022 at 18:39 | comment | added | DMGregory♦ | You may also be interested in What's the largest "relative" level I can make using float? | |
Dec 6, 2022 at 14:03 | comment | added | Philipp | @rwallace Unfortunately current CPUs and GPUs don't have hardware support for custom floating point formats. Theoretically you could emulate them by using raw bytes and implementing your own mathematical operators, but then you lose a lot of performance... and sanity. | |
Dec 6, 2022 at 13:02 | comment | added | rwallace | That is helpful, thanks! Sounds like confirmation of my conjecture: the limiting factor is precision, not the dynamic range of the exponent, so the practically achievable range would be better if there were one or two fewer bits of exponent, and one or two more bits of precision? | |
Dec 6, 2022 at 11:19 | history | edited | Chris Thorne | CC BY-SA 4.0 |
typos
|
Dec 6, 2022 at 10:16 | history | edited | Chris Thorne | CC BY-SA 4.0 |
Corrections and better explanation with bookmark references.
|
Dec 6, 2022 at 10:00 | history | edited | Chris Thorne | CC BY-SA 4.0 |
added 355 characters in body
|
Dec 6, 2022 at 7:18 | history | answered | Chris Thorne | CC BY-SA 4.0 |