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.

Newcomers DBPro Corner / new to dark basic but not programing

Author
Message
Dame Chaton De
17
Years of Service
User Offline
Joined: 12th Dec 2006
Location:
Posted: 12th Dec 2006 14:47
greeting from my ecletic world...

while not new to programing i am new to dark basic.

i find coding in it after using visual basic and the other visual studio programs a bit strange - takes me back to my quick basic days. However I am not complaining, just trying to explain my first dilema.

i am very much enjoying the graphic freedom that dark basic gives me but one aspect that causes me a problem is how do i clear out a line.. in visual basic the command sequence:

anumericvarable=1
loop
locate line,column : screen.print anumericvarable
call pause(2) ' wait 2 seconds
anumericvarable=+1
until anumericalvarable=20

would slowly count to 20 showing the result on one spot on the screen.
doing the equilivent in dark basic causes a bloody mess. it writes each number on top of the previous one making it unreadable. How do i clear out a space to write the number rather then have it do that. this would be something useful to display a score, or a message or what ever in a game?? right now i am using it to show where the mouse pointer is, but surely there is a command that clears to the right of the coursor for a rewrite of something??


have i missed something??

visit me online at:
http://mrzkitten.bravehost.com/
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 12th Dec 2006 15:10
If you use the TEXT commands in DBPro (which would be ideal for this, given the X and Y values you can pass them) then you should set the text opaque value to off (set text opaque), which will stop the 'over print' you describe above. Alternatively, you can clear the screen each loop with a CLS.

Heavy on the Magick
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Dec 2006 17:09 Edited at: 12th Dec 2006 17:14
Another way is to set the backdrop on, which is a good point to understand.

The default is BACKDROP OFF. This means it's up to you to clear up the background in between SYNCs. Run the following 2 snippets, and you'll soon understand what setting the background on does for you...

Backdrop Off


Backdrop On:


Text without smudge:


BACKGROUND ON has overheads, and will slow your game down. But until you get to a stage where the screen is completely filled with 3D objects (such as a Skybox for a background), it's essential.



Dame Chaton De
17
Years of Service
User Offline
Joined: 12th Dec 2006
Location:
Posted: 16th Dec 2006 20:36
the first one (for 2d) works great.

(mostly) i must ensure the second line is atleast as long as the first.

thanks.

my next question... is there a discounted upgrade path to dark basic pro??

i got the basic (smaller) compiler because i was told the tutorials were easier. But i think my ultimate project will need the more advanced compiler.

again thanks.

visit me online at:
http://mrzkitten.bravehost.com/
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 18th Dec 2006 16:42
There is a discounted upgrade:

http://darkbasicpro.thegamecreators.com/?f=order

But right now it would be cheaper to just buy DBPro (boxed or online) in the 30% December Discount deal. Visit the site, you can't miss it (at the top). That will give you a much better offer than the upgrade does, at least for the next couple of weeks anyway.

Heavy on the Magick

Login to post a reply

Server time is: 2024-09-25 15:28:21
Your offset time is: 2024-09-25 15:28:21