• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Can you make a world tile map from a single image and still use proper pixel collision?

I have read and watched a lot on this topic, rebuilt the map and navigation system twice, and just want to know if the following is possible. I have a large water and land map designed in GIMP and would like to use it as the full backdrop. The game has minimal objects at this level, so I'm hoping it isn't boggy. However, I want the player's boat to have proper collision with the land tiles and therefore have two real questions:

- Is there a clean way to import the entire map at once and still be able to navigate and use tile collision?
(I would guess that this would work if it was brought over as hundreds of tiles, but I think that would require an extremely manual process)
- How small do the tiles need to be for GMS2 to detect that collision point (or even better, is there a method that uses something like color detect to bypass that problem)? The tile collision systems I've mirrored so far seem to work well for certain tiles and not so great for others, likely depending on the jagged edges and so on.
 

TheouAegis

Member
Well if it's color based, then for handling the jagged edges you could use the sloped tiles tutorial.

As far as manually handling tiles, if you mean your image is not actually tile-based, then yeah it would be a bit of work. Then again, you are wasting memory with repeated tiles, which I wouldn't doubt your map has a lot of. I mean, you could write software to make the tiles and the map layout automatically if you really wanted to.

As for tile sizes, there is no limit on tile sizes that I'm aware of. However, ideally your tiles should be no smaller than 1/2 the width of the objects colliding with them.
 
Top