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 Professional Discussion / Help please: unwanted screen flicker

Author
Message
MMQ
17
Years of Service
User Offline
Joined: 12th Aug 2006
Playing:
Posted: 18th Apr 2017 13:46
Hi,

I'm running through some DBP exercises, mostly from Hands On Dark Basic Pro.
On one computer, I follow the examples and write my code and it works fine.
On the other, I run and compile the same code but I sometimes get an annoying screen flicker.
This happens in both fullscreen and window modes.

I traced this behaviour down to (string) functions and more recently I’ve experienced this with BITMAP operations.

I’ve tried copying my entire DBP directory from the working computer to the other one with no success. I’ve even recently upgraded the graphics card from an NVidia 310 to an NVidia GT 710 (latest drivers). My main PC has an NVidia 670 GTX.

Any ideas on what might be causing the flickering and how to fix or work around it?

Any help is much appreciated!
Thanks, in advance.

Example code 1:


Example code 2:
Madmaxquinn

There are only 10 types of people in the world: those who understand binary and those who don\'t.
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 19th Apr 2017 01:45

Sorry, but I don't understand how these codes are demonstrating a flicker when you are resting on a WAIT KEY... is it flickering in a loop somewhere or is this the actual code showing the flicker?
Send your parents to noisy sprite demo hell... enter the D-Zone
MMQ
17
Years of Service
User Offline
Joined: 12th Aug 2006
Playing:
Posted: 19th Apr 2017 08:17
This is the actual code!

Loops work fine so long as they don't contain string functions.

i.e. This code doesn't flicker:


But this does:


The one thing I haven't tried yet is compiling the executables and then copying over from one PC to the other (they are in different locations) and seeing if the flickering follows the executable or if it's just that specific PC.
I'm wondering if it's a compiler issue and if so how to fix it?

I'll update again once I've had a chance to test running the executables.
Madmaxquinn

There are only 10 types of people in the world: those who understand binary and those who don\'t.
MMQ
17
Years of Service
User Offline
Joined: 12th Aug 2006
Playing:
Posted: 20th Apr 2017 08:22
I compiled the code above on PC 1. It runs just fine: no flicker.
The same code is compiled on PC: it flickers.
I copied the executables compiled on PC 1 to PC2 and they run fine.
I copied the executables compiled on PC2 to PC1 and the flickering is there.
This says to me it must be a compile issue on PC2 but I have no idea how to fix it.
Any suggestions?
Thanks once again, in advance.
Madmaxquinn

There are only 10 types of people in the world: those who understand binary and those who don\'t.
Bored of the Rings
User Banned
Posted: 20th Apr 2017 15:52
Try using sync on : sync rate 60
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
MMQ
17
Years of Service
User Offline
Joined: 12th Aug 2006
Playing:
Posted: 20th Apr 2017 16:19
Quote: "Try using sync on : sync rate 60 "


That doesn't help. This is a compiler issue, not a code problem.
Madmaxquinn

There are only 10 types of people in the world: those who understand binary and those who don\'t.
Bored of the Rings
User Banned
Posted: 20th Apr 2017 16:48
Good luck with that
Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 20th Apr 2017 16:52
not a compile issue, it's double buffering. The flicker will be done to the two buffers would different contents and DBpro will swap buffers during the wait key as you've not disabled that behavior.

PlayBASIC To HTML5/WEB - Convert PlayBASIC To Machine Code
MMQ
17
Years of Service
User Offline
Joined: 12th Aug 2006
Playing:
Posted: 20th Apr 2017 16:57
Early days but I think I've fixed it by reapplying dbpro_upgrade_7_7_RC7.
Madmaxquinn

There are only 10 types of people in the world: those who understand binary and those who don\'t.
MMQ
17
Years of Service
User Offline
Joined: 12th Aug 2006
Playing:
Posted: 21st Apr 2017 13:23
Just to let you know it's still behaving so it appears that somehow my install was corrupted resulting in this odd issue with compiling the code.
I haven't had any issues since reapplying the 7_7_RC7 patch.
Thanks for your help.
Madmaxquinn

There are only 10 types of people in the world: those who understand binary and those who don\'t.

Login to post a reply

Server time is: 2024-03-28 21:25:09
Your offset time is: 2024-03-28 21:25:09