Fixed point numbers for mechaenetia?

been thinking about mechaenetia a bit.
Why use floating point numbers when fixed point exists? (i am only thinking in relation to the voxel grids and universe grid)
sure they are much simpler to use and quite fast. But in a voxel game usecase they dont perfectly fit in. For example, with floating point, the closer you are to 0 on the grid, the more detailed you get, and the further out the less detailed you get. With fixed point, this in no problem, if you are at 0.0 or 31204.0 they will be equally accurate. The benefit of this is that you Only pay for the accurasy you get, instead of what flaoting point gives you where you have to pay for accurasy thats outside of the world, and too detailed to be noticed

Sure shaders dont support them natively so turning fixed point to floating will be required when interacting with the shader. But this might not be as huge of a problem as computers are super fast. Which means the only other problem will be the developer experience.

There are for certain some points i forgot to bring up, so feel free to come with them.

2 Likes

you will go insane if you try to make the game logic “perfectly fit” the game world, the benefits of fixed point variables are mostly aesthetic, which admittedly is appealing but it unnecessarily complicates things when trying to work with other libraries that all expect floats, floats are fast and precise enough

2 Likes

Additionally, there is also the thing that Farlands wont exist, as regions are limited to a reasonable size before crossing the border will transfer you to another region, and therefore another frame of reference. (frame of reference will be needed for vehicular travel for sure)

Ontop of that, there is going to be about 32 times more precision than Minecraft when it comes to the voxels themselves. Imagine each visible pixel being “1” unit of measurement, with 32 of them being the length of a Minecraft Block in comparision. So 32 Pixels per Meter.

1 Like