Mission Optimisation: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - "{{ExternalLink|" to "{{Link|") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 1: | Line 1: | ||
{{TOC|side}} | {{TOC|side}} | ||
{{ Feature | | {{Feature|informative|This page is about [[Mission Optimisation]]. For ''scripting'' optimisation, see [[Code Optimisation]].}} | ||
This article will try to be a general guide about improving your '''mission's''' performance.<br> | This article will try to be a general guide about improving your '''mission's''' performance.<br> | ||
As usual, moderation is the key; do not expect to find on this page a magical solution that makes it possible to run thousands of AI at | As usual, moderation is the key; do not expect to find on this page a magical solution that makes it possible to run thousands of AI at 240 FPS. | ||
Everything comes at a cost, the tweaks here will simply allow you to locate issues and calibrate your mission properly. | |||
== Before | == Before Anything == | ||
Before optimising anything, make sure you do not have any performance issue running the game itself: | Before optimising anything, make sure you do not have any performance issue running the game itself: | ||
Line 15: | Line 15: | ||
** '''Steam''' allows you to display FPS in a screen corner, in ''Settings > In game > FPS Counter'' | ** '''Steam''' allows you to display FPS in a screen corner, in ''Settings > In game > FPS Counter'' | ||
* Use (unofficial) Performance Guides to get better performances: | * Use (unofficial) Performance Guides to get better performances: | ||
** {{Link| | ** {{Link|https://steamcommunity.com/sharedfiles/filedetails/?id{{=}}1731305438|{{arma3}} performance guide}} | ||
** | ** {{Link|https://www.moddb.com/forum/thread/arma-2-ultimate-tweak-thread|{{arma2}} performance guide}} | ||
** {{Link| | ** {{Link|https://forums.bohemia.net/forums/topic/50167-pc-optimization-for-arma/|{{arma1}} performance guide}}<!-- | ||
** [ {{ofp}} performance guide] | ** [ {{ofp}} performance guide] | ||
--> | --> | ||
Line 24: | Line 24: | ||
** Lower your graphical settings (resolution, textures). If you get way better performances, at least your '''GPU''' limits you. | ** Lower your graphical settings (resolution, textures). If you get way better performances, at least your '''GPU''' limits you. | ||
** If the game keeps having low FPS when running @ 1024×768/low textures then your CPU is most likely the issue. Mission scripts may be performance-hogging too. | ** If the game keeps having low FPS when running @ 1024×768/low textures then your CPU is most likely the issue. Mission scripts may be performance-hogging too. | ||
{{ Feature | important | Please note that [[viewDistance|view distance]] (among other settings) impacts both GPU and CPU! }} | {{Feature|important|Please note that [[viewDistance|view distance]] (among other settings) impacts both GPU and CPU!}} | ||
{{ Feature | | {{Feature|informative|[[viewDistance|View distance]] can be separately set for each clients independently from the server's value through scripting.<br>This can make or break performance for the client.}} | ||
This can make or break performance for the client. }} | |||
== Creating your | == Creating your Mission == | ||
* Be sure to create your scripts with the latest available commands and functions. | * Be sure to create your scripts with the latest available commands and functions. | ||
Line 45: | Line 44: | ||
== Performance | == Performance Impact Table == | ||
{{Feature|Informative| | {{Feature|Informative| | ||
Line 53: | Line 52: | ||
}} | }} | ||
{| class="wikitable" | {| class="wikitable align-center-col-2 align-center-col-3 align-center-col-4" | ||
! Topic | ! Topic | ||
! CPU | ! CPU | ||
Line 95: | Line 94: | ||
|- | |- | ||
| | | | ||
==== General script mistakes ==== | ==== General script mistakes ==== | ||
| {{Colorball|orange}} | | {{Colorball|orange}} | ||
Line 174: | Line 172: | ||
== Performance Diagnostic tools == | == Performance Diagnostic tools == | ||
=== Server | === Server Commands === | ||
* [[Multiplayer Server Commands#Commands|#monitor]] 5 | * [[Multiplayer Server Commands#Commands|#monitor]] 5 | ||
Line 185: | Line 183: | ||
* [[:Category:Command_Group:_Diagnostic|Diag. command available in all builds]] | * [[:Category:Command_Group:_Diagnostic|Diag. command available in all builds]] | ||
== See | |||
== See Also == | |||
* [[Multiplayer Scripting]] | * [[Multiplayer Scripting]] |
Revision as of 20:58, 27 February 2023
This article will try to be a general guide about improving your mission's performance.
As usual, moderation is the key; do not expect to find on this page a magical solution that makes it possible to run thousands of AI at 240 FPS.
Everything comes at a cost, the tweaks here will simply allow you to locate issues and calibrate your mission properly.
Before Anything
Before optimising anything, make sure you do not have any performance issue running the game itself:
- Read Arma 3: Performance Optimisation
- Open the editor, place a unit in the area you like and test your computer.
- You can get current FPS in Arma 3 by going into video options or using diag_fps
- Steam allows you to display FPS in a screen corner, in Settings > In game > FPS Counter
- Use (unofficial) Performance Guides to get better performances:
- Play your mission in singleplayer. If your mission runs fine, its network messages might very well be the issue. See Multiplayer Scripting for good practice tips.
- Usual bottlenecks:
- Lower your graphical settings (resolution, textures). If you get way better performances, at least your GPU limits you.
- If the game keeps having low FPS when running @ 1024×768/low textures then your CPU is most likely the issue. Mission scripts may be performance-hogging too.
Creating your Mission
- Be sure to create your scripts with the latest available commands and functions.
- In Arma 3 use remoteExec / remoteExecCall and DITCH BIS_fnc_MP FOR GOOD! See Arma 3: Remote Execution for more information.
- In Arma 2 network communication is done using the Arma 2: Multiplayer Framework.
- Use the available frameworks and functions for each topic, unless you replace them by third-party ones:
Performance Impact Table
Topic | CPU | GPU | Net- work |
Solution |
---|---|---|---|---|
AI unit quantity |
| |||
Object quantity |
The less objects, the more FPS you will have.
| |||
General script mistakes |
Having too many scripts running is a cause for severe performance issues and execution delays in singleplayer as well as multiplayer.
| |||
High-frequency scripts |
Checking a condition too often is usually a source of poor performance. Does your code execution need to be frame-perfect, or can you afford a delay of a few seconds?
| |||
High-frequency network messages |
| |||
Unscheduled code |
Unscheduled code can have a high impact on the framerate, as such code is not subject to the scheduler's management (as its name suggests) and will run without limitation. Cyclic unscheduled low-performance code can make the game unplayable, up to freezing it. |
What else?
If you have applied all these recommendations and your mission still doesn't run well in multiplayer (but does in singleplayer), it might be caused by mods that you are running which could be badly, or not at all, optimised.
If you want to be sure, run the same mission with and without mods. If you have a big difference in performance, look no further.
Performance Diagnostic tools
Server Commands
- #monitor 5
- Shows performance information of the server. Interval 0 means to stop monitoring.
- #monitords 5
- Shows performance information in the dedicated server console. Interval 0 means to stop monitoring. (since Arma 3 v1.64)
Diagnostic commands