smcameron / space-nerds-in-space

Multi-player spaceship bridge simulator game. Captain your starship through adventures with your friends. See https://smcameron.github.io/space-nerds-in-space
GNU General Public License v2.0
722 stars 72 forks source link

NPC ship movement could use a re-write / overhaul #234

Open smcameron opened 4 years ago

smcameron commented 4 years ago

Various things about the way NPC ship movement is done are problematic.

Planet avoidance, collision avoidance, and navigation interact in complicated and hard to debug ways leading to some very strange behaviors. The patrol route system is probably done at too low level (it's just a series of waypoints).

Ship orientation is generally derived from ship velocity, which is ambiguous (roll is essentially unconstrained and consequently arbitrary and weird).

All that being said, it is not entirely clear to me what such a re-write would look like.

smcameron commented 4 years ago

Re-wrote planet avoidance code to push a one-shot patrol route to avoid planets instead of dynamically trying to steer around planets via per-tick calculations.

Some commits here: https://github.com/smcameron/space-nerds-in-space/search?q=author-date%3A2019-11-09&type=Commits