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.

AppGameKit Classic Chat / Full Screen - Sprite Flickering

Author
Message
x3meblue
15
Years of Service
User Offline
Joined: 11th Dec 2008
Location: Nuremberg, Germany
Posted: 30th Apr 2015 05:07
Hi,

i have the feeling that the full screen mode doesn't get the same attention (speak optimization) like the window mode. I get some awful sprite flickering in full screen (Windows 8.1/Intel HD 3000/VSync on), but in the windows mode it works perfect.

I just have 1 sprite until now, take user input from keyboard to move this sprite, then set its position and sync.

Anything i am not seeing here?

AGK2 Tier 1 / GameGuru / ProMotion 6.5
fog
21
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Newcastle, England
Posted: 30th Apr 2015 05:44
A few people reported this on the Steam forums for my game Echoes+ too. They said it happens in some other games as well so it's not just an AppGameKit issue.

The solution was to right click on your exe file, pick properties and then go to the compatibility tab and check the box next to "Disable display scaling on high DPI settings.


Looking at my Steam feedback it only seems to effect a very small number of people (some OS & hardware combination I guess).

x3meblue
15
Years of Service
User Offline
Joined: 11th Dec 2008
Location: Nuremberg, Germany
Posted: 30th Apr 2015 06:25
This doesn't help.
Always when i move the sprite, i see like a ghost image of it and the colors are flickering. Like i said, SetVSync(1) doesn't help, although i thought it is for helping against this tearing effect.

AGK2 Tier 1 / GameGuru / ProMotion 6.5
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 30th Apr 2015 09:34
I get no problems in fullscreen and use it a lot on multiple machines. Any chance you could share your code (as it's so basic) so we can make some suggestions? It could be something fixable...

Using AppGameKit V2 Tier 1
x3meblue
15
Years of Service
User Offline
Joined: 11th Dec 2008
Location: Nuremberg, Germany
Posted: 30th Apr 2015 15:48
The higher i set the player speed, the more i can see this effect. With speed 1 it's barely visible, but this movement is just too slow for the game.

Here is the code:



AGK2 Tier 1 / GameGuru / ProMotion 6.5
Grayvyn
16
Years of Service
User Offline
Joined: 30th Oct 2008
Location: Southern California
Posted: 1st May 2015 18:57
I have the same flicking issue with my games as well, full screen or windowed. I slowed the FPS to make it better but it is still noticeable, especially with finely, detailed sprites with lots of transparency, say like... grass. I never figured it out and finally thought it was just an OpenGL issue.

x3meblue
15
Years of Service
User Offline
Joined: 11th Dec 2008
Location: Nuremberg, Germany
Posted: 1st May 2015 20:20
Yeah, i think it's an OpenGL and GPU issue, since i re-made the game with the same assets in DarkBasic Pro and i get the same issue here. Todays GPUs seems to have more problems with 2d graphics, because they are optimized just for 3d.

AGK2 Tier 1 / GameGuru / ProMotion 6.5
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 1st May 2015 23:44
If you get the same issue in DBP then it is obviously nothing to do with OpenGL.

AGK V2 user - Tier 1 & 2
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 6th May 2015 17:58
I took a long look at this issue a while back and here's what I came up with.

In Windows Vista and Windows 7 apps do not render to the screen directly when "Enable Desktop Composition" is turned on, they render to an off screen image which Windows then uses to construct the screen. You can find this setting in Control Panel->System and Security->System->Advanced system settings, click the settings button in the performance section, then look under the view effects tab. If the flicker goes away when desktop composition is turned off then it is Windows getting in the way of VSync that is causing it. In Windows 8 this is turned on by default and cannot be turned off.

For full screen apps (those that use WS_POPUP) it looks like this system is bypassed and an app can render directly to the screen, although I'm not 100% sure how it works in this case.

As a result of this AppGameKit attempts to detect when desktop composition is turned on and works with Windows to match its refresh rate and avoid flickering. However there are some cases that still seem to cause it, such as windowed mode with multi-monitor setups, I'm guessing because each monitor has a different refresh rate. As far as I can tell AppGameKit is now doing everything by the book so I don't think there is anything more I can do.

Login to post a reply

Server time is: 2024-11-25 21:56:49
Your offset time is: 2024-11-25 21:56:49