Windows Sprite tearing when moving fast ?[SOLVED]

W

Wintermute()

Guest
I'm getting some intermittant sprite/screen tear when my main player sprite is moving fast. (nothing else on screen tears)

I've assumed this is a vsync issue...looked at the manual and found these two code examples:

display_reset(aa, vsync);

or

display_set_windows_alternate_sync(flag);

My question is:

Which of these (if any!) is the right one to use, and where would I use it in the code - in the room creation code ?

Thanks!
W
 

jo-thijs

Member
None of the 2, you just go to the global game settings, windows tab (or whatever your target is), garphics tab and select "Use synchronisation to avoid tearing".
If that doesn't fix your issue, can you show us an image of the tearing?
Normally seen other things on the screen should tear as well.
 

TheouAegis

Member
If it's the thin bar that spans the entire width of your screen and either moves up and down the screen like a scan line or just hovers right in the middle of the screen, then it's a synchronization issue. Just be aware that synching will lock in your frame rate. If the computer can't handle your game at 60 fps with synching on, it will drop down to 30 fps and cause noticeable slowdown. (Usually only an issue with surfaces.)
 
W

Wintermute()

Guest
Thanks guys! i checked the 'use sync' in graphics tab for windows and the tearing of the player sprite has gone, in fact player movement all round looks a lot smoother now :)
 
Top