Hey Santman,
I made a final test I'd like you to try. All others are welcome, too
The code basically waits for about 15 seconds to allow any overlay to kick in and vanish ( like Gforce Experience ), so the FPS are accurate.
After 5 more seconds, it memorizes the fps at that point of time, and starts emitting particles.
The font colour should turn to green now, which means you can delete ALL particles now by pressing A.
After pressing A, the CUR FPS should return to a value close to the MAX FPS.
Please let the code run for about 40-60 seconds before you press A.
SetErrorMode ( 0 )
SetWindowSize ( 0, 0, 1 )
SetVirtualResolution ( GetMaxDeviceWidth(), GetMaxDeviceHeight() )
SetSyncRate ( 0, 1 )
SetCameraRange ( 1, 0.1, 20000 )
SetPrintColor ( 255, 0, 0 )
SetPrintSize ( 32 )
freq# = 1000.0
e = Create3DParticles ( GetCameraX(1), GetCameraY(1) - 500, GetCameraZ(1) )
MoveCameraLocalZ ( 1, -3000 )
Set3DParticlesDirection ( e, 50.0, 50.0, 50.0, 0.0 )
Set3DParticlesMax ( e, -1 )
Set3DParticlesFrequency ( e, freq# )
Set3DParticlesLife ( e, 600 )
Set3DParticlesDirectionRange ( e, 10.0,10.0 )
Set3DParticlesSize ( e, 100 )
Set3DParticlesTransparency ( e, 1 )
Set3DParticlesActive ( e, 0 )
max = 0
start = GetMilliseconds()
repeat
if ( GetMilliseconds() - start < 15000 ) then Print( "Waiting 15 secs for possible overlays to kick in" )
if ( GetMilliseconds() - start > 20000 )
print ( "Press A to delete all particles ( !!! !!! )" )
if ( max = 0 )
max = trunc ( ScreenFPS() )
SetPrintColor ( 0, 255, 0 )
Set3DParticlesActive ( e, 1 )
endif
else
print ( "Press A to delete all particles ( not yet )" )
endif
if max <> 0 and GetRawKeyPressed ( 65 ) then Delete3DParticles ( e )
print ( "" )
print ( "MAX FPS: " + str ( max ) )
print ( "CUR FPS: " + str ( trunc ( ScreenFPS() ) ) )
Sync()
until GetRawKeyPressed ( 27 )
END
PSY