The Tank Data:
The whole spiel of the game comes from the stack of layers that the tank in question has at any moment.
The most fun part was the size. Each tank has a default size (logically) and they are all the same. And, as per the initial idea, accumulating layers had to make the tank less effective, to negate the positives of this accumulation.
The damage factor is easily calculated (even though I am still not committed to a final formula), but I wanted also to give some visual reference for that stack size.
The most obvious choice was to increase the size of the tank itself. This has two advantages – first, the player can infer some stack sizes by the size of a tank (either your own or of another combatant unit); second – larger tank should be easier to hit, which directly influences performance.
The most obvious issue is that, of course, linear relation between stack size and tank size does not work. A simple quadratic relation (check (x^2)/20 for example) would stunt the tank growth in the lower stack sizes. However this leads to a blown-up tank size the more layers you accumulate. Luckily, I remembered that the function form I need is called ‘histogram’.
Basically I wanted to allow the tanks to differ little in the lower range (up to 3-4 layers), then they should be allowed more noticeable growth, and finally (very important) – reduce the growth factor after some level. Diminishing returns after a certain number of layers would guarantee that there will be a soft cap on the size.
The most important effect of the histogram? – You can easily discern three groups of tanks – small, medium, large. Additionally, if the final equation allows it, a player may be even able to tell the difference between different sizes on the steepest slope of the curve – the lowest sizes are more or less indistinguishable, the highest – too. But in the middle you have noticeable jumps up and down when you add/remove layers.
So how do you find exactly what you need?
First – wikipedia, for list of example histograms
Second – Desmos.com (https://www. desmos.com/calculator) – you type the formula, then you start fiddling with it to make it behave properly. As the minimum number of layers is 1, I had to move the histogram around to make it cross approximately 1 on the x=1 axis. This, of course, was eyeballing it, so:
Third – place whatever version of the equation you’ve got, replace the constant you’ve been fiddling with ‘y’, take that to WolframAlha and ask ‘what would ‘Y’ be if x is 1. Much obliged!
I tried a few histogram equations and I’ve settled on one for now. I am still not sure it will be the final one. The current one settles at about 2.6 something as an upper bound (I can’t be bothered to check if it really converges, as it seems to be the case). I would much prefer the soft cap to be somewhere about 2, but more important for the final decision would be the position of the steepest slope. And I would know what stack sizes get you there when I can actually test some interaction. So, for now, I am sticking with what I have.
Resources:
Wikipedia – but obviously!
Desmos.com – simply delightful; exactly what I needed for this case (including graphing multiple equations for comparison and proving some export options)
WolframAlpha – for when you put your head in a bucket of math that is above your level