This tenday I made even less features and even more insectoidquashing than the week before. A lot of big problems come from google’s protobuf library, which I’m using in this project. They couldn’t make it to work with dynamic loading and even refuse to try, and Unreal Engine, as well as a lot of other software, makes use of it. Problems come in form of memory leaks, since certain functions don’t work (such as releasing arena buffers with strings). I was hoping to fix it soon, but looks like it’s not an adequate task, because this library is bigger than my game :) So, I started to rewrite related code and already changed over 7k lines of code to get rid of the library. The best replacement is Unreal Engine’s serialization and RPCs, even though I’ll have to give up some cool things such as proto definitiona. This rewrite branch is still work in progress, and the memory is still leaking now! But I guess that’s ok for pre-alpha, unless you have 4G of RAM.
Back to more interesting stuff: I redesigned how armor works to make it clearer. At first, there was an idea of turning armor into “hp bar extension” that will restore each turn: it would work like something between Divinity: Original Sin 2 and Slay the Spire. This would allow trickier combos and underline the feeling of “a perfect turn”, when you carefully plan to take no damage and do an effect on the battlefield. Armor-gaining skills would getting much more juicy (see Slay the Spire), and some other features like denying cold damage with fire damage and backwards would work more intuitively. It’s also much clearer to player than the previous system of “defense points”, that non-linearly added to damage percentage cut. For example, 1 point was 5%, 2 points was 9%, and it never gets to 100%.
But there are problems with it: we have a lot of types and damage/defense in design: pierce, blunt, fire, cold, lightning, poison. All of these can’t be shown on a healthbar at once, and there are dozens of units on the screen at the same time. Information needs to be clear and go as fast as possible. It would be inconvenient repeatedly open popups to see defenses; damage predictions on healthbars won’t show damage due to first few strikes taking armor instead of health points. So, this defense style doesn’t fit for this scale of the game. If there were 4 units on screen and not 20, it would make a greater experience. Maybe I’ll leave this idea for future games.
There is much simpler solution. Because there are six types of damage, it’s perfectly fine to have 100% defense for one of them. So now armor is simply adding flat damage block! It linearly stacks with skills, resource effects and everything else. For physical damage armor, it would be easy to gain big defense, but almost impossible to gain 100%. Against elemental damage, it would be not uncommon to have 100% defense against some type of damage and vulnerability to some other.
Besides from armor, I improved menu design and made it more eye-candy; also, more turn prediction visualization work. Here is the full changelog.