Showcase Prep and Newtonsoft JSON ousting
A variety of work for this week, here it is, in itemised mode:
- Added AI logic for a few simple projectile abilities - this means that creatures who can use such abilities, will use them after applying the AI to evaluate suitability.
- Player bot was too trigger-happy with spells, and even after I added some weight factor based on remaining mp over total mp, it still casts too frequently. Tofix later, not important, because most AIs, the moment you start fighting with them, they'll want to unleash fury on you rather than conserve MP for a future they won't have.
- The bot managed to get into a situation that I was fearing and I still fear for the main game: falling into a teleport trap and ending up in a locked room. I allow doors to be unlocked from the inside to prevent that, but somehow the player bot ended up in a room with 3 locked door exits and they were not unlockable. Hmm, that sounds like a bug, and a trigger-happy locked-door placing algorithm firing occasionally. Anyway, my solution was to add some AI behaviour so that if all else fails and we're trapped in a room, use the "Juggernaut charge" ability where effectively we can destroy walls.
- Some successful optimisations that led to good enough performance on the laptop when player using the editor, mainly by caching a few things that should be cached, handling signal disconnection better (I was doing nonsense previously apparently) and actually using the tiled perlin noise textures that I have for the fog of war instead of calculating fBm which tanked my laptop's performance.
- Entity overlay effect with a flashing yellow highlight
- Unsuccessful attempt to improve clarity of visuals when it's dark. This is a tricky one, because darkness is ... analog in the game, and absolute darkness is pitch black, so how can we have clarity when not pitch black, but kinda dark, e.g. at night? Post-process attempt fail, and silhouettes are a bit tricky to do without a lot of extra work (for the GPU mainly) so ... on the backburner for now.
- The event was fun, and even though my aim was to just have the player bot running, people wanted to try it out still (even after my warning of "this demo is just meant for watching!"). Thankfully I had added the "bot mode" being a button, that allows turning the player bot on and off, and when it's off, player has full control. Btw I did print a page with some information, limitations and instructions and I'm pretty sure nobody read that, at least more than 10%. And the font was not that small... Oh well. One of the fun bits was a mostly silent kid who was playing and was walking around the owls and bunnies after defeating some foes, so eventually I asked him "do you want to kill them?" and he nodded affirmatively. Then I showed him the context menu that allows you to kill friendly creatures and let's say he didn't leave anything alive after that: friendly critters, villagers or enemies.
- I had decided a while ago to refactor Newtonsoft JSON to System.Text.JSON, which is better, faster and more modern, and the former was also causing some Godot errors. The port took only two days, which I was super happy about, because I was using Newtonsoft JSON quite a bit, and with loads of customised behaviour. The new code is about a quarter of the old one, with a lot of confusing things removed, so that was a win. What was not a win was that the errors persist. Ugh.
That's it for now, have a nice weekend!
