You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Engine-Level ISO Support for Asset Packs and Episodes #132
asset customizationIssues related to custom graphics, sounds, asset packs etc.enhancementNew quality-of-life feature or request (does not change gameplay)
A feature that @Wohlstand and I have spoken about in private is to give TheXTech the option to play episodes from archives and image files, which can be done through the PhysFS Library. This would create the following benefits:
Reduce disc space usage.
Encourage users to keep unaltered copies of episodes on their harddrives, making preservation easier.
Potentially, in combination with some modified conversion kit code, allow to play Custom Set Episodes without any prior preparations.
Allow TheXTech to get the MD5-Checksum of a whole Episode, which is important for the Netplay feature that is currently in the talks (gonna open a GitHub Discussion on this later today).
For the sake of keeping the Archives unchanged, I suggest that TheXTech should ignore any .sav files that may be stored inside of them.
Hmm, archive formats can also de-dedupe data afaik, which would be great for episodes that repeatedly use the same assets across several, but not all levels.
Hedgewars does use PhysFS a lot, and all custom add-ons were shipped as .hwp files (basically a renamed ZIP archive) which contain some resources that the game can see and re-use
Hedgewars does use PhysFS a lot, and all custom add-ons were shipped as .hwp files (basically a renamed ZIP archive) which contain some resources that the game can see and re-use
Anyway, main goal to just simplify the distribution and make episodes and packages being more portable and the game being more compact. Absolutely no purpose to craft any sort of DRM for episodes which limits the freedom a lot and annoys. However, if episode maker really wants the protection, then the sort of obfuscation would be made that will confuse all guts of episode data making it hard to maintain by human. Manly it's a noob proof protection, hackers will develop the way to deobfucste that easily.
While I do not currently use TheXTech, I am in support of this as not only does it start on the possibility to play co-op, but also lowers the file size used by episodes and custom levels.
@Wohlstand Technically yes, but maybe something also would appear in a head, so, the time will solve this once we'll start this task
Instead of anything that directly references Nintendo, I'd rather suggest:
.xte (X-Tech Episode(s))
.xtl (X-Tech Level(s))
.xta (X-Tech Asset Pack)
These formats should be used for stuff that is exclusive for TheXTech, content that works on other branches like Vanilla or X2 should stick with 7z or zip to avoid an artificial access barrier. Maybe we could encourage/enforce a naming convention like:
.wld.7z / .wld.zip (Multi-Branch Episode(s))
.lvl.7z / .lvl.zip (Multi-Branch Level(s))
.pck.7z / .pck.zip (Packed game like Talking Time/Yoshi's Archipelago).
@Wohlstand Technically yes, but maybe something also would appear in a head, so, the time will solve this once we'll start this task
Instead of anything that directly references Nintendo, I'd rather suggest:
.xte (X-Tech Episode(s))
.xtl (X-Tech Level(s))
.xta (X-Tech Asset Pack)
These formats should be used for stuff that is exclusive for TheXTech, content that works on other branches like Vanilla or X2 should stick with 7z or zip to avoid an artificial access barrier. Maybe we could encourage/enforce a naming convention like:
.wld.7z / .wld.zip (Multi-Branch Episode(s))
.lvl.7z / .lvl.zip (Multi-Branch Level(s))
.pck.7z / .pck.zip (Packed game like Talking Time/Yoshi's Archipelago).
Yeahhh, now that I think about it you're right using .smbx* is not ideal, and your suggested alternatives feel great ^^
Would (just need to check out the specification), but tar.gz (not tar) is less effective for random access as this is a seamless compression that requires to decompress of the whole file until it can be used
Would (just need to check out the specification), but tar.gz (not tar) is less effective for random access as this is a seamless compression that requires to decompress of the whole file until it can be used
I guess I should've thought of that but I didn't x3
I guess .tar.gz would be rather inefficient for this purpose :P
Uhh, does PhysFS support that? It would surprise me a lot.
If it does, I guess, we could make an MD5 based database for Episodes that are encrypted for some reason, so that TheXTech will know the password by default. But, idk how many episodes are affected by that. It seems kinda pointless.
ZIP files do support password protection. IDK if PhysFS supports it.
It effects no episodes currently because no episode is played from a password protected ZIP file.
I don't see much utility in password protecting episodes tho, unless we want to keep other people on the same PC from snooping (why would we need to with episodes?) or in case you wanted to keep the episode for certain people only, IE having a previous episode give you the password for its sequel on completion or something.
I would be very happy to have any sort of archive support, regardless of compression. SMBX episodes being packaged as folders with thousands of files makes them very cumbersome. Transferring them between different drives and devices takes a very long time for one, but really the biggest problem is that with some less efficient file systems like exfat and fat32, episodes end up using a lot more space than they should. This mostly affects platforms that don't support better file systems, like Android, the 3DS or the Switch. As far as I can tell, this is because of cluster size shenanigans, like files only being allowed to be a multiple of 100kb large. When an episode consists of thousands of very tiny files, you can see where the problem lies. An episode that only takes 200MB on my laptop (ext4) can easily take up 700MB on my Switch (fat32) just because of that. Being able to simply load episodes from a tar or an uncompressed zip file would completely fix the problem.
I am pinning this issue to replace the Lighting/Transparency issue which has been solved since OpenGL became the default.
It doesn't have a top priority in development sequence, but it is a very important issue and solving it will fundamentally improve the experience on lots of our non-desktop platforms (as poudink mentioned) and will also help NetPlay work much more reliably.
As an important note: this is still in the planning phase due to some serious issues with the internal implementation of PhysFS.
0lhi listed the goals for how this should work from the user's perspective. Here are some goals from the perspective of development:
Need to route all TheXTech filesystem access (currently done with fopen and variants, various OS-specific directory functions, and some SDL rwops functions) through a single tightly-controlled utility library
When using archives, need a way to reuse a limited set of file handles (instead of creating a new file handle for every TheXTech-side file open)
Need to find an archive format that supports efficiently traversing the directory hierarchy and opening individual files (which is possibly extremely large) with a hard limits on RAM and with minimal I/O access. One candidate is Joliet-variant ISOs.
Possibly: need to integrate this archive handler in the PhysFS framework (could alternatively work with it directly, manually supporting both this archive and direct system I/O)
changed the title [-]Adding PhysFS Library to support playing episodes from zip/7z/iso[/-][+]Adding Engine-Level ISO Support for Asset Packs and Episodes[/+]on Feb 20, 2024
changed the title [-]Adding Engine-Level ISO Support for Asset Packs and Episodes[/-][+]Engine-Level ISO Support for Asset Packs and Episodes[/+]on Feb 20, 2024
Progress is proceeding nicely on this feature and it should be ready for testing following the v1.3.7 update. (I want to hold it back from v1.3.7 due to lack of testing.)
Updates on the points discussed above:
Almost all TheXTech file access is now routed through the tightly controlled Files::load_file and Files::open_file APIs. Some read/write access is not (which is okay). Soundfonts are currently loaded with a different interface, which is bad. We need to make the RWops open mechanism used by MixerX customizable. [Edit: this is done.]
The wip archives branch takes advantage of this control to integrate TheXTech's file open code with my new mbediso library.
The mbediso library does have a working file pointer reuse system.
mbediso supports Joliet ISOs with transparent support for a custom indexed dialect of lz4.
I have no plans to integrate this with physfs; that would add a layer of complication and our low end targets can't support it.
As I said, I don't have plans to integrate this with physfs myself. Once archive support is ready for testing and we have implemented packaging features in Moondust Maintainer, I think you will find that our own archive formats are perfectly suitable for your use cases.
If there is a very large amount of user demand for zip/7z support, then one of the developers may implement it as well, but this will be much less RAM-friendly and will also be slower to load, even on modern computers.
asset customizationIssues related to custom graphics, sounds, asset packs etc.enhancementNew quality-of-life feature or request (does not change gameplay)
Activity
ChristianSilvermoon commentedon Jun 7, 2021
Hmm, archive formats can also de-dedupe data afaik, which would be great for episodes that repeatedly use the same assets across several, but not all levels.
Wohlstand commentedon Jun 7, 2021
Hedgewars does use PhysFS a lot, and all custom add-ons were shipped as
.hwpfiles (basically a renamed ZIP archive) which contain some resources that the game can see and re-useChristianSilvermoon commentedon Jun 7, 2021
Could we use
.smbxefor Episodes? :PWohlstand commentedon Jun 7, 2021
Technically yes, but maybe something also would appear in a head, so, the time will solve this once we'll start this task
LoveBodhi commentedon Jun 8, 2021
This reminds me "MarioPacker" in SMBX-38A, but they're cracked.
Wohlstand commentedon Jun 8, 2021
Anyway, main goal to just simplify the distribution and make episodes and packages being more portable and the game being more compact. Absolutely no purpose to craft any sort of DRM for episodes which limits the freedom a lot and annoys. However, if episode maker really wants the protection, then the sort of obfuscation would be made that will confuse all guts of episode data making it hard to maintain by human. Manly it's a noob proof protection, hackers will develop the way to deobfucste that easily.
MECHDRAGON777 commentedon Nov 26, 2021
While I do not currently use TheXTech, I am in support of this as not only does it start on the possibility to play co-op, but also lowers the file size used by episodes and custom levels.
0lhi commentedon Nov 27, 2021
Instead of anything that directly references Nintendo, I'd rather suggest:
.xte(X-Tech Episode(s)).xtl(X-Tech Level(s)).xta(X-Tech Asset Pack)These formats should be used for stuff that is exclusive for TheXTech, content that works on other branches like Vanilla or X2 should stick with 7z or zip to avoid an artificial access barrier. Maybe we could encourage/enforce a naming convention like:
.wld.7z/.wld.zip(Multi-Branch Episode(s)).lvl.7z/.lvl.zip(Multi-Branch Level(s)).pck.7z/.pck.zip(Packed game like Talking Time/Yoshi's Archipelago).ChristianSilvermoon commentedon Nov 28, 2021
Yeahhh, now that I think about it you're right using
.smbx*is not ideal, and your suggested alternatives feel great ^^I can imagine:
LoveBodhi commentedon Dec 2, 2021
This make me think ".love" format (LÖVE2D Program)!!
ChristianSilvermoon commentedon Feb 18, 2022
Would this also support
.tarand.tar.gzfiles?Wohlstand commentedon Feb 18, 2022
Would (just need to check out the specification), but tar.gz (not tar) is less effective for random access as this is a seamless compression that requires to decompress of the whole file until it can be used
ChristianSilvermoon commentedon Feb 19, 2022
I guess I should've thought of that but I didn't x3
I guess
.tar.gzwould be rather inefficient for this purpose :P5 remaining items
ChristianSilvermoon commentedon Mar 10, 2022
ZIP files do support password protection. IDK if PhysFS supports it.
It effects no episodes currently because no episode is played from a password protected ZIP file.
I don't see much utility in password protecting episodes tho, unless we want to keep other people on the same PC from snooping (why would we need to with episodes?) or in case you wanted to keep the episode for certain people only, IE having a previous episode give you the password for its sequel on completion or something.
poudink commentedon Nov 15, 2022
I would be very happy to have any sort of archive support, regardless of compression. SMBX episodes being packaged as folders with thousands of files makes them very cumbersome. Transferring them between different drives and devices takes a very long time for one, but really the biggest problem is that with some less efficient file systems like exfat and fat32, episodes end up using a lot more space than they should. This mostly affects platforms that don't support better file systems, like Android, the 3DS or the Switch. As far as I can tell, this is because of cluster size shenanigans, like files only being allowed to be a multiple of 100kb large. When an episode consists of thousands of very tiny files, you can see where the problem lies. An episode that only takes 200MB on my laptop (ext4) can easily take up 700MB on my Switch (fat32) just because of that. Being able to simply load episodes from a tar or an uncompressed zip file would completely fix the problem.
ds-sloth commentedon Feb 4, 2024
I am pinning this issue to replace the Lighting/Transparency issue which has been solved since OpenGL became the default.
It doesn't have a top priority in development sequence, but it is a very important issue and solving it will fundamentally improve the experience on lots of our non-desktop platforms (as poudink mentioned) and will also help NetPlay work much more reliably.
As an important note: this is still in the planning phase due to some serious issues with the internal implementation of PhysFS.
0lhi listed the goals for how this should work from the user's perspective. Here are some goals from the perspective of development:
fopenand variants, various OS-specific directory functions, and some SDL rwops functions) through a single tightly-controlled utility library[-]Adding PhysFS Library to support playing episodes from zip/7z/iso[/-][+]Adding Engine-Level ISO Support for Asset Packs and Episodes[/+][-]Adding Engine-Level ISO Support for Asset Packs and Episodes[/-][+]Engine-Level ISO Support for Asset Packs and Episodes[/+]ds-sloth commentedon Aug 13, 2024
Progress is proceeding nicely on this feature and it should be ready for testing following the v1.3.7 update. (I want to hold it back from v1.3.7 due to lack of testing.)
Updates on the points discussed above:
LoveBodhi commentedon Aug 13, 2024
is zip/7z support still retain?
ds-sloth commentedon Aug 13, 2024
As I said, I don't have plans to integrate this with physfs myself. Once archive support is ready for testing and we have implemented packaging features in Moondust Maintainer, I think you will find that our own archive formats are perfectly suitable for your use cases.
If there is a very large amount of user demand for zip/7z support, then one of the developers may implement it as well, but this will be much less RAM-friendly and will also be slower to load, even on modern computers.