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.

Author
Message
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 8th Dec 2010 02:23
So i have been trying to make an object realistically accelerate and decelerate. I have the following code, and in it, it works fine but there's one very small bug. When i start out in the center of the screen, if i just ever so slightly tap the key, the cube moves to the right very slowly. i was thinking that could get annoying in a game, so any way to fix that?? Thanks for your support



Behold the new marble game coming soon: [href"http://forum.thegamecreators.com/?m=forum_view&t=178472&b=8&p=0"]Marbsticle Course [/href]
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 8th Dec 2010 02:29 Edited at: 8th Dec 2010 02:29
ok i fixed it (wadda ya know?) i put the "inc x#,speed#" below the if statements and out of them.

i also know that i could use and instead of nesting, but i nested anyway xD

Behold the new marble game coming soon: [href"http://forum.thegamecreators.com/?m=forum_view&t=178472&b=8&p=0"]Marbsticle Course [/href]

Login to post a reply

Server time is: 2026-07-21 19:18:51
Your offset time is: 2026-07-21 19:18:51