-
So I have been experimenting with exporting image/wave as file to get header files to bundle with my binary. I notice though, it is drastically increasing the size of each of the assets. Now, I am just used to use something like Nim Assets for bundling assets into a nim program and the pck file format from Godot. I don't know if there is something that I should or should not be doing when bundling (probably as I tend to just know enough to cause damage) or if that is the nature of the beast. If it is nature of the beast, what limits are usually there for assets to have a good balance in bundling them into the binary (or any other tricks etc might be used as well) versus just having everything out in the open? Or is there an ability to generate a resource file like a pck file for raylib? My little procedural games (up to the point, but I haven't experimented all that long with this ability) seem to be ok with size, I noticed this more when I was working on an illustrated visual read along story/program that I was working on. The images and wav files tend to be bigger compared to normal sprites and audio effects. Thanks for the help. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
I designed a Unfortunately, required tooling and documentation is not ready yet. |
Beta Was this translation helpful? Give feedback.
-
i've previously used phyfs (https://www.icculus.org/physfs/) with some success... |
Beta Was this translation helpful? Give feedback.
-
There's many ways to embed assets into a binary. My favourite when there's only a few files and one arch is to use a snippet of ASM to embed directly (note the extern and pointer/array fiddling may not be strictly necessary):
This plays nicely with executable packers like upx and was the neatest way I could find to embed a large file without incurring the overhead of something like converting to a C header. |
Beta Was this translation helpful? Give feedback.
I designed a
pck
fileformat just for that: https://github.com/raysan5/rresUnfortunately, required tooling and documentation is not ready yet.