Advertisement

Browsergame Combat System

Started by June 20, 2015 06:43 AM
8 comments, last by Fhizban 9 years, 5 months ago

Hi everybody,

Im new here and could really require some feedback regarding the combat system for a browsergame Im working on.

Intro

Its a fantasy conquest game, a typical oldschool browsergame "click-and-wait-style" with automated combat. Yeah, pretty rare nowadays but its my brainchild after all. The game is more or less complete.

Current System

The current combat system is OK, but it contains too many stats and hand-coded special abilities/events. Now my players report to me that they actually do not care if a unit is compromised by 200 stats or just 20. In addition, creating new units is a pain and this game lives by having a TON of different units.

Some specs I would like to eleminate: Currently units have HP and there is a whole lot of healing abilities tied to them. But as combat is automatic, it does not really matter. It just bloats the code and makes combat processing overly complex. As the player is not able to interact with the troops, they do not really see the "background mechanics" that are going on. But it makes adding new units, new abilities unnecessarily hard for me.

Possible Future System

I really like to keep the unit diversity and having units with special abilities. My studies included old games like "Warlords 2" or "Warlords 3" as well as miniature wargames like "GURPS Mass Combat" or "HOTT Hordes of the Things". They all manage to have lots of variety with just a set of simple stats.

Thats exactly what I would like to achieve.

So, I plan to have units "paired" against each other via some kind of stacking order. Next comes comparing ATK vs. DEF and then calculating a %-Kill Chance from that. That chance states how likely it is that one of the defending units is destroyed. Healing would just alter this chance as would special abilities do. No more HP, no more hassle keeping track of everything.

Abilities just manipulate stacking order, ATK, DEF and/or the kill chance - thats all. Add some terrain modifiers and a lot of modifiers in general and there you go. Clean and simple.

Cons

Here is one of my concerns with the new system: It is possible for a player to attack with 12.000 Goblins, but on the other hand its also possible to attack with just 1 single "God" (or any other really big unit). Without HP and all the systems related to it, its very hard to simulate how much damage a unit can sustain. It either leads to units being killed like flies (in case of the Goblins, which is actually not a problem) or it tends to have Units that are basically "immortal" (like the God). So there would be no "in-between" anymore and that makes representing units of various power-levels / sizes difficult.

Questions

Now, is that aproach too simple? Are there other ways? Does the combat formula really matter so mach to a browser strategy game? I would really appreciate your feedback guys!

Thanks a lot

-Fhizban

If I had a system with 200 stats and I needed to get rid of 190 I think I'd still keep HP at least. You can't get much simpler than HP for representing a very rough power level.

Your pairing mechanic sounds like the classical rock-paper-scissors approach to combat (ie swords beat spears, spears beat cavalry, cavalry beat swords). It's a very simple system but has been used to good effect in many games (think Total War for instance).

Advertisement

Hi stanirya, thanks for your reply!

well 200 was just a example (its actually 154 but that includes name, images, layout specific things etc. as well)

Regarding HP: Thats one of the reasons why I posted this thread. In old strategy games like "Warlords 2" they had no HP at all, but on the other side all units where more or less equal (there are no Gods or Behemoth units etc.).

It gets more complicated because there can be just 1, a few, several hundred or several thousands of units (e.g. 12.000 Goblins, 1 God, 120 Wyvern Riders etc.)

Currently I just keep track of the HP of the first unit in a stack, the others are treated like "full HP". once the first one goes down to 0, its defeated and HP is deducted from the next one.

Thats one of the parts of the system that makes it actually more complicated than I want it to be.

But, guess you are right - HP should be in - any other thoughts?

You might want to take a look at my old browser game at www.ssod.org which handles combat with four simple stats.
It's very loosely based on the combat system used in fighting fantasy game books which offers a wide possibility of outcomes whilst balancing powerful and weak characters effectively.

If you're interested I'd be more than happy to share the rules used. Let me know :)

@braindigitalis thanks!

And yes, I would be interested. Please note that my game is a wargame with focus on mass-combat - so it would be different i think.

Ah....fighting fantasy *memories*

Depending on the size of your battlefield, the constraint on a 'god' unit is that it (mostly) can only be in one place at a time and throughout the battle might only be able to affect a portion of it (and in only certain ways). Then it also matters what all the canon-fodder achieves as to the 'victory conditions'.

Also rather than just pure casualties (and point count of the troops expended) having some other things being the deciding factors for the win/lose :

External aspects/situations like a vanguard punching through a battle line, or a rearguard sufficiently delaying an advancing enemy allowing retreat by the largest number of forces, or troops blocking a bridge, or assault onto the other side with defensive works, or the battle lasting long enough for the opposing sides morale to break .... These all could change the tactical needs to be more than just kill counts.

--------------------------------------------[size="1"]Ratings are Opinion, not Fact
Advertisement

