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 / Help with bat movement.

Author
Message
Scarface
17
Years of Service
User Offline
Joined: 21st Oct 2006
Location:
Posted: 1st Aug 2008 17:16
Hi, I'm back after a long time, I didn't have the time to continue trying to learn DB, but I decided to have another crack at it, but I've forgotton stuff.

Basically I'm trying to create the most simple game possible, Pong! Already after a couple of lines of code I'm having problems.

The bat which is drawn as a box, appears on the screen perfectly, but when I attempt to redraw it when the left key is pressed (For movement purposes) it just creates a long box along the movement path.

I tried dbCLS() inside the main loop, but that just prevents the box from being displayed at all.

Cheers
Scarface




- Scarface
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 1st Aug 2008 17:59
put your dbCLS at the beginning of the loop. unless thats what u were doing before
Scarface
17
Years of Service
User Offline
Joined: 21st Oct 2006
Location:
Posted: 1st Aug 2008 18:01
Great! worked a treat thanks

- Scarface

Login to post a reply

Server time is: 2024-09-30 03:28:11
Your offset time is: 2024-09-30 03:28:11