-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spectator map view is very laggy with high no. of units #2514
Comments
I think the only way to alleviate this is some sort of compromise. Possible idea: Only draw AI units in vicinity of the camera and then all player units. |
Maybe just don't draw each icon per frame as PFH is used on each one. You have 100 spectatable units - 100 PFHs - frame's drop. You don't need such precision for spectator so updating map markers let's say every 1 second could be way better and that's how other spectator scripts I used were working. |
or every frame one unit |
Dude what, I don't have 100PFHs running 😆 It uses the map "draw" event You need to draw the icons every frame otherwise there wouldn't be any icons |
Maybe draw each unit marker only if you zoom enough? Otherwise only whole group marker. |
That's not a bad idea! 😄 👍 |
Wonder what the best way is to check which units are currently on-screen on the map |
distance of the current center of map converted to world coordinates combined with current map zoom? |
Maybe something like this, untested. I forget if it's faster to check allUnits + vechicles or do a nearEntities scan.
|
(allUnits + allDeadMen to include dead units) |
We can use the array of spectatable units (or the corresponding group one - used to cut down on number of iterations for icon related stuff) anyway 😄
|
ACE3 Version: 3.3.1
Mods:
@CBA_A3
@ace
Placed ACE3 Modules:
Description:
Steps to reproduce:
Where did the issue occur?
RPT log file:
The text was updated successfully, but these errors were encountered: