-
Notifications
You must be signed in to change notification settings - Fork 17
Packaging
Before shipping the 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.
When the game is ready for release, it is necessary to package it into distributable form.
LÖVE provides two possibilities for this.
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 distribute a self-contained executable file.
Advantage of the first approach is simplicity for the developer: creation of a .love
file is easy to accomplish.
Advantage of the second is simplicity for the user: there is no need to install any additional software to run the 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 them 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
.....
The following recursive strategy is used: to execute the rule with
the name target
, first execute the rules for each of it's dependencies;
after that, execute each command in the list of the commands. So, typing make target
will result in Make looking for and executing rules for dependency1
, dependency2
etc,
and after that executing a series of commands command1
, command2
etc.
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
and make love
will create a LÖVE package (zip archive with love
extension) 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: