The Elite code was great for learning techniques from!
I recommend everyone should read some well optimised code occasionally, and figure out how it works, to see how it's done.
I didn't know much in the way of assembler techniques before reading the Elite code. For example I didn't even know how to do things like multiply or square root, or draw lines efficiently. That's where I learned those things.
It did take quite a lot of studying the printout to get it. So many "aha! that's how they do it" moments.
There are tables for sin, cos and arctan, but these are only used for drawing the planet’s circles. All the ship-drawing and universe manipulation is done using the small angle approximation, so there’s no need for lookup tables.
I recommend everyone should read some well optimised code occasionally, and figure out how it works, to see how it's done.
I didn't know much in the way of assembler techniques before reading the Elite code. For example I didn't even know how to do things like multiply or square root, or draw lines efficiently. That's where I learned those things.
It did take quite a lot of studying the printout to get it. So many "aha! that's how they do it" moments.