Pitfalls of pixels as unit in game

Started by
10 comments, last by RoamBlade 6 years, 4 months ago

Don't use pixels, you get tied down to resolution and hack physics.

I would recommend using real world units, feet, meters, etc.

That way you can relate to real world equations, (10 m/s means much more than 100 pixels/s), describing the screen size in units would also detach you from the actual pixel resolution, and allow you to use subpixel accurate rendering without complicating the code with fixed point math which has absolutely no advantage over floats in any modern CPU.

And, with float data, you could take advantage of SIMD intrensics, which you can't with fixed point math. 

This topic is closed to new replies.

Advertisement