Changing Tilesets

M

MisterHyde

Guest
Hello,
I have a question regarding tilesets. I am currently trying to make a 2D platformer and I'm using tilesets for non moving things like platforms or obstacles. My intention was to have one tileset for all my platforms, one tileset for all my obstacles, so I can easily design my levels later on. However, when I try to change my current tileset, because I, for example want to add a platform in a different style, the levels I have already done look wrong, because all the tiles shifted (I hope you know what I mean).

In the picture the top one shows how I designed it with the original tileset and the bottom one shows how it looks after I change the sprite used for the tileset (in this case making it wider)

I think I know *why* this happens (The way I understood it was that GameMaker numbers the tiles from left to right, top to bottom, so if I add tiles to my tileset the numbers are off).

How can I solve this? I do not know how many platforms I need, so I cannot design my entire tileset before so the only solution I see are:
a) redesign my level, every time my tileset changes
b) create a new tileset for every new tile added
Both solutions seem far from optimal.
 

Attachments

Rob

Member
Why not use 2 tile layers and have the 2 different tilesets on different layers? If you just add tiles to a tileset it shouldn't be a problem. The problem arises when the index for the tiles change as you've guessed. The top left tile is 0 and it continues counting up by 1 from the left.

You don't want to keep messing around with your tilesets because its a hassle - as you've discovered. Sometimes I'll make a large sprite with plenty of space to add more tiles if I know I'll be needing more that I've yet to create.
 
M

MisterHyde

Guest
Using 2 or more tile layers won't work, because I'm using tile collision. Using multiple tile layers for essentially the same function (e.g. a platform to stand on) would be rather inefficient and complicated.

A large sprite with a lot of free space however seems like a good work around, I will try that. Thank you.
 

Danei

Member
Another thing it may be useful to note is that you can use an invisible tile layer specifically for collisions, and a different tile layer for the visible art tiles. That would enable you to use however many different tilesets you wanted for aesthetics, as well as making things like invisible platforms or hidden passages easy.
 
Top