How do I use an Advanced Random Noise alongside a Tilemap's Tiles?

0 favourites
  • 8 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • Hello,

    I am using a Tilemap to make a randomly generated Island. I need to use a random noise texture to replace tiles in order to add variety to the land scape. Is this possible?

  • Yes. The 2d advanced random noise functions/expressions will give you a value between 0 and 1 for every x,y input you enter. In your case, the x and y would be the tilemap coordinates.

    It is up to you to define what you want the returned value between 0 and 1 to mean.

  • Okay, I think I have that part down. The part I am stuck on is when I compare the Advanced Random's Texture Value, I need a position to lock on to.

    In this image I have two question marks where a certain position should be. I need that position to be a position on my tilemap. I have looked through the Tilemap Documentation and haven't found an expression that I can use. Do you know any that would work?

  • You can use either the absolute tile position or the tile index, either will work.

  • Sorry, I am still a litte confused. I see that I can use Tile to Position to convert the between layout coordinates and Tiles. I am not sure if this is what you mean by Absolute Tilemap position or index. Can you elaborate a little more?

  • The layout coordinate of the tile or the tile index can both be plugged into the advanced random function for usable results.

    To get the layout coordinate, you use the tile to position expression with the tile index to get your value.

    Or you can use the tile index directly in the advanced random expression as well.

  • Okay, since I am having the special tiles spawn over the land tiles, would I need to do a repeating system that checks all tiles for the specific Advanced Random value? Also, I already have one of those systems for the initial island generation so I don't know if that will effect it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Actually, I think I figured it out. Thanks for your help oosyrag!

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