I'm building a template for SEAMLESS TERRAIN GENERATION, check it out!

0 favourites
  • 3 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • Hi!

    Recently I've been very interested in the idea of a seamless map generated by noise, but I got really frustrated that (afaik) C3 doesn't have something like a toggle to generate a seamless noise...

    So I started developing a Latitude/Longitude to Cartesian, so we could walk on the surface of a sphere, but still showing as a plane.

    First things first, it's working, and if you want to use it, feel free to.

    But the catch is, I've always been lousy with maths, and honestly I got it working fine, but I don't know exactly how it's working, because while researching the topic I faced several different formulas of translation from lat/lon -> cart, and also found several sources citing that I should translate the degress to radians, although when I do so, the image stops being seamless.

    If anyone would care to help me understand with more depth and improve this system, I wish we could at some point make it a little more reusable, and give it to the community as a template if that's of interest.

    Seamless_Noise.c3p

    I appreciate any feedback.

    Cheers!

    Tagged:

  • Doesn’t seem to draw anything on safari iOS but the math looks fine.

    You don’t have to convert to radians because construct uses degrees and not radians for the trig functions.

    I see you are ensuring the angle values are in the 0-360 range. That’s only needed for displaying the angles, the math will work the same without it.

    You probably don’t have to find the min and max noise value every time. I’d run it once, write down those values and just input those in the variables. That would at least remove the startup pause.

    You can probably combine steps together to use less events if you wanted too.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you for the feedback! I believe it shows nothing on safari iOS because it only shows something when a key is pressed in WASD. I can in the future make it mobile friendly for sure.

    I'll also think about implementing a way to save the noise normalization, and maybe also save the map in a Json or smt so the movement is more fluid.

    Currently though I'll research the math a little bit more, because the higher I set the sphere radius, the more distortion I get in the seams, I don't know why yet, but I believe I'll be able to find out.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)