Self-updating LÖVE
Self-updating LÖVE
So the only place you can write to with the filesystem library is the designated write-access folder for your game. But I'd like to be able to update my game code via the net, so that users don't have to update the client to keep playing on the server. Rather than have to write an Lua module to allow external file write-access, is this something that could be implemented cleanly into an update of LÖVE? The ideal solution would be to be able to write new resources from data received from LuaSocket and update the script itself, then restart the script.
Re: Self-updating LÖVE
So... you want to be able to do the following:
1. Download a file, or more, from the internet (saved to temporary folder)
2. Unzip the .love file that is currently running
3. Replace files in the .love file with new ones that were downloaded
4. Re-zip that motherfucker
5. Restart love
All in one convenient function....
Jesus... it seems like a cool idea, but it also seems a lot of work. I am not sure, but rude and I discussed the manipulation of currently-loaded .love files before (used for saving things inside the file instead of in the designated folder), but scrapped the idea for some reason or other. My suggestion, until rude comes back from exam-land to look over this idea is the following:
Create a script that just downloads everything it needs for the game from the net when it's started, saving it to the default location, and then runs the files from that location. Then you are free to change the files that are downloaded at your leisure and the people who run the script will get the choice to either play what is currently on their computer or look for new updates. The .love file that is passed around is just there for downloading purposes, much like how the new MSN Live Messenger is pushed around.
1. Download a file, or more, from the internet (saved to temporary folder)
2. Unzip the .love file that is currently running
3. Replace files in the .love file with new ones that were downloaded
4. Re-zip that motherfucker
5. Restart love
All in one convenient function....
Jesus... it seems like a cool idea, but it also seems a lot of work. I am not sure, but rude and I discussed the manipulation of currently-loaded .love files before (used for saving things inside the file instead of in the designated folder), but scrapped the idea for some reason or other. My suggestion, until rude comes back from exam-land to look over this idea is the following:
Create a script that just downloads everything it needs for the game from the net when it's started, saving it to the default location, and then runs the files from that location. Then you are free to change the files that are downloaded at your leisure and the people who run the script will get the choice to either play what is currently on their computer or look for new updates. The .love file that is passed around is just there for downloading purposes, much like how the new MSN Live Messenger is pushed around.
Now posting IN STEREO (where available)
Re: Self-updating LÖVE
Yeah, what Mike said.
Writing to the .love-file is not supported by PhysFS, so it is unlikely that it will be added. Remember that the root of the .love file and the root of the write directory are "merged" by PhysFS. For instance, if you want to load "awesome.png", it does not matter if it's in your .love or in the write directory, love.graphics.newImage("awesome.png") will work either way.
Writing to the .love-file is not supported by PhysFS, so it is unlikely that it will be added. Remember that the root of the .love file and the root of the write directory are "merged" by PhysFS. For instance, if you want to load "awesome.png", it does not matter if it's in your .love or in the write directory, love.graphics.newImage("awesome.png") will work either way.
Re: Self-updating LÖVE
Ah, so that was the reason. Come to think of it, the solution I suggested could potentially be really cool as a small love utility (much like the extremely awesome console), so if anyone is up for making it, please do.
Now posting IN STEREO (where available)
Who is online
Users browsing this forum: Google [Bot] and 10 guests