Packaging Love2d Games
For my first packaging foray I've chosen to package some love games, starting
with Mari0 from http://www.stabyourself.net .
Love (www.love2d.org) is a 2d game framework written in Lua. Apart from the odd
game that runs with LuaJIT, the games run fully interpereted. It's become quite
mature in the last year or so, is very popular at gamejams and for prototyping
the professional games industry.
It appears Mari0 is somewhat of a poster child for Love. It's a clone of
SuperMario Bros crossed with Valve's Portal. It's an extremely polished
Love games are generally distributed as a ".love" file. A .love file is just a
zipfile containing .lua source files and game data. You run it against love
or you can unzip it and run it against the directory. Either way, you need to
have Love installed to run it. Current love 0.8 is in the unstable/testing
As I said the vast majority of games are distributed as a plain .love file.
Love developers suggest a couple of other ways to distibute.
1) plain .love file (as above)
2) .love file packaged with the love binary
3) Doing "cat <lovebinary> <game.love> > game" to create a single
I'll break down options 1 and 3 and leave out option 2 using mari0 as an
1) plain .love file
To package this would need the following;
* love set as dependancy
* install mari0.love into /usr/share/games/mari0
* install a mario.sh into /usr/games that runs;
* install a .desktop file in /usr/share/applications
* Follows Debian policy of using shared libraries from the repo
* Easy to package
* Keeps upstream package clean
* The mechanisms of launching the game is kept to debian.
* As love version changes some games may become buggy if upstream don't upgrade
inline with love.
3) Making a combined executable
To package this would need the following
* Debuild would need to also build love from source. This considerably
complicates the build for every game. While the original love build could be
sourced for use we end up having to maintain a love binary inside every game
* Breaks policy of using the repo libs instead of shipping. This is the
* equivelant (albiet an inverse) of static linking SDL into every SDL game.
Note: Love game developers don't have an upstream build system. Game source IS
the game itself. We can't push configuration items like .desktop files or love
binary distribution upstream.
Option to me looks like a no brainer. Thoughts?