More tiles in one layer or fewer tiles in two layers ?

Get help using Construct 2

Post » Wed May 11, 2016 5:22 pm

Hi everyone, I've just started making a top down 2D game (yes it's a Zelda remake; no it won't be yet another ugly clone :P ). And I'm wondering how I should build my maps : given that some tiles will be used in different environments – the only difference being the color of the ground – what do you think would be best?

1) To draw shared tiles (without ground) and empty ground tiles, then build a base layer with the various ground tiles + a complementary layer above with the shared tiles?

OR

2) To draw all combinations of ground + tiles beforehand, then build the whole map on a single layer thanks to the comprehensive tileset?

I'm thinking performance and memory usage here. I've read the blog posts about how tiled backgrounds work in Construct 2, as opposed to tilemaps (but I think Construct 2 does crunch tilemaps into as few tiled backgrounds as possible, when exporting? not sure). And so I wonder if I'd better use fewer tiles, using separate layers to combine whatever ground+tile need to be combined on runtime... or do the opposite: "hardcode" all tiles combinations in the tileset in order to have a plain, one-layer tilemap on runtime.

Sorry I haven't any pics or capx to show, I've only just started (but I'm thinking forward ^^)!
I hope my question is clear enough. ;)
B
8
S
1
Posts: 15
Reputation: 470

Post » Thu May 12, 2016 11:17 am

I... guess I wasn't clear enough, then... ( ; _ ; )
B
8
S
1
Posts: 15
Reputation: 470

Post » Wed May 25, 2016 10:17 pm

*bump*

Anyone?
B
8
S
1
Posts: 15
Reputation: 470

Post » Wed May 25, 2016 10:39 pm

You're not wrong, this is so confusing. Are you trying to build the whole game in one layout? That's what it reads like but there's no need to do that. The tilemap will always be fine performance-wise as long as you don't use it to display large images. You mention 'draw' a lot so I assume you are concerned about performance issues around loading so many tiles. The game will only load a layout at a time, so just do one level per layout, should be fine?
B
47
S
18
G
84
Posts: 2,273
Reputation: 49,800

Post » Fri May 27, 2016 8:21 am

Hi, and thank you for your answer. :)

I'm not especially trying to build the whole game in one layout (actually it would be much better NOT to do that xD ). I just don't know how much having several layers per layout is a good or bad idea, performance-wise.

But here's a picture I've assembled, in order to explain myself better! This should help.

Image

So in the first example, I would be using several layers per layout to build my map but this would allow me to use fewer tiles. In the second example, I would be using only one layer per layout to build my map but this would require more tiles to begin with.

This picture makes it simple but you can imagine how quick the number of tiles could grow (of course there will be many more) if I was to use a third ground color besides green and brown... Yet everything would be on one layer, so I don't know?
B
8
S
1
Posts: 15
Reputation: 470

Post » Fri May 27, 2016 10:46 am

I'd go with separate "blob" tilemaps for each material and mix to taste.

- Drawing each possible variation is going to make a HUGE tileset.
- By keeping each "material" separate, you can create variant tiles for use with any "ground type": your tiles will be more flexible, and visually more satisfying in the end. (Instead of having the same cliff everywhere, with only the ground type changing, make variants of the cliff-corners, and cliff-middle tiles.) If you're going for a cartoony look and feel like in your example image, too much sameness will end up feeling claustrophobic.
- It's going to be way easier to design your levels with the materials separated than with a huge "I-know-it's-in-there-but-where-is-it" tilemap.

And you'll only have to include the smaller tilemaps for the materials you actually use in each layout (forest level: grass, cliffs, trees... ; north pole level: snow, cliffs, icy rocks...)
B
16
S
3
G
1
Posts: 19
Reputation: 1,084

Post » Fri May 27, 2016 11:15 am

Indeed! Well that sums it up... I think I'll go for less tiles x several layers. After all, performance matters at runtime but so does the time required to make and handle my tiles' graphics! And method #2 certainly would become a more complex task towards the end.

Thanks for your answer(s)! I'll come back and post some WIP stuff as soon as I make significant progress. :)
B
8
S
1
Posts: 15
Reputation: 470


Return to How do I....?

Who is online

Users browsing this forum: hellokitty1, Julot135, newt and 28 guests