Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
game maker - uneven groung in 2d games
i just cant get this done.
what i want is that in a jump n run, the character can run up a hill or stairs flawlessy, without having to jump over every little bump.
for example the character walks onto a 45° bump.
case A (not right engine):
the character stops and acts as if there was a wall.
case B (right engine):
the character walks uo the bump.

also, with the wrong engine (basic jump n run engine), if the caracter walks down a hill, he is kinda flying (not sticking to the ground), because he moves faster than gravity pulls him down.

does someone (else? :P) have a solution for this?

i think it may have to do something with paths, but i cant get it to work nor can i find a tutorial/example...
Thanks given by:
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)
The meme is real (Click to View)
Thanks given by: Bamboori
at least it seems safe, thanks :)
Thanks given by:

Users browsing this thread: 1 Guest(s)