Terrain 2.0

Discussion in 'Planetary Annihilation General Discussion' started by jaykat77, March 2, 2015.

  1. blightedmythos

    blightedmythos Active Member

    Messages:
    405
    Likes Received:
    202
    "Yet". Currently I think Ubers team just sits around drinking beer all day and each department occasional draw straws to see who actually has to get some work done. Whoever is in charge of terrain apparently never gets the short straw.
    Last edited: March 8, 2015
    vackillers likes this.
  2. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    ymmd
  3. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    That's the problem I'm still trying to solve. Currently, I always end up with Voronoi regions, and the degree of the polynomial used defines how steep the borders are. I can have only slight variations in the degree used for the individual vectors, or regions start to bleed across the entire planet. I already can shrink regions in some way, allowing more important regions to float around.

    Originally I had planed to include additional information in the support vectors, namely which regions would be supposed to be connected by ramps and which not, and then toggle interpolation based on this information. That however would have required a different approach, and a lot of postprocessing on the heightmap.

    As it is right now, it should be possible to create a stair like ramp from regions with lower weights, even if the general setting for the map was steep borders. Or just avoid extreme height transitions respectively always use slopes. And when you don't want those height transitions to be purely cosmetic, add CSG to decorate it as a cliff. Or do the opposite, and carve a ramp into the cliff, also using CSG, that's what that stuff is good for.

    Either way, that's not what the height-map is for, units don't care about steep terrain at all.

    Attached is the demonstrator, to be run in your favorite WebGL capable browser. Beware the memory usage, but that's just unavoidable when using that specific WebGL wrapper I used. When implemented in PA, the memory usage would be exactly the same as it is right now.

    PS: Why it was possible to implement that thing so fast? Because it is simple once you find the correct formula. The problem is recognizing that your formula is finished because the parameter space is so huge and you need to find the range of sweet spots.

    PPS: I wouldn't say that the PA team did no good with the planet generator, on the contrary. The CSG tech they included is great! (I think that's the stuff @neutrino has coded.) There is just that purely random noise based frontend which is uncapable of providing satisfying input, and the lack of interfaces to bypass that frontend entirely.

    Attached Files:

    Last edited: March 7, 2015
    guest1, xankar, cdrkf and 2 others like this.
  4. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    woah you made that simplex file in 6 hours?
  5. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    No, the Simplex noise generator was written by someone else, and I'm not the author of THREE.js either (as could be deduced from the comment blocks at the top). I only wrote the index.html myself, the rest is just ready made libraries included to produce a working bundle.
  6. MrTBSC

    MrTBSC Post Master General

    Messages:
    4,857
    Likes Received:
    1,823
    so @exterminans |= wizzard ?
  7. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    only if the next thing he posts is a working hack to get that into PA.

    :p
  8. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    Not today. Out of mana.
    guest1, cdrkf, DalekDan and 4 others like this.
  9. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    damn, somebody get him a potion.

    EDIT:
    [​IMG]
    You now have 300 mana again
    Last edited: March 7, 2015
    guest1, corteks, xankar and 2 others like this.
  10. vackillers

    vackillers Well-Known Member

    Messages:
    838
    Likes Received:
    360
    If this works in game... or can get this to work in-game.... Deffo the sublime wizard of wizardry !!!
    corteks and cdrkf like this.
  11. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    yeah a different system generation server mod would make quite the fete.

    uh also PS. The rotation in the html looks nice, but would someone maybe sorta know how to get the mouse able to rotate it? Haven't gotten into that neck-of-the-woods yet ;p.
  12. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    It doesn't work ingame yet, as it is neither possible to implement it as a "regular" mod (there just is no public API whatsoever yet), nor would it be sufficient to implement it only as a server or only as a client mod as both need to execute the very same algorithms. And I don't feel comfortable with the alternative either, which would be to inject that algorithm as machine code straight into both the server and client executables, not only because that would trigger about every anti virus scanner, but also because that would require users to run my code outside of any sandbox with admin privileges and it would break on every single release.

    No, instead I will continue work on the generation process and hope that Uber comes to reason about either adding an appropiate API, or just adapting the system just straight away. Or it will just end up as a part of a different game, that option exists as well.

    Next step: Ramps and biomes.
    Last edited: March 8, 2015
    guest1, corteks and ace63 like this.
  13. crizmess

    crizmess Well-Known Member

    Messages:
    434
    Likes Received:
    317
    You gained +1 lvl wizardry for commenting your javascript code thoroughly.
  14. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Admit it your magic level just isn't high enough :p
    Well if you can make Uber copy your work that would be magic as well.
    xankar likes this.
  15. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,356
    Yes because the company loves to pay employees for doing no work.

    Okay.
  16. blightedmythos

    blightedmythos Active Member

    Messages:
    405
    Likes Received:
    202
    Hey Google and a lot of tech companies in Silicon Valley are like that. So is valve. :p
  17. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,356
    Yeah but they have a **** ton of money. ;P
  18. cdrkf

    cdrkf Post Master General

    Messages:
    5,721
    Likes Received:
    4,793
    Actually I wouldn't say Google is... They hold the record for making the most money per head of any company in the world. They're seriously efficient with their workforce...
  19. blightedmythos

    blightedmythos Active Member

    Messages:
    405
    Likes Received:
    202
    I think they have money because they are not afraid to innovate and hire brilliant people. They still do weird things like having sleep pods.
  20. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    They are looking at the problem of "we have so much money we dont know what to invest into". A luxury problem. Like playing PA and having too much resources.
    blightedmythos, cdrkf and xankar like this.

Share This Page