Carry On My Wayward Son
Good news, everyone! 3/4 of my NPCs are now on the job!
- Merchants will spawn at a jumpgate, dock at a station, and then leave the sector through a jumpgate
- Police constantly patrol between the populated centers of the sector (stations and jumpgates for right now)
- Miners will hang out at an asteroid, and will occasionally visit a station to drop off their goods, returning to the rock with an empty hold.
The pirates are on hold for now since I need to come up with a combat system idea and plan of attack before I can go down that route.
One lingering issue, though: sometimes NPCs miss their mark and careen off into deep space. I mean, who am I to tell them where to go and what to do with their lives. If they want to leave home and family and strike out into the great unknown, then so be it!
Except that these losers are still in the object pool, never to be recovered. I might opt for a “self destruct” system where the “core” of the sector is arrayed around [0,0,0], and if an NPC ventures too far from that point it’ll go inactive and return to a more reasonable area. Merchants have the ability to calculate a new route when they go back into the inactive pool, but police and miners do not. Since those two have relatively set patterns between nodes, however, I think the likelihood of them skipping out on their jobs is significantly reduced.
I’m working on getting a video of the traffic patterns done, and will post it here and on the Project Universe YouTube playlist when it’s ready.