Light Style© by Fisana

Jump to content


Photo

Advanced attack features


  • Please log in to reply
28 replies to this topic

#21 quantumstate

quantumstate

    Primus Pilus

  • WFG Retired
  • 1,150 posts

Posted 17 February 2012 - 09:37 AM

great!

this patch affects the behaviour of archers to keep a certain distance to the target?


No, this makes arrows get fired at a random spot near the target. Then, when the arrow lands, it tests whether it hit the target and if so causes damage, it is possible for the arrow to hit a different unit than the one it was fired at. Also it provides the option of splash damage so now siege units can cause damage to all units near where the projectile lands.
  • 0

Jonathan Waller [ aka quantumstate ]

Wildfire Games Programmer
Contact me: jonathanmarkwaller at gmail dot com


Support Wildfire Games!


#22 Enrique

Enrique

    Primus Pilus

  • 0 A.D. Department Leader
  • 1,839 posts

Posted 17 February 2012 - 11:43 AM

I have made a patch for this functionality and attached it to the ticket at http://trac.wildfire...s.com/ticket/18


Awesome Jonathan! I want to test it immediately! :)
  • 0
Enrique Keykens

Wildfire Games 3D Artist
Contact me: enrique@wildfiregames.com

#23 Thorfinn the Shallow Minded

Thorfinn the Shallow Minded

    Triplicarius

  • Community Members
  • PipPipPipPip
  • 486 posts

Posted 17 February 2012 - 12:01 PM

By the way, perhaps height and terrain like water and snow would not only affect the speed, but could make the stamina drain more quickly.
  • 0
To win, we must endeavour to be the stronger of the two at the point of impact. Our only hope of this lies in making our own choice of operations, not in waiting passively for whatever the enemy chooses for us."—Schlieffen

#24 Pedro Falcão

Pedro Falcão

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 651 posts

Posted 17 February 2012 - 12:24 PM

I agree with Jonathan and Michael, except for the catapult things. Let's analyze the Onagers of AoK:
- High damage is good.
- Splash damage is good... when not mixed with an incredibly slow projetile speed and a slow recharging time (contrasting to the first AoE, where it really worthed to have a catapult army, even though it worthed too much), making it easy to avoid the incoming missiles (except, of course, with the tech of more accuracy).
- Low range made it an easy target against buildings like castles and towers, as they could easily destroy the poor onagers.
- Very Slow moving speed made it an incredibly easy target for cavalry, even better to micro-manage when you have a huge army trying to defend the catapul, and micro-managing is very bad.

With all these things in mind, players prefered to use trebuchets against buildings (as it had the best range ever) and bombard cannons to splash damage units (they were more accurate, faster fire rate, faster move speed, faster recharging time, faster projectile speed and less area of effect, while almost the same cost). Do we really want that to be repeated here? I think we want to see catapults playing a better role than that. Greeks, by the way, used catapults over some walls (principally against invading ships).
  • 0
Pedro Falcão
Latin: Petrus Falco; Literally means 'Stone Hawk'.
English equivalent: ' Peter ';


Undergraduate Computer Scientist by UFCG
Shotokan Karate Adept, 3rd Kyu (Green Belt) & Muay Thai initiate

#25 Sonarpulse

Sonarpulse

    Sesquiplicarius

  • Community Members
  • PipPip
  • 166 posts

Posted 18 February 2012 - 09:51 PM

Hmm, I don't think you guys should scrap the slow, physics & collisions method of calculating trajectories and damage. Ideally I would make it so players can select that method, or the proposed speedier one before a match.

Also I think that height really should be taken into account for ranged projectiles, and that it wouldn't be too hard either:
Posted Image
  • Imagine all the other parabolas
  • Take the union of them all
  • Make a function that describes the border of the region, f(y)=x. I bet it might be a simple polynomial too, or a hyperbola.
