Skip to content
Tutorial on making a full-featured arkanoid (breakout)-type game with LÖVE framework.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
1-01_TheBallTheBrickThePlatform
1-02_GameObjectsAsLuaTables
1-03_BricksAndWalls
1-04_DetectingCollisions
1-05_ResolvingCollisions
1-06_Levels
1-A_LevelsAsStrings
1-B_OptimizedCollisionDetection
2-01_SplittingCodeIntoSeveralFiles
2-02_LoadingLevelsFromFiles
2-03_StraightforwardGamestates
2-04_AdvancedGamestates
2-05_BasicTiles
2-06_DifferentBrickTypes
2-07_BasicSound
2-08_GameOver
3-01_BetterBallRebounds
3-02_BallLaunchFromPlatform
3-03_MouseControls
3-04_SpawningBonuses
3-05_BonusesEffects
3-06_GlueBonus
3-07_AddNewBallBonus
3-08_LifeAndNextLevelBonuses
3-09_RandomBonuses
3-10_MenuButtons
3-11_WallTiles
3-12_SidePanel
3-13_Score
3-14_Fonts
3-15_MoreSounds
3-16_FinalScreen
3-17_Packaging
doc/img
.gitignore
LICENSE
README.md

README.md

This tutorial describes how to write a more or less full-featured Arkanoid (Breakout) clone.

Here are several screenshots from various stages of the development process:



The intended audience are people, who have basic programming experience, but have trouble structuring their code for projects bigger than "Hello World". An Arkanoid, while simple, contains many elements found in more elaborate games. My aim is to introduce a typical code structure, and to provide a starting point for further modifications.

Chapter 1 describes how to build a prototype for an Arkanoid-type game in the most straightforward way, without relying too much on any external libraries or advanced language features.

Chapter 2 expands the prototype, introducing gamestates, basic graphics and sound. At the end of this chapter, the general frame of the game is complete. What is left is to fill it with the details.

Chapter 3 proceeds to add functionality to achieve a full-featured game. While the first two chapters are rather general, material in this chapter is mostly specific for Arkanoid-type games.

Appendices - which are not written yet :) - demonstrate some additional topics, such as how to use environments to define Lua modules, classes, and so on.

I realize that the length of the tutorial - almost 30 parts - is probably a bit too much. On the other hand, the amount of work necessary to write a game is commonly underestimated and this tutorial clearly shows what it actually takes to develop even a simple one.

Lua programming language and LÖVE framework are used. Basic programming experience is assumed. Familiarity with Lua and LÖVE is beneficial but not necessary. Some non-obvious Lua idioms are briefly explained.

The code can be downloaded using git

cd /your-path/
git clone https://github.com/noooway/love2d_arkanoid_tutorial

or by Github's "Clone or download -> Download ZIP" button.

Each step can be run with the LÖVE interpreter by issuing a love command followed by the folder name, for example

cd /your-path/love2d_arkanoid_tutorial
love 1-01_TheBallTheBrickThePlatform 

One last thing before we start: feedback is crucial. If you have any critique, suggestions, improvements or just any other ideas, please let me know.

Contents:

Chapter 1: Prototype

  1. The Ball, The Brick, The Platform
  2. Game Objects as Lua Tables
  3. Bricks and Walls
  4. Detecting Collisions
  5. Resolving Collisions
  6. Levels

    Appendix A: Storing Levels as Strings
    Appendix B: Optimized Collision Detection (draft)

Chapter 2: General Code Structure

  1. Splitting Code into Several Files
  2. Loading Levels from Files
  3. Straightforward Gamestates
  4. Advanced Gamestates
  5. Basic Tiles
  6. Different Brick Types
  7. Basic Sound
  8. Game Over

    Appendix B: Stricter Modules
    Appendix C-1: Intro to Classes
    Appendix C-2: Chapter 2 Using Classes.

Chapter 3 (deprecated): Details

  1. Improved Ball Rebounds
  2. Ball Launch From Platform (Two Objects Moving Together)
  3. Mouse Controls
  4. Spawning Bonuses
  5. Bonus Effects
  6. Glue Bonus
  7. Add New Ball Bonus
  8. Life and Next Level Bonuses
  9. Random Bonuses
  10. Menu Buttons
  11. Wall Tiles
  12. Side Panel
  13. Score
  14. Fonts
  15. More Sounds
  16. Final Screen
  17. Packaging

Additional Topics:

  1. Game Design
  2. Minimal Marketing (draft)
  3. Finding a Team

Acknowledgements
Archive

You can’t perform that action at this time.