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 / getting rid of the screen "flicker" with print statements and pasted images

Author
Message
JABBER
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Indiana, USA
Posted: 21st Sep 2006 21:35
I can't seem to keep my images and printed statements from flickering every time it syncs.
How do you get a nice consitant image or printed data while sync-ing every loop cycle?
here's what it should look like, just the start of a commands pannel at the bottom of the screen, it and the printed data flicker like mad, prob more times than my eye can see.---->
http://img.photobucket.com/albums/v459/JABO/sjot1flicker.jpg



heres my code-->


I'll getting close to a uber rough beta release if I can just get past these little things that arise,
I was thinking of posting it at the WIP board the even with the way it is now it's at now, the only functions not coded are the dive planes, (but I have coded balist control for diving) and the weapons, I've also created the largest world ever, the northeast coast of Frace to southern Enland, and West out into the eastern Atlantic, at almost full scale, I couldn't believe it! but we'll see what happens to the FPS when there are other ships, and strutures,
Having trouble with my fog making thinks go all black or disappear all together, but another issue another day

anyway, went off track there, if anyone could help me with the flicker I'd been very greatful,

JABBERWOCKY

Retired DEV team member Targetware.net
Retired DEV team memeber BF 1918 MOD
http://hosted.filefront.com/JABBER1975
Cave Man
18
Years of Service
User Offline
Joined: 22nd Aug 2006
Location: North Carolina, US
Posted: 21st Sep 2006 22:12
put

sync on : sync rate 0

at the top of your code

JABBER
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Indiana, USA
Posted: 21st Sep 2006 23:33
CAVE MAN, I'm getting you a Christmas gift, you have helped me greatly!

Retired DEV team member Targetware.net
Retired DEV team memeber BF 1918 MOD
http://hosted.filefront.com/JABBER1975
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 22nd Sep 2006 00:57
You might want to use:

SYNC RATE 60

or something similar to keep the game under control, unless you have coded it to work at the same speed on all computers. This keeps it at 60 frames per second. A value of 0 tells it to run as fast as possible



Cave Man
18
Years of Service
User Offline
Joined: 22nd Aug 2006
Location: North Carolina, US
Posted: 22nd Sep 2006 02:51
You're welcome. If you don't do that, it refreshes at weird rates. Using it also brings down the CPU usage

JABBER
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Indiana, USA
Posted: 22nd Sep 2006 17:23
thanks guys, I was going to ask about what the sync 0 was going to mess with the app running at different speeds on different machines.
But, I'm not to that point yet with my project, just trying to get the basics coded,
And you gents have help me over another hurtle again,
JABBERWOCKY

Retired DEV team member Targetware.net
Retired DEV team memeber BF 1918 MOD
http://hosted.filefront.com/JABBER1975
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 22nd Sep 2006 17:43
Quote: "But, I'm not to that point yet with my project, just trying to get the basics coded"


I would still put a set SYNC RATE in now, then you know how it's looking at every stage. Otherwise, you may have to recode things later.



JABBER
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Indiana, USA
Posted: 23rd Sep 2006 19:07
so do I need to match the sync rate of the program with the current system sync rate of the machine it's running on.
Basicly is the cause of the "Flicker" a mismatch of sync rate between the program and the system?
THANKS GENTS,

JABBERWOCKY

Retired DEV team member Targetware.net
Retired DEV team memeber BF 1918 MOD
http://hosted.filefront.com/JABBER1975
D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 23rd Sep 2006 19:46
No, I think you are over complicating the situation. If you set the sync rate to
60, the program will refresh roughly at that speed on any machine no matter what the specs.
Computers with very low specs are the exception. If the program is very CPU intensive,
then obviously a system with very low specs may not be able to handle the refresh rate.

Without analyizing your snippet, I suspect that you may have an issue somewhere in your
code, or you have a problem with video card drivers or DX9. If the hardware and drivers
are not the problem, then start trouble shooting your program. Try eliminating different
parts of your code until the problem dissappears. It's a matter of process of elimination.

I have only one suggestion at the moment. Try replacing all of your cursor commands and
print statements with text commands and see if there is any improvement.
JABBER
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Indiana, USA
Posted: 24th Sep 2006 00:00
AH!
Thanks D Ogre, I'll try the test statements first, I haven't used those commands at all yet.

Retired DEV team member Targetware.net
Retired DEV team memeber BF 1918 MOD
http://hosted.filefront.com/JABBER1975

Login to post a reply

Server time is: 2024-09-25 09:39:41
Your offset time is: 2024-09-25 09:39:41