Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
game maker - uneven groung in 2d games
#2
I did something similar with my Lemmings engine in MMF2. The Lemmings have a constant speed though, so I can't guarantee the same method would work for you.

I don't know what kind of collision method you're using. Basically, what I did is check for collision at the lemming's footpoint in the direction he is about to go. If there's a collision, check for collision one pixel (or a few, depends on how steep you want to make the walking up a slope possible) above. If there's none (you might need more "collision checks" above if your character has a height), then he'd snap to the ground on the next frame.

Same goes for downward slopes except for first checking for no collision, then for collision.

Can't guarantee it works with GM - and it's probably tedious. There might be a much faster way. I don't really know
Quote of the Day f***ing Year (Click to View)
Reply
Thanks given by: Bamboori


Messages In This Thread
RE: game maker - uneven groung in 2d games - by Ramond - 06-20-2011, 09:37 PM



Users browsing this thread: 1 Guest(s)