RLE Compression?

    AtraUnam

    Maiden of crashes
    Joined
    Oct 15, 2013
    Messages
    1,120
    Reaction score
    866
    • Railman Gold
    • Competition Winner - Small Fleets
    • Wired for Logic Gold
    I'm not sure if this has been suggested before but couldn't starmade become more optimized if ships where stored using the RLE compression method?

    e.g. with [H] representing hull, representing shields and [A] representing amcs. A cross section of hull like this:
    [H][H][H][H][H][H][H][H][H][H][H][H][H][H][H][H][H][H][H][H]
    [H][A][A][A][A][A][A][A][A][A]
    [H][H][H][H][H][H][H][H][H][H][H][H][H][H][H][H][H][H][H][H]
    Would be stored as:
    20[H]
    1[H],9,9
    20[H]
    This is much less space than storing data about the position of each induvidual block and while this form of compression is designed for 2D bitmaps, it could be addapted to work in 3 dimensions. I also realise that having a whole extra value for storing the number of blocks -even if their is only 1- would make small ships far less efficient, but this loss would ba barely noticable compared to the massive increase in the efficiency of large ships. That 500 block long amc array would be stored in just a few values instead of 500. Thoughts?
     
    Joined
    May 26, 2013
    Messages
    1,176
    Reaction score
    938
    • Legacy Citizen 7
    • Modder
    • Top Forum Contributor
    This is a good idea, except for one thing. The orientation of each block needs to be saved as well.
     
    Joined
    Aug 30, 2013
    Messages
    199
    Reaction score
    14
    It would help a lot for a ship with a cross section like hull, 80 shields, hull. But if the blocks were different, or spaced (Think power blocks in lines perpendicular to the direction of the data storage) you would be increasing the filesize massively.