Author Topic: Compressing the factions in a zip or 7z file  (Read 1018 times)

Pizza90

  • Draco Rider
  • *****
  • Posts: 282
    • View Profile
Compressing the factions in a zip or 7z file
« on: 28 November 2011, 21:19:46 »
If im not wrong on the forum i read that gae compress the factions in compressed files to save space, could megaglest do that too? I think it would be a good feature because the download would be less heavy and the space occupied on the hd minor, without thinking that we could add more factions without having a 500mb installer. What do you think guys?
« Last Edit: 29 November 2011, 01:23:55 by Pizza90 »
I translated Megaglest in italian and i keep the translation updated.

TotalNoob

  • Guest
Re: Compressing the factions in a zip or 7z file
« Reply #1 on: 29 November 2011, 00:14:11 »
I don't know how it is implemented in MG, but first drawback, which I would see here, is that each time game starts, everything would have to be uncompressed resulting in longer startup. However if it would be somehow possible to uncompress it directly to the memory, without need to make temporary files, this could still be not so much painful.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Compressing the factions in a zip or 7z file
« Reply #2 on: 29 November 2011, 00:19:22 »
GAE uses phyfs which i looked at and was not satisfied at the time with how phyfs worked (performance and bugs related to 7z support). At this point MG does support 7z files for factions and tilesets for file transfer over networks, but it decompresses on the client end. There are many complex issues related to using physfs and handling duplicate files / mods as well as a host of other things, so this may be looked at for the next release but not the current one.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Compressing the factions in a zip or 7z file
« Reply #3 on: 29 November 2011, 01:15:28 »
GAE uses phyfs which i looked at and was not satisfied at the time with how phyfs worked (performance and bugs related to 7z support).
Performance? How so? It loads faster than MegaGlest. However, it's a very big change, and which file to use in the case of duplicates is a prime issue.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Compressing the factions in a zip or 7z file
« Reply #4 on: 29 November 2011, 01:31:19 »
I think the 'loads faster' argument is apples and oranges. MG has many more factions to pick from as well as different data used than GAE. Likewise I'm sure the RAM requirements go up considerably when loading large compressed files (And if not then the speed suffers). Anyways, as i said I'm well versed in physfs (same people who wrote the mojosetup project that we use for our installer) and have numerous technical reasons why we did not use it as of yet. Overall I like phyfs and many games use it, just need to proceed with extreme caution when actually using it. Would be good to see actual before / after timings in GAE for speed and memory to see how its functioning in the real world, anyone willing to post accurate #'s?

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Compressing the factions in a zip or 7z file
« Reply #5 on: 29 November 2011, 04:46:48 »
Does compression slow down the loading much?  I'm just thinking, if I've got extra space would it behoove me to extract it or leave it compressed?
This is what my addons folder looks like atm,


I haven't had the stop-watch out or anything like that, but I haven't been able to notice any difference  :thumbup: