#Design Turret with ECS

1 messages · Page 1 of 1 (latest)

wild dove
#

Hello, I have a question mark in my mind about ECS. There is a turret in my game, and this turret must find other entities in a certain radius around it and then attack. At this point, I thought that I should write a system that finds other entities in the environment, but I cannot store an array in the component. After finding it, I will aim the turret at the target using another system and fire. What kind of design should I make at this point? Where should I store found entities by my system?

winter cove
#

You can use a dynamic buffer

wild dove
#

What effect does this have on performance? I'm trying to understand how I should design to achieve maximum performance.