My game is a 2D top-view game in the “vampire survival” genre. Monsters appear in numbers ranging from 100 to 1500
Current component configuration is as follows
World Object
- AstarPath
- RVO Simulator
Monster Object
- Seeker
- AIDestinationSetter
- AIPath
- RVO Controller
Monsters do not use Rigidbody,
and only have 2D colliders (isTrigger = false) Monster overlap prevention
Also, there are several obstacles on the map,
and depending on the player character’s attack, there are status abnormalities,
and depending on stun, freeze, slow, etc.,
the monster’s movement speed changes for a certain period of time,
or it cannot move at all. (AIPath.canMove = false or true)
I do not know about ECS, but I looked up related documents because they said FollowerEntity does not require ECS knowledge.
I considered changing it because it is slightly better than AIPath or RichAI in terms of performance, but there are some parts that are holding me back. I checked the documentation and found that accessing script properties is expensive.
There will be at least 100 to 1500 monsters,
and as described above, some monsters need to be applied with movement impossibility or movement speed reduction depending on the player’s skills.
In this case, is it better to maintain the existing structure in terms of performance?
Or is it better to use FollowerEntity in terms of performance,
even considering the cost of accessing FollowerEntity’s properties?