Find actors inside certain radius
Moderator: GZDoom Developers
Find actors inside certain radius
Itll be nice to have function that return pointers, or array of pointers, to all actors inside certain radius, defined by modder, but doing this WITHOUT using thinker/block thing/actor iterator, so it can be called many times per one tick without freezing game to 0.000...001 frames per second.
Re: Find actors inside certain radius
If BlockThingsIterator with explicitly set checkradius argument is too slow, you should provide a real use case for benchmarking.
No matter how fast actor iteration is, someone can always slow the game down to a crawl with mindless use of it.
It's not a big deal to create a mod that do 1000 traversals on 10000 actors per tic and to start crying out loud that the engine is not optimized.
No matter how fast actor iteration is, someone can always slow the game down to a crawl with mindless use of it.
It's not a big deal to create a mod that do 1000 traversals on 10000 actors per tic and to start crying out loud that the engine is not optimized.
Re: Find actors inside certain radius
You mean "what did you do, so that block thing iterator make gzdoom freeze"? I think its a case "do 1000 traversals on 10000 actors per tic".
I try to make monsters, which sane react to flying projectile near him aka supressive fire. If there are too much projectile, monster set self variable "supressed" to true and decrease self speed, accuracy, chance of jump to fire state, etc.
I cant provide code which slow gzdoom, because I delete it and stick to questionable, but working without lag, way of warping with/to projectile "big enough" actor, which check is there anyone/anything within some radius using override can collide with virtual.
I try to make monsters, which sane react to flying projectile near him aka supressive fire. If there are too much projectile, monster set self variable "supressed" to true and decrease self speed, accuracy, chance of jump to fire state, etc.
I cant provide code which slow gzdoom, because I delete it and stick to questionable, but working without lag, way of warping with/to projectile "big enough" actor, which check is there anyone/anything within some radius using override can collide with virtual.
Re: Find actors inside certain radius
Well, if you are suggesting something, it's your responsibility to provide a runnable sample that showcases the problem you want to be solved.
And developers cannot read modder's mind in order to recreate such sample.
I conclude that existing iterators are fast enough. There is no point to investigate some theoretical use cases.
And developers cannot read modder's mind in order to recreate such sample.
I conclude that existing iterators are fast enough. There is no point to investigate some theoretical use cases.