Page 22 of 28

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

Posted: Mon Jul 21, 2014 10:19 am
by rmcode
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?

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

Posted: Tue Jul 22, 2014 7:00 am
by slime
Yes, you definitely can (and probably should) change them to something personalized to you when creating a standalone Mac game. :)

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

Posted: Thu Jul 31, 2014 5:47 pm
by boajuse
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.

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

Posted: Thu Jul 31, 2014 5:52 pm
by slime
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.

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

Posted: Thu Jul 31, 2014 6:12 pm
by boajuse
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".

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

Posted: Thu Jul 31, 2014 6:14 pm
by slime
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.

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

Posted: Thu Jul 31, 2014 6:41 pm
by boajuse
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.

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

Posted: Thu Jul 31, 2014 6:43 pm
by slime
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].

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

Posted: Thu Jul 31, 2014 6:58 pm
by boajuse
Great help, thanx.

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

Posted: Thu Jul 31, 2014 7:38 pm
by boajuse
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?