3 ms·
It’s incredible how many projects and articles have been written around ECS with very little results. Quake 1-3 uses a single array of structs, with sometimes
by monkeyelite 1y ago
It’s incredible how many projects and articles have been written around ECS with very little results.
Quake 1-3 uses a single array of structs, with sometimes unused properties. Is your game more complex than quake 3?
The “ECS” upgrade to that is having an array for each component type but just letting there be gaps:
transform[eid].position += …
physics[eid].velocity = …
- cogman10 1y agoThe important part of ECS (IMO) is more that it's a pattern that others recognize and less that it's necessarily the best pattern to use.
- pjmlp 1y agoHype as usual, too many people waste time on how to implement engines, instead of how to make a game fun to play.
- dist-epoch 1y agoQuake 1-3 were written for computers where memory was not much slower than the CPU as is the situation today. But yeah, probably you don't need an ECS for 90% of the games.
- fooker 1y agoMemory is sometimes faster today!
- pornel 1y agoIn absolute terms yes, but relative to the CPU speed memory is ridiculously slow. Quake struggled with the number of objects even in its days. What you've got in the game was already close to the maximum it could handle. Explosions spawning giblets could make it slow down to a crawl, and hit limits of the client<>server protocol. The hardware got faster, but users' expectations have increased too. Quake 1 updated the world state at 10 ticks per second.
- monkeyelite 1y ago> Quake struggled with the number of objects even in its days. Because of memory bandwidth of Iterating the entities? No way. Every other part - rendering, culling, network updates, etc is far worse. Let’s restate. In 1998 this got you 1024 entities at 60 FPS. The entire array could no fit in L2 cache of a modern desktop. And I already advised a simple change to improve memory layout. > Quake 1 updated the world state at 10 ticks per secondo That’s not a constraint in Quake 3 - which has the same architecture. So it’s not relevant. > users' expectations have increased too Your game is more complex than quake 3? In what regard?
- fooker 1y ago> relative to the CPU speed memory is ridiculously slow Latency from cpu to memory sure. Memory frequency has caught up though, so you have have more bandwidth than any CPU can deal with.
- deleted 1y ago[deleted]
- seivan 1y ago[dead]