How do I properly re-use tilemaps?

0 favourites
  • 6 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • Stupid question, but I have a tilemap object placed on my first level. Now I want to re-use it on my others levels, so I place the tilemap object into my second (third, fourth) layout and it always has

    a) the dimensions of the first instance on level 1

    b) the content / layout of the the first level

    Before I can start to design a new level, I have to clear all tiles first, which is a tedious job, as there's no selection tool to selected multipe tiles in the layout and delete / move them.

  • Any time you copy an object instance, it will use the same properties/values/everything as the starting point for the new instance.

    Easiest solution is to just copy a blank instance of the tilemap, rather than the populated instance from your game layout.

    I suggest you make a "prefabs" layout with no event sheet. Stick all of your objects there and just take copies from there. This gives you a central location from where all your initalised objects can be taken.

  • You can design then store the tileJSON of tilemap, then load in the tilemap whenever you want.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Easiest solution is to just copy a blank instance of the tilemap, rather than the populated instance from your game layout.

    Hmmm.. I simply drag the tilemap from the project explorer

    I recently started this with some object i use globally as I have seen this in some tutorials.

  • The problem with dragging from the project explorer is it will always take the first instance as the "reference instance". Since Construct doesn't have a typical implementation of prefabs, you need to kind of create your own. Using a separate layout for any object's initial state is the only real way around this limitation.

    All of my projects use a layout I call "Parking Lot", which I treat as a prefab explorer. It's not ideal, but honestly it works fine once you get your head around the way Construct instantiates objects.

  • Using a separate layout for any object's initial state is the only real way around this limitation.

    I think, I got it. So for my case, I create a new empty instance of my tilemap on my "parking lot" and use it from there. Means, i have to redo the collision settings onence again, I guess.

    Thank you.

    EDIT: Yep, that did it.

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