For quite a while now I've found the output of AppGameKit getting worse. Especially on Mac.
Since version AppGameKit Classic 2018-07-12 I've found a big drop in raw FPS output and the introduction of judder. As 99% of the time I develop on my Mac I'd be interested to see what other users experience across various OS's and AppGameKit versions.
I've compiled binaries of 3 different versions of AppGameKit for Windows / Mac and Linux. The versions used were :
AGK Classic 2018-07-12
AGK Classic 2019-06-11
AGK Studio 2019-07-23
For me the best performer ( on Mac at least ) for both constant smoothness and fastest FPS ( with vSync off ) is AppGameKit Classic 2018-07-12.
How to test :
1.. Download the version(s) for the OS's you have.
2.. Watch closely for a minute or two to see which AppGameKit version runs the smoothest without juddering.
3.. After point 2 press S to toggle vSync Off and see which version produces the fastest FPS.
Download Links :
https://www.syntaxbomb.com/files/AGK-FPS-Judder-Windows.zip
https://www.syntaxbomb.com/files/AGK-FPS-Judder-Mac.zip
https://www.syntaxbomb.com/files/AGK-FPS-Judder-Linux.zip
Report :
Let me know the results of which worked best / worst for you + The OS's used and the FPS with vSync off per version.
Compile yourself? :
For those that have AppGameKit Classic / Studio / Different versions - Here's the code if you don't want to download the included binaries - Also attached is the ball.png which goes in the media folder.
//
// FPS drop and juddering since AGK Classic 2018-07-12
//
// press 'S' to toggle vsync on / off to see speed drop after AGK Classic 2018-07-12
// press ESC to quit this exciting thing
//
SetErrorMode( 2 )
SetWindowSize( 1920, 1080, 1 )
SetVirtualResolution( 1920, 1080 )
SetDisplayAspect( 1920.0 / 1080.0 )
SetOrientationAllowed( 0, 0, 1, 1 )
SetRawMouseVisible( 0 )
SetRandomSeed ( GetUnixTime() )
SetVSync( 1 )
SetClearColor( 0, 0, 0 )
SetDefaultMinFilter( 0 )
SetDefaultMagFilter( 0 )
UseNewDefaultFonts( 1 )
Type tBall
x As Float
y As Float
speed As Float
size As Integer
EndType
Local ball As tBall
Local balls As tBall[]
Local tempImage, ballSprite, vSync, FPS
tempImage = LoadImage( "ball.png" )
ballSprite = CreateSprite( tempImage )
vSync = 1
FPS = CreateText( " FPS : " )
SetTextPosition( FPS, 0, 0 )
SetTextSize( FPS, 30 )
For count = 1 To 200
ball.x = Random( 0, 1919 )
ball.y = Random( 0, 1079 )
ball.speed = Random( 1, 6 ) + ( Random( 1, 50 ) / 100.0 )
ball.size = Random( 32, 32 * 4 )
balls.insert( ball )
Next
Repeat
If GetRawKeyPressed( 83 )
vSync = 1 - vSync
If vSync = 0
SetSyncRate( 5000, 0 )
SetVSync( 0 )
Else
SetVSync( vSync )
EndIf
EndIf
For count = 0 To balls.length
SetSpritePosition( ballSprite, balls[ count ].x, balls[ count].y )
SetSpriteSize( ballSprite, balls[ count ].size, balls[ count ].size )
DrawSprite( ballSprite )
Inc balls[ count ].x, balls[ count ].speed
If balls[ count ].x > 1920 Then balls[ count ].x = 1920 - balls[ count ].x - balls[ count ].size
Next
SetTextString( FPS, " FPS : " + Str( ScreenFPS() ) )
DrawText( FPS )
Swap()
Until GetRawKeyPressed( 27 )
So what's changed and why is it getting worse on Mac? Others have also found the earlier version of AppGameKit on Windows performs smoother and faster so it's not just Mac alone.
EDIT 2019-07-29 - A user at SyntaxBomb posted video's and their experience with the above code which echo's many others results with introduced judder in later version of AppGameKit :
https://www.syntaxbomb.com/index.php/topic,5891.msg28188.html#msg28188