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 / Text disspears in 3 world

Author
Message
The Holy Grailo
22
Years of Service
User Offline
Joined: 14th Feb 2003
Location:
Posted: 16th Nov 2003 20:34
I am creating a simple project where you can walk around a room and talk to people. I have asipmple function that handles all the text on the screen. The problem is that as soon as i put the text on the screen it disspears as soon program moves to the next line of code. I have tried a wait command but the text still disspears. I am sorry but i do not have a code snipnett because it is on a different computer not hooked up to the internet. All i need is the code to stay on screen till I tell it to clear. Thanks
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 16th Nov 2003 21:34 Edited at: 16th Nov 2003 21:34
run your sync manualy

sync on:sync rate 0

then draw all the 3d in your loop, then right before the sync that gets the screen drawn display the text, eg:

for I=1 to 50
position object I,x,y,z
next I
text 200,200,"this won`t get overwritten!"
sync

then redo the loop, you have to draw the text before every sync, just displaying it in a subroutine and then expecting it to remain won`t work, cheers (example code below, click the source button)

Mentor
FROGGIE!
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: in front of my computer
Posted: 18th Nov 2003 15:35
if you want to do a wait command all you have to do is switch the backdrop off when you want the text to appear and switch it back on when you want the text to disappear.
Carlitos
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location: United States
Posted: 18th Nov 2003 20:43
Or you could put the text command before and after the sync command or turn "DRAW TO FRONT". If you turn backdrop off in 3D, you get a smudge affect that occurs everytime the object moves.
Battleaxe
22
Years of Service
User Offline
Joined: 4th Jan 2003
Location:
Posted: 22nd Nov 2003 21:10
Everytime i want text in a 3D game, I use the 'set camera viewport' command to set some space aside for the text (or 2d drawn huds) either at the side or the top of the screen. When the sync command is used, or when the 3D screen changes, the section outside the 3D area will not be affected, so the text will not disappear.

- Battleaxe

Login to post a reply

Server time is: 2025-05-21 16:21:18
Your offset time is: 2025-05-21 16:21:18