Closed
Conversation
Conflicts: smc/src/core/filesystem/package_manager.cpp
To fix certain inconsistencies, VFS no longer auto-mounts zip files during Find (and thus Open, Get_Directory_Files, Exists, etc). Any zip files that need to be used should be mounted beforehand. Regular file reading works as normal, there is no need to mount directories, only zip files.
Conflicts: smc/src/audio/audio.cpp smc/src/core/filesystem/package_manager.cpp smc/src/gui/menu.cpp
…-anywhere Conflicts: smc/src/core/filesystem/package_manager.cpp smc/src/core/filesystem/package_manager.hpp
Conflicts: smc/src/audio/audio.cpp smc/src/audio/sound_manager.cpp smc/src/campaign/campaign_loader.cpp smc/src/campaign/campaign_manager.cpp smc/src/core/file_parser.cpp smc/src/core/filesystem/package_manager.cpp smc/src/core/filesystem/package_manager.hpp smc/src/core/main.cpp smc/src/core/main.hpp smc/src/core/property_helper.hpp smc/src/enemies/eato.cpp smc/src/enemies/flyon.cpp smc/src/enemies/thromp.cpp smc/src/gui/menu.cpp smc/src/gui/menu_data.cpp smc/src/level/level.cpp smc/src/level/level_loader.cpp smc/src/level/level_manager.cpp smc/src/level/level_settings.cpp smc/src/overworld/overworld_description_loader.cpp smc/src/overworld/overworld_layer_loader.cpp smc/src/overworld/overworld_loader.cpp smc/src/overworld/world_manager.cpp smc/src/scripting/objects/mrb_smc.cpp smc/src/video/img_settings.cpp smc/src/video/video.cpp
Author
|
I'm not sure, but part of the slowness issue may be due to repetitive testing for existence. Perhaps one option may to be have a cache in VFS for this. |
Member
|
This looks very interesting, but it's curious why it isn't performing too well. I'll see if I can get time to look into it myself and see if there's any peculiarities. |
Member
|
With no activity in almost two years, I think this can be considered abandoned now. If you want to pick up work again, feel free to reopen this. Valete, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the continuation of #139 using the official repository.
This feature uses PhysFS to create a form of a virtual file system. Archives need to be mounted before the VFS can read inside them. Until they are mounted, VFS will see them as a file. Once they are mounted, VFS sees the archive as a directory. Packages are automatically mounted during the scan if needed.
I've tested this on Linux using Debian 7 and everything seems to work fine. It works just like the package manager current does: levels, worlds, and campaigns come from the current package, graphics, sounds, and music use the current package and dependencies (so called resource packages), and scripts can be loaded from a package by specifying the name. I've also already merged the packages anywhere code into this branch.
There is one main problem. It is quite slow. Using normal packages seems to be quite fast, but when this feature is compiled, loading some levels is slow and loading the level editor is slow. Perhaps the VFS object needs to cache certain results such as File_Exist tests and Find results.
I don't believe this breaks any compatibility with the current devel code, but due to the slowness issue, I don't plan on merging this any time soon and would like for others to test it if possible. Also, any ideas on how to solve the slowness issue.