vihkr 8 Posted June 6, 2018 New poster (try to take it easy on me!). I'm working on a campaign with some larger mechanized battles. My rig is not current but is hardly a potato (i7-4770K, GTX 970, 16GB). I can get 60-100+ frames on most multiplayer missions and other scenarios. I'm writing a Team Yankee type campaign where the co-op players take on company plus sized units in a series of battles. The players' unit consists of 10 tanks and 6 IFVs with 32 infantry (about 2/3 AI). Enemy force (AI) sizes start at a mechanized company (10 IFVs plus 8 infantry squads) and go up to 3-4X that size. FPS starts to suffer at the low end of battle size (-20 FPS). If I deploy 4 enemy companies plus support assets (scripted virtual artillery modules, airstrike effects etc.) it's an absolute slideshow until most of the units get destroyed. I'm already following many best practices: using effect modules and triggers for artillery, no out of visual range assets, removing assets from the mission using triggers when not needed, and aggressive dead unit garbage collection. However, the FPS still suffers heavily when there is a big battle. 1. Will using an AI mod like ASR AI 3 improve frames due to "more efficient" AI processing? 2. If 1. above is true, which AI mod is "most efficient"? 3. Enabling Dynamic Simulation seems to help somewhat but it makes some of battles unrealistic due to unit behaviour. Is there any way to plan/compensate for this? 4. Are there any other best practices and tips and tricks for big battles other than "use less units"? Share this post Link to post Share on other sites
vihkr 8 Posted June 6, 2018 Here the battle has just started and I'm getting around 25 frames. Here the battle is over and I'm getting about 56 frames which is far less then I usually get, probably cause most of blue team survived. Share this post Link to post Share on other sites
socs 92 Posted June 7, 2018 1 hour ago, vihkr said: Here the battle has just started and I'm getting around 25 frames. Here the battle is over and I'm getting about 56 frames which is far less then I usually get, probably cause most of blue team survived. Take into account the particles in the first frame where you're getting no frames... There's heavy smoke... Whereas your second frame, there's one smoke pillar and your fps are fine.. FPS drops can be cause by a number of things but from the looks of it, you're computer is struggling with the smoke aspect of your mission, also shadows can be playing a pretty big effect too although there's not many there so maybe not... Share this post Link to post Share on other sites
phronk 898 Posted June 7, 2018 Useful commands for optimizing performance. Will not solve all of your problems, but will grant you a head start in learning how to optimize settings for clients: https://community.bistudio.com/wiki/setViewDistance https://community.bistudio.com/wiki/setObjectViewDistance https://community.bistudio.com/wiki/setShadowDistance https://community.bistudio.com/wiki/setTerrainGrid https://community.bistudio.com/wiki/enableCaustics https://community.bistudio.com/wiki/enableEnvironment There are many other ways to optimize your mission(s) and scripts, but it can be situational. If you want to learn code optimization tips, this is a great resource: https://community.bistudio.com/wiki/Code_Optimisation 3 Share this post Link to post Share on other sites
zigzagtshirt 5 Posted June 7, 2018 Add some headless clients slots to the missions. This will at least give you the option of offloading the AI to one or more headless clients if available. Adding the slots does not necessitate their use, but allows you to use them if you want. Look into Werthles Headless Client script. https://steamcommunity.com/workshop/filedetails/?id=459850665 I would avoid the module and use the standalone script as the module has been buggy at times. If you aren't familiar with headless clients in Arma 3, it will take a little effort to understand and set up in the beginning, but once you are off and running you should see significant performance, stability and FPS improvements. Additionally, the AI fight more like actual soldiers vs. brain dead zombies since they don't have to compete for server resources to make them function. If you are using a i7-4770K on the server machine, you have plenty of CPU threads to spare for two headless clients running alongside the server on the same machine. Our guy runs the server alongside two HCs using a i7-4770K and still plays the missions on the same machine. Performance may vary depending on the content played, so I can't promise anything, but I'd say give this a try in addition to the other suggestions on optimizing your missions. Share this post Link to post Share on other sites
barbolani 198 Posted June 7, 2018 How many AI you have? You may disable AI features which maybe are not required for your scenario. Share this post Link to post Share on other sites
vihkr 8 Posted June 9, 2018 On 06/06/2018 at 8:11 PM, socs said: Take into account the particles in the first frame where you're getting no frames... There's heavy smoke... Whereas your second frame, there's one smoke pillar and your fps are fine.. FPS drops can be cause by a number of things but from the looks of it, you're computer is struggling with the smoke aspect of your mission, also shadows can be playing a pretty big effect too although there's not many there so maybe not... I thought it could be particle effects so I set up a test where I placed 30 smoke and fire effects in an otherwise empty scenario and ran it. Yes there was an FPS hit but nothing like in my scenario so I think we've eliminated smoke. Thanks. Share this post Link to post Share on other sites
vihkr 8 Posted June 9, 2018 On 07/06/2018 at 2:37 AM, phronk said: Useful commands for optimizing performance. Will not solve all of your problems, but will grant you a head start in learning how to optimize settings for clients: https://community.bistudio.com/wiki/setViewDistance https://community.bistudio.com/wiki/setObjectViewDistance https://community.bistudio.com/wiki/setShadowDistance https://community.bistudio.com/wiki/setTerrainGrid https://community.bistudio.com/wiki/enableCaustics https://community.bistudio.com/wiki/enableEnvironment There are many other ways to optimize your mission(s) and scripts, but it can be situational. If you want to learn code optimization tips, this is a great resource: https://community.bistudio.com/wiki/Code_Optimisation Thanks! I'm a long time Arma 2 and DayZ player though so have already done this. The code optimization section was worth a read, thanks for taking the time to send this stuff. Share this post Link to post Share on other sites
vihkr 8 Posted June 9, 2018 On 07/06/2018 at 10:12 AM, zigzagtshirt said: Add some headless clients slots to the missions. This will at least give you the option of offloading the AI to one or more headless clients if available. Adding the slots does not necessitate their use, but allows you to use them if you want. Look into Werthles Headless Client script. https://steamcommunity.com/workshop/filedetails/?id=459850665 I would avoid the module and use the standalone script as the module has been buggy at times. If you aren't familiar with headless clients in Arma 3, it will take a little effort to understand and set up in the beginning, but once you are off and running you should see significant performance, stability and FPS improvements. Additionally, the AI fight more like actual soldiers vs. brain dead zombies since they don't have to compete for server resources to make them function. If you are using a i7-4770K on the server machine, you have plenty of CPU threads to spare for two headless clients running alongside the server on the same machine. Our guy runs the server alongside two HCs using a i7-4770K and still plays the missions on the same machine. Performance may vary depending on the content played, so I can't promise anything, but I'd say give this a try in addition to the other suggestions on optimizing your missions. This very interesting, thanks. I'm going to try it out this weekend. The eventual goal is to transfer this scenario to a dedicated (rented) server. Can I run the HC on that server or is that not doable? Share this post Link to post Share on other sites
vihkr 8 Posted June 9, 2018 On 07/06/2018 at 11:09 AM, barbolani said: How many AI you have? You may disable AI features which maybe are not required for your scenario. The largest battle would have about 600 AI plus players, although I'm not close to that yet. Please explain "disable AI" features, may help, thanks. Share this post Link to post Share on other sites
kremator 1065 Posted June 9, 2018 Unfortunately anything over 300AI and Arma3 really craps out. Ai become brainless idiots that cannot see enemy a metre in front of them! Share this post Link to post Share on other sites
vihkr 8 Posted June 9, 2018 Ah shit. So large scale battles are a pipe dream? (And that explains why nearly all the missions are spec ops teams whacking guys?) Share this post Link to post Share on other sites
socs 92 Posted June 10, 2018 1 hour ago, vihkr said: Ah shit. So large scale battles are a pipe dream? (And that explains why nearly all the missions are spec ops teams whacking guys?) Not necessarily a pipe dream... You'd just need a pretty beefy computer to run them... But when i was talking about the smoke, the particle effects and the units all in one scenario will do you in lol... But yeah, Arma 3 is known for its fps problems after all... Share this post Link to post Share on other sites
dangerous-d 11 Posted June 11, 2018 What if you try your scenario but with a fraction of the units and vehicles? Then gradually drip more into the mission until it's performance is where you'd like it to be, then you could allow people to test it and see whether or not you should continue to build or focus on optimising what remains. As you mention, most missions are spec ops teams and small scale missions so if you put up a mission with 100+ units then that could be considered a large scale battle. Obviously not by real world standards or your own standards, but for many that'd be fine. Goodluck, I've learnt some stuff just from reading this thread so thanks for posting. Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted June 11, 2018 On 6/10/2018 at 12:40 AM, kremator said: Unfortunately anything over 300AI and Arma3 really craps out. Ai become brainless idiots that cannot see enemy a metre in front of them! 300? Aiming for the stars there, heh. Maybe with headless client and some beefy machines running them, you also need to consider the area where these units and vehicles will be. Having to render 300 infantry units in the nearby area will most likely lead to problems: Note that this is in VR, all AI disabled and simulation disabled with nothing much else to render, no weather, no trees taking up AA resources etc. on a i7-4770k @4.6ghz and a gtx 1080. Still an extreme case since it's unlikely to have 300 infantry units at a close distance all visible at once it showcases the performance impact on rendering alone. Having 300 civilians each running their own FSM, moving about with roughly 20% rendered at any time should be fine, but having fighting AI engaged in combat, you'd be lucky to stay above 40 fps having 10 vehicles and ~75 infantry fighting each other. Cheers Share this post Link to post Share on other sites
barbolani 198 Posted June 11, 2018 Check this command: https://community.bistudio.com/wiki/disableAI Obviously you won't want to disable most of the features on the AI but some of them make some CPU comsumption and may not be needed (Supression, mine proximity checking etc.) My experience is AI behaves well with up to 100 AI simulated. If you need more and need AI properly behaving, then you need a HC per 100 AIs. From there, the more AI, the more dumber they Will be. Share this post Link to post Share on other sites
kremator 1065 Posted June 11, 2018 1 hour ago, Grumpy Old Man said: 300? Aiming for the stars there, heh. I regularly run up to 300 with my beefy machine, yes. With recent advances in server executables, this is possible. Back in the olden days smoke would come from your machine for anything over 200! AI do become really stupid when FPS/CPS is low (I miss Fred41’s ultilities that showed CPS). 2 Share this post Link to post Share on other sites
vihkr 8 Posted June 11, 2018 9 hours ago, Grumpy Old Man said: Note that this is in VR, all AI disabled and simulation disabled with nothing much else to render, no weather, no trees taking up AA resources etc. on a i7-4770k @4.6ghz and a gtx 1080. Cheers Point taken, thanks. What are you using for your FPS / asset counter? Share this post Link to post Share on other sites
vihkr 8 Posted June 11, 2018 8 hours ago, barbolani said: Check this command: https://community.bistudio.com/wiki/disableAI Obviously you won't want to disable most of the features on the AI but some of them make some CPU comsumption and may not be needed (Supression, mine proximity checking etc.) My experience is AI behaves well with up to 100 AI simulated. If you need more and need AI properly behaving, then you need a HC per 100 AIs. From there, the more AI, the more dumber they Will be. Thanks, I'm trying out HC right now. Thanks for the tips and performance guidelines. Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted June 11, 2018 14 minutes ago, vihkr said: Point taken, thanks. What are you using for your FPS / asset counter? diag_fps and count allUnits. It's a simple formatted hint inside onEachFrame. Cheers Share this post Link to post Share on other sites
zigzagtshirt 5 Posted June 12, 2018 On 6/9/2018 at 7:08 PM, vihkr said: Ah shit. So large scale battles are a pipe dream? (And that explains why nearly all the missions are spec ops teams whacking guys?) If you use headless clients then they are doable, but it will depend on how many headless clients you have running and how much AI each of them can handle. On 6/9/2018 at 10:15 AM, vihkr said: This very interesting, thanks. I'm going to try it out this weekend. The eventual goal is to transfer this scenario to a dedicated (rented) server. Can I run the HC on that server or is that not doable? Headless clients work with dedicated servers the same as regular servers. Share this post Link to post Share on other sites
.kju 3244 Posted July 16, 2018 diag_captureFrame 1; diag_logSlowFrame ['total',0.3]; for very low level analysis you can try these. more here: https://community.bistudio.com/wiki/Performance_Profiling smoke/particles certainly do matter too. overall its the number of entities you can try to disable simulation (AI or collision/physx) and unit caching as mentioned on as many objects and entities as feasible for very advanced script profiling (unscheduled only so far) (which basically has no relation to fps - unless its about entity creation) check: https://forums.bohemia.net/forums/topic/211626-arma-script-profiler/ Dedmen and Kamen work in IDE integration and broader scope/overall improvement. This is the discord server: https://discord.gg/55AhNfc 1 Share this post Link to post Share on other sites