How do I use the same tilemap image on multiple layers?

Get help using Construct 2

Post » Wed Jun 11, 2014 1:46 am

Hello!

For the game my collaborator and I are considering I want to use tilemaps, but there's a background layer that doesn't clip, a same-z-order layer that does clip, and a foreground layer that doesn't clip. I know I need to use 3 tilemap objects but I want them all to use the same image in such a way that it doesn't use three times as much memory.

If this isn't possible then the layers won't be able to share tiles (or at least can only do so minimally) and this will make our game not look as good.

Thanks!
B
9
S
3
Posts: 37
Reputation: 749

Post » Wed Jun 11, 2014 7:14 am

Not sure of the actual answer, but the blog on Tilemaps (https://www.scirra.com/blog/ashley/3/tech-blog-tilemap-tidbits) does mention all the optimise techniques, one of which is repeated blocks. The thing is, it doesn't mention whether this takes place on a Layer by Layer process, or just for an individual Tilemap Layer. @Ashley would know and may answer, if he has a spare moment :)

Either way, it should be easy to quickly mock-up a prototype and check in debug? Might give you some useful info back.

Start with one Layer with the Tilemap, debug, then add another Layer with identical Tilemap image, debug. Rinse and repeat as required.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,418
Reputation: 59,522

Post » Wed Jun 11, 2014 9:56 am

Just go ahead and duplicate the images, and at export time image deduplication will remove the copies.

Tilemap optimisations don't affect the source image, and FWIW only happen per tilemap instance.
Scirra Founder
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,600


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 38 guests