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 / Smooth movement?

Author
Message
CallumD
13
Years of Service
User Offline
Joined: 30th Mar 2011
Location: United Kingdom
Posted: 31st Mar 2011 01:06
I'm trying to make a game, that involves driving a car. Now, I would like to make driving realistic, where you slowly speed up by pressing the key, and visa versa. However, I noticed dbMoveSprite uses integers, and not float points. Because of this, I can't think of a way to make gradual speeding up. Does anybody know of a solution?

Thanks.
Dodga
14
Years of Service
User Offline
Joined: 12th Dec 2009
Location:
Posted: 31st Mar 2011 04:14
You can use 3d planes instead of sprites, this would allow you to easily zoom too. Just have you camera at a fixed z position and only move the camera and all your 3d planes on the x and y axis.
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 31st Mar 2011 14:45
you move in pixels and they don't take floats, you make your own system to handle this where you can use floats and convert them to ints when you use dbMoveSprite

Login to post a reply

Server time is: 2024-11-19 12:43:02
Your offset time is: 2024-11-19 12:43:02