How do I Data-based combat strength...?

0 favourites
  • 4 posts
From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • Hello again community, I'm looking to take on the challenge of creating a multiplayer "war" / military management game.

    One of the steps that I know will block me and that I think has more to do with mathematics and some formula is for me to obtain the combat strength of an army with data that the player enters and this combat takes place... How would I decide the winner...

    In practice...

    The player will have a stock and create a battle, for example

    1000 Soldiers ATK(10) + Bonus (night vision)

    5 Tanks ATK(20) + Bonus (HE SHELL)

    An object then appears with this internal data as a variable...

    But how do I put it to fight with another object...

    A formula for the battle to last 20 real minutes and decide the winner by the host.

  • This is your job as a game designer.

    You have to create the world of the game and its rules in your head.

    And when all the conditions and rules are known, the programmer can turn it into code.

    As for your specific task, there is too little data.

    -how often a soldier attacks

    -how much health he has

    -how much armor he has

    -his movement speed during the day and night

    -his range of fire day and night

    -the effect of bonuses.

    All of these are taken into account when calculating each move and attack.

    When you can write down one battle in a notebook, then you can program it into the engine.

  • Well, I won't be too complex at the beginning. But I managed to do it this way... Having separated the battalions.

    When they get close within range they start attacking each other...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think I managed to convey what I wanted.

    I created an infantry battalion that has

    5 attack

    2 defense

    When this fighter meets another like him (inf) they fight like this...

    Every 1 second

    Inf(victim) - subtract from quantity = (inf attacker).attack / inf victim.defense.

    When a tank battle gets close to combat, it also applies its weight... so

    Inf(victim) - subtract from quantity = (attacking tank).attack / inf victim.defense.

    In short, my combat is based on applying a blow every 1 second and removing some according to the defense.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)