Planet editor: planets have a height map so ...

Discussion in 'Planetary Annihilation General Discussion' started by plannihilator, July 18, 2013.

  1. plannihilator

    plannihilator Member

    Messages:
    55
    Likes Received:
    2
    Nice to see planets with a non-flat height map.

    Question to Uber: does a hill / valley influence gameplay in any way ?
    (e.g. unit sight range increase or decreased,
    projectile collisions with ground,
    firing range increased from hills...)

    I think the physics engine makes it true for projectile collisions and firing range,
    but is it the case for unit sight range?
  2. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    I think it results as a natural factor, since a projectile can travel further going downhill then uphill given the same angle.
    [​IMG]
  3. nanolathe

    nanolathe Post Master General

    Messages:
    3,839
    Likes Received:
    1,887
    But does the unit realise that its projectile can travel further when it's on top of a hill?
  4. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    ah uuhhh.... I'll shut up now.
  5. BulletMagnet

    BulletMagnet Post Master General

    Messages:
    3,263
    Likes Received:
    591
    It's really not hard. There's an equation you can derive that gives real results when a solution is found, and complex results when no solution is found.

    All you have to do is test targets... which is where it's going to get messy. How do you sensibly choose which targets to test first? On a planet full of 9,001 enemy tanks, bots, and structures, randomly picking isn't going to be ideal.
  6. iron420

    iron420 Well-Known Member

    Messages:
    807
    Likes Received:
    321
    Nope! This requires calculations which are impossible for the computer to preform </sarcasm>
  7. nanolathe

    nanolathe Post Master General

    Messages:
    3,839
    Likes Received:
    1,887
    Bested by your rapier wit. How do you do it iron420?

    I wish I was as cool as you.

    ---

    Bullet, you're hitting the nail on the head as far as I'm aware. Sorian said something during Pre-Alpha about units performing calculations against every single potential target at all times to test whether they're in range or not. A simple calculation might get messy if the equation it's asked to figure out becomes several factors more complex.
  8. iron420

    iron420 Well-Known Member

    Messages:
    807
    Likes Received:
    321
    The quality of answers you get should always be directly proportional to the quality of questions asked IMO. Good thing Uber doesn't feel the same way I guess, or those live streams would have been awful!

    As for that bit you mention about Sorain, that seems like a really brute force way to do it to me. Making calculations for everyone every time no matter what. Something more dynamic and elegant would be better optimized. Maybe have the unit fire anyway first, and if the projectile doesn't hit have the unit calculate why and move accordingly to try again or something?
  9. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    guys ...guys
    [​IMG]
  10. nanolathe

    nanolathe Post Master General

    Messages:
    3,839
    Likes Received:
    1,887
    If I'd have had control over the quality of questions answered in the Livestream I wouldn't have even bothered with the ones asking "Will there be units in the game".

    You notice that in the newer livestream they've stopped relying on the Chat so much, and come prepared with questions on paper?

    Science only knows why they might have made that change.
    :roll:

    ---

    tatsujb, that is not how you use Cat Image macros to defuse a situation. You're doing it wrong! :lol:

    Save us Colonel!
    Last edited: July 18, 2013
  11. iron420

    iron420 Well-Known Member

    Messages:
    807
    Likes Received:
    321
    I liked the gif actually, gave me a good chuckle!
  12. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    ^^' I think it's fitting, I mean it blows me away somethimes some of the acts in the animal kingdom : here we see dogs breaking up a fight between two cats.... :eek: unbearably cute and unlike anything I'd ever expect to see.

    Why should they care? why not let them have at it, let them bite to the bone, even place bets?

    No as well as being a loyal friend, dogs are good-hearted and don't like fighting.
  13. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    Would love to see that equation.

    To my knowledge there is no equation we can use in our case because gravity is not a constant direction as the projectile travels across the planet. Instead we rely on an quick iterative test to check if a target can be hit.
  14. thygrrr

    thygrrr Member

    Messages:
    252
    Likes Received:
    1
    The "complex/real" result type equation only works for uniform gravity and no air resistance.

    If you have an actual "simulation", it's a bunch of differential equations but these aren't impossible to solve, even with nonuniform gravity (it's just another function instead of a constant). The problem is that you'd still need to iteratively check for collisions with terrain along the firing arc, so not much is gained. But then, my maths sucks, maybe that intersection test is really easy.
  15. nanolathe

    nanolathe Post Master General

    Messages:
    3,839
    Likes Received:
    1,887
    Thanks Sorian!
    :)
  16. BulletMagnet

    BulletMagnet Post Master General

    Messages:
    3,263
    Likes Received:
    591
    Crap. Forgot about planets.

    I have no idea if there's a similar equation for ellipses.

    [EDIT:] What can we assume about gravity here? Fixed magnitude, doesn't vary with altitude?
  17. infuscoletum

    infuscoletum Active Member

    Messages:
    606
    Likes Received:
    37
    [​IMG]?
  18. BulletMagnet

    BulletMagnet Post Master General

    Messages:
    3,263
    Likes Received:
    591
    Thanks, but that doesn't help at all. We don't know how closely PA's modelling follows reality.

    And besides, that's for n-body simulations. I highly doubt PA is doing those.
  19. mushroomars

    mushroomars Well-Known Member

    Messages:
    1,655
    Likes Received:
    319
    The issue is that units are not currently limited by the arc of their fire. You'll notice that the tanks, and sometimes the D-Gun can overshoot their target when they overkill. These shots will continue onward and do full damage.
  20. kryovow

    kryovow Well-Known Member

    Messages:
    1,112
    Likes Received:
    240
    so its really, the shot is simulated before its actually shot, and then tested if it can hit, and then the unit will shoot it :D (or not)?

Share This Page