-->
0 Members and 1 Guest are viewing this topic.
Shit, that was way over my head. Let me break this down to see if I understand.
1. The 3D engine uses 8.8 fixed point numbers. What impact does that have on my two-byte position variables?
2. I understand about speed. How do I make Speed variable?
3. Do I need to look for a ship, then call the 3D engine each time I find one? Or does one of those routines handle that?
The eastest way for the viewscreen is just render as fullscreen, then overlay with the HUD. It's not the most efficient way to do it, but for only a few ships, it should work.
For the distance, you can use the Pythagorean theorem. Use the sector as the upper byte and the coordinates as the lower bytes, then do this in 24-bit math: √((X2-X1)²+(Y2-Y1)²+(Z2-Z1)²).