Released BeamNG.compress - reduce the game's size

Discussion in 'Utilities and programming' started by Covalence, Nov 22, 2023.

  1. Covalence

    Covalence
    Expand Collapse

    Joined:
    Jul 3, 2021
    Messages:
    186
    Is your PC low on space? Do you want to install another game without buying a new disk? Do not fear, the compressor is here! :D

    While BeamNG.drive's vanilla content is in .zip files, they are simply stored and have no compression whatsoever (unlike mods). This script repacks them all using 7-Zip's Ultra setting, giving the game a much smaller footprint.

    To use:
    • Get the script (below) and 7-zip (for compression)
    • If you installed BeamNG.drive to a custom location, edit the script to change the beamPath variable
    • (Optional) Make a backup of the original files, if you want to undo this without reinstalling (I assume this is allowed, but it's a grey area of the EULA)
    • Press "1" and then any key to start repacking.
    Pros:
    • Saves a lot of space (around 25GB)
    upload_2023-11-21_22-11-55.png
    • Doesn't seem to affect how levels and vehicles work
    • May not set off Steam's integrity check (I restarted and nothing happened, but YMMV)
    Cons:
    • Takes a very long time to run (1h 20m on a Ryzen 7 mobile)
    • Small increase in loading times (69s vs. 62s on West Coast USA)
    Side note: I've tested everything except restoring a backup, it should work but can be manually copied if it doesn't.

    Github: https://github.com/CovalenceSTU/BeamNGCompressed
    Release: https://github.com/CovalenceSTU/BeamNGCompressed/releases
     
    • Like Like x 8
  2. Bauer33333

    Bauer33333
    Expand Collapse

    Joined:
    Jul 25, 2020
    Messages:
    266
    Does this only affect loading times or other performance like opening the vehicle selector as well?
    But I guess if you are really low on space you will profit from being able to provide it to your Ram anyway :D
     
  3. stenyak

    stenyak
    Expand Collapse
    Programmer & Global Moderator
    BeamNG Team

    Joined:
    Aug 6, 2012
    Messages:
    1,994
    The lack of compression is a deliberate and intentional decision on our part. This is not merely a matter of saving storage space, there's plenty more factors than just free space that lead to our current choice.

    You can see the full explanations in these two posts I wrote some months ago: here and a few posts below here :)
     
    • Like Like x 3
  4. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    2,054
    IMO the best way is to compress individual files like "us_semi.zip", "sbr.zip" and "common.zip"(make this zip compress instead of just packaging the files) instead of making a large "content.zip"
     
  5. stenyak

    stenyak
    Expand Collapse
    Programmer & Global Moderator
    BeamNG Team

    Joined:
    Aug 6, 2012
    Messages:
    1,994
    We already use that per-vehicle layout of zip files. Where have you seen "content.zip"?

    The lack of compression is deliberate. We used to have them compressed but the overall negative effects of using compression were evaluated to be worse than the positive effects, and so we reverted back to non-compression.
     
  6. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    2,054
    Could you please elaborate the negative effects?
     
  7. stenyak

    stenyak
    Expand Collapse
    Programmer & Global Moderator
    BeamNG Team

    Joined:
    Aug 6, 2012
    Messages:
    1,994
    I already elaborated here. Using compression will mess up with Steam's deltas, leading to not only the current huge patching times/sizes/wear, but on top of that, hitting data caps in the countries where people have internet data caps, and of course much longer downloads. It will also impact CPU load, so for some people, this could lead to slower game load times, specially users with the slower computers. There may be more effects I don't remember, this discussion is not trivial.
     
  8. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    2,054
    That's a valid concern, thank you for your explanation. However I have a question about load times, isn't loading the game only involves decompression?
     
  9. stenyak

    stenyak
    Expand Collapse
    Programmer & Global Moderator
    BeamNG Team

    Joined:
    Aug 6, 2012
    Messages:
    1,994
    Loading the game involves a lot more operations than just decompressing files. Loading the game does not perform compression operations, if that's what you really meant to ask.
     
  10. a28

    a28
    Expand Collapse

    Joined:
    Jan 28, 2020
    Messages:
    772
    Storage space is insanely cheap rn so the devs have a point
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice