Support loading song assets from a zip file
lewisfff opened this issue · comments
Currently, loading a song in Beatoraja requires loading in images, videos and sound files stored in the file system. I propose adding support for loading a generic archive file which contains the sound files and background video/images.
Why?
-
Faster file transfers: Moving a single archive is faster than individual files, especially when transferring them across different locations in Windows.
-
File compression: By archiving the assets, we can compress them and save disk space.
Implementation
- Archive all the assets for each song into a single zip file, except for chart files, preview sounds, and preview images. These files should be left out of the archive so that they can be accessed in the DECIDE menu without extracting.
Example comparison
Before:
After:
- Modify the song loading process to check for a 'package.zip' file in the song directory and unpack it into memory if it exists. If not, load the assets as usual.
Does anyone have thoughts on this, if it should be done, how it could be implemented, any complexities?
This greatly helps distributing level tables via torrenting: Torrent doesn't work well with LARGE number of files. This could greatly reduce number of files, therefore making torrent feasible.