Even with just a simple probability-of-being killed metric, you can still have a range of unit types. Elder Fire Dragon vs. Goblin might be 99.99% victory chance for the dragon. Throw enough goblins at him, though, and eventually the RNG will side with the goblin. Elder Fire Dragon vs. Paladin might be 90% chance of victory for the dragon, meaning a much smaller group of paladins will eventually triumph. Kill% changes the probability distributions some (e.g., there's a very small but real probability of a lone goblin killing the dragon), but the basic idea remains the same.

Since you're including special abilities, you could alternatively treat hp under that umbrella. Most units are strictly probability based, but a wyvern might have Resiliant(3) and an elder fire dragon might have Resiliant(10), where resiliant is a marker of how many times the creature needs to be defeated before it dies. It's still just an hp system, but it's hidden away some and only applies to a select group of units. It also makes it easier to create variants. The golem has unyielding (3), which works like resiliant (3), but the wounds can't be healed. Or you could have units that transform on death: Fire Dragon => Wounded Fire Dragon => Dying Fire Dragon. Cursed Warrior => Zombie => Ghost

Hey,

I got a ton of new ideas in the last few days - but still need some time to flesh them out. Here are some raw info bits:

1. There wont be unique stats for each unit anymore. Because in a mass combat system it almost makes no sense. Instead there is a simple stat-generator that will auto-create stats for the most common unit types. so there are stat-templates for infantry, cavalry, war-machines and so on. now add a bit of elemental diversity, keep in mind that units can be upgraded etc. - and there you go.

2. I have also decided to drastically tone down the special ability system. Abilities are just Bonus or things that Cancel a specific bonus. Even Healing(5) would be a +5 bonus on HP - no matter if the unit is actually wounded or not. While Curse(3) cancels up to 3 points of Healing. Thats really easy to implement, balance and keep track - and actually its complex enough for auto-combat. No need to have fancy residual poison effects, conditions and stuff like that in a auto-combat-system

Since you're including special abilities, you could alternatively treat hp under that umbrella. Most units are strictly probability based, but a wyvern might have Resiliant(3) and an elder fire dragon might have Resiliant(10), where resiliant is a marker of how many times the creature needs to be defeated before it dies. It's still just an hp system, but it's hidden away some and only applies to a select group of units. It also makes it easier to create variants. The golem has unyielding (3), which works like resiliant (3), but the wounds can't be healed. Or you could have units that transform on death: Fire Dragon => Wounded Fire Dragon => Dying Fire Dragon. Cursed Warrior => Zombie => Ghost

Hm, what a nice idea actually. Im thinking about it!

HPs serve a purpose, every stat does. Before choosing whether to remove HPs altogether, consider the below:

Do you want a combat system based on attrition or evasion?

Some combat systems use both as well.

Evasion's pro is that you don't need to keep track of wounds/HP/life, etc. It is easier to wrap your head around as a user, but it also makes units that much more disposable.

Attrition makes units more durable but requires a means to easily display it's current strength compared to full strength (usually, a life gauge).

Having both allows you to have more unit diversity (sneaky assassins with low HP and high evasion, tanks with high HP but not evasion, etc.)

What's YOUR setting? What are you trying to achieve first and foremost? (You need to know this before making the actual stats and should only include stats that support the mechanics you want to bring forth).

@Orymus3: The setting is classical medieval fantasy with a bit of a dark fantasy touch to it.

The primary focus is large battles between anonymous armies that can be compromised of many different unit types. The battle is fully automatic and the outcome can either be victory or defeat. The primary target is on micro-managing your army: One army design might work well against another but not against all setups of your enemy.

Here is some of the stuff I think I got right:

1. Base Attributes

There will be: Hitpoints, Initative, Armor and Leadership. Most are self-explanatory but Leadership is special: It determines the stacking order of your units only when taking damage. This means high-LD units take damage first, while low-LD units hide behind the "tanks" and take damage later. So you can design an army where Knights take up the front and Archers hide in the back. Of course, effects can manipulate this stat.

Initative on the other hand is used to sort the attacking units. So there are two concurring sort mechanisms: Leadership on target selection and Initative on attacker selection

2. Attack Attribute = "Combat Strategy"

There is not just one Attack Attribute, there are seven. And they are called "Combat Strategy". This is nothing you as a player can choose, instead it determines how and when your units attack. This system now unites concepts of "Range", "Attack Speed" and "Combat Type".

The seven Attributes are, in the order they appear in battle: Preemptive, Ranged, Siege, Skirmish, Charge, Melee and Delayed.

A whole battle consists of seven rounds, one for each Combat Strategy. Starting with Preemptive and going through all phases until the Delayed Phase. Some phases deal more/less damage than others.

1. Preemptive = Assassins and other units that strike before the actual combat begins (a rare special-case)

2. Ranged = Armies are at distance, Archers shoot. Deals a bit less damage, but is the first phase of combat

3. Siege = Catapults and Cannons fire, slower than Ranged but still faster than melee

4. Skirmish = Javelins and Slingshots fired before close combat starts. deals a bit less damage. is often featured in addition to other Combat Strategies (so a unit can have Ranged AND skirmish)

5. Charge = Cavalry, War-Wagons and Shock Infantry are closing in! deals increased damage

6. Melee = Typical close combat, this round is the only one that is repeated several times

7. Delayed = Traps, Poison and Specials that strike after the combat is over (a rare special-case)

3. Combat Processing

* When a new round starts, the engine sorts both the attacking and defending units in descending order of Initative

* Now the engine loops through the sorted units, starting with highest Initative

* The engine now checks if the currently selected unit-stack is allowed to attack during this phase of combat (aka: does this unit have "Siege" etc.?)

* The whole Unit deals "Combat Strategy * Unit-Amount" Damage

* The defender is selected by choosing the hostile stack with highest Leadership

* Defender has "Armor * Unit-Amount" total Armor

* Engine compares total attack with total defense and from that ratio is calculates final damage (final damage is always at least 1% and a maximum of 200% of total damage, this must be tested)

* The Rest is applied against the stacks Hitpoints (Hitpoints * Unit-Amount), casualties are calculated

* The defending army is re-ordered according to Leadership if the unit is destroyed

okay and here some stuff I would like to explain later (the salt in the soup):

4. Army Morale

5. Retaliate Special Rule

6. Special Abilities + Effects

7. Troop Type Superiority Rule

any thoughts so far?

This topic is closed to new replies.

Advertisement