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 / No text or drawing appearing unless window is moved

Author
Message
Random Man A
14
Years of Service
User Offline
Joined: 1st Mar 2007
Location:
Posted: 14th Nov 2021 03:51 Edited at: 14th Nov 2021 20:36
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.



[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
Derek Darkly
10
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 15th Nov 2021 14:23 Edited at: 15th Nov 2021 15:01
You should use SYNC at the very end of your loop because it updates everything the program did up to then, and you also don't have to worry about using CLS when using sync.
Also, to get colors for BOX, it's used something like this:

Send your parents to noisy sprite demo hell... enter the D-Zone

Login to post a reply

Server time is: 2021-12-02 04:30:28
Your offset time is: 2021-12-02 04:30:28