Jump to content
zorrobyte

ZBE_Cache AI & Vehicle caching script/addon

Recommended Posts

How many groups do you have for those 403 AI?

Share this post


Link to post
Share on other sites
How many groups do you have for those 403 AI?

13:06:45 "585 ZBE_Cache (zorro) --- Groups: 128 # All/Cached Units: 403/253 # All/Cached Vehicles: 27/5 # FPS: 40 # ObjectDrawDistance: 0"

Share this post


Link to post
Share on other sites
What does it mean when the Values of Cached Vehicles goes into negative? (Example "Cached Vehicles -87)

I believe it's due to the vehicle was deleted using deleteVehicle from the mission. Regardless, I'll work on using simulationEnabled to generate the cached unit and vehicle counts for greater accuracy for the next version. Negative debug numbers shouldn't hurt anything.

Share this post


Link to post
Share on other sites

0a781d67107c63efbe032693f71902d4.png

Been happening since the begining, not caused issues but...

Share this post


Link to post
Share on other sites

I've also encountered this rpt spam. Begins at mission start and continues indefinitely.

EDIT: to clarify a bit, the error does not occur consistently. Also, I'm testing this using a mission that spawns units after mission start.

Edited by SENSEII
clarification

Share this post


Link to post
Share on other sites

0a4060c9e2b8ff8399b5ed089b71989d.png

First, no Cache system.

Second, F3 system

Third, your system

66 groups 276/87 All/Cached 97/79 Vehicles All/cached FPS 28

Yours performs better in FPS, but worse in CPS

Share this post


Link to post
Share on other sites
http://i.gyazo.com/0a781d67107c63efbe032693f71902d4.png

Been happening since the begining, not caused issues but...

It's when there is no valid formationPosition _x for the specific unit it is attempting to setPos to. This can be due to spawning/deleting units during the mission. I've tried some conditions such as isNull and others with formationPosition however such attempts return in nothing, no true or false if undefined. Still working on a fix..

First, no Cache system.

Second, F3 system

Third, your system

66 groups 276/87 All/Cached 97/79 Vehicles All/cached FPS 28

Yours performs better in FPS, but worse in CPS

What CPU model do you have and at what frequency? I need to simulate a slow CPU to properly test the CPS as there is no drop with my 2500K @ 4.8GHZ my CPS is always at FPS. Maybe I can try underclocking.

Zriel, could you try commenting out the vehicle caching and the ai caching separately and running the test again for ZBE_Cache? I'd like to see what CPS is like on your machine with just AI and just Vehicle vs both so I know which is dropping. Also, is this from a dedicated server or the built in A3 server/editor?

Edited by zorrobyte

Share this post


Link to post
Share on other sites

In built editor. I can test on dedicated though, but in my own machine.

Intel Core i7-3770K 3.5GHz

---------- Post added at 00:21 ---------- Previous post was at 00:05 ----------

3c0103dbdda8521b227286e63c926729.png

First without IA.

Second Without Vehicles

You can appreciate how the second bar is a bit larger in time, so it indicates it's processing things slower.

Share this post


Link to post
Share on other sites
In built editor. I can test on dedicated though, but in my own machine.

Intel Core i7-3770K 3.5GHz

---------- Post added at 00:21 ---------- Previous post was at 00:05 ----------

http://i.gyazo.com/3c0103dbdda8521b227286e63c926729.png

First without IA.

Second Without Vehicles

You can appreciate how the second bar is a bit larger in time, so it indicates it's processing things slower.

Thank you! The emptyVehicle caching can be improved. I checked the last release and it apparently didn't have the FSM sleep tweaks I wanted in there. I need to work on reducing load for the vehicle caching.

Sidenote, the map center and range tweaks you did doesn't work on the VR island as BIS didn't define it. Not a huge issue but still one I'll need to find the solution for. I wasn't seeing the CPS drop as I test on VR and vehicles were not being cached.

Zriel, I made a "unoptimized" branch with no FSM sleeps on GIT to assess true code performance, just so you know what it is.

Edited by zorrobyte

Share this post


Link to post
Share on other sites

I will test the VR map.

About the improvements, just to make it clear, first image is having the caching disabled for IA. And de second one with the Vehicles caching disabled. I think you may have undestrood me wrong XD.

About the FSM, I have (as commentd to you) unloaded them from the functions and put all of them on a separate zbe_functions.sqf file, which is preprocessed at the start of the caching.

Do you want me to upload the changes?

Share this post


Link to post
Share on other sites
I will test the VR map.

About the improvements, just to make it clear, first image is having the caching disabled for IA. And de second one with the Vehicles caching disabled. I think you may have undestrood me wrong XD.

About the FSM, I have (as commentd to you) unloaded them from the functions and put all of them on a separate zbe_functions.sqf file, which is preprocessed at the start of the caching.

Do you want me to upload the changes?

I sent you a PM with my Skype info, I switched to the Beta branch as we should of been doing :P

Plus side, due to the miscommunication I squeezed 4CPS more out of the vehicle caching FSM

Edited by zorrobyte

Share this post


Link to post
Share on other sites

Today's release of 1.36 fixes the units not caching in cargo bug in A3. Zriel and I are doing some heavy performance optimizations and I will be sure to verify functionality for units caching in vehicles. We have also switched to a Beta branch and will be testing before release from now on for higher quality releases. Would be pleased to know I finally nailed the Error 0 elements 3 expected RPT spam.

Edited by zorrobyte

Share this post


Link to post
Share on other sites

In missions made of the Editor your Caching works lake a charm but i can confirm heavy CPS drops after testing around with MCC (what we are using in bigger events). From the MCC 3D Editor spawning an Unit takes ~40 secs. I hope you can improve the code in that direction.

Share this post


Link to post
Share on other sites
In missions made of the Editor your Caching works lake a charm but i can confirm heavy CPS drops after testing around with MCC (what we are using in bigger events). From the MCC 3D Editor spawning an Unit takes ~40 secs. I hope you can improve the code in that direction.

This is a beta not for official release build from the beta branch (skip this one Armaholic/Six):

https://www.dropbox.com/s/f14427iffmvdhvx/%40zbe_cacheinternal.7z?dl=0

I would like feedback on:

Error 0 elements 3 expected RPT spam (should be fixed)

CPS (script performance, if any lag experienced with MCC or another addon/script)

If the AI/Vehicles cache/uncache quick enough for you at reasonable cache distances (currently set to 3second uncache/5second cache)

Edited by zorrobyte

Share this post


Link to post
Share on other sites

Will test later on for you mate! Just been diverted recently testing out KOTH.

Share this post


Link to post
Share on other sites

Changelog

v4.6

  • Moved functions from FSM to zbe_functions.sqf with compilefinal
  • Empty vehicle scanning set to 15 second sleep (instead of 5)
  • Fixed cached AI and vehicle debug counts by using simulationEnabled (100% accurate now)
  • Fixed Error 0 elements provided, 3 expected setPOS RPT spam
  • Moved switchableUnits + playableUnits array to 15 second main.sqf loop instead of in FSM
  • Added _trandomc/u variable in FSM for a randomized FSM sleep for less concurrent calculations
  • Minimized evaluations for zbe_setPosLight/Full
  • Fixed empty vehicle FSM as was using True conditions instead of conditions
  • Fixed next leader uncache condition as was missing variable to set the new leader in the FSM causing it to loop constantly
  • Removing dead is now higher priority in FSM

ZBE_Cache couldn't of come this far without the help of Zriel and feedback on this thread, thank you!

I would LOVE feedback on CPS now and as a reminder, units in vehicles are now cached.

Download

Edited by zorrobyte

Share this post


Link to post
Share on other sites

Okies testing now mate. Will get back to you. Thanks to Zriel on helping too!

EDIT AFTER TESTING >>>>>

Running RealBattle_RTS on my dedi server

"3981 ZBE_Cache (Error: No Vehicle) --- Groups: 97 # All/Cached Units: 391/211 # All/Cached Vehicles: 36/0 # FPS 38 # ObjectDrawDistance: 0"

Apart from a little rubberbanding that can be seen on the map on very distant units (probably because server params aren't optimised) I'm very happy with performance. CPS is either identical to FPS within experimental error :)

Edited by Kremator

Share this post


Link to post
Share on other sites

Would be nice that you also postes your modset (if any). There's always a limit con how much can Arma engine handle al together.

Share this post


Link to post
Share on other sites

I ran RealBattle_RTS with just CBA and ASM (and obviously ZBE_cache) on the dedi.

I did a test run later on with zertychan's port of Benny's Warfare and although the FPS was high, the CPS was very low. I think it is indeed very mission dependent. Without ZBE_Cache the mission would not have as high FPS for sure.

Share this post


Link to post
Share on other sites

Same here after our today's mission with 34 players. Very high FPS but very low CPS.

Share this post


Link to post
Share on other sites

Well we use over 20GB of tested addons, but today's mission was first that was using ZBE Cache. Addon I used in this mission from all this pack were: RH M4/M16, PMC, AGM, BWMod, CBA_A3, LHD. Our enemy was vanilla CSAT units. Mission was built on UPSMON - even when testing offline UPSMON was loading very long (it tends to load very quickly without ZBE). Looks like ZBE Cache delays scripts execution time.

Share this post


Link to post
Share on other sites

I dont think the low CPS is a function of ZBE-Cache per se. Some missions are just very 'heavy'!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×