PlayerMovement 2D DirectDraw JumpAndRun Problems...

nogger

Newcomer
Joined
Jun 29, 2003
Messages
5
Hi,

I've written a little Jump'n'Run game, but I still have Problems with the Player-Movements.

Can anyone tell where I can get some Informations about this topic ? (2D-JumpAndRun with graphity, jumping from block to block,...etc...)

THX, for ur help
 
Cool game. I was looking for something like this. I was going to suggest a site but it looks like you know more than the basics.
 
I like what you've done so far. May I ask why you're using the DxVBLib interop ? I tought that everything you need would be in the managed directx librairies.
 
Just read you're question and tried your game. It looks nice i must tell you, amusing GFX ;)

Anyway about your little problem, because i saw that it wasn't that nice when I tried a little jump with the little fellow. It's bin a long time since i did this last. So after rewriting this three times I've just figured out that I actually need to sit down and try it my selfe before giving you a good answear. But I'll tell you the basics:

First - you need a "line". That is the bow that the guy should follow in his jump. This line comes from some sort of algorithm, eidther from a sinus list or from something like:

V equ Velocity = Nr of pixels guy moves first fram
K equ Velocity takoff = How many pixels slower he moves each frame
V = V - K
Y equ Y coordinate
Y = Y - V

I'm tired now, so this might be bull . Anyway, sooner or later K should make V negative, then the guy would start fall.

This is the basic theory, check out your physics books (I've forgotten everything). Also remember that this is a game, it should not be based on real gravity (wich is boring). Play around, also remember to change Velocity based on example the speed the guy is running, how long the jump key is pressed or something else interesting.

If you need more help, send me a mail and I'll try to dig out some of my old sources for you (if I have any left that is ;)). Or atleast come up with some good theory you could use and modify for your needs.

/Frasse
 
Back
Top