• @jdeath@lemm.ee
      link
      fedilink
      English
      313 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

      • ivanafterall ☑️
        link
        fedilink
        English
        2
        edit-2
        3 months ago

        I want the rows deleted. I’m going to market it as the first game with true AI/enemy permadeath. Dibs on the idea!

      • @AdrianTheFrog@lemmy.world
        link
        fedilink
        English
        13 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.

    • @NocturnalMorning@lemmy.world
      link
      fedilink
      English
      113 months ago

      This is why Breathe of the Wild did the blood moon thing, periodically they’d just bring all the dead enemies back so file size didn’t get too large.

    • @marcos@lemmy.world
      link
      fedilink
      English
      63 months ago

      Also, it’s an unreasonably fast database. That makes lots of trade-offs that normal ones aren’t willing to do.

    • Lemminary
      link
      fedilink
      English
      53 months ago

      *Noita file save on the 7th parallel world intensifies*

    • @AngryCommieKender@lemmy.world
      link
      fedilink
      English
      23 months ago

      There for a minute when Dyson Sphere Program first went into open pre-release, something was wrong with their save file compression, and very quickly people were reporting multiple GB saves.

    • @AdrianTheFrog@lemmy.world
      link
      fedilink
      English
      13 months ago

      I was looking at the savegames from the game control recently, it’s kinda funny because you open them in notepad, you see a bunch of random gibberish from bad decoding (the game uses a proprietary save format) with the words “collected” “Collected” “unlocked” “available” “VariableRestoreHack” (??) “STATE_B_PUZZLE_SOLVED” “Powercore_Not_Attached” randomly interspersed

      Like, surely there is a better way to store 2 state data other than an english word?

      It does generally get longer as you play, but also “locked” just switches to “unlocked” for example when you unlock something

      • SkaveRat
        link
        fedilink
        English
        43 months ago

        Eh, really depends

        They are likely just serializing a bunch of data objects. And set states and flags with humans readable enums

        Enums make code a lot easier to read, especially if you use it to check stuff all over the place

        Using to a couple bytes more storage is worth it