How do I shift the tiles in a tilemap?

Get help using Construct 2

Post » Wed May 07, 2014 1:40 am

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?
B
21
S
5
G
3
Posts: 66
Reputation: 2,848

Post » Wed May 07, 2014 1:52 am

There are no way you can do this as far as I know
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,838

Post » Wed May 07, 2014 2:40 am

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.
B
84
S
20
G
6
Posts: 175
Reputation: 8,156

Post » Wed May 07, 2014 4:20 am

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?
B
21
S
5
G
3
Posts: 66
Reputation: 2,848

Post » Wed May 07, 2014 6:34 am

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.
B
84
S
20
G
6
Posts: 175
Reputation: 8,156

Post » Wed May 07, 2014 11:12 am

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

All the best
B
21
S
5
G
3
Posts: 66
Reputation: 2,848

Post » Wed May 07, 2014 12:52 pm

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.
B
84
S
20
G
6
Posts: 175
Reputation: 8,156


Return to How do I....?

Who is online

Users browsing this forum: Lordshiva1948 and 62 guests