jcae2798 132 Posted January 22, 2016 I just want to be clear. So i'm sure this has been posted many times, but i've done my searchers and not clear around exactly what i wanted to ask. When designing mission, what overall affects performance? 1. Placed objects (Am i correct that this is only an issue when its within view distance of player? Once they move far out, this no longer applies. Would there be a benefit to delete and/or hide objects?) 2. Placed Units. (Assuming disabling SIMULATION on every unit will improve mission overall, correct? Any other tips? Skill an issue? Or no matter skill it has same impacts?) 3. Overall scripts (Of course every script will impact mission. Are the ones that perform loops the worst? Should additional scripts be avoided at all costs when possible?) Any other tips i'll take it :) Share this post Link to post Share on other sites
jshock 513 Posted January 22, 2016 1. As long as you don't have 1000's upon 1000's of objects, it shouldn't be an issue. 2. This would be the main kicker, disabling simulation would help yes. But so long as simulation is enabled, FSMs will be running, which means those units are essentially "thinking", which each "brain" needs its own chunk of the pie that is the server/your machine. 3. Overall most scripts are relatively light and/or if they are heavy they aren't looped and are more of a "one and done" execution on init or on a particular event. As long as scripts are written correctly, looped or no, there shouldn't be an issue, but overall, I would avoid scripts that need to be looped constantly to provide a desired effect (particle effects for example). And for most of this I refer mostly to performance in multiplayer, singleplayer you have a lot more leeway when it comes to this stuff, and as with any multiplayer mission, the more clients, this less leeway. 2 Share this post Link to post Share on other sites
m0nkey 111 Posted January 22, 2016 I am a mere beginner to arma.I am however not a beginner with computers. What I witness for myself in arma is that the fewer objects, the better. Even vehicles take resources. AI much more so. I am always watching resources, whether its a dedicated server or my own machine as host or single player. For myself then, I try to limit AI as much as possible by caching or triggers that spawn things when needed. I go so far as to not use triggers or waitUntils that watch every frame or faster, but instead use a more reasonable timeframe. This may be waitUntil {sleep 1;(code)}; or just a loop with sleep 5; Summed up, my own findings are don't use too many AI as first rule, and second is to not do anything "on every frame" or similar if you don't have to. But I am after all just a beginner to this thing called arma :) 2 Share this post Link to post Share on other sites
jcae2798 132 Posted January 24, 2016 Yea when i originally was posting this, my question was more toward how objects affects performance (With EDEN being released). My guess is once the player moves out of view (assuming they correctly setup their viewobject settings), then this no longer causes an impact.... Maybe i'm wrong though. In an older mission i use to delete the base objects via trigger when unit moved out, but not sure if this is required. Of course it may help? IDK... Appreciate the reply as well. Share this post Link to post Share on other sites
TedHo 53 Posted January 27, 2016 In an older mission i use to delete the base objects via trigger when unit moved out, but not sure if this is required. Of course it may help? IDK... In singleplayer I wouldn't worry about deleting unneeded stuff as long as they're simulation disabled, and your CPU should be fine. In multiplayer sessions (especially with high player count) having too many objects seems to create a strain on server bandwidth. In which case it might be better to keep deleting unneeded objects. Another thing to consider: trigger conditions are evaluated onEachFrame, which means having too many triggers can significantly affect performance. This goes back to m0nkey's suggestion of not using too many onEachFrame loops. A good alternative to detecting player leaving the area would be to use something like: waituntil {sleep 10; player distance _pos > 1000}; //OR: waituntil {sleep 10; !(["MarkerName", getPos player] call BIS_fnc_inTrigger)}; {deleteVehicle _x} forEach _vehiclesToDelete; Share this post Link to post Share on other sites
barbolani 198 Posted January 28, 2016 Another thing to consider: trigger conditions are evaluated onEachFrame, You sure? In old times I've read a lot of docs saying triggers check every 0.5 secs... Share this post Link to post Share on other sites
whiztler 137 Posted January 28, 2016 You sure? In old times I've read a lot of docs saying triggers check every 0.5 secs... Indeed. Also in A3, trigger conditions are evaluated every 0.5 seconds Share this post Link to post Share on other sites
driftingnitro 38 Posted January 28, 2016 I make co-op missions for a unit that has 40+ players on at once and optimization is a huge factor with a mission of that scope. On the topic of multiplayer and by evaluating other people's frame-rates when playing, the biggest hit to performance is the combat itself. People would be receiving 60fps at base when their render distance doesn't reach the AO. When they were in the AO it was around 40-50 FPS, but when the fighting started. With combining bullets, tracers, sounds, particles, and other affects, that's where their biggest performance hit was. Granted this was on a Dedicated Server so all the AI processing load was off the host/client. I recommend testing missions by actually fighting in them, spawn AI to take the player's role just to shoot, make noise, and do stuff so you can see how it holds up in a fight. For hosted games, AI will be guaranteed to be your downfall like JShock said. Even a few AI squads on both sides will make a noticeable hit. To the host's PC, however the other players should not see the same performance hit, independent of the actual rendering of the unit's models, textures, and so on. In conclusion, always delete units that are irrelevant to the mission and will not become relevant in order to ensure maximum efficiency. Objects can cause some frame drop too but that typically happens when physics and vehicles are involved. I've made elaborate structured in XCAM with 2000+ objects with almost no performance hit. The key is those objects did not have active physics, they were static. Hope this provides some insight on optimization. Share this post Link to post Share on other sites
TedHo 53 Posted January 28, 2016 You sure? In old times I've read a lot of docs saying triggers check every 0.5 secs... Indeed. Also in A3, trigger conditions are evaluated every 0.5 seconds I stand corrected. Sorry about the misinformation. Share this post Link to post Share on other sites