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 Discussion / Background Flickering

Author
Message
Toby Quan
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: U S A
Posted: 20th May 2004 06:24
I am working on my game for the acoders competition. It will be done in total 2D.

I really really want to do sprites, but I keep encountering strange flickering problems. I am programming it with DBC v1.13.

Anyway, I have read threads on this board where people debated using sprites or using Paste Image. Sprites offer so much more than just the Paste Image. Sprites have tons of commands and features, and paste image is ... well ... just paste image.

Here is a screenshot of what I have done so far:



My current program uses Sprites, but sometimes the background flickers - and sometimes it doesn't!

Could somebody else try it and tell me if it flickers for you or not?

http://www.ScottTown.com/games/tc_033/beta.zip

This program above is simply the character selection screen. There are 6 characters. You pick one, the computer picks one, you pick the next one, the computer picks one, you pick another, and the computer picks the last one. Then, the program quits.

Sometimes, I can run the program once, and it will work just fine. Then, if I run it again, it will flicker.

Another way I can make it flicker sometimes is if I jiggle the mouse back and forth really fast for a few seconds.

Try running it two times. Did it flicker for you? It sure does for me.

I'm not going to try to get a new video card or anything like that, because if it doesn't work correctly on my machine, that means that it may not work on other machines - namely, the judges of the event.

I am currently re-writing the program using the Paste Image command instead of using sprites. So far, no flicker. Even when I jiggle my mouse around real fast - which caused my sprite version of the application to begin to flicker. I have sync set to 45.
The Rev
21
Years of Service
User Offline
Joined: 26th Apr 2004
Location: Mississippi USA
Posted: 20th May 2004 07:38
Hi I tried it and ran it four times tried the mouse real fast and no flicker I am running a 500mz 128 ram win 98 dx8.01 ati rage 8 meg video card
zenassem
22
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 20th May 2004 10:08 Edited at: 20th May 2004 10:14
User,
[edit: update]
It seems to be your code, more than likely your input handler. I have noticed now that it only happens if I click and miss the image and click on the backgound. Check that area of your code.

When first running it everything seemed fine. As I started clicking/selected the images on the third one I chose the screen started to flicker in some areas. I believe this has more to do with a misplaced or lackof a sync command somewhere in your code possibly a nested loop or function call from your main loop. If you post your source we can figue it out.

The main disadvantage of using paste image over sprite, is with the former you lose the "sprites built in" ability to handle collisions. Plus, In DBpro sprites are rendered by 3d (since it uses DirextX9+). This tends to be faster in DBpro.

here's my specs in case you were wondering:



Toby Quan
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: U S A
Posted: 21st May 2004 05:01
Thanks a ton for trying out my program. Based upon these results so far, it works on one computer and not on another. That's what I was afraid of.

I have posted the source code in the SOURCE button below.

There is only one sync command in the entire program, which is at the end of the game loop.

Here are my specs:

Login to post a reply

Server time is: 2025-05-23 19:25:20
Your offset time is: 2025-05-23 19:25:20