hi
it would be nice if there is a possibility of loading data from external compressed single file .
resources from a single file
Moderator: Moderators
Hi airpas,
Does any of the extensions listed in "Resources / Compression" on GMtoolbox do what you're after? If not, could you explain your specific requirements? Shouldn't be too complicated to ( for instance ) whip up a miniz based extension.
K
Does any of the extensions listed in "Resources / Compression" on GMtoolbox do what you're after? If not, could you explain your specific requirements? Shouldn't be too complicated to ( for instance ) whip up a miniz based extension.
K
Hi airpas,
You can however use a extension that is capable of loading resources from a ( "zip" ) archive, but then you end up with 3 files ( exe + "zip" + dll ). If you absolutely want only 2 files you could port such dll to a scripted library, but that will have performance consequences. And obviously both options will require additional scripting compared to just having a single exe.
What's the reason that you want to do this by the way? I can think of a few, but i'm curious about your reasoning![Wink :wink:](./images/smilies/icon_wink.gif)
K
Ah, like that. Unfortunately such feature isn't built-in, so you can't do that ( easily ).airpas wrote:instead of put all the resources inside the exe, i'd like to separate it in a single file
You can however use a extension that is capable of loading resources from a ( "zip" ) archive, but then you end up with 3 files ( exe + "zip" + dll ). If you absolutely want only 2 files you could port such dll to a scripted library, but that will have performance consequences. And obviously both options will require additional scripting compared to just having a single exe.
What's the reason that you want to do this by the way? I can think of a few, but i'm curious about your reasoning
![Wink :wink:](./images/smilies/icon_wink.gif)
K
thanks for the infos
the reason is .. well i think i've never seen a real game packed in single exe file .but maybe for small games its ok
another reason is some times the AV suspect and alert false positive . and this happen when you use build and compress with upx , so if there is a single file system you won't worry about that , because the compression touch only the resource file.
the reason is .. well i think i've never seen a real game packed in single exe file .but maybe for small games its ok
another reason is some times the AV suspect and alert false positive . and this happen when you use build and compress with upx , so if there is a single file system you won't worry about that , because the compression touch only the resource file.
Hi airpas,
K
I'm no PE / ELF / Mach-O expert, but i suspect the "payload" that gets piggybacked to the runtime doesn't get loaded into memory automatically ( by the OS ). So in that case it's entirely up to ZGE how it deals with that data .. identically to when it would be a separate file.airpas wrote:well i think i've never seen a real game packed in single exe file .but maybe for small games its ok
This is definitely a valid argument. When you don't want to use UPX compression, you can end up with massive files when using imported data ( since bitmap / mesh / sound data is stored in RAW format ).airpas wrote:another reason is some times the AV suspect and alert false positive
K
There is no built-in generic decompressor in the ZGE runtime (the zlib decompressor is only in the IDE to decompress resources from .zgeproj files). So if the resources were in a separate file they would be uncompressed. To reduce resource size you can use JPG bitmaps and OGG audio because the ZGE runtime supports those formats.
The runtime already supports loading the resources from a separate file if the filed is named "zzdc.dat" and is in the same directory. Although I've hidden the menuitem in the IDE that allows creating such files because I thought it would only confuse things. Let me know if you need it.
The runtime already supports loading the resources from a separate file if the filed is named "zzdc.dat" and is in the same directory. Although I've hidden the menuitem in the IDE that allows creating such files because I thought it would only confuse things. Let me know if you need it.
thanks
it would be good if there is an option to rename "zzdc.dat" in the editor
also zzdc.dat .is a raw file , could you add compression mechanism to it ?
there is an lzo pascal unit , its tiny and fast
https://gist.github.com/XProger/0d364bff0e82f7e971ad
but seems i386 only .
it would be good if there is an option to rename "zzdc.dat" in the editor
also zzdc.dat .is a raw file , could you add compression mechanism to it ?
there is an lzo pascal unit , its tiny and fast
https://gist.github.com/XProger/0d364bff0e82f7e971ad
but seems i386 only .