Distributing your games (making a .love file)

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.
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: Distributing your games (making a .love file)

Post by rmcode » Mon Jul 21, 2014 10:19 am

A question about creating a Mac OS app:

Are we allowed to change the "bundle name", "copyright" and "bundle version" in the plist, or do we need to leave the standard there?

User avatar
slime
Solid Snayke
Posts: 2853
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Distributing your games (making a .love file)

Post by slime » Tue Jul 22, 2014 7:00 am

Yes, you definitely can (and probably should) change them to something personalized to you when creating a standalone Mac game. :)

boajuse
Prole
Posts: 5
Joined: Thu Jul 31, 2014 5:24 pm

Re: Distributing your games (making a .love file)

Post by boajuse » Thu Jul 31, 2014 5:47 pm

After making game.exe file frome love.exe+game.love my program can't open file for reading that stored in C:\Users\user\AppData\Roaming\LOVE\game.
File with game.love extension just doing it fine.

User avatar
slime
Solid Snayke
Posts: 2853
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Distributing your games (making a .love file)

Post by slime » Thu Jul 31, 2014 5:52 pm

The save directory of fused games is in %appdata%/identityname/, rather than %appdata%/LOVE/identityname/.

All the love.filesystem functions (love.filesystem.read, love.filesystem.write, etc.) are relative to both the game's source folder/.love and its save directory, so it shouldn't be a problem to have a different save directory location as long as your game doesn't rely on a file being in the save directory before the game puts it there initially.

boajuse
Prole
Posts: 5
Joined: Thu Jul 31, 2014 5:24 pm

Re: Distributing your games (making a .love file)

Post by boajuse » Thu Jul 31, 2014 6:12 pm

slime wrote:The save directory of fused games is in %appdata%/identityname/, rather than %appdata%/LOVE/identityname/.

All the love.filesystem functions (love.filesystem.read, love.filesystem.write, etc.) are relative to both the game's source folder/.love and its save directory, so it shouldn't be a problem to have a different save directory location as long as your game doesn't rely on a file being in the save directory before the game puts it there initially.
still it's not working. I'm using Win7 and it has "Roaming" after "appdata".

User avatar
slime
Solid Snayke
Posts: 2853
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Distributing your games (making a .love file)

Post by slime » Thu Jul 31, 2014 6:14 pm

Yes that's normal. If you type %appdata% into the Explorer address bar it will take you to /username/AppData/Roaming/.

It sounds like your code might be assuming a file exists even though it hasn't created it yet - try deleting or moving the game's save folder in %appdata%/LOVE/ and run the un-fused .love, to see if that's the case.

boajuse
Prole
Posts: 5
Joined: Thu Jul 31, 2014 5:24 pm

Re: Distributing your games (making a .love file)

Post by boajuse » Thu Jul 31, 2014 6:41 pm

Here is the test code where i create file, write "test" in it and then trying to read it from that file.

Code: Select all

function love.load()
	fname="data.txt"
	f=love.filesystem.newFile(fname)
	f:open("w")
    f:write("test")
	f:close()
	if love.filesystem.exists(fname) then 
		p=love.filesystem.read(fname) 
	else 
		p="none"
	end

end


function love.update( ... )

end


function love.draw()
	love.graphics.setBackgroundColor(25,25,25,255)
	love.graphics.print(p, 10, 10)
	
end
.love just doing it fine with "test" output but .exe do not with "none" output.

User avatar
slime
Solid Snayke
Posts: 2853
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Distributing your games (making a .love file)

Post by slime » Thu Jul 31, 2014 6:43 pm

You might need to make sure the identity is set, either in love.conf via t.identity (e.g. t.identity = "mygame") or at the top of love.load via [wiki]love.filesystem.setIdentity[/wiki].

boajuse
Prole
Posts: 5
Joined: Thu Jul 31, 2014 5:24 pm

Re: Distributing your games (making a .love file)

Post by boajuse » Thu Jul 31, 2014 6:58 pm

Great help, thanx.

boajuse
Prole
Posts: 5
Joined: Thu Jul 31, 2014 5:24 pm

Re: Distributing your games (making a .love file)

Post by boajuse » Thu Jul 31, 2014 7:38 pm

Oh! I've noticed that this new .exe file is an archive and can be opened and extracted. So is there any way to protect the code from that?

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests