Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • 2 weeks later...
Posted
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.
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...