• 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 Character Dash skipping tilemap collision

K

Kyle Rider

Guest
I have been searching for an answer to this for a while. All I can find is using object collision. I use tilemap collision checking for my maps.

My characters dashes, if I slow down the code it works perfect. So since it isn't an object collision system I can't use collision line and all that jazz.

Any tips?
 

NightFrost

Member
I'm guessing you're only checking the tile at the endpoint of the movement? A grid-based collision system needs to check every cell along the movement path for intervening terrain (and needs to do it for both edges of the bounding box if they're on different gridlines). Essentially a loop script that goes through a certain space in the ds grid. For a good overview of these things, this article is one of the best I've found. Scroll down to Type #2: Tile Based (Smooth).
 
K

Kyle Rider

Guest
nothing new, Although I don't use DS_grid I just use
c1 = tilemap_get_at_pixel(obj_Game.map,x-12,y+1); // left_bottom

Should I be using a DS_grid? would that solve my Dash?
 
Top