Game Development Community

Scene Tearing in TGB

by TimR · in Technical Issues · 05/20/2011 (12:42 pm) · 4 replies

In TGB, I'm getting some significant scene tearing (flickering lines) along the edges of my image maps. I've seen the other threads that fixed this problem by enabling VSYNC. This, however, has not fixed my issue, which is occurring on both my desktop and laptop. Any advice would be appreciated. The game is a 2D platformer with a moving camera. It occurs whether the camera is directly attached to the player or not.

About the author


#1
05/20/2011 (3:42 pm)
Make sure your images are a power of 2 in both directions. 16, 32, 64, 128, 256, 512, 1024, etc.

I've seen where if the image isn't a power of two, you get a white line on the edges that will flicker due to the image being resized to be a power of two.
#2
05/20/2011 (4:38 pm)
I changed all of the images so that they were a power of 2 in both directions but the problem still persists.
#3
05/23/2011 (12:16 pm)
So I've played around with this a bit more, and I realized that this only happens when using .png's. If I resave my images at bitmaps or jpegs then the problem stops. However, I need transparency so I have to use png's. Can anyone clue me in as to why only png's are flickering and tearing along the edges for me?
#4
05/28/2011 (6:14 pm)
Make sure you changed
$pref::Video::disableVerticalSync = 1;
in file
common/preferences/defaultPrefs.cs
Change to
$pref::Video::disableVerticalSync = 0;