How do I reuse the same tilemap on a different level?

1 favourites
  • 12 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • I must be stupid. I know there has to be away to reuse the same tilemap to built a different level, but for the life of me I can't figure out how.

    My game is a maze. I create every level by hand (it's relaxing). I don't want to upload the same tilemap 500 times.

    How do I reuse the tilemap for a different level?

    Thanks.

  • You save tilemap tile layout in a json format, then load it again later.

  • You save tilemap tile layout in a json format, then load it again later.

    Ah what?

    You wouldn't happen to know of a very specific video tutorial that shows how to do that, would you?

    I'm willing to search for it, but I'm not sure what it would look like if I find it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'll just explain it here :

    Add a global string variable and set it to tilemap.tilesJSON

    The variable is then the positional data for the tilemap.

    Then later on for tilemap you can use the action 'load' and use the variable

    You can also use the download action to make an external file of the tilesJSON information if that's useful for the game

  • Hello,

    Thank you for that, but I don't understand much of it.

    I assume by 'global string variable' you mean to create a global variable and make it text and not a number. But after that, I'm lost.

    I've been Googling, trying to figure out what you mean by the rest, but I'm not getting it.

    Is there a step by step how to?

    I need to be able to see the tilemap so I can manually drag & drop the bits to create each level.

  • When you say you want to reuse the same tilemap what precisely do you mean?

  • I used a tilemap to make the top maze by clicking on the tile and then clicking on the layout and built it by hand, one tile at a time, for that level. I love it, it's very relaxing.

    I want to use the same tilemap for the next layout the same way. Click on the tile I want and then click on the layer and build the layout for the next level.

    But when I click on the tilemap it doesn't show up and I have to upload it again. I have 5 tilemaps uploaded and now I want to reuse them again and again to build each level.

    Won't that use less space/memory?

    I can reuse sprites, but that's harder and takes longer.

    Like I made this one.

  • The second image doesn't seem to show a tilemap placed in the layout or selected. Usually if you do that in another layout it has the same tileset image loaded with it because it's the same object.

  • Right, that's the problem. I want to use the same tilemap to build a different layout in the second level.

    I create the new level (layout), click on the previously used tilemap, and the tilemap doesn't show up.

    If I make them into sprites I can use them over and over again, but it's more difficult to create each level. So the question is, how do I reuse the tilemap in a different layout.

    There has to be away, I can reuse sprites, there has to be away to reuse a tilemap.

  • I'm confused myself. You're supposed to place it in the level. When you do this it is an instance of the same object so the same tilemap. Then you can draw on it with the same tileset as before. At the moment you're just clicking on it on the right side? It doesn't show up by clicking on it, you have to place it in the level. When you place the tilemap in level 1 you are creating instance 1, when you place the tilemap in level 2 you are creating instance 2, of the same object. You can draw on them separately in each layout. You don't for example need to create a second tilemap object.

  • OH!! That makes sense.

    Thank you so much.

    Sorry about the confusion. I'm new to C3 and don't know all the terminology yet.

    Thanks again.

  • Alright no problem. And just to clarify my first few responses on here are in reference to saving or storing that data. So the tilemaps you are drawing to create the racetrack, you can save the tile positions as a string of data, that's what I originally thought you meant by reusing.

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