Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fullscreen Flicker #221

Open
wertstahl opened this issue Oct 8, 2021 · 19 comments
Open

Fullscreen Flicker #221

wertstahl opened this issue Oct 8, 2021 · 19 comments
Assignees
Labels
bug Something isn't working pending reproduction Needs further input/testing/reproduction by the issuer

Comments

@wertstahl
Copy link

wertstahl commented Oct 8, 2021

Windows 10 x64 Nvidia GTX 760 latest drivers
when i go fullscreen (F11), on my 1920x1080 LG, half of the lower screen flickers terribly as soon as character choice is finished - more precisely, it seems to be a redraw timing error... some barbwire-bordered black shape flickers at about half height of the screen in the bottom section over the entire width as soon as the real story begins. Unplayable.

@Pyrdacor Pyrdacor self-assigned this Oct 8, 2021
@Pyrdacor Pyrdacor added bug Something isn't working v1.3 Ambermoon.net 1.3 labels Oct 8, 2021
@Pyrdacor Pyrdacor added this to the Ambermoon 1.3 milestone Oct 8, 2021
@Pyrdacor
Copy link
Owner

Can you provide some screenshots? I can't reproduce this on my end.

Can you also try to turn on/off some settings in the nvidia control panel like turning off "VSync"? Just temporarly of course to track down the issue.

@Pyrdacor Pyrdacor added the pending reproduction Needs further input/testing/reproduction by the issuer label Oct 11, 2021
@Pyrdacor Pyrdacor mentioned this issue Oct 11, 2021
17 tasks
@Pyrdacor Pyrdacor removed the v1.3 Ambermoon.net 1.3 label Nov 8, 2021
@Pyrdacor Pyrdacor removed this from the Ambermoon 1.3 milestone Nov 15, 2021
@haja00011
Copy link

haja00011 commented Nov 21, 2021

I also see a flickering in fullscreen.
But I only see it if I run a program (Edge browser which runs a youtube movie) in the back of (behind) Ambermoon.net.
Ok, it is fullscreen, in the back is maybe not exact.

  1. Run browser and start youtube video
  2. Run Ambermoon.Net in full screen

If I don't run the youtube movie I don't have the flickering.

Edit: Disabling VSync doesn't solve the problem for me.

OS: Windows 10
graphics card: NVIDIA GeForce GTX 780

@Pyrdacor
Copy link
Owner

Thanks. I will investigate this with your instructions.

@tgfmfc
Copy link

tgfmfc commented Jul 1, 2022

I have the flicker issue as well. It's already there in the intro, seems to be less though. There is NO app running in the backgound/behind the Ambermoon window. I've uploaded 2 short videos showing the problem.

https://icedrive.net/s/FGg9uQY3b5BV5YYR9buawjP3vVRb

Link expires in 30 days.

OS: Windows 10
GFX: NVIDIA RTX 3050

I used a Radeon RX480 before - didn't happen there as far as i remember.

@Pyrdacor
Copy link
Owner

Pyrdacor commented Jul 1, 2022

This looks like your taskbar is interfering with the game window. Can you try to hide the taskbar before you start the game?

@tgfmfc
Copy link

tgfmfc commented Jul 1, 2022

Already thought about that, but the flickering area is much higher than the taskbar. Of course i checked it anyway by attaching the taskbar to the top of the screen - didn't change anything. I've uploaded another video from the 3d dungeon where the issue gets much worse. filename: VID_20220701_203041.mp4 (same link as above)
Please let me know if you need any further system specs.

@tgfmfc
Copy link

tgfmfc commented Jul 1, 2022

Another thing worth mentioning might be that it's not just a black flicker, parts of the graphics seem to be jumping within it.
As you've probably guessed already, the issue can't be seen, when i capture the video directly from the nvidia software, that's why i'm using my phone to capture the videos. I've used mpc to move frame by frame through the video, which of course is far from perfect, perhaps this screen helps anyways:

image

@Pyrdacor
Copy link
Owner

Pyrdacor commented Jul 1, 2022

Can you try to change your vsync setting in the Nvidia software? Maybe it has some effect.

@tgfmfc
Copy link

tgfmfc commented Jul 1, 2022

The result is actually quite interesting! I'm sure i already tried that about a month ago when i read your suggestion from october 21 - it didn't help.
I just tried again and the flicker was gone, both with vsync completely turned off or on. (default setting is to use the setting for 3d-applications).
What makes it interesting besides fixing the flicker (tested in the 3d-dungeon):
With vsync off, the movement seems very smooth with some stutter every few seconds but with constant tearing. The tearing line loops constantly from bottom to top.
With vsync on, the graphics aren't smooth anymore, there seems to be more or less constant stuttering.
I then activated the fps overlay expecting a quite constant number hopefully at 60. I'm not sure, but in one try it jumped between 54 and 60.
Do you limit the framerate in the game? if so, it might cause the problem, i guess - i'm not an all an expert on this, but if you limit the framerate to a value lower than 60 (which is the frequency i use), there might be an interference with what nvidia is trying to do. just a guess though.

@Pyrdacor
Copy link
Owner

Pyrdacor commented Jul 1, 2022

Actually I perform some adaptive vsync on my own dependent on how fast the rendering is. I will add an option to disable this in the next version which I will release in the next days.

@tgfmfc
Copy link

tgfmfc commented Jul 1, 2022

Could you perhaps provide me with a version with a higher fps-cap (could be static, something like 80) - That could verify if it really is the issue (and yes - that would be just a test, not a fix)

@Pyrdacor
Copy link
Owner

Pyrdacor commented Jul 1, 2022

I am not at my PC right now and don't know if I will be able to do so this weekend. But next week for sure.

@tgfmfc
Copy link

tgfmfc commented Jul 1, 2022

No problem - i'm not planning to play ambermoon within the next weeks. At the moment i'd still prefer the emulated version anyways, since i have sound (music) issues as well - could be related. Thanks for the great project - very much appreciated!

@Pyrdacor
Copy link
Owner

Pyrdacor commented Jul 1, 2022

Too bad. If you don't mind please open an issue here on GitHub for the music as well. I always try to improve the project but some things don't happen on my end so I'm dependent on people who have those issues and help me to find the reason. So thanks for your input so far.

@tgfmfc
Copy link

tgfmfc commented Jul 1, 2022

Sorry, no harm intended! I love this project and i'd love to help. Right now i don't intend to open an issue about the music - it's about crackling and the music being crackly and german: 'leierig'/out of sync - since i think it might be related to the other issue.
again: i'm very thankful for what you're doing! Me preferring the amiga-version ist just because i have it preinstalled and i can start it with a click. Of course i'll follow the ambermoon.net project as well!

@Pyrdacor
Copy link
Owner

Pyrdacor commented Jul 10, 2022

The result is actually quite interesting! I'm sure i already tried that about a month ago when i read your suggestion from october 21 - it didn't help. I just tried again and the flicker was gone, both with vsync completely turned off or on. (default setting is to use the setting for 3d-applications). What makes it interesting besides fixing the flicker (tested in the 3d-dungeon): With vsync off, the movement seems very smooth with some stutter every few seconds but with constant tearing. The tearing line loops constantly from bottom to top. With vsync on, the graphics aren't smooth anymore, there seems to be more or less constant stuttering. I then activated the fps overlay expecting a quite constant number hopefully at 60. I'm not sure, but in one try it jumped between 54 and 60. Do you limit the framerate in the game? if so, it might cause the problem, i guess - i'm not an all an expert on this, but if you limit the framerate to a value lower than 60 (which is the frequency i use), there might be an interference with what nvidia is trying to do. just a guess though.

Ok I had a look now. As I said I use adaptive vsync and a fixed frame rate of 60. I can also turn off vsync or turn it on the whole time. In those cases the behavior is exactly as you mentioned it. Without vsync, screen tearing. With vsync, stuttering. This is the reason why I implemented adaptive vsync in the first place. The problem is that I use the internal timing (60 frames or ticks per second) for all kind of stuff: movement, ingame time, etc. So changing that would break the game. But it really shouldn't be necessary in my opinion.

There are basically two FPS values involved. One is used by the graphics API I use. It basically uses a timer to only call the render method at given times (or always if vsync is on). But my own implementation calculates and manages its own FPS through time differences. As mentioned this is to keep the game itself at a stable speed (movement etc). The adaptive vsync will only control the graphics API behavior, my own timings will always be the same as it guarantees a stable framerate on all systems as long as they are not ultra slow.

Your settings to override vsync, will also only override the setting of the graphic API and not mine.

So I can't change my internal FPS limitation without breaking the game or spending much time. Moreover I don't want to allow disabling adaptive vsync through the game options as it would cause problems (as you mentioned). If someone overrides the behavior inside the nvidia settings, it is his own decision but the result will be bad.

Anyway, I found a spot inside my code which might lead to the flickering. It is only a shot into the blue but maybe you can just test it: https://www.file-upload.net/download-14964654/Ambermoon.net.zip.html

Caution with the file host site. Don't let you bait to click on the Ad which looks like the download button. You have to wait a few seconds until the real download button appears.

@tgfmfc
Copy link

tgfmfc commented Jul 10, 2022

Just tried the test build - the flickering is still there. It might have decreased a bit - but i'm really not sure.

@Pyrdacor
Copy link
Owner

Pyrdacor commented Jul 11, 2022

By any chance, does your graphic card use G-Sync or FreeSync? Does your monitor use a variable refresh rate? If so, can you try to disable this?

@tgfmfc
Copy link

tgfmfc commented Aug 3, 2022

Weird. I answered the github mail on 11.07. Doesn't seem to have arrived here. Sorry for that. This was my original answer:

"I don't have a compatible screen, so: no i don't use either of them."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending reproduction Needs further input/testing/reproduction by the issuer
Projects
None yet
Development

No branches or pull requests

4 participants