Map elevation and path visualisation

Discussion in 'Planetary Annihilation General Discussion' started by godde, October 9, 2012.

  1. godde

    godde Well-Known Member

    Messages:
    1,425
    Likes Received:
    499
    I think that terrain elevation and unit path traversibility is important to visualise in a game that has procedurally generated terrain.

    Textures and shading can propably visualise terrain elevation good enough but if PA is going to have different slope tolerance for vehicles and bots for example I think it could be useful if a player can switch to terrain elevation view and unit traversibility view like on the Spring engine.

    Terrain elevation:
    [​IMG]



    Unit traversability and building placement:
    [​IMG]
    With this mode you can see where the unit can go or where you can place a building.
    Red is terrain where the selected unit can't go or where the building that you wan't to place can't be.
    Green is where the selected unit can go or where the building that you want to place can be placed.

    In Spring the different views can easily be turned on and off by pressing F1 for elevation view(showElevation) or F2 for unit traversibility and buildingplacement view(ShowPathTraversability).
  2. thorneel

    thorneel Member

    Messages:
    367
    Likes Received:
    1
    This would be very useful to devise strategies and should really make it in PA. Now, there is one new option I'd like to see about the unit traversability view.

    Instead of seeing navigable slopes in green and blocked paths in red for the selected unit, this view should show slopes coloured depending on the absolute angle such as, say :
    Green : everything can path it
    Yellow : hovers cannot path it
    Orange : vehicles cannot path it
    Dark red : bots cannot path it
    If there's seabed-crawling amphibious units, there could similarly be light blue, blue, indigo and violet for submarine terrain. And maybe some intermediate colour for water shallow enough for land units to cross it.
    The colours should probably be editable for mods, which may not use the same slope or shallow water tolerances for their land units.

    The interest is, you may want to decide in favour of one or another strategy involving vehicles or bots depending on those slope tolerances. But before building said units, you can't select it to see the second screen (crossable terrain), and the first screen may not be clear enough to determine if a terrain is crossable by a given unit type, particularly for players who aren't experienced with said unit type.
  3. godde

    godde Well-Known Member

    Messages:
    1,425
    Likes Received:
    499
    Good idea thorneel.
  4. Thundertactics

    Thundertactics New Member

    Messages:
    16
    Likes Received:
    0
    This forum really does produce some fantastic suggestions. Agreed, with both of you.
  5. Culverin

    Culverin Post Master General

    Messages:
    1,069
    Likes Received:
    582
    You know, this would very much help with this issue....

    Attached Files:

  6. wolfdogg

    wolfdogg Member

    Messages:
    350
    Likes Received:
    0
    Man, these spambots are really becoming a problem.

    I think this is a great idea. Why is it that the great ideas never have a poll?
  7. thapear

    thapear Member

    Messages:
    446
    Likes Received:
    1
    Because often the only argument one could have against the really good ideas is technical issues. A poll would only result in lots of yes votes and some no votes by people who know the technical challenges.
  8. Causeless

    Causeless Member

    Messages:
    241
    Likes Received:
    1
    Indeed. Polls should only be used for major conflicting ideas, not for:

    Sadly the community doesn't seem to understand this fully. Half the people here bash every poll just because it is one, irregardless of what the poll is, while the other half seem to be fueling this by making crappy thread after crappy thread.
  9. igncom1

    igncom1 Post Master General

    Messages:
    7,961
    Likes Received:
    3,132
    I would love for non-flat terrain to be darker and rockier in appearance, like in TA making visualization of hills easy.

    If you can see hills easy, we can have more of them unlike in Supcom1-2 where you really couldn't see all but the most obvious hills.

    This way, bots and tanks will have a further difference in their uses and the overall strategy of the game.
  10. RealTimeShepherd

    RealTimeShepherd Member

    Messages:
    157
    Likes Received:
    17
    Have you seen the terrain concept video on Twitch TV?

    The cliffs are deliberately dark and hard edged to make the visualisation of passable/impassable super easy...
  11. igncom1

    igncom1 Post Master General

    Messages:
    7,961
    Likes Received:
    3,132
    Indeed, but I am referring to normal hills and the like.

    The slopes look cool coming down the cliffs but what about normal hill bumpiness?

    Sorry if I was not clear.
  12. eukanuba

    eukanuba Well-Known Member

    Messages:
    899
    Likes Received:
    343
    This is a repost from an earlier thread but relevant here:

    Emphasis addded because it would be wonderful feature, if it's at all feasible technically please can we at least have an option? Even if turning it on gives 1fps on today's computers it will still be worth having the option there, because one day there will be a computer that will scoff at such trifling calculations as if it were beads on an abacus.
  13. GoogleFrog

    GoogleFrog Active Member

    Messages:
    676
    Likes Received:
    235
    I knew I must have forgotten something. Spring does the non-circular range ring visualisation too so I don't think it is technically infeasible. As in it does this where applicable:
  14. BulletMagnet

    BulletMagnet Post Master General

    Messages:
    3,263
    Likes Received:
    591
    The terrain-conforming range-ring isn't hard. Mathematically, it's just the intersection between the terrain and an upside down paraboloid (each ballistic trajectory is a parabola, but the entire set of every possible trajectory happens to be one too).

    If it's possible to write a shader that colours only when two meshes intersect, you should have a range ring.

    [EDIT:] Nevermind! That assumes that the gun has full [0, 90] degree firing angle range. What I said only applies to artillery.
  15. eukanuba

    eukanuba Well-Known Member

    Messages:
    899
    Likes Received:
    343
    Not sure if my point came across or not, so I'll clarify. In TA and SupCom the projectile weapons were artificially limited. On top of a hill your turret, PD or artillery should have a longer range simply because the ground is further away. In both games you could accidentally hit something outside the range ring, but only if it missed its "allowed" target. I propose a system where the gun can fire to its natural limit, and the range ring accurately reflects that.

    To calculate an accurate range ring for a fixed gun would be a one-time calculation, so probably doable. But for any mobile units the game would have to calculate every ballistic weapon, in a 360° radius, every single game cycle. This would mean that what would be a big, taxing battle for ballistics purposes in SupCom would still be far less calculations than the standby overhead if true range rings were calculated.

    Now I'm no programmer so hopefully there's a cheeky shortcut to achieving the same end, but even if there's not then I would hope that it's included as a feature, even if it'll be five years before a home PC can run it properly.
  16. thorneel

    thorneel Member

    Messages:
    367
    Likes Received:
    1
    To keep things simple, we could have projectiles with limited duration, so they don't go out of range like in those SupCom missed shots. It would simplify calculations. On the other hand, having projectile-based weapons having further range on higher ground could be tactically interesting. The problem is, the further you shoot, the less precise you are. What good is a tank if it can't hit its target?
    I'd go for the simple solution and have limited duration projectiles, though. Also, it allows us to have big guns like artillery to actually target those giant flying fortresses just above them without having to manually target a patch of dirt some km away, without the risk than a miss will wreck a nearby base - the projectile simply disappear before hitting the ground, if it missed its target.
  17. BulletMagnet

    BulletMagnet Post Master General

    Messages:
    3,263
    Likes Received:
    591
    There is a shortcut. Geometry.

    [​IMG]

    The red area is what can be hit by a tank that can shoot from 30 degrees up to 45 degrees. The green area is what can be hit by artillery that can shoot from an angle of 45 degrees up to 60 degrees.

    The low-arc stuff is fairly easy to conceptualise; just get a modeller to knock up a mesh of a funky paraboloid shape (picture the letter w, upside down, and spun around in 3D) and have some code to stretch it to fit the appropriate gun.

    The high-arc is more difficult. It's actually a parabola for part of it, then something else. By something else, it might be another parabola.

    [PS:] If you can shoot all the way up to 90 degrees, then you have a super simple paraboloid.

    Actually, I think that would complicate calculations. If you don't have to consider time, there's a standard ballistic equation you plug your target into, and it'll tell you a simple yes/no if it's possible to hit.

    If you have to consider time too, then you have to do the first, then later check how long that will take.

    Fifty tanks, shooting at another fifty tanks would be reasonably effective. When you whittle them down to only a few left, then yes you're quite correct that accuracy would be a problem.

    You don't need to manually target the ground either. If the artillery can put a projectile through the point in space where the aircraft is - it'll try to do it.

    Imagine that instead of a flying fortress, there's a sharp spike in the terrain, and on that spike sits an enemy tank. Will your artillery be able to compute an angle to shoot the tank? If it can, then you can replace the tank and it'll still work.
  18. garatgh

    garatgh Active Member

    Messages:
    805
    Likes Received:
    34
    I love this idea, i hope they can add it easily.
  19. BulletMagnet

    BulletMagnet Post Master General

    Messages:
    3,263
    Likes Received:
    591
    I've been thinking about paraboloids some more. They're not a silver bullet solution as I first hoped.

    They're great for visualising where ballistics certainly can't hit.

    Don't rely on them for information where they certainly will. That's a little more difficult.
  20. eukanuba

    eukanuba Well-Known Member

    Messages:
    899
    Likes Received:
    343

    On the graph you posted above, the x-axis is analogous to a flat battlefield. If a unit is atop a cliff, then the parabola would extend into the y-minus area. No idea how easy that would be to code but that's the basic idea.

    The reason that I'm so keen on this working realistically is that putting turrets and artillery on the edge of cliffs feels like a natural way to improve your defences. But in TA and Supcom, it doesn't quite work like that. I was playing a game of Forged Alliance the other day where an opponent had a multi-shielded firebase directly under a big cliff. I used transports to get onto the cliff, put a T2 artillery on the edge of the cliff, and instead of being remotely useful it was shot to bits in no time by some standard units at the BOTTOM of the cliff. I can upload the replay later if you're interested in seeing it, but logically that artillery should have been a massive pain in the arse for my opponent.

Share This Page