1. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    Forget about "mountains". You can't tell apart mountains from edges or just normal terrain, there is no "plain terrain" which you could use as reference. Calculating LoS on a 3D mesh costs as much performance as ray-tracing (because thats what you need to do) and i don't see how this could be simplified.

    Besides: LoS would mean even more trouble, since maps would always have to be constructed with the effects of LoS in mind as edges in the terrain or complex shapes would always brake LoS, even if not intended.
  2. shinseitom

    shinseitom Member

    Messages:
    57
    Likes Received:
    0
    That being said, I wonder how the new Company of Heroes is doing their LoS simulation? Supposedly, even a swaying tree in the wind is supposed to change what you can see, almost to ludicrous levels.

    I realize that it's a much different game from PA, but I do wonder what kind of trickery they use to get a system like that running in real-time.
  3. doctorzuber

    doctorzuber New Member

    Messages:
    252
    Likes Received:
    0
    You know, I hadn't actually considered that, but thinking about it I think I like the idea. From a design standpoint it should be fairly easy to just block radar by obstructions since this basically duplicates fog of war behavior they will have to have anyhow, just at greater distances.

    This of course should only apply to ground based radar, orbital spy satellites are unaffected by such nonsense, which is much of what makes them so valuable. I'm sure some balancing will be needed there to make sure spy satellites aren't too cheap and easy allowing players to skip ground radar entirely.
  4. thefirstfish

    thefirstfish New Member

    Messages:
    296
    Likes Received:
    0
    I don't see why spherical LOS/radar wouldn't work on any form of topology?

    To be clear: The radar distance should be projected from the unit as a sphere.

    I don't think it would be a good idea to have terrain block radar though simply due to the horizon effect.
  5. doctorzuber

    doctorzuber New Member

    Messages:
    252
    Likes Received:
    0
    Radar scattering because of mountains is a very real thing however. Simple hard truth is that ground based radar simply cannot see over obstructions. That's why we have GPS and satellites in our world.

    And like I said, it's not like this even costs them anything in development time. The exact same algorithms they have to use to make the fog of war behave properly can be applied directly to the radar circles as well. It's like a free feature really.
  6. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    Who says fog of war would use LoS?
    There was no LoS in SupCom, FA or SupCom 2, for various reasons. And it was good.

    So don't consider LoS a given feature, chances are, that even visual will just use plain spheres (distance check). It's by far the cheapest method (its exactly 9 floating point operations, compared to several thousands when using LoS) and cheap calculations are a prerequisite when we talk about large scale battles.

    How they did it in Company of Heros? With very few units and a devasting amount of calculation power. Calculating LoS for a mere 100 units on a planar gamefield is totaly different from doing the same for 10.000 units on complex shaped bodies. One is a rather simpel calculation on a 2D picture (even moving trees are nothing but just an animated pattern painted onto the heightmap), the other one requires full scale raytracing over a complex scene.
    You see, we are not only talking about 100x the units, but also about calculations which are way more complex. You wouldn't be able to possibly do that in realtime for more then 100-200 units at the same time on an average, modern desktop PC.
  7. thefirstfish

    thefirstfish New Member

    Messages:
    296
    Likes Received:
    0
    We could assume that the machines of the far future have invented some detection system based on neutrinos, perhaps?

    This sort, not the awesome game developer type.

    http://en.wikipedia.org/wiki/Neutrino

    If it's easy to implement terrain blocking LOS/radar on irregular spheres without the horizon vastly shortening either then fair enough, but it doesn't sound like it would be.
  8. zachb

    zachb Member

    Messages:
    256
    Likes Received:
    3
    Well don't do full on ray tracing.

    If you have ever played one of the pen and paper war games (look at my forum picture) People just take a shoe lace or something and stretch it between two units and look at what tile is in it's path.

    I imagine you'd have "mountain tiles" and "plains tiles". Then you just draw one line between two points and see if it passes a mountain tile. And since you are drawing on a simple 2d grid with big cells (so you don't have to traverse very many points) the actual "ray tracing" is a lot easier.

    Granted that's the simplest, dumbest way to do it, but it's fast.

    But then again it's not Company Of Heroes 2 where you have to draw a line in 3d space and see if it crosses a leaf or something.
  9. doctorzuber

    doctorzuber New Member

    Messages:
    252
    Likes Received:
    0
    I agree.

    For gameplay purposes, it is basically a 2d world. The 3d elements are pretty much purely cosmetic. There is no reason to unnecessarily complicate the math here. Simple 2d math will be sufficient for LOS and radar mapping.
  10. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    If it only was 2D or could be simplified to that...

    Last thing Uber said, was that all celestial bodies are going to be real 3D models to enable even more complex objects like ring worlds or alike. You can project a map on that model which is then used for pathfinding, but you can't use the same map for determining line of sight since their can and will be many cases where LoS is non-existant while a "straight" path exists (once around the globe) and other way around (imagine the inside of a ring world, you can see the opposite side, even if the path is blocked).

    So you are stuck with doing LoS tests in 3D with concave bodys. "Real" line of sight could be calculated quite efficient using octtrees, but then again people asked for "over the horizon radar" which needs to be calculated as some type of refraction, e.g. requiring multiple samples for the possible ways as their isn't just one direction around the obstacle.
  11. shinseitom

    shinseitom Member

    Messages:
    57
    Likes Received:
    0
    What if it was real LOS with octrees like you said, but the radar buildings were just really tall? Almost cartoony tall? Sorta like the scale of all the rest of the units? Or maybe their will be a relatively cheap radar satellite that requires a geosynched land station so that you can't move the satellite at will? Coupled with the normally fairly small planets (in general, the units appear be huge and the planets small, at least according to the visualization video) should allow for decent radar, surely? It would have at least some 'over the horizon' view, depending on the height of the radar and curvature of the planet.

    Of course, there's no way to view more than 50% of the globe with one satellite, so if somebody wanted that they'd be out of luck I guess. Higher tier radar satellite ring?

    Using that real LOS, would radar sight be blocked by any terrain in the way in an efficient manner?
  12. Causeless

    Causeless Member

    Messages:
    241
    Likes Received:
    1
    Using 3 geo-stationary sattellites would be pretty cool for radar, though you'd need a land based radar or another few satellites if you wanted to cover the poles.
  13. thorneel

    thorneel Member

    Messages:
    367
    Likes Received:
    1
    Never put neutrino-based gear in SF.
    The two exceptions are long-range detection of giant nuclear reactions, and maybe long-range stealth communication. And that's when you want to do hard-SF, which means that your neutrino detectors will be massive and probably immobile.
    If not, just stay away from neutrinos. There is only ridicule to be found there.

    How taxing is LoS anyway? Spring seems to do fine with it, and it has not the most taxing games out there.
  14. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    Spring uses a 2D gamefield + heightmap only. That makes LoS calculation quite cheap.
  15. thefirstfish

    thefirstfish New Member

    Messages:
    296
    Likes Received:
    0
    These are giant robots. From the extremely far future. They may well have developed a sensing system able to detect subtle modifications caused to travelling cosmic neutrinos as they pass through objects such as other giant robots. Or neutrinos emitted by the power systems of the robots, which might be based on principles of nuclear fission or fusion. They may have managed to do that in a reasonably compact package (although radar towers from TA would be pretty huge in real-world size).

    This isn't actually very far out compared to some of the things that people readily accept about the TA/PA Universe, for example plasma weapons or star wars style lasers.

    If it's a major problem though due to physics that I'm not aware of (I'm a biologist, not a physicist), then the spherical detection range could be justified by the robots using using a detection system based on a different subatomic particle that we haven't yet identified. Or it could just not be justified at all, like more or less everything else in the TA/PA universe.
  16. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    Lets just say they use long range petahertz scanners. Contrary to radar, this radiation passes through most material and can't be blocked easily, at least not by anything below the density of a white dwarf or black hole.

    Visual "range" is just limited by the actual resolution of the sensor, if a small unit is to far away, a low quality sensor would be unable to identify even the shape of the object or telling it apart from background noise.

    There we got the explanation for spherical radar / visual (even through the ground) as well as for the other big topic, large units being more (earlier) visible to "radar" than smaller ones.
  17. thefirstfish

    thefirstfish New Member

    Messages:
    296
    Likes Received:
    0
    Sounds good to me :)
  18. thorneel

    thorneel Member

    Messages:
    367
    Likes Received:
    1
    Yeah... no. Believe me, neutrinos don't work that way.

    Known nuclear reactions emit neutrinos indeed, but then many units would have stealth, like solar panels, wind generators and probably many low-consumption units that could do without their own reactor. And I'd expect them to come up with high-energy reactions that wouldn't produce neutrinos. And supergenerators would be visible from further away than other units...

    Maybe, but that would be very hard to do. I wouldn't be surprised if this kind of field detector was on the same tech level than black hole launchers, actually.

    Though plasma weapons are kind of ridiculous when you stop and think about it, it's in the same way than giant mecha : absurdly inefficient compared to what you could do instead, but physics don't (quite) say no (only economics). And some people find it cool. (Though more people find mecha cool than plasma weapons).

    If we have to explain it, this kind of approach is generally better. If you try to come up with a realistic explanation, some people will find the problems with it and their suspension of disbelief will be broken. Going for full magitech, at least, no-one will tell you that your undiscovered particle don't work like that. And you fight with giant robots anyway, so people are already fine with magitech.
    But the better way is still probably :

    People actually don't need explanations. It worked well with other games, it would work well with this one. If you don't explain it, people won't ask you how it works and you won't break anyone's suspension of disbelief. By far, this is the best approach IMO.

    Tl;dr : Don't explain what you don't need to.
  19. thefirstfish

    thefirstfish New Member

    Messages:
    296
    Likes Received:
    0
    Good points. I agree with this.

    Anyway, spherical detection unbroken by terrain would be one option to simplify radar/LOS.

    I'd be cautious about radar/LOS that is broken by mountains but not by the curvature of a planetary body.
  20. shinseitom

    shinseitom Member

    Messages:
    57
    Likes Received:
    0
    What if the sphere was seen as something like a heightmap? Specifically, distance from center of planet? And moving one pixel over on a heightmap = moving some arclength away from the radar station? How hard is that to calculate? Is that getting into way too much?

    What if a simple sphere of LOS was used for units, but this was used for radar stations? A hybrid approach?

Share This Page