Jump to content

What is a battle? (battle detection)


Recommended Posts

We plan to have battle detection for UI notification, sounds, and also special battle-themed music as opposed to the normal peace music, which our very talented musician Omri has and will continue to compose (y)

So the obvious question is: what is a battle? It shouldn't be a battle every time one of your units is attacked, or it would be almost constant. By contrast, a skirmish might be a scout or female being attacked by an enemy archer or even a lion, of course you want to be notified of that, but in a different way. A battle would be something different, a more significant event for your civilization, and we can make it dramatic. Should it be based solely on the number of units engaged in combat in a given area, if so how many? Is an actual attack required or merely the presence of a large number of enemy units? And when does the "battle" end? I can imagine maybe one or two attacks continuing after the major battle has been decided.

The sooner we answer these questions, the sooner it can be implemented :)

Link to comment
Share on other sites

Critter attack should counted as critter attack, while skirmish should be considered as minor armed conflict between two rival factions. Battle however was an organized armed conflict meant to destroy an enemy's armed forces.

1. A soldier or civilian engage battle with a critter should considered as critter attack.

2. A skirmish should have at least (in theory) 10 soldier mostly consists of skirmisher, archer, infantry and cavalry (in most case light cavalry or mounted skirmisher) where the attack should be less organized then a true battle.

3. A battle should have at least (in theory) 50 soldier in which almost all types of soldiers should present at the battlefield from scout, light cavalry, cavalry skirmisher/archer, heavy cavalry, light infantry, heavy infantry, skirmisher, archers, siege weapons and at least one field commander or solely made up of one, two or three types of unit with at least 50 unit present with a commander at the battlefield.

4. A battle end either with the total annihilation of the enemy or the player's military unit or the withdrawal of the enemy or player's military unit from the battlefield. Withdrawal can be counted as victory, rout or stalemate where player or enemy may attempt to fight another time but annihilation was different where one side suffers a crushing defeat and almost all unit never survived the battle.

5. A battle can include coalition forces in which player or enemy's ally send aid to the battle, this include several forms:

- small contingent of troops, mostly unorganized and lack of leader's guidance

- an army, organized and capable to endure prolonged fighting.

This is my idea of battle and skirmish but more idea will come .

Edited by The Crooked Philosopher
Link to comment
Share on other sites

Another thing we need to consider is "when not to stop" the battle. After all, the conditions for battle may be met, and then some units retreat or are killed etc and they are not, only to be met a couple of seconds later when new units join the battle. To make the risk of "bouncing" back and forth between peace and battle tracks lesser, something should be done. Perhaps just have the battle music continue for a couple of seconds after the conditions are no longer met, or have it fade out over a couple of seconds, followed by some seconds of silence before the peace tracks continue again. Something like the latter is probably what I would prefer, then it could be seen as the rising tides of war or something ;) Might still be a bit annoying if it happens too much (perhaps an opponent withdrawing his troops often or something, would probably be more prevalent in part 2 though with e.g. the Huns).

Link to comment
Share on other sites

To keep it simple Battle music could play after a set number of units have been killed within a minute (maybe 20+). Battle music could end when the battle track ends - even if the battle continues afterwards or nothing is happening - and then back to a generic track.

For animal attacks or smaller skirmishes I'd like to see a visual 'ping' on the minimap to show where the action is taking place. Hearing a special sound each time a unit is attacked may be frustrating, so a visual sign may be better. We should have a keyboard shortcut that shows you where your units are attacking/being attacked - just like we have the idle villager command.

Link to comment
Share on other sites

That reminds me The Settlers 4 when battle music ends but no generic music appears to make matter worst even skirmish have battle music too.

I like the idea about the concept of critter attack where visual ‘ping' on the mini map indicates the location of critter attack plus a visual sign to indicate critter attack.

If a battle become a siege warfare, will the battle music be used or a new siege music introduced to indicate a prolonged siege is going on?

Link to comment
Share on other sites

In Age of Empires 3, the dramatic battle music happens when you are attacking a town center or attacking the building that allows access to trading and Native American tribes.

My opinion is that you should play battle preparation music when you move a large number of troops together.

Edited by Sighvatr
Link to comment
Share on other sites

Good idea, Sighvatr.

Another question for the team

