Ticket #18 (closed enhancement: fixed)
[PATCH] Realistic ranged attack
| Reported by: | stuart | Owned by: | quantumstate |
|---|---|---|---|
| Priority: | Must Have | Milestone: | Alpha 11 |
| Component: | Core engine | Keywords: | patch |
| Cc: |
Description (last modified by k776) (diff)
- Ranged attack projectiles should not guaranteed to hit target
- Splash damage should be implemented when the projectile hits something (target, ground, or otherwise)
Attachments
Change History
comment:3 Changed 15 months ago by quantumstate
- Status changed from new to assigned
- Description modified (diff)
- Summary changed from Entity - Attack - Area Ranged to [PATCH] Entity - Attack - Area Ranged
- Owner set to quantumstate
- Milestone changed from Backlog to Alpha 9
- Keywords review added
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
comment:4 Changed 15 months ago by quantumstate
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:6 Changed 15 months ago by historic_bruno
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.
Changed 15 months ago by quantumstate
- Attachment templates_splash.diff added
Example template modifications adding splash for siege
Changed 15 months ago by quantumstate
- Attachment status_bars_hack.diff added
This makes status bars show at all times, useful for watching the effect of splash damage
comment:7 Changed 15 months ago by k776
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 Changed 15 months ago by k776
- Type changed from task to enhancement
- Milestone changed from Alpha 9 to Alpha 10
comment:9 Changed 15 months ago by k776
- Priority changed from Should Have to Must Have
- Description modified (diff)
- Summary changed from [PATCH] Entity - Attack - Area Ranged to [PATCH] Realistic ranged attack
Changed 14 months ago by quantumstate
- Attachment advanced_attack-160312.diff added
New version with fixed square footprint bug
comment:10 Changed 14 months ago by quantumstate
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 Changed 14 months ago by FeXoR
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?
Changed 13 months ago by quantumstate
- Attachment advanced_attack-250412.diff added
updated to latest svn
comment:13 Changed 13 months ago by k776
- Keywords patch added; patch, removed
- Milestone changed from Alpha 10 to Alpha 11
comment:14 Changed 12 months ago by quantumstate
- Status changed from assigned to closed
- Resolution set to fixed
In 11886:

Milestone Advanced Playability Demo deleted