Simple vbscript-and-folder trick to package Love

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
RawinputWizard
Prole
Posts: 3
Joined: Thu Apr 14, 2022 4:35 am

Simple vbscript-and-folder trick to package Love

Post by RawinputWizard »

You can run a Love app by simply dragging a folder onto love.exe, no need to make an archive.

https://i.imgur.com/OsmYnbP.mp4

Since the exe only needs path to directory, you can simply use vbscript to launch a relative path, and package the game into a loose directory like so:

https://love2d.org/imgmirrur/ZSDUctx.html

This makes any sort of modding or dynamic asset addition much easier to do since you don't need to re-archive all the game files.

Then, if your game is distributed through Steam, you can simply make the Steam shortcut point to launching the vbscript file directly to abstract it all away from the player.

I've attached a sample package here to showcase the simple directory structure using a modded version of Hydrogen Maniac's amazing Lead Haul game
LeadHaulModded.7z
(65.74 MiB) Downloaded 112 times
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: Simple vbscript-and-folder trick to package Love

Post by ReFreezed »

This is silly.

You never had to re-archive a LÖVE game to apply a mod to it. Since LÖVE tries to load files from the save folder before the .love/.exe file (by default) users just have to put the modded files there (with no risk of accidentally breaking the original game files). You're just adding a dependency to VBScript (which is Windows only) and spreading out the game files.

Regarding Steam, if you still decide to separate the files like this, you can just point Steam at love.exe and set the correct arguments in Steamworks directly. No need to use VBScript in-between.

Not to mention that the game will show up as "love.exe" in the task manager etc. which is just confusing.
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
User avatar
darkfrei
Party member
Posts: 1197
Joined: Sat Feb 08, 2020 11:09 pm

Re: Simple vbscript-and-folder trick to package Love

Post by darkfrei »

ReFreezed wrote: Wed Apr 27, 2022 9:42 am Regarding Steam, if you still decide to separate the files like this, you can just point Steam at love.exe and set the correct arguments in Steamworks directly. No need to use VBScript in-between.

Not to mention that the game will show up as "love.exe" in the task manager etc. which is just confusing.
Is it possible to open the love.exe with argument for other name as love?
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: Simple vbscript-and-folder trick to package Love

Post by ReFreezed »

darkfrei wrote: Wed Apr 27, 2022 12:54 pm Is it possible to open the love.exe with argument for other name as love?
I don't know what you mean.
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
MrFariator
Party member
Posts: 548
Joined: Wed Oct 05, 2016 11:53 am

Re: Simple vbscript-and-folder trick to package Love

Post by MrFariator »

darkfrei wrote: Wed Apr 27, 2022 12:54 pm Is it possible to open the love.exe with argument for other name as love?
Rename the love.exe? Of course, ideally you should just fuse your game for distribution, and maybe use something like ResourceHacker to modify the executable data, like application icon.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests