Jump to content

Physically Correct vs Simple Game Rules Combat


Recommended Posts

A bit off topic (I think there was a thread for this but I can't remember where it was, feel free to move my post there):

Concerning "Physical correct" behavior vs straight forward game rules:

There are mainly two (clean) ways to make a good RTS in sense of game rules:

1.) Add a physics engine at a very basic level and add very simple game rules (Only Movement(Turning) Speed(Acceleration), Attack Speed/Damage, Projectile Speed/Turning Rate(for missile attacks)/Error but nothing like Armor/Attack Type etc.)

Example: Total Annihilation, Spring Engine

Advantages: Very realistic, what units are good against what other units comes out "naturally" (Without bonus, just by the physics)

Disadvantages: Very Hard to balance, a much harder to implement engine

2.) Add a complex set of game rules that allow units to counter specific other units (either by armor/attack type or by another more "natural" attribute like the Unit Size like done in Starcraft) and let the graphics only represent that rules (In AoE/AoC "Bonus vs Unit Type" is also present but seam enforced to me)

Example: Starcraft(Damage bonus against units depending on size, Splash damage), Warcraft III(Damage/Armor Type, Heroes take less spell damage), Age of Empires(Damage/Armor Type)

Advantages: What units are good against what other type can be determined by the Attack/Armor Type without seming to be enforced. It can also represent the Armors usually worn by the specific unit type if it's placed in an historical setting (like 0 A.D.).

Disadvantages: The game is less realistic especially the graphic representation might seam to not always represent the actual outcome in damage (Warcraft III tries to make it a bit better by making all ranged attacks "missile" attacks which on the other hand seam a bit strange in case of auto aiming arrows).

As is 0 A.D. is an ugly mix of all. The graphics does not only represent the game rule but interferes with it e.g.: Melee units that attack does not deal damage if the target is to far away after the attack animation is run.

Though there is no fundamental physics engine underneath the game archers shoot in physical trajectories (might be still good for the graphics but bad to let that interfere with the game rules meaning every shoot should hit if not otherwise managed in the game rules like a "Chance To Hit" Attribute)

