-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[XML Markers] Output Protobins Using Internal Category and Map Hierarchy #75
Comments
o/ long time no see. I almost went with a similar approach at first, but this layout will create SO MANY FILES. tekkit for example has over 8k categories https://mp-repo.blishhud.com/tw_ALL_IN_ONE.taco.html at the same time, having your category menu tree spread out across map folders means that category menu can be different per different maps. also, there's no defined "order" of category menu items, so for example in a queensdale map
how does someone define the categories to appear in menu in that order with just (sub-)directories?
|
The internal binary format is not intended for use by humans. Users will only need to care about the "full" category list, and not individual map categories. However only categories that are present in the map you are in will show up by default in the category selection, as to cut down on menu size. With this design Burrito can just query the directory and subdirectories to find what categories are on the map because if a map does not have any markers for a given category no folder or file should exist. Category ordering though is a very good point. Directories do not have a set ordering so that data could not be properly preserved under this design. @coderedart Do you have a suggustion as to a different method of storing the files internally? |
Even if its internally, creating thousands of files / directories for a single marker pack doesn't feel warranted (especially when there's no compelling reason to do so). If we store all the categories in a single file (tree structure), then it makes a few things easy. all maps use the same category menu and its easier to edit the categories like moving The problem is referring to them from markers / trails.
Now the category schema could just be simple recursive tree structure and each node has a unique ID. With markers, burrito can just store them all in a single file per map. in 99% of the cases where a user is As for showing only categories that are relevant to the current map, just read the that's what i would do, but if you want to stick to the existing format of separate categories per map, just add a field called |
I think I am in agreement about not using nested folders, and instead using some sort of metadata file containing all of the category hierarchical data. The thing I would be concerned with would be the loading times of trying to load all the markers on a particular map each time you entered it. Right now I load all the markers a category has, but only one category at a time, and it takes a few seconds for all that to be read from disk and parsed. With the markers per category already loaded, it only takes a few frames to build all the marker geometry for a newly entered map, and I kinda want to keep that as low as possible. But this is really looking like an issue of "good enough". No need to prematurely optimize. Some experimentation is clearly needed. I think the best way forward is to start with the simplest unoptimized solution first and then optimize and seen fit.
Jokes aside, I think this is a good battle plan to achieve the correct balance between speed, files, and development time. |
everything in a single file is definitely the direction i thought you were going with until i saw this issue :). the main disadvantage would be that every time the user saves the marker pack while editing, i will need to serialize / save the whole pack to the disk which is a lot of work (cpu usage / disk writes). but still much much better than the thousands of directories method. |
Once the Protobuf Classes have been populated we need a way to split them up and write them to the internal file structure. Each category will be split up by map id so that the user only needs to load markers for the particular map they are on. Additionally we want to allow for an easy construction of the hierarchy of what categories are in each map. Therefore the internal map hirearchy will look like this
This will allow burrito to simply list all the files in a directory in order to later figure out what are all the categories in that directory. if we add the ability to show all categories when a user wants to see them we can then just create a single file that has a map of all the categories, instead of having Burrito parse every <map_id> folder
The text was updated successfully, but these errors were encountered: