NEWS

Master your own destiny! Command a nation!

When the heroes don’t show up for war!

What happens when the heroes do not show up for war? Well, then the generals have to throw the die.

Heroes & Generals is a game where a series of action games are triggered by a strategy meta-game. In some cases there is not enough human players to play out a battle or the battle is simply too imbalanced for the action game to be any fun. In that case the result of the battle will be decided by the server.

Our current algorithm is very simple and we are in the process of designing it’s replacement. I will tell a bit about some of the thoughts behind the next iteration and I have uploaded a small sandbox created in flash for trying out some ideas. The demo focuses on the actual solving of battles and not how they got into battle (the engagement rules).

Battle Solver Demo

All battles are fought between a number of assault teams from the two factions. The commanders move the assault team to a battle field and when contact is made between the assault teams a battle begins. The assault teams are very different in their composition and function and some combinations might not yield any results (like attacking a recon unit with fighter planes).

Simplified Battleresolver Flow

The battle is split into a 5 phases. The first 2, deployment and initiative happens only once for each assault team (assault teams joining an ongoing battle still have to be deployed). The next 2, battle turn and battle assessment, is where the actual battle goes on, and the last is for gathering of results (if a battlefield is lost it have to change side etc.).

The most interesting part is of course the battle turn. This is where the fun happens. There is a few rules that we must follow when designing this. First and foremost, we are creating an action game and we would prefer real players (the heroes) to play the game and not our server so we need to encourage the commanders to incentivise players to join the battle. This bit is actually beside the point of this blog so I’ll just say that we need a system where at any time action players can break the auto-resolve and create an action game. The current system is base around ‘one-resource-must-die-each-turn’ which gives some obvious problems with the time of the battles. Bring more men to the battle and the battle takes more time, when in reality more men shouldn’t add more time. It should rather be; ‘the greater the imbalance the shorter the battle’. In order to achieve this, the assault teams are broken down into individual resources (soldiers and vehicles) and in essence ‘lined up’. For each turn all resources gets one attack (or as you can see preparing for an attack by either loading its gun or finding a target). In the demo I have added a time delay between each attack but on the server a battle turn is always carried through. All the different parameters for both the attacker and the target adds up to a ‘kill probability’, which basically is ‘how likely is the target to die in this round’. Most numbers are between 0 and 1 and should be seen as a probability. For instance the ‘attack value  infantry’ is the probability of the unit to get a successful kill on infantry unit, 0 is never and 1 is always.

Press 'Add' to add an assault team to either side
You can add assault teams to the battle by clicking on the ‘add’ buttons. Mouse over will tell you the unit type (and if you can’t tell them apart you should’nt be playing with the demo).
When you are ready for battle press the ‘resolve battle’ button (yes, the red one :-).

Assault Teams in the battle
You can assign a commander to the assault team. This is a little test of mine to see the effect of the commander. The commanders (or generals) in the game comes from the soldiers played in the action game. Once a soldier reaches rank 12 (lieutenant), the player can choose to ‘convert’ him to a commander. This removes the soldier from the battlefield and the player can now assign him to command an assault team (or later a command (a command being the logistic superior to several assault teams)). Converting a soldier to a commander will enable him to rise above level 14 (captain) and gain rank of field marshal  The player can also just get a ‘west point’ commander (buy a commander instead of converting a soldier) but a real ‘battlefield’ commander will have considerable bonuses.
I have also added an entrenchment option to simulate the fact that an army defending a town will require a lot to defeat.
During battle you can reinforce assault teams running out of resources.

Parameters
In this section of the demo you can play around with my initial parameters and see the effect on the battle.
NB:Internally an assault team is called a ‘commandnode’ due to some initial programmer confusion about the term ‘group’. The ‘commandnode template’ is a data structure that binds ‘army resources’ (men and tanks) to the ‘commandnodes’ (the assault teams). The ‘Army Resource Template’ is a data structure that holds values for the different resources like soldiers, tanks and so.