Now when checking if a target in range, there is two more steps: get the height difference between the target and archer, and plug that in. If the function is too slow/complicated, make a table. Using a table also means that drag, etc, can be accounted for with no performance penalty.
Doubt this is any faster, but the shape can be spun around the z axis to create a 3d shape which can be placed over the archer (not rendered of course), and then intersected with the hieghtmap to create a bordered region. Game then checks if unit is within that region.
---------------------------------
On an somewhat unrelated note, I was thinking if a bunch of ranged units are selected and told to attack (maybe just attack ground), the mouse wheel (with a hotkey I guess) could be used to adjust how much spread they should aim for. the area to be targeted could either correspond to the formation of the archers, or simply be a circle or rectangle. That way if the enemy is a swarm of units you can just rain down arrows, but if the enemy is some big powerful unit that moves slowly (the king in), you can have them all target the same spot
  • 0
Posted ImagePosted ImagePosted Image

#26 howlingflute

howlingflute

    Discens

  • Community Members
  • Pip
  • 59 posts

Posted 18 February 2012 - 11:27 PM

  • Imagine all the other parabolas
  • Take the union of them all
  • Make a function that describes the border of the region, f(y)=x. I bet it might be a simple polynomial too, or a hyperbola.


It is indeed a paraboloid. Actually the envelope is desciribed by g^2*r^2=v_0^4-2*g*v_0^2*z where g is earths acceleration, v_0 is the initial speed of the projectile, z is the height, and r is the horizontal distance from the firing position. But I really don't see the need for extremely realistic physics in the game. I do think that projectiles should be stopped by walls. I think quantum states patch is pretty cool. Always wanted some splash damage.

Edited by howlingflute, 18 February 2012 - 11:28 PM.

  • 0

#27 Sonarpulse

Sonarpulse

    Sesquiplicarius

  • Community Members
  • PipPip
  • 166 posts

Posted 19 February 2012 - 08:55 AM

Just a Parabola (looking at in 2D)? Great! Then this should be really easy to implement without much performance penalty. I think it's an important because 1) warfare of 0 a.d.'s era was EXTREMELY tied to elevation: 2) it is a easy, consistent, and the most logical way to give garrisoned archers a bonus.
  • 0
Posted ImagePosted ImagePosted Image

#28 Pedro Falcão

Pedro Falcão

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 651 posts

Posted 19 February 2012 - 05:09 PM

Guys, i'd note that archers' equations are very different, since while the catapults relied on the weight of the projectile and the strenght of the throwing equipment, while archers (long-bowmen above all) relied on the aerodynamic of the arrows and the elasticity of the bow (the bow is what's elastic, the string just has to withstand the pressure applied), and while catapults have a crushing attack, archers have a piercing attack. This means the angles involved in the equations are different: archers rather fired with a max angle of 50°, while catapults fired with a max and a minimum degree that varied with the type of catapult. So, we need to watch out for the degrees of the shots, uh?
  • 0
Pedro Falcão
Latin: Petrus Falco; Literally means 'Stone Hawk'.
English equivalent: ' Peter ';


Undergraduate Computer Scientist by UFCG
Shotokan Karate Adept, 3rd Kyu (Green Belt) & Muay Thai initiate

#29 Sonarpulse

Sonarpulse

    Sesquiplicarius

  • Community Members
  • PipPip
  • 166 posts

Posted 24 February 2012 - 04:09 AM

The parabola paths I mentioned are calculated ignoring air resistance, so you have a valid point about the aerodynamics of an arrow. However those equations are only concerned with the "initial velocity", so differences between bows and catapults do not matter. "Crushing attack" vs "piercing attack" may effect what initial angles are practical, but not the paths of each given initial angle.

(Also I think you can fire straight up and an arrow will still fall arrowhead first due to wind resistance. And if that's true, how would archers fire at people on walls at closer ranges?. For the record: On level ground 45° gives the longest range, so a restriction of no more than 50° wouldn't matter for calculating ranges.)
  • 0
Posted ImagePosted ImagePosted Image