Game maker ramp movement


















GMS1 - Version 1. Published August 23, Added a fix that created odd behavior when a move speed not equal to zero was passed to the script with a -1 direction. GMS2 - Version 2. Published May 26, Massive Overhaul -Updated Script allows better support for all angles and shapes of collisions -Updated example project showcases basic movement, momentum based movement, and analog controls. Published January 1, Loading, please wait. Package contents Loading, please wait.

Related Loading, please wait. Share Share on Facebook Share on Twitter. What is the issue? Continue Shopping Checkout. Problems with movement GameMaker studio 2 Ask Question. Asked 3 years, 11 months ago. Active 3 years, 6 months ago. Viewed times. Improve this question. Steven 1, 3 3 gold badges 18 18 silver badges 32 32 bronze badges.

This function tries to do too many things on a too low level. Split it up into meaningful blocks and analyze part by part. Add a comment. Active Oldest Votes. Improve this answer. Steven Steven 1, 3 3 gold badges 18 18 silver badges 32 32 bronze badges.

Sign up or log in Sign up using Google. This part we will cover slopes. Now when most people think of slopes, we are still thinking in the way that we are supposed to see them as. In computer graphics, we have to work in pixels.

Pixels are aligned to a grid. In a pixel perfect collision engine, we have to be creative to continue the illusion of a flat slope. We know that it really is like stair steps. But we want to move along it, slide, and feel flat. My method of dealing with slopes has evolved over the years. First I thought the answer was simply move up a certain number of pixels first, then move over to collision, and finally move back down that same number of pixels to collision.

That is, at first glance, a perfect solution. I thought I was pretty smart keeping my movement aligned to the grid. I called it the up over down solution. I ran into an issue later on where the player would seemingly hop down the slope instead of running down the slope. The way I had set it up, the player could move up a slope but would never stick to the slope moving down.

Easy fix I thought. I will just move the player up, then over, then back down, and then I move down one more time. Now we stick to the slopes moving down. Next issue: falling off platforms looks really weird. So back to the drawing boards. The player seems to get knocked down when falling off platforms.

Up, over, down, down again only if that puts us on ground.



0コメント

  • 1000 / 1000