#this mod is fire

1 messages · Page 1 of 1 (latest)

past bay
#

Can you share how did you make it efficient?

#

In terms of performance. How do you tackle large areas? Divide them into zones?

uneven locust
#

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

past bay
#

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

uneven locust
#

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.

#

finding apis are a breez now and knowlage base is very good

past bay
#

Ah it's AI code, bummer