-
Notifications
You must be signed in to change notification settings - Fork 19
Packaging
Before shipping your game to the public, it is necessary to add several game levels, get rid of the bugs, test, and polish everything. I won't describe details of this process but it is actually what constitutes significant part of game development work.
After your game reaches release quality, it is necessary to distribute it somehow.
LÖVE provides two possibilities to package a game into a distributable form.
The first method is to create a .love
file (which is in fact just a zip archive), that can be
executed by the LÖVE interpreter. The second method is to bind the LÖVE interpreter together with the
game and to distribute a self-contained executable file.
Advantage of the first approach is simplicity for the developer: .love
file creation can be easily accomplished.
Advantage of the second is simplicity for the user: there is no need to install any additional software to run your game.
For this project, I'll use the first method, but for commercial games the second approach is preferable. I plan to address it in one of the appendices. love-release is a helpful tool to automate creation of .love
packages and stand-alone executables for various platforms. Besides, with external tools such as love.js it is relatively easy to
create a web-version of your game. Give it a try.
On GNU/Linux, a convenient way to create a *.love
archive is by make
utility.
There are lots of tutorials describing Makefile syntax. In short, a typical entry - called rule - has the following form:
target: dependency1 dependency2 .....
command1
command2
.....
Typing make target
will execute a sequence of commands command1
, command2
etc.
However, since the dependency list of the rule is not empty, Make will first look for rules
with names dependency1
, dependency2
and execute them.
For the current project the following Makefile
is used:
NAME=love2d_arkanoid_tutorial
all: love
love:
zip -r ${NAME}.love *.lua \
fonts img levels sounds \
credits.txt Makefile \
../LICENSE ../README.md
clean:
rm -f *.love
Commands make
, make all
or make love
will create a zip archive with all
the necessary files to run the game; make clean
will delete this archive.
Feedback is crucial to improve the tutorial!
Let me know if you have any questions, critique, suggestions or just any other ideas.
Chapter 1: Prototype
- The Ball, The Brick, The Platform
- Game Objects as Lua Tables
- Bricks and Walls
- Detecting Collisions
- Resolving Collisions
- Levels
Appendix A: Storing Levels as Strings
Appendix B: Optimized Collision Detection (draft)
Chapter 2: General Code Structure
- Splitting Code into Several Files
- Loading Levels from Files
- Straightforward Gamestates
- Advanced Gamestates
- Basic Tiles
- Different Brick Types
- Basic Sound
- Game Over
Appendix C: Stricter Modules (draft)
Appendix D-1: Intro to Classes (draft)
Appendix D-2: Chapter 2 Using Classes.
Chapter 3 (deprecated): Details
- Improved Ball Rebounds
- Ball Launch From Platform (Two Objects Moving Together)
- Mouse Controls
- Spawning Bonuses
- Bonus Effects
- Glue Bonus
- Add New Ball Bonus
- Life and Next Level Bonuses
- Random Bonuses
- Menu Buttons
- Wall Tiles
- Side Panel
- Score
- Fonts
- More Sounds
- Final Screen
- Packaging
Appendix D: GUI Layouts
Appendix E: Love-release and Love.js
Beyond Programming: