#this mod is fire
1 messages · Page 1 of 1 (latest)
Can you share how did you make it efficient?
In terms of performance. How do you tackle large areas? Divide them into zones?
Sure no problem its very simple nothing special really its just a set cap prevents too much burning at the same time. But i have two setups for it:
Soft cap (max alive) pauses spawning when too many nodes are burning. Waits for old ones to burn out naturally before placing new ones.
Hard cap if somehow too many pile up anyway (example multiple shots in the same spot), it force kills the oldest "fire" immediately to stay under the limit
So store positions and compute distance between all nodes?
I wonder if the game has some kind of clustering/zone system
I think AI systems have something like that, but idk if usable outside
It only checks one position against whatever fire happen to be within a small radius using the engines builtin sphere query: "QueryEntitiesBySphere" You give it a position, a radius, and a callback function. The engine finds all entities within that sphere and calls your function once per entity.
its on here if youd like to check it https://github.com/steffenbk/Arma-reforger-steffenbk-mod-open-source
But i doubt i found have found it had it not been for the MCP for arma that got released https://github.com/Articulated7/enfusion-mcp
finding apis are a breez now and knowlage base is very good
Ah it's AI code, bummer
Open-source, respect!!