Comment by hackit2
5 hours ago
When I started with the gaming industry (Operation Flashpoint), I was coming in near the end of fixed point arithmetic where floating point units where becoming more common as part of the PII or PI era. It was around mid-1990, I'm actually in my early 40's now. I knew a little bit of floating point units but never really dived into the area - also at the time I wasn't really mathematically minded and we really didn't have access to the internet - Australia.
A-10 Cuba! came out around 1996, and only now am I getting to know its internal engine. For example, it utilizes a signed Q15.16 fixed-point representation for its X and Z axes. For instance, a raw value of 98,304 (0x00018000) decodes to 1.5 units - where a unit is defined as 6607.92 feet - which translates to 9,911.88 feet in the game world. Then to top it off, it uses a different coordinate scaling convention for its up axis. For example the up-axis resolution is 1/10th of a foot so a raw value of 10,000 is actually 1,000 feet. Then there are other discrete exponent scaling factors which the game applies to maintain numerical precision and accuracy.
I had a great time learning all this well reverse engineering the game, and also come to learn even today how common it is for chips not to come with FPU unit, and how common it is that those chips actually perform fixed point arithmetic.
No comments yet
Contribute on Hacker News ↗