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.

Dark GDK / gravity not working right

Author
Message
hwoarang
11
Years of Service
User Offline
Joined: 19th May 2012
Location:
Posted: 20th May 2012 01:59
Hi, iam trying to make my rock.bmp jump. it kind of works fine but there are some problems.
1st my rock.bmp jumps too slow.
2nd my rock.bmp jump in mid air too.
i really dont know where to start fixing this problem. can any one take a look at my code.
left and right works find

DeadTomGC
13
Years of Service
User Offline
Joined: 11th Aug 2010
Location: LU
Posted: 22nd May 2012 01:32
Well, first off you should change this:

to this:


Here:
You should add vely=0; after the y=400;

Also, get rid of these:




I think that should do it. One large mistake you made was leaving conflicting ways of moving the sprite in your code. ie, the move command vs. the dbSprite command


Login to post a reply

Server time is: 2024-04-26 04:12:39
Your offset time is: 2024-04-26 04:12:39