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 / Are there more setup parameters?

Author
Message
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 1st Sep 2013 07:49
Here's a quick question which very likely has a no answer (until V2 - fingers crossed).

When you create a project it makes two files, main.agc and setup.agc. You can alter the fullscreen, height and width in the setup.agc file, but are there any more parameters that it will accept? For example, I can set my app to run fullscreen at 1920 x 1080 which is great...but the screen tearing is horrible. Is there a flag to turn on vsync?
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 1st Sep 2013 08:26
this you can turn on in game but it use 60 Hz.

SetVSync( mode )
mode - 1 to turn vsync on, 0 to turn it off.

http://www.appgamekit.com/documentation/Reference/Core/SetVSync.htm
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 1st Sep 2013 08:40 Edited at: 1st Sep 2013 08:40
Doesn't work for me at all. I've tried assorted variations of the frame rate (60,59.9,59.1,70) and combinations of the commands - nothing. I've just finsihed posting in haliop's thread, but I can get vsync working only by going to the nvidia control panel and manually adding my game's .exe to the list of apps and specifying it use vsync. Any method works, on, adaptive etc, but if I even tell the game exe to use the global setting, and turn that to on, screen tearing still appears in the game.

Not sure if it's an AppGameKit or nvidia issue, but it appears that the drivers aren't understanding AppGameKit trying to turn on vsync???

EDIT ssorry, by combinations of the commands I mean setvsync(1), setsyncrate(x,0) etc etc.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 1st Sep 2013 09:24
the docu said you can use only one command
setsyncrate(x,0) or setvsync(1)
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 1st Sep 2013 09:55
SetVsync works sometime. Just started using it myself. According to the help it disables SetSyncRate. But you may have more luck only using one of them.

Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 1st Sep 2013 10:35
Digital awakening, yes I've tried combinations of one, the other and both. No matter what I do, vsync doesn't seem to work.

It's probably just the overpowering nVidia drivers and there's nothing I can do...just curious as to how many other machines may suffer the same, nVidia is quite a popular brand! :-(
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 1st Sep 2013 11:36
I also have Nvidia on my laptop. Doing some testing it seems that I always have sync rate problems running full screen (not always visible). From what I understand of the help, it sets the sync rate to the same as the screen's refresh rate. But what happens if there are variations to the framerate? Printing the frame rate setvsync( 1 ) does the same as setsyncrate( 60, 1 ). I get about 59.4 FPS. Not a solid 60. So I have a line going through the screen (moving from top to bottom) where the top is one frame and the bottom is another.

The normal definition of vsync is that the game renders the frame and then wait for the screen to refresh, before rendering another. This is not how AppGameKit handles it and that's the problem.

Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 1st Sep 2013 11:45
Isn't that though because, as Paul explained in another thread, they changed it for windows xp onwards to match the desktop manager (or something like that), and using 60 is the same as vsync? Either way, using vsync is meant to stop the tearing at the cost of frame rates, which it does not.

If you had vsync on, but your machine cannot cope with 60fps,it waits for the next refresh as you say and that's when the frame rate drops. But my machine is a 4gb quade core with a 2gb gtx670.....pretty confident it's keeping up. Lol. As happens though, the frame rate is always on screen and it does maintain 60 with the exception of the periodic frame rate drops that Marcus describes in another thread, which I'm confident is because, like dbpro, agk isn't threaded, or at least not when windowed.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 1st Sep 2013 15:25
I get no tearing on my Ouya regardless of framerate. Because it does true vsync. I think AppGameKit runs in what DBP refers to as windowed full screen. However, I get no tearing if I run AppGameKit in a window, fullscreen set to 0.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 5th Sep 2013 14:56
I found the problem, it seems that whilst DWM is the preferred method of vsyncing on Windows it does not apply to full screen apps. Instead a full screen app should use normal OpenGL vsync, I've made this change for the next update.
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 5th Sep 2013 16:10
Awesome, thanks Paul.

Bet you hoped beyond hope that you'd come back from your hols and find no more issues stopping v2! Hope you had a good break anyway.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 5th Sep 2013 22:02
Sounds great Paul

Login to post a reply

Server time is: 2024-05-09 05:23:00
Your offset time is: 2024-05-09 05:23:00