How do I shift the tiles in a tilemap?

  • Hopefully I'm explaining myself properly, thanks for reading:

    I've created a background in a tilemap. The layout has grown wider, and I want to extend the width of my tilemap background to match, but keep the tiles exactly where they are in the layout. (When I resize the tilemap, it moves the tiles I've drawn on it.)

    How do I keep my tilemap design as is, but shift all the tiles in the map one column to the right?

  • There are no way you can do this as far as I know

  • I think it's best to make a separate background layer where you'd use a Tiled Background object.

    This is an image, most of the time a tile, like the background tile in your Tilemap (or a bigger image is also possible of course), that you can scale all you want and it wil automatically match without distorting the image itself.

    Make a layer for the Tilemap above the background layer and use your Tilemap for the ground (collision) and interaction.

    You can put another Tilemap on top (in a new layer) for decor purposes, overlapping or whatever you want. Not only is this way faster and flexible if you want to adjust something, like you want to now, it's also better for the performance as the Tiled Background is very efficient.

  • Genius, thank you both. I'm using the TileMap to draw my level backgrounds, but in playtesting, the levels get longer and shorter. So I was hoping i could shift the tiles to match it.

    Do either of you know if using multiple TileMap objects in a layout would be efficient? Or does too many tiled backgrounds tax the cpu?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Tilemaps can be efficient but it really depends on how you use them in your game, how big the actual tiles are etc.

    For some games the Tilemap object is maybe not the right choice and Sprites may show better results. Sometimes a combination is a great option. Using a Tilemap just for the collision of your level and using Sprites on top for polish. Tiled backgrounds are always very efficient because they are "seen" as just one image, the duplication takes almost no effort as so the performance will be better.

    There are some blog posts about the Tilemap and performance tips, how Construct 2 renders your game and such, I'd recommend to give those a read. It's worth to know

    As far as I know it's not possible to select multiple tiles at once and move them within a Tilemap, if that is what you mean. This would be a great addition in the future though.

  • Very helpful - thanks again! I'll look for those blog posts... hopefully the feature gods hear our prayers.

    All the best

  • No problem

    Well, Scirra updates are frequent. I have no idea what they're planning on but I'm sure they will do their best to make Construct 2 even more powerful and intuitive than it is already.

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