We have Damage and Armor Types but also got "Bonus vs". It would be better to have one of this (I'd much prefer Armor/Attack Types).

That mix is quite impossible to be balanced and results in many "Bugs" like the missing chasing melee units (Made even worse by having a min. range for non-siege/fast units like Skirmishers).

Another game (and I like it) that mixes a bit of all is Warzone 2100. Projectiles (but missiles) have a trajectory that is fixed at the time it goes off directed towards the predicted point of the unit targeted when the projectile (would) collide with the target with an applied Error determined by the upgrades of accuracy for that type of weapon. It also has Damage/Weapon Types that deal different damage to different units dependent on their propulsion: Cyborgs, Hoover/Wheel/Half-Track/Full-Track Vehicles, VTOLs. Also the speed of projectiles greatly matters for hitting a target. But it turns out to work quite well though not really balanced.

But in general I think it would be better and a lot cleaner/much less messy to pick one and stick with it and just make additions in an other direction if it works good with the chosen base rules.

NOTE: I tried but not always managed to write words that are involved in the game concept with capital initial letters like "Attack Type". Don't know if that is usual practice and I'm quite sure I didn't do it right all the time but I think it makes it easier to differentiate between game concepts and their explanation. Feedback appreciated.

Edited by FeXoR
  • Like 1
Link to comment
Share on other sites

Sorry for the double post but theres another thing that interferes with the Damage/Armor Type (or other bonuses), how the graphics and the game rules are linked and Unit AI in general so I added another post to clearly separate it:

It's about Stances/Formations (again ^^). I don't know if I can explain this clearly. I'll try anyway.

As "Attack Bonus VS [unit Type]" feels unnatural to me so feels adding a bonus (of any kind) just for entering a formation. There are several ways to make it more natural but none of them are easy to implement (as far as I though, yet). Damaged units could be take from the outer areas of a formation and could be drawn in to be healed (if healers are present). If there is usage for Stamina (and maybe Moral) the same could be done for exhausted units.

Stances should not interfere with player given orders in any way. Instead there should be Orders that work similar to it. The reason is that you have to click less buttons (only the Order, not the Stance and the Order) and the unit enters exactly one Stage (that of the Order) not two States interfering with each other (Order and Stance).

That all influences the Unit AIs behavior that is - if all (Formations/Stances/Orders) are used - quite unclear to determine how a Unit/Formation will react to a given situation for both, the player and the developer.

For me - personally - it would be much more valuable/handy to have an Attack Move order (as well as a Hold Ground/Defend Order if wanted or something similar). A Guard Target Order and a Search And Destroy/Auto-Explore Order would be handy as well. As can be seen there will be more Orders to implement than the number of Stances + Orders but it will be much cleaner in code and behavior than the Stance/Order combination and they can be implemented one by one.

Edited by FeXoR
Link to comment
Share on other sites

I agree with most of what you have to say Fexor, but I must disagree with you about formations. Even in games like warcraft 3, there were bonuses based on abilties that units used. I think formations should be viewed in a similar manner. A group of units will be given a general bonus to armour or attack based on their formation. This is an intuitive side effect of formations. A testudo would for example increase the protection of a group of roman soldiers (a bonus percentage for armour across all attack types) but restrict their ability to fight (a reduction in attack power). This I think is obvious. However, to take away any benefit from using formations other then the natural benefits of having certain units meat shield for other units etc, is to make the feature redundant, that is, just a visual experience rather then something that is actually useful in game.

Personally I think formations as well as the ability to run/charge are features that add to the depth of gameplay in 0ad, as well as the excitement in a battle.

Link to comment
Share on other sites

I noticed that many PPL like formations and I think it could turn out to be a good thing. But at the moment it is pretty much destroying my style of play. I can't order a vast amount of troops even to go to a point on the map without having them stupidly running far into enemy territory not to mention the time lost by the units stupidly tangling around instead of attacking. So I really want something like a "no formation" formation that gives the order to each selected unit individually at least.

Link to comment
Share on other sites

So I really want something like a "no formation" formation that gives the order to each selected unit individually at least.

I don't think that's an unreasonable request. When queued orders are given to workers they will also move in formation from one construction/resource to another, however I'd sometimes prefer it if they just moved individually like female citizens.

(slightly going off topic though)

Link to comment
Share on other sites

I noticed that many PPL like formations and I think it could turn out to be a good thing. But at the moment it is pretty much destroying my style of play. I can't order a vast amount of troops even to go to a point on the map without having them stupidly running far into enemy territory not to mention the time lost by the units stupidly tangling around instead of attacking. So I really want something like a "no formation" formation that gives the order to each selected unit individually at least.

in some games the units can go individually or in group (Battalions). if we implement that, we can need a comman to ungruop and other to grup, the adventaje is special skill in grup, think in a group spearman, kill cavalry, or Archers grup to fire arrows over a building. etc.

this change the game, and bring to other level, beyond AOK, more Like Total War, but own style, and building constructor.

Link to comment
Share on other sites

  • 3 weeks later...

Eventually getting round to replying, after far too long.

A bit off topic (I think there was a thread for this but I can't remember where it was, feel free to move my post there):

Concerning "Physical correct" behavior vs straight forward game rules:

There are mainly two (clean) ways to make a good RTS in sense of game rules:

1.) Add a physics engine at a very basic level and add very simple game rules (Only Movement(Turning) Speed(Acceleration), Attack Speed/Damage, Projectile Speed/Turning Rate(for missile attacks)/Error but nothing like Armor/Attack Type etc.)

Example: Total Annihilation, Spring Engine

Advantages: Very realistic, what units are good against what other units comes out "naturally" (Without bonus, just by the physics)

Disadvantages: Very Hard to balance, a much harder to implement engine

2.) Add a complex set of game rules that allow units to counter specific other units (either by armor/attack type or by another more "natural" attribute like the Unit Size like done in Starcraft) and let the graphics only represent that rules (In AoE/AoC "Bonus vs Unit Type" is also present but seam enforced to me)

