I apologise for the lack of searching, I wasn’t even sure what to look up (if there’s an active thread, just let me know and I can request to take this one down or something?).
Basically, I have a very basic implementation of numbers dealing damage to each other (a tile based game where you expand with troops which are solely numbers).
So far, let’s assume you have a tile with 86 troops, attacking a tile with 21 troops. For every troop, is 100 health (so 8600 vs 2100). Damage is:
(health / 100) * 2
However, it’s a little unfair - so I randomised the multiplier a bit for the defending tile. Damage and health scales every 1/4th of a second, and every second the display is updated.
I might not be interpreting the question correctly, but what’s wrong with the attackers having an advantage in the bottom left? The attacker has almost double the troops that the defenders have, so why WOULDN’T you want them to win?
That’s true, but I would like the defending tile to have a slight buff - with the way I’m currently dealing damage, the defending team won’t deal a significant amount of damage in comparison, barely anything in fact. I tried randomising the multiplier for the defending tile, but then my next issue would be when troops are single digits. The damage is too low for the battle to end as quick as I’d like.
Hi!
This is basically the formula I use for a similar game:
A = A - ceil(1.5*B/A)
B = B - ceil(1.5*A/B)
A and B are the raw number of units of each team (units have no “health”).
The problem with it is both parties will be substracted 1 regardless of their size (e.g. 1,000 vs 5 would result in 999 vs 0). Might have to tweak it.
The time spent on each iteration is variable. The bigger the squads are, the faster they will consume each other, so single-digit battles are not too slow.
I hope these ideas help!
Btw, nice job with the game. Looks like a modern version of TC!