3 ms·
In much the same way that your run of the mill AbstractFactoryGeneratingFactoryGeneratorSingleton involves writing a bunch of not so useful code, and then someo
by mcbrit 3y ago
In much the same way that your run of the mill AbstractFactoryGeneratingFactoryGeneratorSingleton involves writing a bunch of not so useful code, and then someone comes along and "improves" it by changing that final Singleton to Dependency Injection:
ECS also has a lot of overhead. You almost certainly don't need ECS, and whatever you're writing would almost certainly be much simpler without ECS. Use ECS because it solves a serious problem that you have.
Edit: And my seriously downvoted point was putting objects on a "Case Board" does NOT justify an ECS; it's a problem with a /lot/ of good and good enough solutions. Were there any problems that needed an ECS, or did the article just want to say ECS (and voxel) because it's hip?
- LarsDu88 3y agoHaving written Unity, Godot, Unity DOTs, Bevy, an obscure ECS engine called kivent, and even rolled a java engine from scratch at one point I somewhat disagree with this statement. When people think of overhead, they might be thinking of the jankiness of Unity DOTs and it's lacklustre ECS integration with a preexisting editor designed for Unity's Gameobjects world. The truth is, an engine built with ECS from the outset has ergonomics that go beyond merely writing better multithreaded code. It truly enforces composition over inheritance when done right. Overwatch is an example of a game written using ECS that generally doesn't have hundreds of thousands of entities bouncing around
- mcbrit 3y agoOverwatch has networked gunplay and uses ECS to deal with that hard problem. Cool. I get why ECS is used there. Hard problem, meet the formalism that I will use to think about you. A case board is not a hard problem. Using composition or a functional style instead of OOP is not a hard problem, or at least not a hard problem that ECS solves. I'm not sure that we're talking past each other now, but I did want to at least respond to your point about Overwatch and note that ECS is used to solve an actual, hard problem there.
- mcbrit 3y ago(edit: ECS doesn't solve networked gunplay. but it could be part of a solution, and even as part of a solution ECS can totally justify why it's there, because again: hard problem.)