I've had a very weird problem for ages, and I've put up with it for a while, but at this point I'm at my wit's end.
For some reason, sometimes when printing text to the screen, or drawing small simple shapes, I'll just get a black screen. BUT, if I drag the window on the screen with the mouse, while it's moving, I'll see the text or shapes flicker rapidly. I've tried everything mentioned in this thread:
https://forum.thegamecreators.com/thread/219719 - that thread just says flickering period, but I see nothing unless I move the window, THEN it flickers. And I have no idea what that means. And it's only with certain programs - others work entirely differently for some reason, but there's no difference in the code as far as I can tell. An old program I somehow got to a state where it flickers when printing text without moving the window, but when I start drawing on the screen, it goes solid without flickering and works perfectly, and there's ZERO rhyme or reason to it.
I've tried Properties in the editor, changing the Screen Type to every option except "hidden", changing resolution, reinstalling DirectX and DBPro from scratch, seemingly everything. I'm out of ideas.
Please help.
sync on
sync rate 60
sync : sync
randomize timer()
musicVolume=50
set display mode 1280,720,32,1
load music "ch_beforeqf.mp3",1
load music "ch_timer60.mp3",2
load sound "ch_correct_qf.wav",1
set music volume 1,musicVolume
set music volume 2,musicVolume
set sound volume 1,50
Start:
cls : cls
set music volume 1,musicVolume
set music volume 2,musicVolume
sync
rem Opening screen and instructions
cls : cls
sync
KeyPress$=""
do
cls : cls
print "Introduction music starts automatically. Press C to quiet the music and set up the clock."
print "Once the clock is set up, press S to start the Moneymaker round."
print "During the timer, press R for a correct answer. This key will continue working after time expires."
print " "
print "Press any key to begin."
KeyPress$ = INKEY$()
if KeyPress$="" then else exit
loop
cls : cls
sync
KeyPress$=""
wait 2000
rem question and timer box
do
cls : cls
sync
ink rgb(255,255,255),0
box 60,300,1220,420
ink rgb(0,0,0),0
box 62,302,818,418
ink rgb(0,0,0),0
box 820,302,1218,418
KeyPress$ = INKEY$()
if KeyPress$="" then else exit
loop
end
[EDIT] After some frustration, I realized after 14 years of programming stuff in Dark Basic for a while, then forgetting about it for ages, and coming back to it like a newbie all over again, I figure if I'm going to be a newbie, I might as well try something else. Currently playing around with AppGameKit instead, and it's taking me some time to figure out what the new commands are, but it's working in that, text and drawings stay fully visible the whole time. I might just stick with it, but if anyone knows what's wrong with my Dark Basic Pro, I'd still like to know, this could help me fix some old programs.
Thanks for your time and assistance,
Aaron