Thursday, November 9, 2023

Let There Be Light, Before I Lose My God Damn Shit

Things are generally going well, and a version release draws near. Don't take this as an official announcement or anything, but I'm pretty darn confident that I'll have this out in the wild before the end of the year. That's the goal for now, anyway.

This month I finished up the in-game help pages for the new damage system and knocked out a few little bugs before realizing that I had bigger fish to fry. A couple of months ago I mentioned that the space station lighting wasn't quite up to par. As it turns out, I was not fully aware of the scope of the problem. What I should have said was ALL OF THE LIGHTING IS FUCKED AHHHHHHH!

Turning Off The Dark

So yeah, converting the project to Unity's Universal Rendering Pipeline (URP) absolutely fucked all the interior station lights, resulting in a huge detour which took most of my development time this month. The good news is that everything's working now, with the possible exception of my brain.

The station interiors were basically unplayable, the darkness pierced only occasionally by glitchy strobing bullshit. The main problem, which took me way too long to figure out, was that URP only lets an individual mesh be affected by a small number of realtime lights, so the dozen or so hangar lights plus all of the lights in the ship were fighting each other for dominance over the giant interior meshes and causing all manner of ruckus.

I'd never messed with baked lighting before, but it seemed like that was the solution. And it was, but hoo boy what a mess. The stations are all what Unity calls prefabs, which I was instantiating at startup. I couldn't get the baked lighting to work for days, and it's so obvious in retrospect, but it was because the stations weren't actually instantiated in the editing scene, and so didn't bake. So I had to redesign the whole architecture of how stations work in Unity's object hierarchy (now they all live in the editor & I just activate the objects when I need them rather than instantiating the prefabs at runtime) which worked but I still had to redo all the lighting after that and then, for some reason that I still do not understand, I had to bake the lights for each station individually. That part was easy but it took for god damn ever. So it was all just a huge time sink for very, very little payoff. It still doesn't look great, but it's good enough for now and I have a decent idea of what I need to do to fix things properly whenever I get around to redesigning the stations.

Procrastinating But Not Really

As anyone who has been following this development process knows, I hate fucking with graphics shit. It's just the worst. So this lighting fiasco kept bringing me to the edge of losing my shit but I had limited development time this month and I didn't want to waste what little time I had, so I spent some cool down days working on less pressing matters. I got my recording environment set back up and started planning out a release trailer and a 'what's new' video for v0.04, and started sketching out ideas for cockpit control layouts. I don't expect to be adding any new cockpit controls until v0.06, but it's fun to work on and I'll need to figure it out eventually.

Coming Up Next

This thing is pretty much ready, I think, but there are still a few loose ends knocking about and, more importantly, I need to sit down with the game and actually play it for more than a minute or two at a time. Who knows what soul-crushing bugs I'll uncover in the process.

I spent 2 of the last 4 weekends out of town and another one preoccupied with CTWC '23, so I really haven't been putting as much time into Black Road Sky as I'd like. But with the last known major bug squashed (LIGHTS!) and no big travel plans for the rest of the year, I'm excited to finally wrap this version up. The next post here will either be a trailer and some hype, or a deep meditation on the futility of existence, depending on how playtesting goes. Stay tuned to find out!