Making games standalone from LOVE?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
conman420
Prole
Posts: 33
Joined: Sun Aug 31, 2008 8:46 pm

Making games standalone from LOVE?

Post by conman420 »

I've started making a few games and I was just wondering will LOVE ever support 'compiled' games? Where to run it you do not require the love engine installed on the system it will run straight from the love file?

I'm sorry if love already supports this but I haven't seen anything to show this :)

Thanks.

never mind missed this thread:

http://love2d.org/forum/viewtopic.php?f=3&t=89
SnakeFace
Prole
Posts: 28
Joined: Tue Aug 19, 2008 2:45 pm

Re: Making games standalone from LOVE?

Post by SnakeFace »

I second this!
Lovely quotes
somewhere within the jungle of administrative doom - rude
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Making games standalone from LOVE?

Post by rude »

I implemented this a few days ago. You'll be able to merge love.exe and yourgame.love into yourgame.exe. When the love.exe is run under a different filename, it will try to load itself. This does not mean that there only will be one .exe, though. You'll still need to distribute the DLLs LÖVE needs in addition to yourgame.exe.

This will be available in version 0.5.0 (next).
User avatar
conman420
Prole
Posts: 33
Joined: Sun Aug 31, 2008 8:46 pm

Re: Making games standalone from LOVE?

Post by conman420 »

Awesome :D
User avatar
sauer2
Citizen
Posts: 61
Joined: Tue Sep 02, 2008 4:15 pm

Re: Making games standalone from LOVE?

Post by sauer2 »

rude wrote: This will be available in version 0.5.0 (next).
Also for other platforms than windows?
emonk
Prole
Posts: 24
Joined: Tue Aug 12, 2008 11:43 am

Re: Making games standalone from LOVE?

Post by emonk »

The zip archive format allows for having a zip file appended to a stub executable for making self-extracting zip executables. I've seen plenty of variations on this theme for windows, but don't know of many instances of it on other platforms. So single-file distribution of Love is a matter of appending a copy of your game.love to love.exe to produce game.exe. As rude pointed out however you'll still need the shared libs that Love.exe depends on.

That doesn't mean that there can't be Love sfx executables for each platform though. So long as there is some way to bind a zip file to an executable image without stopping it from functioning as an executable, this should be possible. I know nothing about the binary form of non-win32 executables, so I can't make predictions, but I don't imagine that it's impossible. It might take some binary patching of the exe header on some platforms perhaps, but most likely it'll be fine.

The problem of course is that each platform has a different executable format, and no two are enough alike (or enough different for that matter) to allow for a single redistributable. So a cross-platform version is pretty much out... unless we wrap multiple executable types with a java stub perhaps?

rude: could you perhaps do runtime linking against the DLLs and extract them from the game.exe if required? Takes a bit more work, I know.
Sarcasm - just one of the services I offer.
surtic
Citizen
Posts: 74
Joined: Sat Jul 12, 2008 12:18 am

Re: Making games standalone from LOVE?

Post by surtic »

Speaking of 0.5.0, how about that love.graphics.newImage(rgba_buffer, width, height)?

... Just asking :?
Green_Hell
Citizen
Posts: 94
Joined: Thu Feb 21, 2008 1:11 am

Re: Making games standalone from LOVE?

Post by Green_Hell »

rude wrote:You'll still need to distribute the DLLs LÖVE needs in addition to yourgame.exe
Does it make any sense then?

No offence

I know it's possible to do it multi platform and so that anything can be included. See http://love2d.org/forum/viewtopic.php?f ... t=20#p1144
>>I love LÖVE.<<
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Making games standalone from LOVE?

Post by bartbes »

I think DLL distributing is not a problem, as the main goal for the exe's is to allow people to just download the game instead of engine + game.

It's normal for games and even all other programs to have DLL's.
And that's just windows, I haven't seen any linux program which doesn't need libs (not including libc, ld, etc).
Don't know about mac, but there isn't even a mac version.
Post Reply

Who is online

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