O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

LÖVE for Lua Game Programming

Book Description

If you want to create 2D games for Windows, Linux, and OS X, this guide to the LÖVE framework is a must. Written for hobbyists and professionals, it will help you leverage Lua for fast and easy game development.

  • Discover the LÖVE framework and build games easily and efficiently
  • Learn how to utilize the LÖVE framework’s tools to create a 2D game world
  • A step-by-step approach to learning game development

In Detail

LÖVE is a game development framework for making 2D games using the Lua programming language. LÖVE is totally free, and can be used in anything from friendly open-source hobby projects, to closed-source commercial ones. Using the Lua programming framework, one can use LÖVE2D to make any sort of interesting games.

LÖVE2d for Lua Game Programming will quickly and efficiently guide you through how to develop a video game from idea to prototype. Even if you are new to game programming, with this book, you will soon be able to create as many game titles as you wish without stress.

The LÖVE framework is the quickest and easiest way to build fully-functional 2D video games. It leverages the Lua programming language, which is known to be one of the easiest game development languages to learn and use. With this book, you will master how to develop multi-platform games for Windows, Linux, and Mac OS X. After downloading and installing LÖVE, you will learn by example how to draw 2D objects, animate characters using sprites, and how to create game physics and game world maps.

LÖVE2d for Lua Game Programming makes it easier and quicker for you to learn everything you need to know about game programming. If you’re interested in game programming, then this book is exactly what you’ve been looking for.

Table of Contents

  1. LÖVE for Lua Game Programming
    1. Table of Contents
    2. LÖVE for Lua Game Programming
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Getting Started with LÖVE
      1. Downloading LÖVE
      2. For Windows users
      3. For Linux users
      4. For Mac users
        1. Choosing your editor
        2. Running a LÖVE game
        3. Basic structure of LÖVE
          1. Examples
          2. Conf.lua
      5. Summary
    9. 2. LÖving Up!
      1. Drawing 2D objects
      2. Moving objects
        1. Rotating objects
        2. Moving left, right, up, or down
      3. Sprites
      4. Animation
      5. Summary
    10. 3. Before You Build a Game
      1. Planning your game
        1. Strategy
        2. Role-playing games
        3. Adventure
        4. Action
        5. Simulation
      2. Summary
    11. 4. Making Your First Game
      1. Basic level design
        1. Getting your assets ready
          1. Player
          2. Coin
          3. Antagonist
          4. Diamond
        2. Tile set
      2. Getting started with Tiled
      3. Exporting your tile map
      4. Loading the game level
      5. Conf.lua
      6. Summary
    12. 5. More About Making the Game
      1. Bump on it!
      2. Loading solid tiles into the bump
      3. Loading the character objects (player and enemy)
      4. A player character
      5. The anim8 library
        1. Frames
        2. Animation
        3. Player movement
        4. Gravitation physics
        5. Player collision with platform
        6. Player's death
        7. Draw player
      6. Summary
    13. 6. Meeting the Bad Guy!
      1. Bad guy
      2. Updating the enemy position and animation
      3. Enemy collision configuration
      4. Enemy death function
      5. Drawing the enemy character to the screen
      6. Summary
    14. 7. Pickups and Head-Up Display and Sounds
      1. Pickups
        1. Coins
        2. Diamonds
        3. Life
      2. Audio system
        1. Enemy collision sounds
        2. Item pick sounds
          1. Coin sound
          2. Diamond sound
      3. Head-Up Display (HUD)
        1. Menu HUD
        2. On clicking a button
      4. Life HUD
      5. Score HUD
      6. Summary
    15. 8. Packaging and Distributing Your Game
      1. Windows executable
      2. Mac apps
      3. Linux
      4. LÖVE on browsers
      5. LÖVE on Android mobile phones
      6. Summary
    16. Index