Page 1 of 2

Game distribution question

Posted: Wed Oct 27, 2021 11:21 am
by VanBandama
Hi! What are pros and cons fusing game over shipping with .love file, aside compatibility with previous versions? I tried to search some info about that on wiki or forum but no luck.

Re: Game distribution question

Posted: Wed Oct 27, 2021 11:29 am
by GVovkiv
VanBandama wrote: Wed Oct 27, 2021 11:21 am Hi! What are pros and cons fusing game over shipping with .love file, aside compatibility with previous versions? I tried to search some info about that on wiki or forum but no luck.
I guess shipping your game in .love, to play by someone, not testing staff or something, archive is bad way to do so since to play user should download love somewhere just to play your game
It's annoying
If i want to play game, i better just download ready out-of-box game, click something like Game.exe and start playing, rather then download archive with game, download love, install game and love and only after that play
If you just want to pass it to someone for testing("hey, man, i know you work with love; can you check what i done?"), showcasing or on forums for helping with bugs/problems/etc i guess it's fine

Re: Game distribution question

Posted: Wed Oct 27, 2021 11:57 am
by togFox
What about protecting LOVE2D source code from code stealers? Love2D source code can be accessed in about 10 seconds. That's a con.

Re: Game distribution question

Posted: Wed Oct 27, 2021 12:16 pm
by GVovkiv
togFox wrote: Wed Oct 27, 2021 11:57 am What about protecting LOVE2D source code from code stealers? Love2D source code can be accessed in about 10 seconds. That's a con.
Is that considered as con?

Re: Game distribution question

Posted: Wed Oct 27, 2021 12:36 pm
by VanBandama
For me the key is performance. Is there some notable differences?
And I'm not a big fan putting everything into exe. I know that's how love2d works but seeing huge exe file is a big red flag of poor optimization and messy code. I was wondering if it's possible to put assets and logic into .dat/ .bin file or stick to .love and ship it with exe.

Re: Game distribution question

Posted: Wed Oct 27, 2021 1:30 pm
by grump
There is probably nothing to worry about performance-wise. It's not like the fused exe is loaded into memory at once. The difference between fused exe and external love file is probably negligible.
VanBandama wrote: Wed Oct 27, 2021 12:36 pm seeing huge exe file is a big red flag of poor optimization and messy code.
Define "huge". AAA titles have exe files hundreds of MB large. Nobody gives a shit.
I was wondering if it's possible to put assets and logic into .dat/ .bin file or stick to .love and ship it with exe.
Why not, you just need some kind of launcher then, even if it's just a batch file or smth, because otherwise you have a love.exe that only shows a nogame screen. Or maybe fuse just a tiny .love file to the exe that runs your game's acual main.lua from the filesystem.

Re: Game distribution question

Posted: Wed Oct 27, 2021 1:55 pm
by zorg
VanBandama wrote: Wed Oct 27, 2021 12:36 pm For me the key is performance. Is there some notable differences?
You mean between a .love and a combined .exe? Not really; the latter just has the executable mounts itself (its tail, actually, where the zip footer is, at the very end) to the virtual filesystem and then runs like that.
VanBandama wrote: Wed Oct 27, 2021 12:36 pm And I'm not a big fan putting everything into exe. I know that's how love2d works but seeing huge exe file is a big red flag of poor optimization and messy code. I was wondering if it's possible to put assets and logic into .dat/ .bin file or stick to .love and ship it with exe.
Besides the reality grump dumped on you, there is a way in fused mode to load assets/scripts/whatever from the folder containing the .exe file itself: love.filesystem.getSourceBaseDirectory
togFox wrote: Wed Oct 27, 2021 11:57 am What about protecting LOVE2D source code from code stealers? Love2D source code can be accessed in about 10 seconds. That's a con.
It can also be accessed if you just rename the combined exe to have a .zip at the end... or, not even that, just open it with your favorite (un)archiver and be amazed... also, i invite you to check this post and the one below it out: https://love2d.org/forums/viewtopic.php ... 62#p223862

Re: Game distribution question

Posted: Wed Oct 27, 2021 2:15 pm
by Gunroar:Cannon()
togFox wrote: Wed Oct 27, 2021 11:57 am What about protecting LOVE2D source code from code stealers? Love2D source code can be accessed in about 10 seconds. That's a con.
Use a license. You can get the assets and code out of , like , all games (romhacks, not even nintendo is safe). The only difference is the difficulty in doing it. But what makes people want ton"steal" an idea successfully is lack of license (what's to stop me from using an Alan Walker song I downloaded in a game I make for example?) . Maybe if you still really want I think there's something like code encryption. :P

Re: Game distribution question

Posted: Wed Oct 27, 2021 2:16 pm
by VanBandama
Exactly as you said 100+ MB it's big. I know today nobody gives a damn how huge game is. I want everyone who downloads my game, to easily access to soundtrack folder (as a bonus - and as GVovkiv mentioned earlier player don't want to be annoyed)

Something like this i.e:

D:/MyGame :
-/soundtrack/ - audio tracks going here, also game will load it from here
-myGame.exe
-/GFX/ - here are all spritesheets and tileset in .dat file format
-lua51.dll
-mpg123.dll
-OpenAl.dll
-SDL2.dll
-msvcp120.dll
-msvcr120.dll

I know that structure can be achieved with .love file, just curious how it can affect performance and stability

*update:
I wrote it same time zorg and Gunroar:Cannon()'s explanation and didn't see that. But thanks for clarification :)

Re: Game distribution question

Posted: Wed Oct 27, 2021 2:17 pm
by GVovkiv
Gunroar:Cannon() wrote: Wed Oct 27, 2021 2:15 pm
togFox wrote: Wed Oct 27, 2021 11:57 am What about protecting LOVE2D source code from code stealers? Love2D source code can be accessed in about 10 seconds. That's a con.
like code encryption. :P
Or, probably, other language/engine/framework