torginus 6 days ago

I remember reading an article about this technique - it was used in the original Starcraft. The idea here, is that the object needs to be allocated anyway by someone else, so you get the linked list for free.

An object can also be part of multiple lists, each used by a different subsystem with its own concerns.

Deleting an item involves unlinking it from all lists (though that requires a doubly-linked list)

Edit: found the article

https://www.codeofhonor.com/blog/tough-times-on-the-road-to-...

1
jamiejquinn 4 days ago

AFAIK it's also a structure heavily used by Nethack 3 to manage its astounding complexity. Modern, complex roguelikes seem to be using ECS as an alternative but I think they still have their uses.