Difference between revisions of "Game Distribution"
(→Making a .love-file: Simplified instructions, added some examples) |
(→Making an executable file out of a .love-file: Restructured and clarified some instructions (e.g. modification of Info.plist)) |
||
Line 33: | Line 33: | ||
zip -9 -q -r SuperGame.love . | zip -9 -q -r SuperGame.love . | ||
− | == | + | == Creating a Windows Executable == |
− | + | Once you have packed your game into a .love file you can create a game executable that directly runs your game. | |
− | + | For this you have to append your .love file to the love.exe file that comes with the official Löve .zip file. The resulting file is your game executable. | |
− | + | Once you have your game executable you can pack it together with all the other DLL files of the official Löve .zip file into a new .zip file and share this with the world. | |
− | |||
− | |||
− | + | '''Note:''' it is highly recommended to use the '''32-bit''' build of the Löve engine instead of the 64-bit version. | |
− | + | === Platform Specific Instructions === | |
− | === Windows === | + | ==== Windows ==== |
− | |||
− | + | To create your game executable under windows use the command line to run | |
− | + | copy /b love.exe+SuperGame.love SuperGame.exe | |
− | + | Alternatively you can create a .bat (e.g. create_game_exe.bat) file with the contents | |
− | + | copy /b love.exe+%1 "%~n1.exe" | |
− | + | and then you can simply drag your SuperGame.love file onto the .bat file and it will create the file SuperGame.love.exe which you could then use for distribution. | |
− | + | ==== Linux / OS X ==== | |
− | + | In the command line run | |
− | + | cat love.exe SuperGame.love > SuperGame.exe | |
− | + | to obtain the game executable <tt style="font-size:1.3em">SuperGame.exe</tt> | |
− | + | == Creating a MacOS X App == | |
− | + | Once you have your game prepared as .love file you can make your game available for MacOS/X users using the official Löve Zipped Universal Build from [https://www.love2d.org https://www.love2d.org]. This will then run directly your game instead of the Löve demo. | |
− | |||
− | |||
− | + | These are the steps required: | |
− | |||
− | |||
− | |||
− | + | # Unpack the Zipped Universal Build from [https://www.love2d.org https://www.love2d.org] | |
− | + | # Rename love.app to SuperGame.app | |
− | + | # Copy your SuperGame.love to SuperGame.app/Contents/Resources/ | |
− | + | # Modify SuperGame.app/Contents/Info.plist | |
− | + | # Zip the SuperGame.app folder (e.g. to SuperGame.osx.zip) and distribute it. | |
− | + | When modifying the file SuperGame.app/Contents/Info.plist make sure to change the values of the following XML-tags: | |
− | + | ||
− | + | * <tt>CFBundleIdentifier</tt> | |
+ | * <tt>CFBundleName</tt> | ||
+ | |||
+ | and remove the section <tt>UTExportedTypeDeclarations</tt>. E.g. | ||
+ | |||
+ | {| border="1" cellpadding="1" cellspacing="0" | ||
+ | !width="300"|Original Info.plist | ||
+ | !width="300"|Modified Info.plist | ||
+ | |- | ||
+ | | | ||
+ | ... | ||
+ | <key>CFBundleIdentifier</key> | ||
+ | <string>org.love2d.love</string> | ||
+ | ... | ||
+ | <key>CFBundleName</key> | ||
+ | <string>LÖVE</string> | ||
+ | ... | ||
+ | <key>NSPrincipalClass</key> | ||
+ | <string>NSApplication</string> | ||
+ | <key>UTExportedTypeDeclarations</key> | ||
+ | <array> | ||
+ | ... | ||
+ | </array> | ||
+ | </dict> | ||
+ | </plist> | ||
+ | | | ||
+ | ... | ||
+ | <key>CFBundleIdentifier</key> | ||
+ | <string>'''com.SuperCompany.SuperGame'''</string> | ||
+ | ... | ||
+ | <key>CFBundleName</key> | ||
+ | <string>'''SuperGame'''</string> | ||
+ | ... | ||
+ | <key>NSPrincipalClass</key> | ||
+ | <string>NSApplication</string> | ||
+ | </dict> | ||
+ | </plist> | ||
+ | |} | ||
+ | |||
+ | == Distribution for Linux == | ||
+ | |||
+ | For Linux there is not yet a simple way to distribute your game. The general approach here is to point to the official Löve packages at [https://www.love2d.org https://www.love2d.org]. Once the package is installed the .love packages are usually automatically executed using the installed Löve package. | ||
== Distribution on the web == | == Distribution on the web == |
Revision as of 21:34, 30 April 2013
Contents
Create a .love-file
Please note that some operating systems use case-sensitive paths. To avoid unnecessary hassle make sure that the path specifications you use in code matches that of your folders and files.
To create a .love-file you have to create a zip file of the whole game directory. Make sure that your main.lua is in the root of the archive, e.g. if you have
<somedir>\SuperGame\gfx\character.png <somedir>\SuperGame\main.lua <somedir>\SuperGame\conf.lua
You must ensure the zip file containts
gfx\character.png main.lua conf.lua
and not the directory SuperGame\.
Once you have your zip file you simply rename the ending from .zip to .love and you are done!
Platform Specific Notes
Windows
Windows supports creation of zip files out of the box. For detailed instructions see http://windows.microsoft.com/en-hk/windows-vista/compress-and-uncompress-files-zip-files
Alternatively you can use the Distribution Utility that is available here
Linux / OS X
Assuming your current directory is SuperGame/ you can create the .love file from command line directly using
zip -9 -q -r SuperGame.love .
Creating a Windows Executable
Once you have packed your game into a .love file you can create a game executable that directly runs your game.
For this you have to append your .love file to the love.exe file that comes with the official Löve .zip file. The resulting file is your game executable.
Once you have your game executable you can pack it together with all the other DLL files of the official Löve .zip file into a new .zip file and share this with the world.
Note: it is highly recommended to use the 32-bit build of the Löve engine instead of the 64-bit version.
Platform Specific Instructions
Windows
To create your game executable under windows use the command line to run
copy /b love.exe+SuperGame.love SuperGame.exe
Alternatively you can create a .bat (e.g. create_game_exe.bat) file with the contents
copy /b love.exe+%1 "%~n1.exe"
and then you can simply drag your SuperGame.love file onto the .bat file and it will create the file SuperGame.love.exe which you could then use for distribution.
Linux / OS X
In the command line run
cat love.exe SuperGame.love > SuperGame.exe
to obtain the game executable SuperGame.exe
Creating a MacOS X App
Once you have your game prepared as .love file you can make your game available for MacOS/X users using the official Löve Zipped Universal Build from https://www.love2d.org. This will then run directly your game instead of the Löve demo.
These are the steps required:
- Unpack the Zipped Universal Build from https://www.love2d.org
- Rename love.app to SuperGame.app
- Copy your SuperGame.love to SuperGame.app/Contents/Resources/
- Modify SuperGame.app/Contents/Info.plist
- Zip the SuperGame.app folder (e.g. to SuperGame.osx.zip) and distribute it.
When modifying the file SuperGame.app/Contents/Info.plist make sure to change the values of the following XML-tags:
- CFBundleIdentifier
- CFBundleName
and remove the section UTExportedTypeDeclarations. E.g.
Original Info.plist | Modified Info.plist |
---|---|
... <key>CFBundleIdentifier</key> <string>org.love2d.love</string> ... <key>CFBundleName</key> <string>LÖVE</string> ... <key>NSPrincipalClass</key> <string>NSApplication</string> <key>UTExportedTypeDeclarations</key> <array> ... </array> </dict> </plist> |
... <key>CFBundleIdentifier</key> <string>com.SuperCompany.SuperGame</string> ... <key>CFBundleName</key> <string>SuperGame</string> ... <key>NSPrincipalClass</key> <string>NSApplication</string> </dict> </plist> |
Distribution for Linux
For Linux there is not yet a simple way to distribute your game. The general approach here is to point to the official Löve packages at https://www.love2d.org. Once the package is installed the .love packages are usually automatically executed using the installed Löve package.
Distribution on the web
There is an experimental project to run .love games in a WebGL capable browser (up to date firefox,opera,safari...) without needing extra plugins, see forum thread
Mobile distribution
There is an experimental project to run .love games natively on android phones, see subforum
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info