# Gameplay Unit stats and battle outcomes

This topic is 477 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello,

I'm trying to make a text based strategy game similar to Utopia Battlefields, Mafia Wars etc. I'm looking for information on how to compute battles between armies. Currently I've listed the different races, their units and the unit stats. I've been playing around with this but my "algorithms" are quite basic and I'm not sure how to make them more complex. Trying to find information for building this type of game is quite difficult! Any help would be appreciated.

Thanks.

##### Share on other sites

Why do you feel that complexity is desirable?

Design the gameplay to be fun. Do that first. Then you can start worrying about how to implement it. The player doesn't care if your battle system is 5000 lines of code or 5. She wants to have fun and an interesting challenge.

##### Share on other sites

Thanks for your reply. When I say "complexity", I mean I can't figure out a good way to simulate battles. For example, if 300 soldiers with 90 attack and 30 defence fight 100 soldiers with 120 attack and 25 defence. I've got some arithmetic going on but it's basic in the sense that I don't get the logic outcome most the time. The maths works but the logic doesn't.

##### Share on other sites
56 minutes ago, jceg316 said:

Thanks for your reply. When I say "complexity", I mean I can't figure out a good way to simulate battles. For example, if 300 soldiers with 90 attack and 30 defence fight 100 soldiers with 120 attack and 25 defence. I've got some arithmetic going on but it's basic in the sense that I don't get the logic outcome most the time. The maths works but the logic doesn't.

What do you want to happen in this scenario? These numbers are just made up, so they don't carry any universal truth -- so you need to define what you want to happen in different circumstances.

##### Share on other sites

Who goes first has a big impact on the balance, did you factor that in?

Also, at such huge numbers, you can't figure out what is off any-more, try to scale down to 2-3 units, and say, 10 battles. At such amounts, you can save all data, and analyze it afterwards.

##### Share on other sites
7 hours ago, Alberth said:

Who goes first has a big impact on the balance, did you factor that in?

Also, at such huge numbers, you can't figure out what is off any-more, try to scale down to 2-3 units, and say, 10 battles. At such amounts, you can save all data, and analyze it afterwards.

No I haven't factored that in, only because I'm not sure if that would work: it would mean one army has first attack, then the defending army would be weakened and the battles could be very skewed to whoever gets the first attack.

Although thinking out loud here, I guess it could be unit dependent: some unit types have an advantage and are more likely to attack first. Again though, I'm back to the same problem: how do I actually program that in?

I have done tests with 1 on 1 and 100 v 70 etc.

##### Share on other sites

What exactly do you have at the moment?

1. 1
2. 2
Rutin
18
3. 3
khawk
15
4. 4
A4L
14
5. 5

• 10
• 13
• 26
• 10
• 11
• ### Forum Statistics

• Total Topics
633745
• Total Posts
3013667
×