Scavenging Derelicts, and Timer Performance
Hey Folks! Made a concerted effort to do a bit more dev work today, despite the heavy PR load. I managed to get about half a day's worth of coding done, but I suspect that'll improve over time as chatter simmers down a bit.
I think one of the biggest questions I'm seeing is, "how will this play?" And I'd like to get at least some core gameloop running so I can show you all. It's still more a collection of systems than a playable game.
For phase 1, I'm aiming to get a captain that can go through chargen and choose the shipbreaker origin, which launches into the K-Leg boneyard. From there, I'd like that captain to be able to find a derelict worth fixing-up, and start pulling parts from nearby junk to get it running again. All while keeping personal needs, like food, water, air, and emotional needs, attended to.
With that in mind, I fired-up the game, rolled-up a shipbreaker, and launched into space in a tiny salvage pod. Since the pod lacks a full fusion thruster found on larger ships, I had to use debug commands to dock to a nearby derelict. That derelict was damaged, airless, and littered with debris. Some pieces could be repaired, but some have no repair actions setup yet. Power was on and feeding to certain systems, but others were cut-off. And my framerate in the hulk was passable, but not fun to watch.
That revealed some of the first things I should do to get this fantasy a reality.
First, I'm going to see if there are any quick wins to making performance better. As far as I can tell, every object in the scene is updating per-frame, but only a subset need to. Also, they only need to update as often as their shortest heartbeat period, not per-frame. I started looking into this first.
I also need to make the derelicts powered-down. They can still be powered-up when checking them out, but they shouldn't be sitting there with the lights on and life support running. This means that I need human-facing controls for switching the reactor and batteries on/off (as opposed to them always running when they can). I also need the derelict-making code to switch things off.
And speaking of the derelict-making code, it's currently damaging some things, and totally removing others. The former can be fixed in-game with tools and parts. The latter cannot. I need some way to deal with the latter in-game, or else remove that for now. This probably means adding a few more repair/replace actions for the crew to use. And maybe some more actions for moving bigger equipment around.
Assuming I can do these things, I think we'll have a good start. I can theoretically find and fix a derelict entirely inside the game, without debug commands. And I suspect I'll discover some missing piece of the experience once I do, such as finding certain non-mechanical objects and supplies. E.g. food, air, water, etc.
But this at least seems like an achievable goal. So more on that next week!