Air collisions

Discussion in 'Planetary Annihilation General Discussion' started by izob, April 27, 2013.

  1. bmb

    bmb Well-Known Member

    Messages:
    1,497
    Likes Received:
    219
    But clipping is the issue, you're not making a compromise with anything, you're just introducing an issue. Don't act the middle ground diplomat when what you really are doing is having an opinion. That pisses me off.

    Why other games don't do it is frankly none of our concern, maybe they just don't care. But as far as I understand the system proposed for PA there is no reason it shouldn't be easy.

    Air is not a 3D space here, it's a 2D space with verticality. You are imagining complexity that does not exist and using it to justify a compromise looking for a problem.
  2. KNight

    KNight Post Master General

    Messages:
    7,681
    Likes Received:
    3,268
    I'm not saying that clipping is the solution, I'm saying that as far as 'solutions' go, clipping is the best compromise. Units individually work as you'd expect it leads to clipping, but that's something we see in practically every RTS game so players tend to be a lot more forgiving about it even to the point of not actively noticing it. On the other hand a system to avoid clipping could result in situations where the player gets jarred and questions it, like what happens when 200 air units attack a single target from the same general direction? is there enough verticality to compensate for it? do you force arbitrary behavior onto the units to better conform to the system?

    Also you are correct, it might be simpler than I imagine, but unless one of us is a programmer fluent in these kinds of issues, it's just as possible that you can be wrong as well. The fact no one seems to have done it yet, even on a smaller scale might just be circumstantial, but you don't have any hard facts to back your position up either, you're just saying is simple, when you should probably be saying that if it is simple it should be done, to which I already agreed with.

    There is a lot of complexity that would need to be considered for such a system, and even if it's all considering the result might not be as ideal as originally hoped. I think this is the root reason of why we haven't seen it yet, especially now in a world of tight fisted publishers and investors the idea of paying to try something that might not work out is hard to get approved when the currently available options have proven to work fine and even be widely accepted.

    I'd love to see it, but I don't know if Uber is in the right position right now to try it, on the other hand this is the ideal time to try it.

    I guess in the end I'm just trying to point out is that it's a lot more complex than many give it credit for. This isn't just a case of 'not doing it like that' like it was some toggle that was always available but never used for whatever reason.

    Mike
  3. smallcpu

    smallcpu Active Member

    Messages:
    744
    Likes Received:
    72
    Ah... 3d =/= 2d with a height axe.

    You're sure you've thought that argument through? :mrgreen:

    Bmb, just making assertions without any arguments is a waste of time. And bringing your bad mood to the forum isn't conductive to good discussions either. ;)

    Air units are especially bad to do 3d movement calculations with collision because of their high movement speed. Their high speed forces you to take a large amount of surrounding units into calculation. Just saying, flow fields solves this doesn't work. The usual flow fields that exist currently use pathing on a flat map with different cost for height differences for example. Pathing in a 3d space would need a 3d flow field with an additional dimension for the cost vector. Have fun debugging any 4d calculations. (You can't do that graphically anymore as they do with the current land based flow field for example...)

    Also, the definition of a compromise is in choosing a non optimal solution in light of irreconcilable issues, like, making planes fly in a way that fits good gameplay and easy solutions. (Ubers ressources don't grow on trees nor can the be fabricated with makers sadly. :( )

    A compromise here is to do planes in a way where they clip through each other which is a solution that can be programmed adequately easy compared to more sophisticated ones.

    Edit: knight wrote a better answer then I did.
  4. syox

    syox Member

    Messages:
    859
    Likes Received:
    3
    There are several problems here.
    • Around spheres 3-dimensional cost or flow fields do not only get deformed along the tangential plane but also perpendicular.
    • while tanks bots and ships are relatively slow, planes are fast and have huge turning radii, due no friction on ground,
    • this results in a bigger forecast you have to do with the costfields, or more iteration steps per time, which translates to more computing power needed
    • a 1-dimensional-value-field around a sphere could be made easy visible (colors or heights) which eases up the bugfix process, never underestimate imagination :).
  5. Moranic

    Moranic Member

    Messages:
    111
    Likes Received:
    3
    How about this: Everytime you see a big air battle in games like supcom from the side they're just flying pancakes shooting each other. How about when a plane notices another plane on the same coordinates as it is on it randomly determines if it stays on the same height, if it goes a bit lower or a bit higher. The clipping will stay but it will be less as they can fly in 3 different height levels. I guess this idea needs lots of refining and I don't know if it can be done engine-wise, but it's better than letting them fly around in a full 3D space. My idea involves three 2D dimensions.

    @mike, just letting them clip is not a compromise, that's ignoring the problem. The clipping IS the problem so just letting them clip is not a solution, nor a compromise.
  6. comham

    comham Active Member

    Messages:
    651
    Likes Received:
    123
    All air units in supcom and TA were VTOL, so having them slow down mid air during the start of a swarm flight, to sort out formations, that's fine with me. Plus there's allowing aircraft to fly at slightly different heights.

    Large swarms of aircraft becoming unmanagable due to pathfinding is a design goal of mid-air collisions. Similarly large swarms of ground vehicles should be unmanagable.

    As for 200 air units in formation targeting one unit, gravity bombers will have an issue, but ground attack missiles can just be fired at an angle, and gunships can form a wall across z-levels.

    EDIT: Actually, with gravity bombers, didn't TA do a thing where it split up the bomber swarm into two streams which attacked the target from two directions? Shouldn't be too hard to do that with n number of streams. Different aircraft, different pathfinding strategy.
  7. Teod

    Teod Well-Known Member

    Messages:
    483
    Likes Received:
    268
    Wait.
    Isn't the entire purpose of flowfield-pathfinding, advanced unit AI and other cool technical stuff of this game is to make large swarms of units - ground, naval AND air - easily managable?

    The design goal of mid-air collisions is to avoid large number of aircraft taking space of one unit, while still having damage and health of large number. And flowfields can help to avoid it, while still keeping control of this force simple.
  8. comham

    comham Active Member

    Messages:
    651
    Likes Received:
    123
    Yeah, sorry, I could have phrased that better.
  9. bmb

    bmb Well-Known Member

    Messages:
    1,497
    Likes Received:
    219
    They're not doing full 3D on anything. Submarines, orbital, air are all 2D navigation layers in the engine just like in TA and supcom. They explicitly stated this in the flowfield stream.
  10. bmb

    bmb Well-Known Member

    Messages:
    1,497
    Likes Received:
    219
    Don't just harp on and on and go in circles. You've made the exact same post 5 times now. What is this complexity exactly? What is the issue? What are we compromising for?

    They have said pretty much exactly what they are doing with the air layer. They're even using layers to begin with just like TA and supcom. I don't agree with that since I think layers have certain issues. But it does make air simple to deal with. What do you imagine is going on here?

    If you order 200 units to go to the same spot it should be self evident that they cannot all fit in that one spot. I'm not sure why that is so hard to understand. If you think that 200 units not being able to occupy the exact same space as each other is an issue then I don't know what to say.
  11. KNight

    KNight Post Master General

    Messages:
    7,681
    Likes Received:
    3,268
    Congratulations! You didn't read my posts! If you had you'd know that I never said it was a solution! It's a compromise! Clipping is far from the only issue possible with air units, it' better to say that based on the SupCom implementation it is the only remaining issue.

    Clipping is A problem, along with with a whole slew of other things. Allowing units to Clip is a compromise that allows air units to fly in a believable manner which is important for immersion and it scales perfectly, the system works just as good whether it's 1 air unit, or a 1,000. As far as Compromises go it's pretty darn good.

    Also worth noting that altering height has some side effects no one has mentioned yet because of the focus on pathing you all seem to have, but Air units closer to the ground are going to be easier to hit, due to the less distance between the ground and the unit itself AND Air units higher up will be harder to hit as well. ALSO because we're dealing with spheres now that also means units lower will go 'faster' and higher units will go 'slower'. Add to that that you guys think 3 separate z-layers are enough when dealing with potentially hundreds of units at a time and the possibility that more z-layers will be required, especially when you consider that you have to concern yourself not only with your own units, but also the ENEMY units as well you can get an absurd amount of verticality involved, and due to the spherical nature of maps I don't think this will work out very well. In SupCom where you essentially have infinity verticality and a 'flat' 2D view of the battlefield(basically square maps as opposed to spheres) you can somewhat get away with it, but on a sphere you can't keep stacking units or you'll end up in orbit eventually.

    Add to that potential issues with weapons fire(depending on the status of friendly fire) and you get quite the quadmire.

    Collision is a good compromise because it means/meant that the Devs could get exactly the flight dynamics they needed and knew that they would work reliably, so they could be easily planned for on the bases of one unit, and because they don't clip the system scales perfectly because all air units act alike regardless of other units in thier proximity.

    To get rid of clipping would require a complex system no matter what and a more complex system is more likely to break and a lot harder to understand from a player's prospective. Is it possible to do? Of course, anything is possible given time, is it the right choice to push for it as things are? Maybe, maybe not, from a realism perspective yes it should be done, from a gameplay perspective thought, I think the clipping compromise is a sure bet, while trying to get rid of clipping is not.

    Okay, imagine there is a big artillery piece you wan to destroy, you have 200 in one location and give them a direct, singular attack order on that Artillery, what happens? The Artillery piece occupies a singular location while your bombers cannot. So how does the system accommodate for that, likely by forcing an arbitrary such as stretching out so they all takes the same path like a train(and making their large numbers worthless against AA) or maybe by fanning them out across a larger arc?

    There is cause and effect it's not like trying to get rid of clipping will mean they work the same as before, it's not interchangable like that and I don't think enough people are looking at the consequences of the change objectively, they see the consequence of "Units won't clip anymore" and leave it at that but you can't be that naive about it when the gameplay is so heavily dependent on that kind of thing in a simulation based engine.

    Believe it or not, I'm not trying convince anyone that allowing clipping is the best solution, or that we shouldn't look into possible solutions, I'm just trying to get people to actually think it through, because I'm not seeing much reasoning beyond "getting rid of clipping solves clipping thus it should be done" without any thought about why units are allowed to clip in the first place or what impacts that change might have on the rest of the game.

    Everything is interconnected, and that goes quadruple in a simulation based game like PA, SupCom and TA, even small weapon adjustments can have large impacts of gameplay, and making fundamental changes to something like pathfinding has even farther reaching effects.

    Mike
    Last edited: May 1, 2013
  12. bmb

    bmb Well-Known Member

    Messages:
    1,497
    Likes Received:
    219
    Why would you need 200 bombers to take down one piece of artillery?

    Your situation is not a desirable outcome. You sound like someone defending their OP tactic thats about to be nerfed.

    Units not being able to go in the same space is a desirable limitation that not only satisfies the simulation but also discourages sniping like that and encourages a more even, cooler looking battle.

    And I really don't think you understand, there is no fundamental difference between how collision on the ground is handled from how collision in the air is handled. There's likely some sort of bounding box for projectile and bumping, and they both are going to use flow fields for pathfinding. Performance and effort wise they are the same. What does take effort is making it different in the ways that matter, such as being able to transition between the two, flight dynamics and whatnot.
    And potentially being able to avoid by going either up or down instead of sideways.
  13. comham

    comham Active Member

    Messages:
    651
    Likes Received:
    123
    The problem is not immersion, the problem is clipped blobs of units with the combined health and damage of the sum of its parts. Let air units collide and you don't have that issue, only the issue of some planes flying slightly slower than max speed for the short time it takes them to path to a free piece of airspace.
  14. nlspeed911

    nlspeed911 Member

    Messages:
    482
    Likes Received:
    18
    If Bombers were a normal, ranged unit, then yes, clipping should exist. As it is, Bombers need to pass over targets, and they have a large turn radius. I don't think clipping should exist for air units.

    Just make anti-air weapons fire in a logical way (no more threehundred missiles at one fighter), and / or add a tiny splash radius to anti-air weaponry. And perhaps have various formations for groups of air units that you could choose (including none, which would eventualy result in clipping).
  15. smallcpu

    smallcpu Active Member

    Messages:
    744
    Likes Received:
    72
    Wooosh.

    That's the sound of the point of knight's post going over bmb's head.

    Seriously, reread what he posts please. Because currently you're obviously not arguing in good faith.


    The whole issue of making airplanes work like ground stuff in regards to their pathfinding and movement is: If you do that, they won't feel like planes anymore.

    It maybe works with gunships, but not with planes. Planes are special in that they don't fly back, can't strafe, are fast etc. A ground unit doesn't behave at all as an air plane. You can have ground units being in the way of other ground units without it looking absolutely silly and bugged, you can't have the same with air planes. They can't just stop for a second and then continue to fly just because some other plane crossed its path.

    He gave a specific example. Say how you would handle it. 200 planes, sent to a specific location. Its something that will happen in game (it happens in SupCom and can happen in old TA even).

    Do they just bump into each other like rubber balls? (That's what they'd do if they'd behave like ground units. Just give a bunch of ground units fast speed, slow turn rate and no moving back and see how well that mass movement suddenly catastrophically fails.)

    Should they spread out so much that they don't bother each other? Meaning you couldn't mass air anywhere anymore. May be desirable but it would alter air combat massively and need an extreme change in air balance compared to TA or SupCom. That way 200 air units would probably cover half of a small map in TA, just to avoid crashing into each other.

    You can't just say, no clipping and expect the whole flying unit simulation to suddenly still work.
  16. syox

    syox Member

    Messages:
    859
    Likes Received:
    3
    Well i got a idea that maybe could help in this case. Got to do some thinking.
  17. bmb

    bmb Well-Known Member

    Messages:
    1,497
    Likes Received:
    219
    perhaps it was the sound of my point going over your head.
  18. syox

    syox Member

    Messages:
    859
    Likes Received:
    3
    Ok here i go.

    To achieve a realistic behavior, the cost and flowfields could be used. To address the issues of high seed aircrafts you can create 2td or 3td costfields.
    t hereby stands for time and is another dimension, so 2td is actual 3d and 3td 4d.

    for the distribution over time of cost one unit creates i would suggest something like this:
    [​IMG]

    Its something of ( (const_1 / (d^2 + const_2)) -const_3) where d does stand for difference in place and time as in d=sqrt((x0-x)^2+(y0-y^2+(t0-t)^2)

    x0,y0,t0 is the actual coordinates x0,y0 of a object at a given time t0,

    With unpassable(255) at top.

    So units have the chance of avoiding eachother in place or time.

    You also could to this for a 3dimensional corridor of let say altitudes from 100 to 10000 ft and include time.

    But RAM wise i would try to keep it as low as possible. Also maybe only addressing 8 or 16 or 32 steps into the future can help to stay small.

    With this you calulate the movement of one plain.
    paint its movement graph into this 2td matrix, and based an this also the costs it generates
    this adds up for the integrated costfield for the next plain and so on.

    With this planes not only cant evade left or right but also back in time (slow down let them arrive later) and forward in time(speed up let them arrive earlier). Using 3d space also up and down.

    Problem of this solution, You need to add up costs after every plane again and therefore change the flowfield. It may computing costwise be better to not even calculate it. So only calculate the integrated cost field, because you only need to add the 2td costs there.

    Another problem: Path may differ based on which plane you start.

    A proper solution here could be just to add a future layer every iteration. And to delete the last past layer of cost fields. Though if changes happen you need to calculate from start.

    This system may also help in collision avoidance on land.

    Adding another explanation:

    Code:
    x marks the path of a unit:
    
    
    00000000
    xxx00000
    00xxx000
    0000xx00
    00000xx0
    000000x0
    000000xx
    
    assuming it i moves with a speed of one and the following cost distribution 0124210
    we have those cost fields:
    
    t=0
    21000000
    42100000
    21xxx000
    1000xx00
    00000xx0
    000000x0
    000000xx
    
    t=1
    12100000
    24210000
    121xx000
    0100xx00
    00000xx0
    000000x0
    000000xx
    
    t=2
    01210000
    12421000
    0121x000
    0010xx00
    00000xx0
    000000x0
    000000xx
    
    t=3
    00100000
    x1210000
    12421000
    0121xx00
    00100xx0
    000000x0
    000000xx
    
    and so on.
    Optimally it is coherent in time.

    Attached Files:

  19. bmb

    bmb Well-Known Member

    Messages:
    1,497
    Likes Received:
    219
    I don't really know how units keep formation and avoid each other on land but I imagine they use the cost field already?
  20. syox

    syox Member

    Messages:
    859
    Likes Received:
    3
    Propably, but I don't know if they use time also as dimension. So calculating some steps into the future.

Share This Page