   Fixed point math and integers.
  My scene is pretty big and not very detailed and I was just wondering would there be any point doing fixed point math with integers? This way I would minimize creep and also ease up my job, however is there any reason why not to do it? 
  As far as I know there''s not much point using fixed point unless you''re running on a system that has no FPU. Floating point operations are of comparable speed to integer nowadays so the extra time converting between formats for transfer to OpenGL or Direct3D would not be worth it.   Why you shouldn''t use iostream.h - ever! | A Good free online C++ book;  No but there are A LOT of reasons to use it if you can.The first and most important is cause operation on integers are waaaaaay to fast than the floating point ones.There is only one thing you have to be aware of:the overflows.Example:we are using 16x16 FPM so we can store max 65535 in the integer part and 0.9999847412109375 in the fraction.Say we put 1000 in the integer part so we have to shift 1000 left by 16 bits which results in 65536000.If we try to multply that number by another FPM number huge overflow will occurr.So you must use this wisely if your world is big as you say.Cheers   "You losers better learn...NOONE CONTROLS OUR GOD DAMN LIFE!!!" - MANOWAR ;  Fixing overflows in multiplications with FPM is slower than simple multiplications with floats. A few places where it''s good to use FPM are:*) Inner loops*) Other places having certain numeric limits*) Places that need integers as resultsGuess there are a few more to list. But overall, using floats is the way to go. Casting between ints and floats are slow, remember that. ;  I''ve already shared that with Coelurus but i''ll share it with you too.As he pointed castings int to float and float to int are extremely expensive(however the floating point division simply hails and kills).HUGE optimization can be done if you used cast tables.The cast table is simply a table with floats(or doubles/words/dwords) where you can seek with a given integer and using this trick you avoid expensive casts.When performed with FPM is very fast!   "You losers better learn...NOONE CONTROLS OUR GOD DAMN LIFE!!!" - MANOWAR ;  One reason to use fixed point is that its resolution is constant across the numeric range. Floats will start to fall apart and become quantized as you move further away from zero. Fixed point will act exactly the same regardless of (eg.) where you are in coordinate space and it makes things like constant speed motion much easier to deal with. The catch of course is that you''ll need to know your maximum world size in advance and set the spatial resolution accordingly. And if the world is incredibly huge you may not have enough bits for sub-pixel accurate movement (but then 32bit floats will probably not be enough either and you have to use doubles).(btw, OpenGL can use integer coordinates, but without profiling I can''t tell if there''s a speed penalty from hidden casting or some such) ;  At geometry transformation stage almost every GPU uses floating point calculations. In theory casting from integers _is_ therefore slow. 