Example: Starcraft(Damage bonus against units depending on size, Splash damage), Warcraft III(Damage/Armor Type, Heroes take less spell damage), Age of Empires(Damage/Armor Type)

Advantages: What units are good against what other type can be determined by the Attack/Armor Type without seming to be enforced. It can also represent the Armors usually worn by the specific unit type if it's placed in an historical setting (like 0 A.D.).

Disadvantages: The game is less realistic especially the graphic representation might seam to not always represent the actual outcome in damage (Warcraft III tries to make it a bit better by making all ranged attacks "missile" attacks which on the other hand seam a bit strange in case of auto aiming arrows).

As is 0 A.D. is an ugly mix of all. The graphics does not only represent the game rule but interferes with it e.g.: Melee units that attack does not deal damage if the target is to far away after the attack animation is run.

This is an issue, I think we should drop this feature.

Though there is no fundamental physics engine underneath the game archers shoot in physical trajectories (might be still good for the graphics but bad to let that interfere with the game rules meaning every shoot should hit if not otherwise managed in the game rules like a "Chance To Hit" Attribute)

This is something that I implemented so I have given it significant thought. It used to work like you said, with a simple 50% hit chance. I'm pretty uncertain about this. Some people like being able to dodge missiles but this does introduce a big element of micro.

