Hello, it has been a nice week. I started by making the tape recorder for Welcome To The Dark Place; I was really happy about that idea because I didn't just allow the player to travel quicker but also found a way to tie it in with the game's emphasis on audio. Then I just made bug-fixes and adjustments for another week, and now I feel like the game is good enough to leave where it is.
The Long Journey To Having Grass
I came back to Lethal Company with a determination to figure out how to add grass and vegetation without murdering the game's framerate. This led to a streak of what felt like really good luck; but I guess it was just me finally discovering things which I hadn't been determined enough before to find.
(This is probably too much grass.)
I looked at Adamance's flowers and noticed that Unity's automatic static batching was not batching them efficiently, for whatever reason. So looked up a tutorial about how to create performant grass, and it told me to use GPU-instancing to render every flower only on the GPU in a single "draw call" which is very efficient. To my surprise this actually seemed to work; the game is able to render a copious amount of grass this way. Now I had grass that only took the game's framerate down by about 20%! The next couple days I worked on a script that manually spawns grass on the world and culls it depending on the player's distance from each grass "chunk" (like in Minecraft). Even with this, I think I'll need to add quality settings for it.
The next discovery was helped along by the modding community, which practically understands the inner workings of my game better than I do. A few of them are here in the Patreon hangout room on Discord and are extremely helpful! Basically, in my effort to make the grass render properly, I would end up optimizing the game's main stylization shader as a side-effect.
Up until now, Lethal Company could not render GPU-instanced objects. If it did, it resulted in the objects sticking out from fog like this. In the above gif it might not be as clear, so here's another example:
If this looks normal to you, please get your eyes checked.
Just kidding, but if you were as familiar with this as I am, it would also make you want to throw up. This is why instead of using Unity's default terrain, I had to go through the workaround of buying an expensive asset to convert the terrain to a standard model, which came with its own host of problems when it was said and done. (Now I cannot go back and edit any terrain on the existing moons without it being a lengthy process.)
This was one of the most ancient curses of Lethal Company; some bugs stick around so long that they just become a fact of life.
Well, the solution was to convert the game's main shader from a "DrawRenderers pass" to a "Fullscreen pass." Previously the game would apply outlines and cel-shading effects to every single object on-screen individually, but now, these effects are applied once to the whole screen as a single image. I actually could only get so far in this before I had to get help; thankfully, a member of the modding community had already done this exact thing and was willing to give me her solution to use in the base game! It was meticulously crafted to look exactly like the game's original shader but has been recreated from the ground up. Now because of her generosity, we can have many nice things!
(This is actually a picture of my half-baked solution before I got help, but in this particular case it looked pretty good. Notice that the grass has outlines, unlike the gif and screenshot from before.)
It was incredibly satisfying to be free of this bug once and for all, and with no performance cost. It's actually supposed to make the game render faster (although I myself can't really tell.)
The March Revamp
I've been planning to give March another try for a long time, because it now feels like the game's dullest moon. It looks the same as Vow, and it's very big without any unique landmarks. Well the revamp is well under way now, and I am very satisfied with it thus far. It's absolutely going to benefit from being able to use Unity's default terrain through every stage of the process. It keeps some key elements of the original March's layout, but it's more dynamic and has at least a smidge of a visual identity of its own.
My goal is to make these outdoor environments feel like an actual jungle or forest fully claimed by nature.
I want to release this update soon, but I have also badly wanted to make a "creature feature" update that includes more than just several new animals, and revamped March would be a nice addition to that update.
The version that takes the game out of Early Access ought to be very big and comprehensive, so at some point, I am going to want to stop making smaller updates and begin "charging up" content for that one big update. I don't know when that will be, but it probably won't be just yet, since I want to release some bug fixes, and there's still quite a bit to do before I get to making the ending.
I have been really enjoying working on Lethal Company again. There is a certain mindset that allowed this dauntingly big project to grow into what it is, and I've gotten into that mindset again. It goes like this: I see the mountain of work set in front of me, and instead of feeling crushed and trapped by it, I see it as a huge blessing. Having something to work on every day adds a necessary purpose and direction to my life and honestly keeps me from going insane. In that way, Lethal Company has sustained me for an incredibly long time, and I'm glad there's still more to go. It may be fun to start something new, but I like waking up every day knowing what I'm going to do next.