Hi!
I was wondering how to trim/ optimize my game in size? I did pong step by step from cs50 and got around 6 mb. That's a lot for simple game like pong, so I compared it to mari0 and found that (mari0) has sdl, openal32 and DevIL dll's. And my game has msvcp,msvcr and love dll's alongside previously mentioned.
Is there a way to make it smaller besides zipping it? In haxeflixel I used -dce (dead code elimination) command for that.
The way you zip the love file can also affect its final size. Make sure to choose the slowest and highest level of compression.
PNGGauntlet can reduce the size of PNGs considerably and FLAC/OGG is considerably smaller than WAVs.
You could also try minifying the Lua code, using something like https://github.com/2dengine/love.maker
Last edited by ivan on Sat Dec 11, 2021 8:16 am, edited 1 time in total.
That prevents love.physics from being loaded and thus probably in small part reduces the runtime RAM usage of löve, but any disabled modules are still very much present in the executable and love.dll. lucked and azoyan are talking about reducing the file size of the shipped game, and for that you'd basically have to build löve from source with the unnecessary modules removed or commented out; conf.lua does nothing there. That should be feasible, but you'll probably have to pull the source code from github and do the stuff yourself.
However, I think that'll only have a rather small impact on the overall file size of your game. Maybe 1-3MB at most in a very generous case, not at all familiar with how much Box2d and OpenAL add together. Considering löve is about 10MB total by itself (according to my Windows machine anyway), that's rather small save (in terms of magnitude) - and great many indie titles today are far larger than that. You're probably better off taking ivan's advice, unless your game doesn't use any external art assets and instead relies purely on love.graphics.rectangle, love.graphics.line, and such. Usually the storage capacity is much less of an issue than any runtime memory usage when it comes to today's games, even if I do dislike modern triple A titles for having uncompressed audio in the tens of gigabytes in their installations.