Tutorial on making Arkanoid-type game with Lua and Love2d

Discussion in 'Indie Basics' started by noooway, May 21, 2017.

  1. noooway

    noooway New Member

    Joined:
    Feb 19, 2017
    Messages:
    4
    Likes Received:
    0
    Hey!

    I have been writing a simple Arkanoid-type game with LÖVE framework, but at some point I've decided to turn it into a tutorial.

    The tutorial is intended for 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 goal is to introduce a typical code structure, and to provide a starting point for further modifications.

    Here is a couple of screenshots:
    [​IMG] [​IMG]
    [​IMG] [​IMG]

    LÖVE framework uses Lua language and it is geared towards 2d games. It is cross-platform, running on major desktop and mobile operating systems, and on the web. Some example games can be found here. LÖVE is simple and intuitive; glancing over this short article is enough to understand it's basic principles of operation. Another it's advantage is that it is free and open-source.

    The tutorial is split in 3 chapters.
    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.

    (follow the links for the screenshots).
    1. The Ball, The Brick, The Platform
    2. Bricks and Walls
    3. Detecting Collisions
    4. Resolving Collisions
    5. Levels
    Appendix A: Storing Levels As Strings

    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.

    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

    Chapter 3 proceeds to add functionality to achieve a full-featured game.
    While the code for this chapter works and available in the repository, some minor corrections are required.
    Overall, this chapter is currently in a draft stage, and the finished parts can be found on the github.

    My current plans are to finish the tutorial about programming part and update the graphics and the sound.
    Any feedback is appreciated.
     
  2. noooway

    noooway New Member

    Joined:
    Feb 19, 2017
    Messages:
    4
    Likes Received:
    0
    I haven't announced the contents of the third chapter, so here it is.

    1. Better 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 (draft)
    13. Score (draft)
    14. Fonts (draft)
    15. More Sounds (draft)
    16. Final Screen (draft)
    17. Packaging and Distribution (draft)

    While it is moslty concerned with Arkanoid-specific details, some topics can be applied to other types of the games.

    For example, the sections on Random Bonuses, Menu Buttons, and Wall Tiles have been updated recently.

    [​IMG]

    [​IMG]

    [​IMG]
     
  3. noooway

    noooway New Member

    Joined:
    Feb 19, 2017
    Messages:
    4
    Likes Received:
    0
  4. noooway

    noooway New Member

    Joined:
    Feb 19, 2017
    Messages:
    4
    Likes Received:
    0
    I've finished the last 2 parts of the tutorial: credits screen and packaging.

    [​IMG]

    All in all I don't like how the Chapter 3 has turned out.
    My initial idea has been to discuss typical problems arising in game programming on real-life examples.
    However, most of the code in Chapter 3 has become too specific for this Arkanoid and hardly can be transferred to any other project.
    Besides, technical details of the specific implementation obscure the general ideas.
    I think, instead of describing a step by step code evolution, a better approach would be to restructure the Chapter 3 into a series of loosely related articles grouped by a common subject. For example, a group on visual effects with articles on postprocessing, particle effects, etc. Basically, topics currently placed in appendicies should become the main material for this chapter.

    This will require a lot of work that I currently don't want to deal with.
    Instead I would like to concentrate on making a small but well-polished, publishable quality, game.
    As one of the first steps, this will require to find an artist and a sound designer.

    Regarding the tutorial, the plan is following:
    1) Update the Chapters 1 and 2.
    2) Find a native speaker to get help with the text proofreading.
    3) Restructure the Chapter 3 into a series of "additional topics".
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer