New Save Format --- No more absurd upload speeds, client loading in the works!

Author Topic: New Save Format --- No more absurd upload speeds, client loading in the works!  (Read 7848 times)

The upload speed stats are for the test release.

Pros:
  • Saves are 55 to 65 percent of their original size.
        Bricks     Save name    Default size     Binary Size     Final Size     Regular Upload Time     Binary Upload Time     Time Difference
        6275     ATC fort     263.6kb     167.2kb     63.5%     106     14.1     7.52x Faster
        11479     Crysta Castle     507.1kb     298kb     58.7%     192     26.12     7.35x Faster
        14091     Afghan DM     582.4kb     335.5kb     57.6%     240     30.45     7.88x Faster
        16478     ACM city     719kb     451.8kb     62.8%     288     35.36     8.15x Faster
        17687     Sirrus Military Compound     777.7kb     470kb     60.4%     318     40.73     7.80x Faster
        44465     Goldengate     1.9mb     1.2mb     63.1%     780     88.87     8.77x Faster
  • Saves load up to 8x faster due to a new uploading system
  • Ownership is saved for every single brick. This fixes many issues where bricks would load with the loaders ownership no matter what.
  • Server-side saving. Comes with autosaver.
  • Possibility of adding support soon for brick persistence. (saving variables to bricks)
  • Saves bricks by datablock name and not uiname. There have been a few instances of developers changing their bricks display names and screwing up saves. (I had to deal with this personally with the wedge bricks)
  • Tells you what add-ons you need to load a save.

Cons: (Stuff that will hopefully be fixed eventually)
  • Server loading takes longer than it would without the mod. That is loading a file saved on the server. It's still a lot quicker than uploading a save from the client side normally though.
  • You have to have port 14880 open on your server to accept files from clients.
  • No options currently to disable saving events or ownership. This is planned however.
  • Not a client side format, you have to be the host of the server to save the bricks like this. I could plan on adding a client side mod but it'd most likely only work (or work better enough to consider using) on servers with the server mod.
  • While future versions of the mod will be backwards compatible (able to load saves from previous versions), the mod may be updated frequently, meaning you might want to wait until some of the planned features are added.

Installation:
  • Just unzip both server_binarysave and it's requirement support_binary to your add-ons folder.


Download:
Usage:
  • /loadBinary <path>   ---   Must be a complete path (e.g. "saves/test.bin" is okay, but "test.bin" is not) must be admin to use.
  • /saveBinary <path>   ---   Same as above
  • /binaryCancel    ---   Admin only, cancels any saving or loading from the add-on.
  • /autosave    ---   Admin only, starts the autosaver. The autosaver saves to "config/server/autosave.bbs" every 5 minutes.
  • /uploadBinarySave <path> --- On servers with the test release when using a client that also has the test release.
« Last Edit: September 03, 2014, 09:52:13 AM by DrenDran »




Is the extension "Binary Blockland Save" or "Blockland Binary Save"?

Is the extension "Binary Blockland Save" or "Blockland Binary Save"?
I think the first one lol

why?

Why are you writing the name of the datablock (with some parts omitted for some reason - what if you get one with an unusual name?) for every brick?

$binarySaveFile.writeString(getSubStr(%brick.dataBlock,5,striPos(%brick.dataBlock,"Data")-5));

Go through all the used brick datablocks and write a lookup table that maps U32s (or something similar) to full datablock names or uiNames, then just specify the index of the datablock in the table for each brick.

I like to imagine every scripter on this game gets a personal alert when a new server script is released so that they can go through it in a constant attempt to boost their ego by one-upping every other guy.

I like to imagine every scripter on this game gets a personal alert when a new server script is released so that they can go through it in a constant attempt to boost their ego by one-upping every other guy.

     Save name    Default size     Binary Size     Final Size
     ACM city     719kb     527.5kb     73.3%
     ATC fort     263.6kb     192.3kb     72.9%
     Sirrus Military Compound     777.7kb     550.2kb     70%
     Goldengate     1.9mb     1.4mb     73.6%
     Crysta Castle     507.1kb     385.6kb     76%
     Afghan DM     582.4kb     432.8kb     74.3%

I was trying to help him improve the way high filesizes (for a binary format). I don't see what the issue is here; if he implements it, it's your advantage, not mine.

How much longer does it load?

How much longer does it load?
Well, keep in mind there's no uploading, only the actual loading.
Compared to the time to upload and make a build, it's actually far quicker.
I'm not sure why but it takes forever to upload larger builds with the default system even though I have decent Internet.
It's slower in comparison with other server sided loading add-ons (as well as /reloadbricks), is what I'm saying.

With my system for me:
To load Golden Gate bridge (45k bricks) it takes about ~70 seconds.
To load a smaller build like the Arch of Constintine (2.5k bricks) it takes about 4-5 seconds.
Someone like Beta City (8k bricks) might take like 12-15 seconds.
It all depends on your computer obviously, but it's definitely faster than uploading and loading.

Why are you writing the name of the datablock (with some parts omitted for some reason - what if you get one with an unusual name?) for every brick?

$binarySaveFile.writeString(getSubStr(%brick.dataBlock,5,striPos(%brick.dataBlock,"Data")-5));

Go through all the used brick datablocks and write a lookup table that maps U32s (or something similar) to full datablock names or uiNames, then just specify the index of the datablock in the table for each brick.
Actually not a bad idea. Yeah, I'll see what I can do.



Dedi support?
Means the mod can support dedicated servers. Since some mods break if the server is dedicated.

I like to imagine every scripter on this game gets a personal alert when a new server script is released so that they can go through it in a constant attempt to boost their ego by one-upping every other guy.

What's wrong with people contributing, pointing out exploits/bugs to fix or better/faster ways to do a certain thing? You, as the end user, will get a better product.