Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Map Benchmark by Nerexis (nmilsim.wordpress.com )
- // Discord: https://discordapp.com/invite/s7BMSjp
- // Steam: https://steamcommunity.com/profiles/76561198010051679/
- // version 27.11.2023
- [] spawn {
- private _totalFPS = 0;
- private _count = 0;
- private _mapSize = worldSize;
- private _startTime = diag_tickTime;
- private _scores = [];
- player allowDamage false;
- private _ehId = player addEventHandler["HandleDamage", {0;}];
- setViewDistance 4000;
- setObjectViewDistance 4000;
- setDate [2022,2,24,12,0];
- 0 setOvercast 0.3;
- 0 setRain 0;
- 0 setFog 0;
- forceWeatherChange;
- uisleep 1;
- systemChat "Starting FPS test, please close debug console...";
- uisleep 1;
- diag_log "Starting FPS test...";
- systemChat "3";
- uisleep 1;
- systemChat "2";
- uisleep 1;
- systemChat "1";
- uisleep 1;
- systemChat "START";
- for "_x" from 0 to _mapSize step 1000 do {
- for "_y" from 0 to _mapSize step 1000 do {
- private _center = [_x + 500, _y + 500, 0];
- if (surfaceIsWater _center) then {
- continue;
- };
- private _pos = [_center select 0, _center select 1, 0];
- cameraOn setPos _pos;
- cameraOn setDir ([_pos, [worldSize/2,worldSize/2,0]] call BIS_fnc_dirTo);
- cameraOn camCommit 0;
- uiSleep 1;
- private _fps = diag_fps;
- _totalFPS = _totalFPS + _fps;
- _count = _count + 1;
- _scores pushBack [_fps, _pos];
- };
- };
- private _endTime = diag_tickTime;
- private _elapsedTime = _endTime - _startTime;
- private _averageFPS = _totalFPS / _count;
- private _msg = format ["Map %1: Average FPS: %2, Samples: %3, Took: %4 seconds", worldName, _averageFPS, _count, _elapsedTime];
- systemChat _msg;
- diag_log _msg;
- player allowDamage true;
- player removeEventHandler["HandleDamage",_ehId];
- _scores sort true;
- diag_log format["------ MAP BENCHMARK RESULTS EXPORT START T%1 ------",diag_tickTime];
- {
- diag_log format["%1. FPS %2, POS %3",_foreachindex,_x # 0, _x # 1];
- } foreach _scores;
- diag_log format["------ MAP BENCHMARK RESULTS EXPORT END T%2 ------",diag_tickTime];
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement