Need help with combat system for a new rts game
Posted: Sun Feb 26, 2012 6:15 pm
Hello:
Its been a while since ive posted. I am building a space rts game. I have 5 ships which have different atk, def, hp, range each. during an attack a player may choose any combination and quantity of the above ships to attack another players fleet with. that being said, im having a hard time coming up with a combat system for multiple units attacking and being attacked at the same time:
example:
attacker fleet is:
scout ship - 10
light fighter - 5
fighter - 0
frigate - 10
cruiser - 0
defenders fleet is:
scout ship - 0
light fighter - 0
fighter - 10
frigate - 10
cruiser - 10
figuring out how to pair the attacks or to resolve the battle as a whole and determine which ships take losses and which do not is mind numbing. if anyone has some very simple or basic formula i could use to pair the attack ships with the defending ships would be much appreciated. just to clarify, i have an idea of how i want to calculate the battle damage, im just having a hard time figuring out how to resolve which ship, fights which ship and how to determine the ships that take losses and how many losses.
Its been a while since ive posted. I am building a space rts game. I have 5 ships which have different atk, def, hp, range each. during an attack a player may choose any combination and quantity of the above ships to attack another players fleet with. that being said, im having a hard time coming up with a combat system for multiple units attacking and being attacked at the same time:
example:
attacker fleet is:
scout ship - 10
light fighter - 5
fighter - 0
frigate - 10
cruiser - 0
defenders fleet is:
scout ship - 0
light fighter - 0
fighter - 10
frigate - 10
cruiser - 10
figuring out how to pair the attacks or to resolve the battle as a whole and determine which ships take losses and which do not is mind numbing. if anyone has some very simple or basic formula i could use to pair the attack ships with the defending ships would be much appreciated. just to clarify, i have an idea of how i want to calculate the battle damage, im just having a hard time figuring out how to resolve which ship, fights which ship and how to determine the ships that take losses and how many losses.