CMB:SimplifyTesting: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "[[Image:" to "[[File:")
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
=SimplifyTesting=
=SimplifyTesting=


==Goals==
== Goals ==


* Showcase what testing is all about.
* Showcase what testing is all about.
Line 7: Line 7:
* Offer tools to support and simplify testing.
* Offer tools to support and simplify testing.


==Preface==
== Preface ==


A crucial part is to have your [[CMA:DevelopmentSetup|development setup]] right and all decent [[CMA:Tools|tools]] available.
A crucial part is to have your [[CMA:DevelopmentSetup|development setup]] right and all decent [[CMA:Tools|tools]] available.
Line 13: Line 13:
'''Make sure that both is true for your setup.'''
'''Make sure that both is true for your setup.'''


==General tips==
== General tips ==


* Use window mode to avoid load times from ALT+Tab and therefore easily be able to switch been the game and the OS. This is also useful for game loading times to be able to do something useful meanwhile. ([[ArmA:_Startup_Parameters]]):
* Use window mode to avoid load times from ALT+Tab and therefore easily be able to switch been the game and the OS. This is also useful for game loading times to be able to do something useful meanwhile. ([[ArmA:_Startup_Parameters]]):
Line 21: Line 21:
* Alternatively you can modify the arma.cfg located in your .\profiles\Users\''STANDARD-OS-USER'' folder. You can define the start area (x & y) as well as the width and height. In other words you can leave the area left/right either/and below/above the arma screen "blank" for your text editor or any other app.
* Alternatively you can modify the arma.cfg located in your .\profiles\Users\''STANDARD-OS-USER'' folder. You can define the start area (x & y) as well as the width and height. In other words you can leave the area left/right either/and below/above the arma screen "blank" for your text editor or any other app.
  // Example for 1280 x 1024 windows resolution with two line taskbar.
  // Example for 1280 x 1024 windows resolution with two line taskbar.
  winX=0;  
  winX=0;
  winY=0;
  winY=0;
  winW=1280;
  winW=1280;
Line 27: Line 27:


<br clear="all" />
<br clear="all" />
[[Image:CMB_SF_NoTopWindowBar.jpg|thumb|280 px|No top window bar|left]]
[[File:CMB_SF_NoTopWindowBar.jpg|thumb|280 px|No top window bar|left]]
[[Image:CMB SF WindowModeWithReduceScreenSize.jpg|thumb|280 px|Window mode with reduced screen size|left]]
[[File:CMB SF WindowModeWithReduceScreenSize.jpg|thumb|280 px|Window mode with reduced screen size|left]]
<br clear="all" />
<br clear="all" />


Line 59: Line 59:
  useWBuffer=0;
  useWBuffer=0;


==Launching the game==
== Launching the game ==


Everything related to configs requires the game to be (re)started to parse the config files.
Everything related to configs requires the game to be (re)started to parse the config files.
Line 67: Line 67:
* Load no island and intro mission on startup ([[ArmA:_Startup_Parameters]]):
* Load no island and intro mission on startup ([[ArmA:_Startup_Parameters]]):
  -world=empty
  -world=empty
