← Back to context

Comment by dist-epoch

3 months ago

Quake 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.

Memory is sometimes faster today!

  • In 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.

    • > 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?

    • > 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.