Jebbs

BlitzMax Forums/BlitzMax Beginners Area/Jebbs

Jebbs(Posted 2008) [#1]
Topic- Is it possible to use speed to create a higher jump?

I want my game character to be able to jump higher when the he is running than when he is walking. I know how to jump and how to get my character to run; I just can't add them together to create height.

I would also like to get my character to bounce back off walls when he hits them. Let's say he was running straight at a wall and when he hits it, he walks a few steps backwards.

If anyone has any insight about what I should do, I would be eternally grateful if they would post it. Thanks!

PS- Maybe a way of creating momentum might be a solution for making these effects.


SebHoll(Posted 2008) [#2]
Here's an example I have knocked up for you that should demonstrate the basics of quick and easy pseudo character physics. There may be better ways to do this, but this seems to tick all of your requirements above...

Hope you are OK with OO ;-):



I've tried to document the code well, so that you can see what is happening.


Jebbs(Posted 2008) [#3]
Perfect! Thanks a lot SebHoll. That was just what I was looking for.