Join Nostr
2026-03-16 13:01:33 UTC
in reply to

Liblast on Nostr: I have a Game class that had a world_state Dictionary. That dict contains state of ...

I have a Game class that had a world_state Dictionary. That dict contains state of all Entity instances in the game. Every entity instance has a unique ID, which are sequential ints (0,1,2,3...). IDs are never reused after an entity is destroyed, to avoid confusion. Because Game has state of all Entities, it can also hold a journal, save the changes to a file for later playback or analysis or transmit it through network (send and recieve).
Entities expose Attributes which define them...