Lou Montana/Sandbox – User
Jump to navigation
Jump to search
Introduction
This article will try to be a general guide about improving your mission's code and its performance.
Creating your mission
- Be sure to create your scripts with the latest available commands.
- In Arma 3 DITCH BIS_fnc_MP FOR GOOD and use remoteExec / remoteExecCall instead! See Arma 3 Remote Execution.
- In Arma 2 ONLY use the Multiplayer framework.
- Use the available frameworks
Moar FPS!!1!
- AI will eat their host's CPU:
- Use agents whenever possible
- If a client has a low-end machine, they shouldn't lead a group of many AIs as these would then be locally computed.
- Arma 3 Dynamic Simulation allows you to freeze AI that are distant from players. Many distance settings should be set according to the mission.
- Simple Objects
- Less objects = more FPS
- Less mission objects
- Less weapon items / HMD / backpacks = less proxies (item position is calculated)
- Delete dead bodies / wreckages
- View distance
- Triggers check their condition every 0.5 second (hardcoded value). If you don't need such precision, use a while-loop script.
Server-side FPS
- The server should be considered as a powerful machine from a scripting point of view; .
- If you own more than one average computers, you could consider Headless client and coding accordingly.
Client-side FPS
Script optimisation
- Don't publicVariable at a high rate
- Don't spawn many objects
- Client view distance can be set separately from the server's value through scripting. This can make or break performance for the client.
Configuration optimisation
- If the client has issues playing in singleplayer, it is most likely that his hardware configuration is not up to the game's current settings, and will encounter even more issues in multiplayer.
Off-the-shelf script
_unit removePrimaryWeaponItem "acc_pointer_IR";
_unit removePrimaryWeaponItem "acc_flashlight";
if (sunOrMoon == 1) { _unit unlinkItem hmd _unit; };
What's next?
- drop unoptimised mods