Get the latest tech news

Neo Geo Dev: Fixed Point Numbers


Let's take a look at how to work with decimal numbers on an ancient cpu.

For my game, I've opted for a system that creates pretty precise decimal numbers at the cost of smallish integers. In my game, I almost always store something's x and y values for its location on screen as fixed, then right before I need to update its sprite, I will convert it back to integers. As I worked on my game, I realized I needed to change how many bits I used for decimal and integer in my fixed point system.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of neo geo dev:

neo geo dev:

Photo of fixed point numbers

fixed point numbers