Pre Post Linux Variety
A variety of things lately, lots of it being maintenance of some form, so not super exciting to write about.
Animations. In the begiining of the project, I envisioned potentially multiple hand-drawn animations for different creatures, e.g. dying, attack etc. This never materialised, but the abstractions to support it have been requiring maintenance and are unnecessarily complex, so I removed that. All animations besides "idle" will be procedural and shader-driven.
Sensor swapping . One of the areas I'm looking at now requires swapping of playable creatures to work well (for tutorial purposes), so I've been looking at that code and associated bugs. Since I implemented the ability to "possess" other creatures a few years ago, I've written a lot of code that doesn't take that possibility into account, and e.g. I'm checking against the player in a lot of cases where I should be checking against the currently controlled unit, the "sensor". Now, with the new and improved (and possibly incomplete) fixes, you can take over a character, move around, take appropriate actions and even inspect the character sheet,
Setting up Linux. Has taken some time, but it's kinda done now, so all good. All development workflows more or less functional w/ Rider, CLion, SmartGit. More context here.
Graphics performance. My laptop suffers a bit performance-wise when running the game, and because I was stuck with the laptop for a few days, I thought I'd investigate out of curiosity. After running JetBrains dotTrace, it did find a bunch of things: some dynamic string allocation I can't control (Godot's code), some memory casting code that allocated memory for conversion, which was swapped to some unsafe casting code, and a few other bits, but nothing major. So, what's the other culprit? It seems like it's graphics!
A while ago I had added some profiling for GPU passes, and I realised again that they are very nicely presented in the Godot Visual Profiler! Beautiful. Here's the output in the overworld:

Now the above shows some expensive passes, like "river", "plant", "mtn" and especially "fog-of-war". Why so expensive? I went to the river pass, because it's pretty simple. Just a few matrix transformations, some indexing, some texture sampling and ... simplex noise calculation. Hmm. Commenting that out, the cost dropped to < 1ms, so about 7 times faster. Oops!
Test No 2: fake simplex noise with some passthrough value to see the cost in all passes. Results here!

Ok, so we see that there are a few passes affected: "river", "mtn" and very importantly "fog-of-war". This means that the noise needs to be optimised heavily, and this can result in a lot of savings. The other performance culprits are "tree", "tree-shadow", "plant", etc. All these, ~3-5ms, are way too expensive. Why so much? Because I'm not really doing anything too clever, and I'm rendering all of them without any culling whatsoever. I have ideas and past implementations for this, but this is not the time now to deep dive. Knowing the problems and knowing how to solve them, and how much effort would that entail, is good enough at this stage.
That's all for now, slow days because of the Linux stuff plus teaching, but it feels like things are going to start moving again soon.
