Inkyrius

The Girl Anachronism

 


 
This place is not a place of honour. No highly esteemed deed is commemorated here. Nothing valued is here.

 
Inkyrius or Inky or Kyrie are all fine.
Girl with a dash of Void.

 
Queer Trans Nerd. Mostly Harmless.
Interests include programming, formerly Minecraft modding, conlangs, worldbuilding, maps, typography, etc.

 




Watching back some of pannenkoek's videos is making me think about floating point numbers again. Is there actually any reason to use a float for Mario's position instead of a fixed point number? Unless I've messed up my maths somewhere the delta between representable values is smaller for a 32-bit fixedpoint (with the decimal place right in the middle) than for a float when Mario is at least 256 units away from the origin.

Like floats are great and all, but they're very clearly designed for when you need to represent a real number in a maths context, where the number of significant figures is a good representation of accuracy. They're just scientific notation for computers. If you're using them for a coordinate system where the origin position is basically arbitrary then you don't need the increasing accuracy closer to 0, and you don't need the wide range of numbers that are much larger than your map size (In this case shorts, so ±32,768).


You must log in to comment.