What about skirmish? Is there any music for a skirmish since skirmish was a different matter? In game skirmish could escalate into an all out war and when it escalate into a field battle will battle detection able to detect it or treating a battle as a skirmish?

Edited by The Crooked Philosopher
Link to comment
Share on other sites

As a general rule I don't think we want to complicate it more than peace/war music. That said I do think there should be audio/visual signs that other things happen, I just don't think it's worth creating new tracks for :) (And most definitely not complicating the programming even further :) )

Link to comment
Share on other sites

As a general rule I don't think we want to complicate it more than peace/war music. That said I do think there should be audio/visual signs that other things happen, I just don't think it's worth creating new tracks for :) (And most definitely not complicating the programming even further :) )

My visual sign is when lag begins to start, I know the enemy is deploying large amounts of troops to attack.

Link to comment
Share on other sites

I think battle alarm is something completely different than battle music and much simpler to handle. Battle alarm should be triggered whenever a unit gets attacked and a certain amount of time passed since the last attack and/or there's a relatively long distance between the current attack and all attacks in the past X seconds.

The goal is to inform the player about attacks but he should not be annoyed by multiple alarms of the same event.

Battle music is a lot more complicated, because it should only be triggered by significant battles.

The first question is if battle music should be triggered globally or if the music-type (battle/peace) should vary for different players.

It could add to gameplay if you hear battle sound and know that something significant is happening but you have to find out where first.

The second question is what should be considered significant enough to trigger battle music.

We could start with some use cases before we try to find a good algorithm for decision.

Use cases (YES/NO if battle music should be played or not):

  1. YES: Two relatively large attack forces meet on the battlefield
  2. NO: One scout discovers a large enemy attack force far away from you base and gets attacked
  3. YES: One scout discovers a large enemy attack force close to your base and gets attacked
  4. NO: Two relatively small groups of soldiers meet on the battlefield in lategame
  5. YES: Player A attacks player B with a large attack force, player B has no military units left or only very few and will be defeated
  6. NO: Two scouts meet in the early game, one attacks.
  7. YES(PlayerA threatened): Lategame: A small group of 9 military units which consists of 90% of PlayerA's military units meets a large group of 40 units which consists of 50% of PlayerB's military units close to the base of PlayerA.
  8. NO (no player threatened): Lategame: A small group of 9 military units which consists of 90% of PlayerA's military units meets a large group of 40 units which consists of 50% of PlayerB's military units close to the base of PlayerB.
  9. The game is close to the end and a lot of smaller and larger battles happen everywhere.
  10. ... to be continued

Looking at these use-cases you can see a few factors which are important:

- Absolute number of units involved

- Absolute number of units involved per player (see use-case 2)

- Relative number of units involved per players (see use-case 4)

- Relation of the troop strengths at the battlefield

- Distance to a players bases (see use-case 2,3,7,8)

- Game phase (early or late-game). We could use an indicator for economic power like the amount of resources and the

increase speed of resources. The idea is to find out how quickly a player can recover from his losses in the battle. If you have enough resources and many unit training building, it often doesn't hurt much if you loose, let's say 60% of 50 units.

- Number of different units attacked in the last X seconds (see use-case 9)

The next step could be figuring out the relations between those factors.

Well, this seems to be quite complicated. I think for optimal results it needs to be that complicated.

There's a reason why there are commercial games that failed getting it right in a lot of situations.

Link to comment
Share on other sites

a "battle" could be defined when more then some percent of your army is engaged, for more then few seconds.

maybe more then 15% for more then 15 seconds.

I like the idea of battle music slowly fade after battle then few seconds of just quite (Add a very quite sound effect of whisteling wind).

By the way, I really appreciate Omri's work. I think there should be another music: "getting ready for battle" witch is an energetic mix between relaxing "peace" and epic "battle". I remember warcraft II had these types of music and this really got me into the mood.

For the condition in witch to play: Maybe when one of your troops is being attacked by an enemy force, or even when in peace time, but you have really big force of soliders, elefents, ballista or whatever just waiting for your command.

  • Like 1
Link to comment
Share on other sites

By the way, I really appreciate Omri's work. I think there should be another music: "getting ready for battle" witch is an energetic mix between relaxing "peace" and epic "battle". I remember warcraft II had these types of music and this really got me into the mood.

