Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

The Best Jump Algorithm?

Name: Anonymous 2012-03-12 10:35

Who's up for a bit of challenge or provide some tips or better code?
I'm having trouble with the math side of doing jumps on the game I'm making.
Can someone please help me out for a while?
My character's jump looks weird, it looks pointy.
There's code here http://codepad.org/SXH4ydz8 where we can start.
There are constraints there.

Name: Anonymous 2012-03-12 10:50

jnz is the best jump.

Name: Anonymous 2012-03-12 10:54

lolwat?

you meant this one http://faydoc.tripod.com/cpu/jnz.htm ?

Name: Anonymous 2012-03-12 11:19

Make a proper Physics simulation and just give your Entity an upward force of X newtons which will cause it to rise into the air and then eventually fall back in a nice smooth pattern due to gravity.

Name: Anonymous 2012-03-12 11:21

>>4
upward force of X newtons
upward velocity of X [m/s] *

Name: Anonymous 2012-03-12 11:23

>>4
Wrong. Realistic physics in a video game are shit and eat a lot of processing power.

Name: Anonymous 2012-03-12 11:24

>>6
Simple Force simulation with gravity do not eat up a lot of processing power.

Name: Anonymous 2012-03-12 11:37

OP here

I thought of adding fall velocity  to jumpspeed (now tempspeed)
then let it jump with tempspeed then decrease tempspeed by velocity*deltaTime

But that's just me saying, dunno better code from what I can think...

Name: Anonymous 2012-03-12 11:58

>>1
Forget it, white people can't jump.

Name: Anonymous 2012-03-12 12:12

On a related topic, does anyone have the exact algorithm used in Super Mario Bros?

Name: Anonymous 2012-03-12 12:19

It is np-hard OP, don't bother

Name: Anonymous 2012-03-12 12:37

>>1
NOT ENTERPRISE; DIDN'T READ

>>11
good job wasting those dubs

Name: Anonymous 2012-03-12 13:35

>>10
I've seen the original source and they just implemented a basic physics engine: http://en.wikipedia.org/wiki/Standard_Model

The jumping force, air resistance, gravity, etc, just came about naturally as a result.  It's all about emergence bro.

Name: Anonymous 2012-03-12 14:59

>>9,11,13
This is why I love you, /prog/.

Don't change these.
Name: Email:
Entire Thread Thread List