Landing after jumping

BlitzMax Forums/BlitzMax Beginners Area/Landing after jumping

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

As for the collision detection algorithm issue, I'd make a class for each of the various types of things in your game. Have a collision routine that returns a boolean if it happened. You'll need to make a matrix (or some way) to track all the objects to determine where the avatar is then check collsion in the matrix coords of where its at.

Just iterate through the objects until a collision (or multiple collisions) is found. You can then apply what code you need to then for the reaction to the collision.

Your movement should use a gravity algorithm with speed. This will keep your avatar from floating, as it constantly applies gravity. You can search on the web for gravity and speed algorithms. If you get stuck, I'll see what I have to give you help there. I'm at work atm, so I don't have it handy with me.

I'll see what I can find for you later tonight.