* Use [http://en.wikipedia.org/wiki/RAID_0#RAID_5 RAID 5],[http://en.wikipedia.org/wiki/RAID_0#RAID_0 RAID 0] or a [http://en.wikipedia.org/wiki/Solid-state_drive solid-state drive] to speed up loading the files from the HDD.
* Use {{Link|https://en.wikipedia.org/wiki/RAID_0#RAID_5|RAID 5}},{{Link|https://en.wikipedia.org/wiki/RAID_0#RAID_0|RAID 0}} or a {{Link|https://en.wikipedia.org/wiki/Solid-state_drive|solid-state drive}} to speed up loading the files from the HDD.
* Use the ''minimal addons setup'' (MAS).  
* Use the ''minimal addons setup'' (MAS).  


===Minimal Addons Setup===
=== Minimal Addons Setup ===


Step-by-step setup:
Step-by-step setup:
Line 87: Line 87:
  PW:
  PW:


==Testing areas==
== Testing areas ==


===SP editor===
=== SP editor ===


* Benefits of the SP editor:
* Benefits of the SP editor:
Line 96: Line 96:
  "g:\games\arma\users\myUser\missions\myMission.intro\mission.sqm"
  "g:\games\arma\users\myUser\missions\myMission.intro\mission.sqm"


===MP editor===
=== MP editor ===


* Benefits of the MP editor:
* Benefits of the MP editor:
Line 103: Line 103:
  -host
  -host


===Dedicated server===
=== Dedicated server ===


You can easily setup a dedicated server on your own computer. Especially with a multi core system the performance is fine.
You can easily setup a dedicated server on your own computer. Especially with a multi core system the performance is fine.
Line 113: Line 113:
* Direct launch:
* Direct launch:


===Buldozer===
=== Buldozer ===


==Debug==
== Debug ==


The game will write errors of configs and scripts to a file called [[arma.RPT|arma.rpt]].<br>
The game will write errors of configs and scripts to a file called [[arma.RPT|arma.rpt]].<br>
Line 126: Line 126:
Any script error message happening during the game will be put in the arma.rpt.
Any script error message happening during the game will be put in the arma.rpt.


===Dedicated server===
=== Dedicated server ===


Note that while testing on a dedicated server it will write an arma.rpt there<br>
Note that while testing on a dedicated server it will write an arma.rpt there<br>
as well. So make sure to check both the client and the server.
as well. So make sure to check both the client and the server.


===Write to arma.rpt yourself===
=== Write to arma.rpt yourself ===


You can use these commands to debug strings to [[arma.RPT|rpt]] file:
You can use these commands to debug strings to [[arma.RPT|rpt]] file:
Line 148: Line 148:
  format['%1',_myVar] createVehicleLocal [0, 0, 0];
  format['%1',_myVar] createVehicleLocal [0, 0, 0];


==Debug console==
== Debug console ==


Get a debug console. You can execute code during the mission or check variables:
Get a debug console. You can execute code during the mission or check variables:


* [http://forums.bistudio.com/showthread.php?t=126249 DevCon - the developer console]
* {{Link|link= http://forums.bistudio.com/showthread.php?t=126249|text= DevCon - the developer console}}
* [http://forums.bistudio.com/showthread.php?t=73356 Gaia's Debug Console for ARMA 2]
* {{Link|link= http://forums.bistudio.com/showthread.php?t=73356|text= Gaia's Debug Console for ARMA 2}}


==Play-testing==
== Play-testing ==


===Invincibility===
=== Invincibility ===


You can make yourself invincible with  
You can make yourself invincible with  
Line 176: Line 176:
  };
  };


==Unpacked files==
== Unpacked files ==


[[Category:ArmA_2:_Editing]]
{{GameCategory|arma2|Editing}}

Latest revision as of 23:09, 20 November 2023

SimplifyTesting

Goals

  • Showcase what testing is all about.
  • Explain how to simplify the task.
  • Offer tools to support and simplify testing.

Preface

A crucial part is to have your development setup right and all decent tools available.

Make sure that both is true for your setup.

General tips

  • Use window mode to avoid load times from ALT+Tab and therefore easily be able to switch been the game and the OS. This is also useful for game loading times to be able to do something useful meanwhile. (ArmA:_Startup_Parameters):
-window
  • Use -x and -y along with window mode to be able to have another app visible on the screen. Alternatively get a second monitor. (ArmA:_Startup_Parameters):
-window -x=800 -y=1024
  • Alternatively you can modify the arma.cfg located in your .\profiles\Users\STANDARD-OS-USER folder. You can define the start area (x & y) as well as the width and height. In other words you can leave the area left/right either/and below/above the arma screen "blank" for your text editor or any other app.
// Example for 1280 x 1024 windows resolution with two line taskbar.
winX=0;
winY=0;
winW=1280;
winH=960;


No top window bar
Window mode with reduced screen size


  • Use noPause mode to keep the gaming running even without focus for non MP environment. Testing in the MP editor makes this no longer needed. Yet with the SP editor you can load a mission more easily and bit faster. (ArmA:_Startup_Parameters):
-noPause
-noSplash 
  • Use profiles to put the profile folder within your arma folder to access it more easily. Use name to call a specific profile for testing. (ArmA:_Startup_Parameters):
-profiles=Profiles -name=test

An alternative is to use an full path to avoid the profiles folder sublayer
and have the 'users', 'mpmissionscache' and the debug and report files
directly in the game folder:

-profiles=g:\games\arma 
g:\games\arma\users\*
g:\games\arma\mpmissionscache\*
g:\games\arma\ArmA2Int.RPT
  • Modify your test.ArmAprofile to the very lowest settings to reduce low times and get most FPS:
blood=0;
viewDistance=1;
terrainGrid=50;
precision=8;
sceneComplexity=1;
shadingQuality=0;
shadowQuality=0;
soundEnableEAX=0;
soundEnableHW=0;
anisoFilter=-1;
TexQuality=-1;
postFX=0;
useWBuffer=0;

Launching the game

Everything related to configs requires the game to be (re)started to parse the config files.

To reduce the A1 startup time you can utilize the following tweaks:

-world=empty

Minimal Addons Setup

Step-by-step setup:

  1. Move your .\arma\addons folder to .\arma\CA_addons\addons
  2. Adapt all your standard launch paths to use -mod=CA_addons; (and more if needed)
  3. Create the folder structure .\arma\x\mas\addons
  4. Git clone the MAS repository to .\arma\x\mas
  5. Copy anims.pbo from .\arma\CA_addons\addons to .\arma\x\mas\addons
  6. Adapt dev launch paths to use -mod=x\mas; (and more if needed)

MAS git repository data:

URL of repository:
User:
PW:

Testing areas

SP editor

  • Benefits of the SP editor:
    • A
  • Direct launch:
"g:\games\arma\users\myUser\missions\myMission.intro\mission.sqm"

MP editor

  • Benefits of the MP editor:
    • A
  • Direct launch:
-host

Dedicated server

You can easily setup a dedicated server on your own computer. Especially with a multi core system the performance is fine.

  • Benefits of the dedicated editor:
    • Only way to properly test a MP mission for locality and performance.
  • DS configuration:
  • Direct launch:

Buldozer

Debug

The game will write errors of configs and scripts to a file called arma.rpt.
Check the page for the file's location.

The meaning of some errors is explained there as well as on its talk page.
However most error messages are rather easy to understand from the naming
and given output.

Any script error message happening during the game will be put in the arma.rpt.

Dedicated server

Note that while testing on a dedicated server it will write an arma.rpt there
as well. So make sure to check both the client and the server.

Write to arma.rpt yourself

You can use these commands to debug strings to rpt file:

diag_log "test";
diag_log _test;
diag_log (a + b);
diag_log [test];
localize 'my Debug String'; // => 'String my Debug String Not Found'
'my Debug String' createVehicleLocal [0, 0, 0]; // => 'Cannot create non-ai vehicle: my Debug String'

With format['%1',_myVar] you can convert code to string.

localize format['%1',_myVar];
format['%1',_myVar] createVehicleLocal [0, 0, 0];

Debug console

Get a debug console. You can execute code during the mission or check variables:

Play-testing

Invincibility

You can make yourself invincible with

player allowDamage false;
(vehicle player) allowDamage false;

Run it in a loop to make it always applied to matter what vehicles you enter and exit:

[] spawn
{
 while {true} do
 {
  player allowDamage false;
  (vehicle player) allowDamage false;
  sleep 0.1;
 };
};

Unpacked files