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 / Graphics break-up on fast moving graphics

Author
Message
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 13th Dec 2017 10:11
I'm struggling with graphics break-up when I have fast movement on screen and detailed/contrasty graphics. I'm used to the slight LCD blurring that you get (that wasn't an issue 25 years ago on CRT!) but this feels worse. My LCD monitor was good for its day but is about 9-12 years old so it might just be down to that but I'm keen to get to the bottom of it and understand what I can do to eliminate or reduce the effect. My game is running at around 250fps (syncrate(0,0)) and I'm using sync() to update all graphics so I expected smooth-ish graphics. I've tried VSync(1) which improves things but that has the occasional stutter (that I'm investigating) and is still not perfect from a graphics break-up point of view. I am planning on trying SetRenderToImage tonight as an alternative way of processing the graphics (have no idea if that is a sensible plan) but thought I'd jump on and see if anyone has any ideas? Is this an AppGameKit thing or a monitor thing or am I just wanting the impossible? My graphics card is a monster (nvidia 1080) so I don't think that is a limiting factor.
Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)
Markus
Valued Member
19
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 13th Dec 2017 12:09
if you can provide an example code we can test on different systems and see what happens.
AGK (Steam) V2017.09.25 : Windows 10 Pro 64 Bit : AMD (17.11.4) Radeon R7 265 : Mac mini OS High Sierra (10.13)
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 13th Dec 2017 12:55
Hi Markus - It's a massive game (https://forum.thegamecreators.com/thread/212269?page=5) that I've been working on for a couple of years or so... so tough to provide all the code. I can try and mock up a test and see what happens and I was also thinking of buying a fast moving& detailed platformer on Steam to see how that looks on my setup (any ideas?) but I'm wondering if others have experienced stuttering/break up and if they managed to get around it somehow?

Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)
Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 13th Dec 2017 13:04
Is the speed of the graphics dependent on the frame rate? Or are you using a timer-based method to control it?
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
Markus
Valued Member
19
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 13th Dec 2017 14:01 Edited at: 13th Dec 2017 14:04
about stuttering
if you have loops with variable length each frame or you call a sub function every x frame which takes longer. means a non constant time in frame tick.
or a mistake in timer-based movement.
or background tasks, or much file access.
or ...
AGK (Steam) V2017.09.25 : Windows 10 Pro 64 Bit : AMD (17.11.4) Radeon R7 265 : Mac mini OS High Sierra (10.13)
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 13th Dec 2017 14:06
could you provide screenshots or a video to showcase the issue?
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 13th Dec 2017 14:54
Sounds like it might be screen-tear. You need to wait for the vertical blank. SetVSync(1).
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 13th Dec 2017 14:57
Phaelax - Timer based control - speeds are set in px/second and then movement is calculated based on the loop speed so regardless of frames, movement is the same.

Markus - I'm going to remove all the enemy/platforms and see if this makes a difference - I never really noticed any issue in World 1 but that is less demanding graphically (world 2 has more layers). I can set up a debug function t detect slower loops and see if it's dipping heavily on occassion.

Smallg - I was hoping to fix it and then show you guys a video! But yes, I may have to do that next.

I might see if I can replicate the issue on a completely isolated piece of code (ie make it a tiny piece of code that only).

Anyone got experience of rendering all graphics/sprites to an image (SetRenderToImage) and then displaying that image? Does that lead to more "solid" graphics?
Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 13th Dec 2017 15:01
CJB - I don't think it's classic screen tear (which I have also had) - I've used SetVSync(1) and whilst it does help a bit, I'm still getting some graphics breaking up and occasional stutters. SetVSync(1) also means you force your game to 59/60 cycles per second...which is fine but anecdotally it feels less able to cope with sudden extra load (ie when you throw lots of graphics to the screen).

Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 13th Dec 2017 15:45
I'm using a virtual resolution of 1920 x 1080. Just done another test (when I should be working!)... On my (even older) 30" Dell monitor (attached to a different PC), which has a native resolution of 2560 x 1600 and therefore stretches the game to fill the screen, the game looks much better. No real break-up - LCD blurring but that's just LCDs for you. Interestingly, even with SetSyncRate(0,0) it has always run at 59fps on this PC. I know the PC could run faster (it's a dual Xeon) but it's always seemed to sync to the monitor. Anyway, that's an aside.

Next test is another monitor on my main home PC where I have seen the graphics break-up. I guess I'm wondering if it's a crappy monitor thing given it's fine on my work PC?

So for PC games, do most of you use SetVSync(1) or do you let the game run as fast as possible with SetSyncRate(0,0)?
Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 14th Dec 2017 21:56
Yeah - probably a good idea in general. I think some background process, that i've not managed to work out, dented performance but it's be not bad thing to have a snoop around at the various functions to see how fast they are performing and other things that these commands might show...

Thanks.
Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)

Login to post a reply

Server time is: 2024-03-29 04:37:00
Your offset time is: 2024-03-29 04:37:00