Hey, I am making a factorio-esque game, and I'm wondering about my approach for rendering the many items that will be on conveyor belts.
Rn i'm split in between two ideas, but i'm sure there are other ways:
Idea A: Conveyor belts etc manage the items's data internally and then every frame they all write to a resource that has a big vec with all the positions, (sprite/mesh) types etc.. that draws all the items with instantiation. That vec is cleared every frame to be filled again.
Idea B: Each items has it's own enttity/transform/(sprite or mesh) and conveyor belts and the likes just act on them. They will get batch instantiated anyway with how bevy handles it by default.
I'm split between 2D/3D (leaning more on 3D) but it shouldn't matter for this topic.
Which solutions do you think would yield better performance and which would you recommend ?
I'm kinda scared that one entity per item would be slow when you have thousands of them in the world, but I don't have the experience to know for sure.
Also, solution B would make object to object interactions depend on the actual item's transform positions so it would be more costful for example to check if a conveyor belt has an item on it's than if that was just data.