Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Sparkys fall speed help

Author
Message
Daniel wright 2311
User Banned
Posted: 14th Jun 2012 22:21
Ok, so, I am not shure what value to change to make my player fall faster if I jump. Right now,If I jump off of high places,the fall takes a while,making it look well,bad,I need my player to fall fast,any help will be great.

my signature keeps being erased by a mod So this is my new signature.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 14th Jun 2012 22:32 Edited at: 14th Jun 2012 22:33
Sparky's is for collision. If you have some fall code it is probably just DBPro code, or maybe some sort of gravity code.

Daniel wright 2311
User Banned
Posted: 14th Jun 2012 22:54 Edited at: 14th Jun 2012 22:55
with in sparkys jump,it does make you fall,gravity is applied in sparkys examples,and this is what I am using,I need to speed up the falL,SO I NEED ANY ONE WHO KNOWS HOW TO TO SHOW ME IS ALL.

my signature keeps being erased by a mod So this is my new signature.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 14th Jun 2012 23:06
I don't have the jump example.

Daniel wright 2311
User Banned
Posted: 14th Jun 2012 23:21


my signature keeps being erased by a mod So this is my new signature.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 14th Jun 2012 23:34 Edited at: 14th Jun 2012 23:40
This appears to be the fall speed setting...

if vy#=0 and jumptimer=0 then vy# = vy# + 10*gravity# else vy# = vy# + gravity#

Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 14th Jun 2012 23:38 Edited at: 14th Jun 2012 23:41
THERE'S REALLY NO NEED TO SHOUT ABOUT IT!!!!

You haven't supplied the full code but I can help none-the-less.
Somewhere there is some code (that you haven't supplied) that sets a global variable called: gravity# and assigns it a value. Find the code that assigns the value and play with it to see what happens. It's impossible to say what it should be just by looking at the code so just keep adjusting it until you get a value you are happy with.

IS THAT EXPLANATION OK FOR YOU?
Daniel wright 2311
User Banned
Posted: 15th Jun 2012 00:44 Edited at: 15th Jun 2012 00:45
lol,I did not meen to put anything in caps,honestly my dauther keept trying to type on my keybord as I was typing,so I rushed it there,lol,she is only 9 months old.

At anyt rate,here is all that is at the top of my program,I did play with it,but after I did,my player would not even jump,its as low as it gets right not,if I put it to 0.2 there is no jump.Thanks for your help any how



my signature keeps being erased by a mod So this is my new signature.
Daniel wright 2311
User Banned
Posted: 15th Jun 2012 06:16 Edited at: 15th Jun 2012 06:17
I figured this out by ajusting the gravity# in the game loop after the jump happens,I just raise the value after the jump,then I fall a lot faster.

my signature keeps being erased by a mod So this is my new signature.

Login to post a reply

Server time is: 2026-07-10 14:58:31
Your offset time is: 2026-07-10 14:58:31