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

0 favourites
  • 7 posts
From the Asset Store
This is a Dungeon Master tool & the 1st of 12 Combat Engines from the Building Combat Engines for Browser Games workshop
  • 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 ). 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.

  • I... guess I wasn't clear enough, then... ( ; _ ; )

  • *bump*

    Anyone?

  • 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?

  • 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.

    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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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...)

  • 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.

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