-
Notifications
You must be signed in to change notification settings - Fork 10
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
Support for both real and virtual filesystem #152
Merged
Merged
Conversation
This file contains 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
…D a tilesheet from the last run)
…i context on Darwin
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.
So far Spelunky-PSP's build process involved resource-compiling all its assets into header files, resulting in a single executable that could be placed around the filesystem without having to copy anything else. As for portability and convenience, this feature proved to be extra handy when building a web version - no assets had to be streamed through the network, it was enough to download the WASM module with the game. However, as the project progresses and I'm soon to work on the new levels (and thus introducing way more assets), the current workflow of having to resource-compile assets, re-compile and re-link the project every time an asset is changed/added turns out to be too complicated.
That's the rationale for this MR: to extend current solution with a build-time switch to optionally use real or resource-compiled (called virtual interchangeably) filesystem. This way I can work much easier on adding assets in development builds and still use the previous approach of a single executable in production builds.
Before merging:
The repository contains multiple files (game assets) with size ranging between 1-10 MB, which is a good case for git-lfs adoption. What's more, I have already used git-lfs in other, professional projects with much satisfaction. The difference is, said projects were backed by internal, self-hosted infrastructure. Here I am relying on Github and its cloud solution, and its billing docs state:
So - I receive some small amount of free git-lfs storage (1 GB) and some amount of bandwidth (1 GB) for free.
I can work with that, given the size of the assets, with a slight possibility of running out of space in a very distant future and having to pay for storage. The bandwidth quota is shady in my opinion; I read the docs multiple times and still could not shake the feeling off that malicious actors could just clone my repository multiple times to suck my bandwidth and make me pay more for the service (not to mention real people cloning the project and forks counting to the bandwidth... of the root project).
Being realistic, it's only me working on this project - there's no need to go out of my way and pay monthly fee just to make things "super correct" from software engineering point of view and introducing git-lfs, even though I like it and know its benefits, such as smaller repository size and faster cloning/fetching. In the end, files are reasonably small <10 MB, the amount of them is not overwhelming and once added, they are not modified.
There are some other, potential problems that git-lfs introduces, such as problems with repository migration, but I don't deem them worth discussing as the argument above is enough for me not to adopt it.