For the condition in witch to play: Maybe when one of your troops is being attacked by an enemy force, or even when in peace time, but you have really big force of soliders, elefents, ballista or whatever just waiting for your command.

Or it triggers when you mobilize your large army which I suggested above.

Link to comment
Share on other sites

I support Yves' idea. Further refinement to the sound could be used: if the attacking army is small, or big, the alarm could be slightly different (louder/fuller/whatever).

This is also of interest for ai development, btw. If the system gets complicated enough, the AI's might want to use some of the underlying "infrastructure".

Link to comment
Share on other sites

I think it should depend on the enemy troops attacking a player in comparison to the second players combat units/defensive structures (lets say 20%). If player 1 has 100 combat units/defensive structures and player 2 attacks with 20 units it's a battle for player 1. If player 2 got 200 units its not a battle for him. I don't really think the area in total is really of interest because if say 100 units attack a player from all sides it is a battle IMO though not many units may fighting in the same area. It may be important in which players area the combat takes place though (e.g. to decide if defensive structures may be taken into consideration). To scale things by soldiers strength (however that should be determined) rather than by the sheer numbers may be good but I think the pop cost or the health/structure points would do OK.

For me a simple alarm sound and/or minimap signal in case a unit is attacked is much more important. It has to be chosen wisely though. It should not be annoying (like most sounds might be) or make it harder to track the events on the minimap (like minimap signals might be). A good thing would be perhaps to run a sound but only once in 10 secs or so and then just make the attacked unit blink with twice the size as normal on the minimap. A key to go to the last event is important to me as well but I think it's planned anyways. That way a battle would be easy to track on the minimap as well without being very annoying I guess.

Don't want to suppress anyones ideas (indeed I like it) but have to say it seams that a style/feeling thing (battle music) is again treated with a higher priority than a gameplay/playability feature (alarm on attack). I really think 1st the game should be awesome than the look and feel of the game should be awesome (though I have to admit that e.g. the graphics drawn most of the attention to potential new community members which is important ofc.).

This is also of interest for ai development, btw. If the system gets complicated enough, the AI's might want to use some of the underlying "infrastructure".

I'm not sure the AI can access that part of the code...

Edited by FeXoR
Link to comment
Share on other sites

For battle detection I think it would be good to use damage rate as a metric to determine when a battle is taking place. So if lots of units are being damaged then it is a major battle. The idea of taking the total army size into account sounds good as well.

Don't want to suppress anyones ideas (indeed I like it) but have to say it seams that a style/feeling thing (battle music) is again treated with a higher priority than a gameplay/playability feature (alarm on attack). I really think 1st the game should be awesome than the look and feel of the game should be awesome (though I have to admit that e.g. the graphics drawn most of the attention to potential new community members which is important ofc.).

I don't think anyone is prioritising this above attack warning sounds. Attack warning sounds shouldn't need a whole discussion thread about when they should occur since the requirements for playing the sound are straightforward. Battles are a much more subjective idea and are more complicated to define.

Link to comment
Share on other sites

The first question is if battle music should be triggered globally or if the music-type (battle/peace) should vary for different players.

I'd say it should vary (i.e. if your units are part of the battle, the music plays, if not it doesn't), you should have to scout to know that other players are fighting a battle if you're not part of it.

Don't want to suppress anyones ideas (indeed I like it) but have to say it seams that a style/feeling thing (battle music) is again treated with a higher priority than a gameplay/playability feature (alarm on attack). I really think 1st the game should be awesome than the look and feel of the game should be awesome (though I have to admit that e.g. the graphics drawn most of the attention to potential new community members which is important ofc.).

I don't think anyone is prioritising this above attack warning sounds. Attack warning sounds shouldn't need a whole discussion thread about when they should occur since the requirements for playing the sound are straightforward. Battles are a much more subjective idea and are more complicated to define.

Agreed, it should be fairly straight-forward. And most of the questions, like how often should the sound play, what should the visual indication look like, are things which are best finalized when testing the game. I.e. make a quick mockup version, include it in the game and test it, does the sound play too often/often enough, is the visual indicator obvious enough/too distracting etc :)

Link to comment
Share on other sites

I like the idea of damadge rate/death rate for battle detection. There does not seem to be any other condtion under which this could happen unless individual soldiers are fighting other individual soldiers over a widely dispersed area and high numbers of soldiers are dying, which is a rather unlikely scenario.

