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

GameMaker Working with tile collisions

Suzaku

Member
Well Im starting to put my tilesets on my gamemaker project(2d platform game) but now I wonder how people actually deal with those tile colisions as they need to be an object for that purpose I think. I think about using the good and old "invisible scaled object" on a separated layer, but I want to know how people are doing that nowadays. Are the tiles still merely visuals?
 

TheouAegis

Member
Who said they need to be objects? It wouldn't be called tile collisions if you need objects.

Look up Shaun Spalding's tile collisions video to get an idea how it works. And look up the video on sloped tile collisions to get an idea of how to handle non-square tiles.
 

Yal

šŸ§ *penguin noises*
GMC Elder
In the project I'm currently working on, I'm having a script to check for collisions with a single pixel. It checks if there's a tile there (if not --> no collision), and then does different checks depending on the tile's type... for slopes I check some triangle maths, full-block tiles are guaranteed collisions everywhere, and background tiles have no collisions. This is a pretty flexible system that can be extended to as many collision shapes as you want. (My project checks the tile's L/T coordinate to tell what type it is, so certain tile types need to be in certain positions in the tileset, but I see that as a plus - it enables you to convert an area to a different tileset without extra work)
 
Top