Last I need to stress that this demo is just a sandbox and none of the values are final (and probably subject to change a few times before implementation).


  1. chaos205chaos20501-30-2013

    Very cool! I’m hoping this is not just to demonstrate the algorithms at work, but will actually be viewable by generals/heroes watching the battle from the campaign map. I’m imagining a line of entrenched soldiers defending against a wave of attackers. Fun!

    Note: check the window-size of the demo page; I’m using Firefox and it’s cut off about 1/10th of the page (right side) and it’s not showing any scrollbars and won’t let me zoom out.

    • Reto.Robotron3000Reto.Robotron300001-30-2013

      I think RedBjarne designed it for a resolution of 1920×1200 to 2560×1440… I’ll ask if he can enable scrolling in lower res.

  2. CraneTYSCraneTYS01-30-2013

    Yeah that’s what i am talking about.I hope we will see it soon.(Hansen)

  3. WarblerWarbler01-30-2013

    Looks good.

    -The attacker should gain a bonus in autoresolve for each access point they are attacking from beyond the first, negating (a part of) the defender’s entrenchment bonus – the same factor is already readily observable in the tactical game.

    -Commander bonuses. This’ll be interesting. Obviously commanders should not only affect autoresolve, but should also have effects for players playing in a tactical battle, as well as strategic-map benefits other than just autoresolve power. Maybe this should be done via giving commanders ‘traits’ – i.e. specific abilities that give all the troops in the assault team/command a certain bonus. Some of them could be about training – basically similar stuff to the combat badge bonuses – i.e. the commander makes sure his troops are kept in shape and well-drilled, giving them a stamina bonus, focuses on marksmanship giving a bonus to accuracy, etc. Some other stuff I can come up with for commander bonuses (though a lot of it makes assumptions about yet-to-be-implemented game mechanics):

    Logistics expert – soldiers start with more ammo in tactical battles, supply units sent to resupply this AT/Command gain a bonus to movement speed on the campaign map

    Pathfinder – Reduced movement penalties when moving over poor-quality transport connections (bad infrastructure in less built-up areas, connections that have been sabotaged, bombed, etc) on the campaign map

    Artillery expert – Improved cooldowns & precision for bombardments called in from off-map artillery, as well as for ones executed by an artillery unit this commander is in charge of

    Stealth/reconnaissance/intelligence-related traits – helps the AT(s) stay hidden on the campaign map, or improves their ability to find hidden enemy units

    • SkyDaggersSkyDaggers01-30-2013

      Jesus, it’s not a mmo, we don’t need this bullshit.

      • cRo4Ti4cRo4Ti401-30-2013

        yes , the acess point thought is nice one. Thanks for show us “the magic behind autosolve” know dozen of players who ever wanted see ho wit works, and best is , now its still possibl eto figure out what unit will be most efective?

        if someoen get somed ata plz open thread in forum and let us talk about.

        @Sky daggers the only bullshit i see here are your comments. Youre give really annoying comments who are nothing as bullshit.

        i think still you didnt get the ” mechanixs so its bullshit for <you due you didnt get the function ".

        no thx for your nonsense talk.

        • SkyDaggersSkyDaggers01-30-2013

          Oh so you want my thomson with maxed accuracy as he stated ? I would snipe from tower with my thomson, how would you like that ? Huh ? But yeah if we want to make everyone CoD super soldiers then i don’t mind ill just pass this game then…

          • WarblerWarbler01-30-2013

            Supersoldiers and sniper-SMGs? You’re making some pretty big assumptions there. I’m not suggesting handing out bonuses like candy.

            The biggest possible bonus of an individual type (assuming commanders with the relevant trait stacked as deep through the chain of command as possible – any commander assigned directly to the AT accounting for the largest portion of the impact, then the commander of that AT’s Command, and so on) should probably, in most cases, be smaller than the effect of an individual combat badge (obviously, exact amount would have to be evaluated for balance on a case-by-case basis). Likewise, the number of individual traits a commander should be able to accrue should be limited, so players would be forced to make choices regarding how to develop their commanders.

  4. FontanFontan01-30-2013

    very nice for a first iteration…still many tweaks need.
    But was that necassary :-(

  5. DondergodDondergod01-31-2013

    I just put some allied stuarts vs axis tigers.
    After 110 turns, neither side has lost a single unit.

    Tried refreshing, then did same settings: again no kills for either side.
    So it still needs work ;).
    But for the rest it’s looking pretty good.

    • chaos205chaos20501-31-2013

      I’m sure they’ll get the balance right before implementing anything like this for auto-resolve. :)

    • Reto.RedBjarneReto.RedBjarne02-02-2013

      Hi dondergod

      I fucked up and forgot to update the new assaultteam category database before uploading (the old one does not include light and heavy armor which is why this combination just goes on for ever :-))
      I have fixed it (and adjusted the values a bit) and uploaded a new version of the demo.

      The new version says ‘Battle Solver v.1.01′ in the page title (top left).

      I have also added a switch to speed up the resolve time by 20x, just below the big red button.

      Thanks for the feedback :-)

What are you waiting for soldier? We need heroes on the battlefield and generals to lead them!