• jdeath@lemm.ee
    link
    fedilink
    English
    arrow-up
    31
    ·
    5 months ago

    and even if some idiot put every zombie npc in a database (or if you want to think of it that way), you wouldn’t just delete the rows! the bodies would disappear, so instead you would update that row like (npcState = KIL, bodyLocation = <some coords>) or something. Especially if you wanted to keep player stats

    • AdrianTheFrog@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 months ago

      Maybe you would have an array of active enemies in RAM, and when enemies are killed they are removed from that array for example?

      In a game like Minecraft for example, you definitely wouldn’t want to store every single dead entity and its location when there can easily be thousands created and destroyed in a single second

      It obviously depends on the game though.