Limit Theory Redux is a fork of the discontinued open-world space simulation game Limit Theory. We have made it our mission to continue the development of the ambitious Limit Theory project as an open source initiative.
Apache License 2.0
62
stars
8
forks
source link
Initial version of the working tactical radar #255
First draft of a tactical radar that displays nearby vessels (ships and stations).
For quick clarity, the initial version uses only the x (0 to infinity to 0 to -infinity to 0) and y (1 or -1) components of self.gameView.camera:worldToNDC(object:getPos()) to position vessels on the radar. The y component ("up" or "down" relative to the player ship's facing) is not currently used. (This actually works pretty well -- try it!)
The Numpad1, Numpad2, and Numpad3 keys change the current range of the tactical radar among Close, Normal, and Distant.
Ship dots are small; station dots are large.
The color of radar dots are drawn according to the color returned by a Disposition check.
Bugs:
Although the values returned from worldToNDC() can go as high as +/- infinity, they are cut off at 1.57 which corresponds to pi/2 (90 degrees), otherwise the sin() and cos() of the value fluctuates wildly as the value approaches +/- infinity. This cutoff results in ships near 90 and 270 degrees seeming to be briefly "stuck" to the right or left side of the tactical radar. Some alternate math is needed to smooth out this transition at 90 and 270 degrees.
Possible future enhancements:
If the player has a target lock on a vessel, draw a box around that vessel in the radar
Include y-axis information (IFF that adds more practical utility than complexity)
First draft of a tactical radar that displays nearby vessels (ships and stations).
For quick clarity, the initial version uses only the x (0 to infinity to 0 to -infinity to 0) and y (1 or -1) components of
self.gameView.camera:worldToNDC(object:getPos())
to position vessels on the radar. The y component ("up" or "down" relative to the player ship's facing) is not currently used. (This actually works pretty well -- try it!)The Numpad1, Numpad2, and Numpad3 keys change the current range of the tactical radar among Close, Normal, and Distant.
Ship dots are small; station dots are large.
The color of radar dots are drawn according to the color returned by a Disposition check.
Bugs:
worldToNDC()
can go as high as +/- infinity, they are cut off at 1.57 which corresponds to pi/2 (90 degrees), otherwise the sin() and cos() of the value fluctuates wildly as the value approaches +/- infinity. This cutoff results in ships near 90 and 270 degrees seeming to be briefly "stuck" to the right or left side of the tactical radar. Some alternate math is needed to smooth out this transition at 90 and 270 degrees.Possible future enhancements: