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 / Flashing Graphics Problem

Author
Message
Zeuts
20
Years of Service
User Offline
Joined: 8th Nov 2004
Location: Pittsburgh PA, USA
Posted: 1st Oct 2005 09:22
Okay, this is my first program attempt in "Dark Basic Classic", so I appologize if this a completely lame question. Try as I might, I couldn't figure out what was wrong.

So, the problem is this: When I run the program, the "Main menu screen displays, but the text showing the cursor position and the variable value of "ButtonNumberMain", along with the entire bottom menu bar and the on/off buttons, are ALL blinking repeatedly in rapid succession. Yet, the weird thing is that when I put my cursor over one of the 'button defined areas', everything stops blinking. It's only when my cursor isn't over a button area that everything flashes. Why?????????

I've posted my entire program code from top to bottom. Sorry if you're annoyed by my organization methods. I like to have things clearly seperated -just makes it easier for me. I hope it isn't a problem.



Lastly, if you see any parts of code that are blatently inefficient, or if you have any tips on a better way for me to do something, please state them. I'm a complete n00b when it comes to Dark Basic, and only a novice programmer at best.

-Thanks for any help.
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 1st Oct 2005 14:05
Zeuts,

1: It might help increasing the sync rate a bit.

2: You can remove the cls, because at the start of the loop, you paste an image over the complete screen wich causes all previous "2D" erased. Removing the cls will give you also a faster screen rate.

Immunity and Annihalation makes Immunihalation...
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 1st Oct 2005 18:18
As Sven says, Sync refreshes the 3D screen and wipes off any 2D and text.

Simply move any 2D output to the screen (Text etc.) to immediately after the Sync at the end of your main loop.

TDK_Man

Login to post a reply

Server time is: 2024-11-13 21:04:29
Your offset time is: 2024-11-13 21:04:29