Posted March 09, 2019 by imaginaryrobot
I've continued work on my previous topic, which you can read here, on ship sensor range, heat signature, stealth, and the broad strokes system of how ships detect one another.
Until this point, every active ship always knew where every other active ship was; this was fairly logical at the time, and required no extra code. Ships would just check the AIManager class to see what other vessels were in the area, and then run their normal checks against them (is this ship an enemy? Is this ship the player, and if so, does my faction hate them? etc)
In order to facilitate some gameplay styles that require the player to be sneaky, I had to come up with a different approach. You won't be much of a smuggler if the cops always know your exact position, after all. After a great deal of thought and some janky prototyping, I've reworked the detection system into something that accounts for the following factors:
(A ship with passive stealth hiding above a planet. If another ship gets too close, stealth immediately breaks)
I'm also planning on adding an active stealth mode, better known as a cloaking device, as a piece of equipment you can carry on your ship. This would bypass enemy sensor ranges entirely, allowing you to fly anywhere in safety while the system was engaged. There will likely be some significant downsides to using it - I expect it to drop your shields when its engaged, and be time limited. This will also be a fairly rare and expensive upgrade, and likely story/progression locked (in the 1.0 release, anyway. No meaningful story elements will go in before then).
I expect this system to ship in the 0.3.0 update, which I'm hoping will be ready by the 16th or 17th of March. My task list for it is long, however, and it might get delayed until after GDC if I don't get it out before then. Thanks for reading, and I'd love to hear what you think!