Even better if the death rate is higher than a certain value for some time.

Edited by madmax
Link to comment
Share on other sites

Perhaps another thing to consider: classify skirmish/battles depending on where they take place.

A group of at most 15 versus 15 soldiers in no mans land would just be a skirmish. If either group is larger than 15, then its a battle.

A group of more than 15 soldiers entering enemy territory would be a battle (ok, they haven't started attacking yet but we can expect that to happen very soon). The number 15 is just an example.

The battle would end when the invading forces have been killed or have retreated and left enemy territory. In the case of fighting in no mans land, the battle would be over when either side has last 75% of its forces. Again, 75% is just an arbitrary number.

Link to comment
Share on other sites

Here's a crazy idea... How about make the battle music be controlled by the player, and confer some sort of advantage in battle?

Make it sort of an overall health, some heroes could bring more than others, and it would run down over time. The player would choose when to go into battle mode, and when to turn it off and save some juice.

While the music was on units could perform better, as it wore down the effect could lessen, thus stimulating a battle fatigue.

OK, too much, right? I'll go back to coding now...

Link to comment
Share on other sites

Here's a crazy idea... How about make the battle music be controlled by the player, and confer some sort of advantage in battle?

Make it sort of an overall health, some heroes could bring more than others, and it would run down over time. The player would choose when to go into battle mode, and when to turn it off and save some juice.

While the music was on units could perform better, as it wore down the effect could lessen, thus stimulating a battle fatigue.

OK, too much, right? I'll go back to coding now...

This way it would have a gameplay impact at least. With a cooldown I'd like it on the first glance :1eye:

Shouldn't be overpowered though. Perhaps heal 10-20% stamina, 5-10% health and add 1 piercing and 1 hack damage for all units.

It would then work about like powers in AOM or TBfME though no supernatural background is required.

Edited by FeXoR
Link to comment
Share on other sites

I think it should be quite simple but it's probably too simple.

Music on: Enemy force is 3:1 within radius

Music off: Enemy force is 1:1 within radius

(yours v.s. theirs) = (NB = no battle, BU = battle music for us, BT = battle music for them)

* 1 v.s. 1 = NB

* 1 v.s. 3 = BU

* 10 v.s. 10 = BU & BT

* 10 v.s. 1 = BT

* 30 v.s. 10 = BT

* 10 v.s. 30 = BU

Link to comment
Share on other sites

I think it should be quite simple but it's probably too simple.

Music on: Enemy force is 3:1 within radius

Music off: Enemy force is 1:1 within radius

(yours v.s. theirs) = (NB = no battle, BU = battle music for us, BT = battle music for them)

* 1 v.s. 1 = NB

* 1 v.s. 3 = BU

* 10 v.s. 10 = BU & BT

* 10 v.s. 1 = BT

* 30 v.s. 10 = BT

* 10 v.s. 30 = BU

What does radius mean? On screen? A fixed radius around every point of a grid?

It seams to me like that battle music would be on most of the time until players filled the map (which can happen quite fast on tiny to medium maps).

I think battles should rarely happen so the player gets his blood pumped with adrenaline if the battle music starts ^^

Link to comment
Share on other sites

I think it should be quite simple but it's probably too simple.

Music on: Enemy force is 3:1 within radius

Music off: Enemy force is 1:1 within radius

(yours v.s. theirs) = (NB = no battle, BU = battle music for us, BT = battle music for them)

* 1 v.s. 1 = NB

* 1 v.s. 3 = BU

* 10 v.s. 10 = BU & BT

* 10 v.s. 1 = BT

* 30 v.s. 10 = BT

* 10 v.s. 30 = BU

Hmm, I disagree, wouldn't it be a bit melodramatic if one of your scouts ran into 10 enemy soldiers and this epic battle music started? I mean it's something you want to know about, yes, but I wouldn't say a battle was impending.

I'm leaning toward Pureon or quantumstate's ideas of using damage or unit death rates to trigger a battle. Once we have that implemented, it should be easy to playtest and find reasonable thresholds. We could also make them configurable, so players choose how severe a situation is before they get notified. Whereas with some of the more complicated solutions, you don't have that simple means of tweaking the behavior.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...