Stop storing docked entities in subdirectories

    Joined
    Dec 14, 2014
    Messages
    745
    Reaction score
    158
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 2
    It is one of the worst practices a programmer can do.
    Many of your player if not most probably use windows.
    When you store an entity under a sub directory depending on the name length of the entity if they made or your random name gen system creates it that is becomes part of that entities path. Windows depending on the version has different limits to what it can look at with a path length. It is entirely possible to create objects in the game you can not load all of the structure simply do to windows not being able to even seen it.

    What is worse your system is incapable of deleting those objects even windows itself isn't capable of doing so through its on file manager. In fact the only way I found to delete such objects is to write a program or script that renames every directory to a single letter then goes through and deletes the deep directories.

    Create a connection list and store it in a file. Just look at it as a virtual directory. It should be faster on top of being safer in storing the ships docked entities.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    A zip-directory.

    I have no problem with long file names (jet), but would prefer it anyway because it takes much longer to copy 10'000 1-byte files than to copy 10'000 bytes in a single file.

    Use this every time someone says something negative about Schemas programming skills
     
    Last edited:
    Joined
    Dec 14, 2014
    Messages
    745
    Reaction score
    158
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 2
    The issue is a limitation of the OS not an issue of personal preference. A zip file however could be an effective solution except if someone ever unpacks it that could cause problems for the owner of the computer.
    Example:
    C:\Program Files (x86)\Steam\steamapps\common\StarMade\ this file path is 55characters

    Old windows style 8.3 names are fairly short as file names go.
    Windows 7 was limited to 1024. Windows 10 I think has been raised up. Not sure exactly what it was. Some time prior to windows 7 it was as low as 255 bytes however in reality you could only use 240.
    Even using 8.3 names(which this game doesn't) on windows 7 you can only dock about 85 structures. That's quite a bit. however remember this game doesn't use 8.3 names. Which means that issue happens with a lot less structures docked to each other. Instead they use a method of the naming docked entities attached_#. It wouldn't be near as bad if they changed it to A_# the this would reduce each name length by 7 letters. Still it would be in bad practice.
    They could also benefit from the speed boost of using a psuedo directory even if they didn't use a zip file.
     

    Ithirahad

    Arana'Aethi
    Joined
    Nov 14, 2013
    Messages
    4,150
    Reaction score
    1,330
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen 8
    Using the subdirectory system, AFAIK, is also what precludes having things dock to two different 'parent' entities. If this is the case, that'd probably be another reason why a big connection list would be nice. :\
     
    Joined
    Dec 14, 2014
    Messages
    745
    Reaction score
    158
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 2
    Using the subdirectory system, AFAIK, is also what precludes having things dock to two different 'parent' entities. If this is the case, that'd probably be another reason why a big connection list would be nice. :\
    Honestly forgot entirely about that aspect but you are dead on.