#18 closed enhancement (fixed)
[PATCH] Realistic ranged attack
Reported by: | Stuart Walpole | Owned by: | Jonathan Waller |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 11 |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description (last modified by )
- Ranged attack projectiles should not guaranteed to hit target
- Splash damage should be implemented when the projectile hits something (target, ground, or otherwise)
Attachments (6)
Change History (21)
comment:1 by , 14 years ago
Milestone: | Advanced Playability Demo |
---|
comment:2 by , 14 years ago
Milestone: | → Backlog |
---|
comment:3 by , 12 years ago
Description: | modified (diff) |
---|---|
Keywords: | review added |
Milestone: | Backlog → Alpha 9 |
Owner: | set to |
Status: | new → assigned |
Summary: | Entity - Attack - Area Ranged → [PATCH] Entity - Attack - Area Ranged |
I have attached a patch. The graphical arrow collision is not a perfect match for the gameplay one but it should be close enough.
The code uses a Gaussian distribution and defines spread which determines the scaling of the gaussian. The Gaussian will have width Spread at distance 40m from the archer. This means about 2/3 of the missiles will hit a target of size spread at 40m. The spread is linearly proportional to distance.
Issues: If the entity being attacked dies before the missile arrives then the missile has no effect.
I consider these to be minor
by , 12 years ago
Attachment: | advanced_attack.diff added |
---|
by , 12 years ago
Attachment: | advanced_attack-220212.diff added |
---|
comment:4 by , 12 years ago
Attached an updated diff. Now ProjectileManager gets told when to remove a projectile that has hit the target.
Also I added some speed based inaccuracy and removed the distance based inaccuracy, this can be easily changed if people want it to work differently.
comment:5 by , 12 years ago
Priority: | Nice to Have → Should Have |
---|
comment:6 by , 12 years ago
Can you post a patch with some templates changed for demonstration? (or maybe some new templates to compare with the current behavior) I want to test it but have no idea what combination of parameters is sensible.
by , 12 years ago
Attachment: | templates_splash.diff added |
---|
Example template modifications adding splash for siege
by , 12 years ago
Attachment: | status_bars_hack.diff added |
---|
This makes status bars show at all times, useful for watching the effect of splash damage
comment:7 by , 12 years ago
This is where the patch to make tab toggle health bars (#1187) would be helpful. Lets try get that one into Alpha 9.
comment:8 by , 12 years ago
Milestone: | Alpha 9 → Alpha 10 |
---|---|
Type: | task → enhancement |
comment:9 by , 12 years ago
Description: | modified (diff) |
---|---|
Priority: | Should Have → Must Have |
Summary: | [PATCH] Entity - Attack - Area Ranged → [PATCH] Realistic ranged attack |
by , 12 years ago
Attachment: | advanced_attack-160312.diff added |
---|
New version with fixed square footprint bug
comment:10 by , 12 years ago
I have attached a new patch version fixing a bug where rectangular buildings were treated as being twice as big as defined. For the final version I will make <Spread> a non-optional attribute but my templates are a mess currently so it was easier to leave it optional at this point.
comment:11 by , 12 years ago
Does this patch only check if the projectile hits the original target or where the projectile lands and if there is a unit? Does it take in account the targets movement?
comment:12 by , 12 years ago
Keywords: | patch added |
---|
comment:13 by , 12 years ago
Keywords: | patch, review → patch review |
---|---|
Milestone: | Alpha 10 → Alpha 11 |
comment:15 by , 12 years ago
Keywords: | review removed |
---|
Milestone Advanced Playability Demo deleted