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.

DarkBASIC Discussion / is it possible?

Author
Message
hpfan273
18
Years of Service
User Offline
Joined: 19th Jan 2007
Location:
Posted: 26th Mar 2007 00:28
in DBC, is it possible to erase text from the screen but nothing else?
i am using a pause screen, and i want it to erase the text: pause. but nothing else on the screen. how do i do that?

THANKS FOR STOPING AT A RED LIGHT... AND LETTING ME CRASH INTO YOU AT 80 MILES AN HOUR!!!
Gil Galvanti
20
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 26th Mar 2007 00:58
Are you doing this in 3D? Do you have any code?


hpfan273
18
Years of Service
User Offline
Joined: 19th Jan 2007
Location:
Posted: 26th Mar 2007 02:32 Edited at: 26th Mar 2007 02:33
i got it... but the word pause wont appear... here is the section of my code that has it:

[/code]if keystate(1)=1 then CLS : print "PAUSE" : suspend for mouse[code]

i am using 3D by the way... lol... but i got a new question... how do i get the text to STAY on the screen?

THANKS FOR STOPING AT A RED LIGHT... AND LETTING ME CRASH INTO YOU AT 80 MILES AN HOUR!!!
Gil Galvanti
20
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 26th Mar 2007 04:52
you need to use the "text" command with 3D . Text x, y, string is the syntax. Then what you would do with 3D is only display the text when you are pressing the key. If you don't tell it to draw the text every loop, it is erased every loop, so only tell it to draw the text when you press the key, here's a small snippet of what I mean .



indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 26th Mar 2007 04:52 Edited at: 26th Mar 2007 04:54
this should run in DBC /DBP
to test press the [p] key



hpfan273
18
Years of Service
User Offline
Joined: 19th Jan 2007
Location:
Posted: 27th Mar 2007 03:38
ok... indi... this is what my code is with your code... kind of long... but yea... the game doesn't freeze when i hit pause:



srry if there are mistakes... or i didn't do things shorter... but there it is... plz help

THANKS FOR STOPING AT A RED LIGHT... AND LETTING ME CRASH INTO YOU AT 80 MILES AN HOUR!!!
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 27th Mar 2007 04:00
if you want everything to pause in my example, you have to put your main game loop components in the area of my code that has an if statement regarding the rotation of the cube.




Im not saying you have to, as a death screen would keep the game rolling, but if you wanted to stop everything you need to use that conditional loop.

Login to post a reply

Server time is: 2025-05-29 00:32:44
Your offset time is: 2025-05-29 00:32:44