We have Damage and Armor Types but also got "Bonus vs". It would be better to have one of this (I'd much prefer Armor/Attack Types).

Simply having attack/armour types just doesn't seem to be flexible enough for what we want. Just having bonuses leads to having to create a huge amount of bonuses which also means the player needs to learn a lot of things. I think it is reasonable to have both, the armour gives the broad picture with bonuses giving extra detail to create more interesting interactions.

That mix is quite impossible to be balanced and results in many "Bugs" like the missing chasing melee units (Made even worse by having a min. range for non-siege/fast units like Skirmishers).

I'm not sure why you put "Bugs" in quotes. This is a genuine bug that is unintended behaviour, it is a release blocker for the v1.0 release.

But in general I think it would be better and a lot cleaner/much less messy to pick one and stick with it and just make additions in an other direction if it works good with the chosen base rules.

I'm not convinced about it being better to pick one or the other. I can see your argument about it being cleaner, though I think the armour/attack type is actually more in the physical simulation camp. I would say that we should treat the more "physical" stuff as the core and give little boosts with the "artificial" stuff to introduce variety.

Sorry for the double post but theres another thing that interferes with the Damage/Armor Type (or other bonuses), how the graphics and the game rules are linked and Unit AI in general so I added another post to clearly separate it:

It's about Stances/Formations (again ^^). I don't know if I can explain this clearly. I'll try anyway.

As "Attack Bonus VS [unit Type]" feels unnatural to me so feels adding a bonus (of any kind) just for entering a formation. There are several ways to make it more natural but none of them are easy to implement (as far as I though, yet). Damaged units could be take from the outer areas of a formation and could be drawn in to be healed (if healers are present). If there is usage for Stamina (and maybe Moral) the same could be done for exhausted units.

Stances should not interfere with player given orders in any way. Instead there should be Orders that work similar to it. The reason is that you have to click less buttons (only the Order, not the Stance and the Order) and the unit enters exactly one Stage (that of the Order) not two States interfering with each other (Order and Stance).

That all influences the Unit AIs behavior that is - if all (Formations/Stances/Orders) are used - quite unclear to determine how a Unit/Formation will react to a given situation for both, the player and the developer.

For me - personally - it would be much more valuable/handy to have an Attack Move order (as well as a Hold Ground/Defend Order if wanted or something similar). A Guard Target Order and a Search And Destroy/Auto-Explore Order would be handy as well. As can be seen there will be more Orders to implement than the number of Stances + Orders but it will be much cleaner in code and behavior than the Stance/Order combination and they can be implemented one by one.

Attack move will definitely be there, perhaps some of the others as well.

Link to comment
Share on other sites

Simply having attack/armour types just doesn't seem to be flexible enough for what we want. Just having bonuses leads to having to create a huge amount of bonuses which also means the player needs to learn a lot of things. I think it is reasonable to have both, the armour gives the broad picture with bonuses giving extra detail to create more interesting interactions.

I'm relieved to read that, i was afraid the team would ignore the inconsistencies of the current system. And yeah, i agree that the attack/armor types system isn't flexible enough for the game, it had inconsistencies even for Warcraft 3. I didn't play many games of the Total War series, in fact i just played Medieval 2 and their attack/armor system (with attack/defense skill, charge bonus based on current speed, bonus in woods/snow, morale, stamina) seems pretty solid, so we could adapt some of their ideas into our game.

  • Like 1
Link to comment
Share on other sites

Eventually getting round to replying, after far too long.

First of all thanks for the reply.

This is an issue, I think we should drop this feature.

I agree.

This is something that I implemented so I have given it significant thought. It used to work like you said, with a simple 50% hit chance. I'm pretty uncertain about this. Some people like being able to dodge missiles but this does introduce a big element of micro.

I think I read somewhere that CPU usage is quite high to simulate (if done, not sure) that a projectile can hit a unit not initially targeted by the unit the projectile comes from. That might be considered as well for a decision here. I'm uncertain about this as well.

Simply having attack/armour types just doesn't seem to be flexible enough for what we want. Just having bonuses leads to having to create a huge amount of bonuses which also means the player needs to learn a lot of things. I think it is reasonable to have both, the armour gives the broad picture with bonuses giving extra detail to create more interesting interactions.

Thats OK for me just think that picking one of them would do.

I'm not sure why you put "Bugs" in quotes. This is a genuine bug that is unintended behaviour, it is a release blocker for the v1.0 release.

Good to know. What are the plans to fix this? Give ranged units a melee attack that is weaker that their ranged attack seams bad to me because ranged units then by default fight "imperfect". That seams to be stupid and will result in more micromanagement. In combination with the yet crappy formation behavior it will be a pain for the player to manage.

I'm not convinced about it being better to pick one or the other. I can see your argument about it being cleaner, though I think the armour/attack type is actually more in the physical simulation camp. I would say that we should treat the more "physical" stuff as the core and give little boosts with the "artificial" stuff to introduce variety.

I didn't make myself clear here. I meant 1.) (Physics engine, not many other game rules) or 2.) (Complex game rules, graphics "unlinked" from the game rules just representing the action mainly) not damage/armor type or "bonus vs.". Sorry.

Attack move will definitely be there, perhaps some of the others as well.

Good to here. But it is still planned to stick with orders+stances+formations? That's my main concern. It results in a vast amount of combinations to be handled sanely which seams to be a quite impossible job.

Link to comment
Share on other sites

I think I read somewhere that CPU usage is quite high to simulate (if done, not sure) that a projectile can hit a unit not initially targeted by the unit the projectile comes from. That might be considered as well for a decision here. I'm uncertain about this as well

Even if this is the case, I'd rather keep that, as it adds a lot of realism and ranged units get better with increasing numbers, since less shots won't hit.

Wouldn't it be an option to give melee units the possibility to perform the attack while slowly moving towards the target (if the target is fleeing), so the target may move away, but not fast enough to get out of range for the initial hit to be delivered?

Edited by kosmo
Link to comment
Share on other sites

There are simpler ways to solve the attack/move problem, like making the units come closer to the target before attacking or making them finish the action of attacking before resuming the chase. Attacking while moving would require a whole new animation state for all units (since units with minimum range suffer from the same issue) and some programming too.

About the physics simulation, i don't think what consumes processing power is the trajectory of the missiles, but the collision checks (correct me if i'm wrong). With this in mind, it is possible to add more realism to missile trajectories and still use the complex game rules, to obtain a better performance. IMO, we don't need to follow the example of the Total War series, in which they have the physics AND complex game rules AND complex micro managing, what can be annoying, at times, but we can instead adapt it to our game, so that we may not be the most realistic game in the world, but we'll have freedom to tune this or that detail and yet have a 'simulated' realism.

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...