• Draconic NEO@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    35
    arrow-down
    1
    ·
    13 hours ago

    I already know that people are going to excuse this practice or say it’s progress but it’s not excusable, space wasting is a big problem in modern game development. Especially since modern games do not use the same optimization, such as the fact that you do not need to store duplicate rotated or mirrored versions of textures. Since one idiot I’ve met on Lemmy doesn’t understand what that means and thinks I’m talking about actual mirrors. Here’s a short demonstration.


    Here is an example of a texture tile from an RPGmaker game. It’s a lower quality but this concept does scale up and really applies to any game where textures are stored images and not solid colors or AI generated on the fly (basically the vast majority of games out there).


    This is an example of Mirroring or Reflection. Yeah that’s right the word mirror can refer to a transformation I know wild but for people who are actual game devs you should know this already. Even though this texture is small if you have a lot like this which could easily be mirrored it can add up fast especially with larger textures.


    This last one is called rotating, it’s not always ideal since some textures are orientation sensitive and could handle being mirrored but get messed up in tiling if they get rotated. So it can’t always be used but should be used in cases where it can be.

    Both of those are very computationally cheap and simple ways to save space on textures by only having as many as you need to paint the scene.

    Another way to optimize is to simply use lossless compression schemes, which these images are already doing since they are .png files. This might seem like a no-brainer but I’ve seen many modern games which store textures completely uncompressed and waste a lot of space, especially for bigger textures. It also applies to FMVs and animated textures too. Use lossless compression standards for your assets, I really shouldn’t have to say that.

    Finally one way to reduce size dramatically is to just omit assets that aren’t needed. If your machine isn’t 4K capable or doesn’t have a 4K display than 4K or higher graphics aren’t going to do you any good and are going to be a waste of space. Most games don’t let you omit them during the download process but worse, some games complain or redownload them if you delete them, despite them not being used at all. Basically these games could fit in a smaller size but they just don’t because they have duplicate unused assets that could be removed but either make it difficult or don’t let you at all.

    • AdrianTheFrog@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      4 hours ago

      The problem is, if you used normal compression formats, you would have to decompress them and then recompress them with the GPU supported formats every time you wanted to load an asset. That would either increase load times by a lot, or make streaming in new assets in real time much harder.

      • Draconic NEO@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        3
        ·
        3 hours ago

        There are still other compression schemes which can be used to save space, and not compressing anything is a bad idea, it’s not the biggest waste of space but it is a waste.

    • gandalf_der_12te@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      7
      ·
      edit-2
      5 hours ago

      I want to comment that “duplicate textures” isn’t typically wastes a lot of space. It’s one thing, but not typically the biggest thing.

      The biggest thing is really unnecessarily high-definition textures, as you already said. If you have 4K textures for everything, that means you roughly use 5 MB per asset, even when using compression. If you have 2000 of these assets in your game, you immediately need 10 GB or storage space, and RAM when they are loaded into memory, and that’s what makes the game so heavy.

      Just to make a counter-example, Luanti, which is like open-source Minecraft, uses 64x64 pixel assets at the most, where each asset consumes less than 1 KB of storage space if compressed, and that’s why even using a thousand assets in the game or more, the total game size is less than 30 MB. And that literally contains the whole game, including all assets and logic, which is just as complex as proprietary Minecraft.

    • ptu@lemm.ee
      link
      fedilink
      English
      arrow-up
      5
      ·
      10 hours ago

      Choosing which resolution you install sounds like a great idea. How much would you estimate it would reduce the aforementioned 300GB game?