so im currently messing around with an idea for a game, and part of that game is going to involve 2 armies meeting, fighting it out, and establishing a winner, a loser, and the losses involved.
the 2 armies will meet. there will be an animation to show fighting, and one army will end up on fire, followed by a data sheet showing damage and casualties.
im not so much looking at how to go about coding this atm , as much as im wondering the best general setup of this kind of thing. id like to figure out the order things will take place in, to be able to work out what troops cause which damage and when etc, and id like to pick your brains about it.
atm, in my head im seeing three troop types, infantry, cavalry, and archers. each with thier own stats for attack, defence, health, speed and range.
when two sets of troops come into range they engage, with said stats being used to determine how one set of troops does against the other. the range of the archers will set the size of the battlefield, and once battle has commenced, the archers will stay put, while cavalry and infantry move forward.
the archers will engage the cavalry first as cavalry will move forward quicker than infantry, then the cavalry will engage the infantry as they come into range of them and attack first as they have the faster movement speed.
the infantry will have the higher defense stats, so they can hold against the cavalry. all the while, archers are still firing on the cavalry.
ill use the range and speed stats to create waves of attack and generally speaking, the battle will be lost when the stronger force breaks through the enemies cavalry and infantry to attack the archers, who at that point wont hold up well against the enemy in thier face.
the main issues im discovering is how to make it so that one of the troop types doesnât just annihilate the others. keeping the three in some sort of balance is the aim.
my general thoughts on that matter are, infantry have the highest defence stats and hp, cavalry have the highest speed and attack, while archers have medium attack, defence and hp, but high range.
any thoughts are appreciated, and any tips are very welcome. im not sure this is the best way to deal with this idea, as its turning out to be a pretty complex. any input from people who have dealt with this kind of thing will be invaluable.
cheers.