Gravity? Collision Platformer.

BlitzMax Forums/BlitzMax Beginners Area/Gravity? Collision Platformer.

For gravity, you shouldn't just alter the y by a fixed value. What you need is a yspeed which starts at 0, then when there is no collision you increase yspeed by a small amount. Every frame you change the yposition of the character by yspeed. This what when you jump, you just set yspeed to a negative value and then gravity will make it go to zero (the top of the jump arc) and then beyond as the character falls down. You may wish to consider having a "terminal velocity" which is a maximum yspeed so you can never fall too fast (e.g. through platforms etc).

Hopefully someone can help you with the CollideRect code as it's a bit tricky.