I was wondering if there was a way to package only the necessary files in the .love file (e.g. script files) so that the large sound & image files would be left out. Because I just find it weird that everything about the game is compressed down to an exe file, which makes it around 50MB in my case.
Is there a way to do this? I've tried, but it ends up giving errors. It'd also give opportunity to the user to make their own resource packs & such.
Only Packaging Some Files in the .love File?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Party member
- Posts: 559
- Joined: Wed Oct 05, 2016 11:53 am
Re: Only Packaging Some Files in the .love File?
If you go searching the forums, you'll find plenty examples of people asking about how to make love.filesystem point outside the project/.love or save directory. One often suggested approach is using native-fs library. To my knowledge, 12.0 will add the ability to mount other paths, which will make it possible to do what you're asking.
However, if you want players to be able to make their own resource packs, you can also make use of the "appendidenitity" option in conf.lua. If you set it to false, love.filesystem will look in your game's save directory first, the source directory second. So long the folder structure in both places is similar, you can give players the ability to override assets or behavior.
However, if you want players to be able to make their own resource packs, you can also make use of the "appendidenitity" option in conf.lua. If you set it to false, love.filesystem will look in your game's save directory first, the source directory second. So long the folder structure in both places is similar, you can give players the ability to override assets or behavior.
Re: Only Packaging Some Files in the .love File?
This should help the investigation of yours : love.filesystem.mount and love.filesystem.unmountpyxledev wrote: ↑Tue Jul 23, 2024 4:43 pm I was wondering if there was a way to package only the necessary files in the .love file (e.g. script files) so that the large sound & image files would be left out. Because I just find it weird that everything about the game is compressed down to an exe file, which makes it around 50MB in my case.
Is there a way to do this? I've tried, but it ends up giving errors. It'd also give opportunity to the user to make their own resource packs & such.
Mounts a zip file or folder in the game's save directory for reading. It is also possible to mount love.filesystem.getSourceBaseDirectory if the game is in fused mode.
Example from the wiki page:
-- Assuming content.zip exists in the game's save directory and contains a file called 'myimage.png'.
love.filesystem.mount("content.zip", "content")
assert(love.filesystem.getInfo("content/myimage.png") ~= nil)
Re: Only Packaging Some Files in the .love File?
You'll need to be clear with your user base that a one time full installation is needed before benefiting from smaller patches but yeah - often thought about this but never bothered to try it.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
Who is online
Users browsing this forum: Bing [Bot] and 4 guests