• @[email protected]
    link
    fedilink
    English
    107 hours ago

    In the engine I’ve worked on it’s even less dramatic than deleting a row. It changing a single boolean from 1 to 0.

    "Single bit state CHANGED!!!”

    • @[email protected]
      link
      fedilink
      English
      258 minutes ago

      Honestly excel would be more exciting if the commentator from mortal combat described my actions if I correctly use a function.

  • @[email protected]
    link
    fedilink
    English
    1312 hours ago

    I’ve been working on a survival/RTS game and it’s funny that even though the game development framework I’m using (Unity) tends to push you to put most of the code on the visual objects level and that was my original approach, over time I’ve figured out the whole code is way cleaner and works better (in other words, the best architeture for that software) when almost all of the game is really just a Data layer being manipulated by the player and a separated View layer for the players to visualized it in a nice way - basically a Model-View Controller Architecture, same as you’ll find in systems were a server-side application has web and/or smart app UIs.

    That said, I have the impression that something like an FPS is a lot less data-driven than an RTS because things like the 3D models that make up the world are a lot more important for data decisions (has the bullet hit an object, can the player move to this position). You can still say that stuff is data (3D models are data, specifically collections of vertices in 3D space with some additional information attached), but model data is generally way more visualization-oriented than what one could metaphorically call a “database”.

      • @[email protected]
        link
        fedilink
        English
        09 hours ago

        Whilst composition over inheritance is indeed the way to go (and if you read the original Design Patterns book, it’s part of the things they talk about in the beginning well before they go into patterns), ECS just distributes the data all over the place which tends to create bugs due to implicit dependencies that are not very visible because things are distributed (so when you change something, other stuff elsewhere might break).

        The point of ECS is performance with large numbers of similar entities, rather than being a good architecture in software engineering terms (i.e. resilent to bugs, not brittle when changed, easy to understand as whole and so on).

        My impression, having come from totally different areas of software development (server-side, web, smartphone apps, desktop apps) is that Game Development isn’t all that sophisticated in the terms of Software Architectures, maybe because it’s too close to the metal, too concerned with performance and mainly the playground of young devs who, frankly, lack the experience to have reached the level of being aware of software development as a process and how to design and develop software in such a way as to improve the outcomes of that process.

  • @[email protected]
    link
    fedilink
    English
    1614 hours ago

    No, I’m not playing. In reality, I’m just bumping atoms in a galactic billiards game with the biggest chain reactions.

  • Lemminary
    link
    English
    3417 hours ago

    Hah! Joke’s on you, player! I pooled my game objects and you’re endlessly killing the same bad guys with the same bullets over and over.

  • @ThatGuy46475
    link
    English
    3919 hours ago

    And spectator sports are watching people exercise and reading is staring at a tree while hallucinating

  • @[email protected]
    link
    fedilink
    English
    271 day ago

    Reductionism when “it isn’t murder I just deleted your row from the national health government database”

  • @[email protected]
    link
    fedilink
    English
    1151 day ago

    The opposite actually - rows are dramatically added to a database. In most games save files grow the longer you play.

    • Lemminary
      link
      English
      417 hours ago

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

    • @[email protected]
      link
      fedilink
      English
      441 day 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
        English
        2
        edit-2
        15 hours 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!

      • @[email protected]
        link
        fedilink
        English
        201 day ago

        Isnt there this graveyard off map somewhere in Skyrim, where all the bodies get teleported?

        • @FordBeeblebrox
          link
          English
          722 hours ago

          Why would that even be necessary? Sounds like one of those “make a guy with a train for a hat and run up and down this hall” moves they like to do

          • @finitebanjo
            link
            English
            1
            edit-2
            4 hours ago

            Technically, the train was done by the Obsidian studio, not Bethesda per se, because of strict deadlines.

          • Echo Dot
            link
            fedilink
            English
            516 hours ago

            I wouldn’t be surprised if it is true though. Bethesda games are not exactly winning awards for coding elegance.

          • Natanael
            link
            fedilink
            English
            115 hours ago

            If they literally don’t have an object delete option then relying on render distance to make it go away is a ridiculous but simple solution

        • @[email protected]
          link
          fedilink
          English
          61 day ago

          i can’t speak to that, but it sounds plausible. in that case the body location would be updated to those coordinates

      • @AdrianTheFrog
        link
        English
        120 hours 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.

        • Natanael
          link
          fedilink
          English
          1
          edit-2
          15 hours ago

          Definitely depends on the type of game, but it’s more likely the game stores data about which areas you cleared and then infer that the bodies of any permanently remaining enemy (like bosses) is to be displayed.

          Can vary even more for procedurally generated levels. If the set of enemies is fixed and stay in calculated positions in a map generated randomly, then it might store an array or something tracking the enemies.

          • @[email protected]
            link
            fedilink
            English
            1
            edit-2
            11 hours ago

            Procedurelly generated stuff is all about storing the differences from the procedural generation.

            So for example minecraft saves don’t store the terrain, they store how it differs (due to player interaction) from the procedurally generated baseline.

            (After all, all you need to recreate an untouched procedurally generate world are the bytes of the seed and nothing else)

      • @[email protected]
        link
        fedilink
        English
        81 day ago

        This is how it works in many game engines.

        You set up the monsters and just hide them/disable them. They’re already allocated to memory.

        And it’s a performance cost to create/delete versus just moving a dead enemy out of view, then respawning that enemy later in the level.

        • Natanael
          link
          fedilink
          English
          115 hours ago

          If it’s a type of enemy you see just one of at a time but see it often, sure. If there’s many, cost of copy/delete is definitely not that high relatively speaking.

          (random sidenote: in the first Mirror’s Edge game, you can sometimes hear enemies you passed scream as they fall when you pass from one part of a map to another, as the ground in the map is unloaded before the enemies unload)

        • @[email protected]
          link
          fedilink
          English
          21 day ago

          im not very versed in game engine design, but dont they dynamically stream them into memory before they will be needed, and discard them when they wont nowadays?

          • @AdrianTheFrog
            link
            English
            620 hours ago

            Dynamic streaming is common nowadays, as games have gotten large enough that not everything in a level can fit into memory.

            I don’t know about what is actually done in industry but I feel like most of the time you wouldn’t bother with keeping dead instances unless instancing is shown to actually be a performance problem, which will probably not happen all that often

            Godot for example doesn’t have built in dynamic level streaming yet or a built in way to cycle through dead instances as far as I can tell, although I’m sure that wouldn’t be hard to do with code

    • @AdrianTheFrog
      link
      English
      220 hours 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
        517 hours 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

        • Echo Dot
          link
          fedilink
          English
          2
          edit-2
          16 hours ago

          I thought that enums were supposed to compile down to aa, ab, ac when you actually build the game.

          • SkaveRat
            link
            fedilink
            English
            416 hours ago

            Depending on the language, they are.

            Lots of games also use data structures derived from tables/csv at runtime to configure things like stats. So they would also need these (human readable) values in the save files

            Hard to tell from speculation and not having the data

          • Natanael
            link
            fedilink
            English
            115 hours ago

            Depends on optimization levels, data types, and whatnot. If it’s a string to be fed into the API of a different binary then the compiler will often not optimize down that representation. Internal function names are likely to be optimized that way, with lookup tables holding original function names (at least for any externally exposed function).

    • @NocturnalMorning
      link
      English
      151 day 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
      link
      English
      81 day ago

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

    • @AngryCommieKender
      link
      English
      21 day 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.

    • @[email protected]
      link
      fedilink
      English
      21 day ago

      Me in the matrix (so irl basically), holding a gun: “Don’t worry, I’m not deleting you!”

  • pruwyben
    link
    fedilink
    English
    1124 hours ago

    I would play a database management roguelike.

      • WFH
        link
        fedilink
        English
        35 hours ago

        Must know Jira, Python, Snowflake, dbt, how to find the will to live.

    • @[email protected]
      link
      fedilink
      English
      414 hours ago

      Intensity comes from keeping up and fixing the bullshit your coworkers cause while attempting to build in idiot guardrails to stop further damage.

    • @Donkter
      link
      English
      419 hours ago

      MDR in severance?

  • @[email protected]
    link
    fedilink
    English
    17
    edit-2
    1 day ago

    Pretty much them zombies would be in active memory

    Incidentally, just decided my new band name, active memory zombies

  • @uservoid1
    link
    English
    181 day ago

    I like to dramatically DELETE rows FROM slow_database

  • @aeronmelonM
    link
    English
    211 day ago

    After hours of trial and error, I finally changed the integer on the BossKill parameter from 0 to 1!