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 / Flickering Text

Author
Message
Michael73
14
Years of Service
User Offline
Joined: 29th Jan 2010
Location:
Posted: 6th Jul 2010 11:45
Hello
I am in the middle of making a game and i am using the 'text' command to display the amount of the remaining(using the time command). The text has a opaque background. I added the 3d part of the game in but now you can see the text but its flickering on the 3d image. I was woundering if anyone knows the reason why this is happening and how i could fix it.
Thank You to everyone.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Jul 2010 16:34
Sure - it's happening because you haven't taken control of when DBPro shows you what has been done so far.

At the top of your program, use the SYNC ON command - that tells DBPro that you are taking charge.

Then when you've done everything you need to in your main loop, use the SYNC command to tell DBPro it's all done - everything up to that point will be displayed.



LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 6th Jul 2010 17:04
By adding the '3D part' of the game, you are now using the backdrop. Using the backdrop requires that text be printed in every game loop. Make sure that every time you reach the SYNC command at the bottom of your game loop (as IanM said), you have used the TEXT command to show it on the screen. Another thing to look at would be the DRAW TO FRONT command.


Michael73
14
Years of Service
User Offline
Joined: 29th Jan 2010
Location:
Posted: 7th Jul 2010 09:15
Thanks for the help, I knew I was foregting something - I just couldn't quite remember what it was.

Login to post a reply

Server time is: 2024-11-23 14:14:35
Your offset time is: 2024-11-23 14:14:35