You are previewing Developing Mobile Games with Moai SDK.
O'Reilly logo
Developing Mobile Games with Moai SDK

Book Description

Learn the basics of Moai SDK through developing games

  • Develop games for multiple platforms with a single code base

  • Understand the basics of Moai SDK

  • Build two prototype games including one with physics

  • Deploy your game to iPhone

In Detail

Moai SDK is a fast, minimalist, open-source Lua mobile framework for pro game developers. Moai is built around Lua, a common programming language for games, and offers a single open-source platform for both the front-end elements seen by consumers and the back-end infrastructure.

Developing Mobile Games with Moai SDK will guide you through the creation of two game prototypes in a step-by-step way, giving you the basic tools you need in order to create your own games.

Developing Mobile Games with Moai SDK introduces the basic concepts behind game development, and takes you through the development of a tile-based memotest, and a platform game prototype as well. You'll end up with a good codebase to start writing your own games.

You will learn some tricks that come from real life experience while creating a small framework that will allow you to display images, play sounds, grab input, and so on. You'll also learn how to implement physics using Box2D bindings, and everything in Lua, without having to use any compilations. After doing this, we'll take a look at how to deploy your game to iOS and run it on an iPhone.

With this book, you should be ready to go and create your own game, release it to the Apple Store, and have enough tools to dig deeper into Moai SDK.

Table of Contents

  1. Developing Mobile Games with Moai SDK
    1. Table of Contents
    2. Developing Mobile Games with Moai SDK
    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. Why Moai SDK?
      1. Multi-platform development
      2. Why Moai SDK?
      3. Summary
    9. 2. Installing Moai SDK
      1. Getting the latest stable build
      2. Setting up the environment
        1. Windows
        2. Mac OS X
        3. GNU/Linux
      3. Running samples
      4. Summary
    10. 3. Basic Moai SDK Concepts
      1. The Moai SDK Runtime
        1. Input Queue
        2. Action Tree
        3. Node Graph
      2. Rendering
      3. Moai Hosts
      4. Lua and C++
      5. Summary
    11. 4. Our First Game with Moai
      1. Concentration
      2. Project setup
      3. Opening a window
        1. Resolution independence
      4. Summary
    12. 5. Showing Images on the Screen
      1. Introduction to Decks and Props
      2. Our first image
      3. Coordinate systems
        1. Window/Screen coordinates
        2. World coordinates
        3. Model coordinates
      4. Blend modes
      5. Summary
    13. 6. Resource Manager
      1. Resource definitions
      2. Resource manager
        1. Getter
        2. Loader
          1. Images
          2. Tiled images
          3. Fonts
          4. Sounds
      3. Exercises
      4. Summary
    14. 7. Concentration Gameplay
      1. Grid
        1. Tilemaps
        2. The implementation
      2. Input
      3. Gameplay
        1. Initialization
        2. Input processing
        3. Choosing a cell
        4. Tile swapping
        5. Resetting tiles
        6. Removing tiles
        7. Other auxiliary methods
      4. Summary
    15. 8. Let's Build a Platformer!
      1. Background
      2. Camera and scrolling
        1. Parallax
        2. Setting up the layers
        3. Adding images to the different distances
      3. Main character
        1. Animations
      4. Summary
    16. 9. Real-world Physics with Box2D
      1. Creating the world
      2. Box2D body types
      3. Character versus the world
      4. Movement
      5. Keyboard input
      6. Creating the scene
      7. Exercises
      8. Summary
    17. 10. Creating a HUD
      1. The basics
      2. Left or right, that's the question
      3. Updating information
      4. Summary
    18. 11. Let the Right Music In!
      1. Audio manager
      2. Background music
      3. Sound effects
      4. Summary
    19. 12. iOS Deployment
      1. Xcode project
        1. The host
      2. Running an example
      3. Setting up our own project
        1. Pointing to the correct source code
        2. Fixing source paths
        3. Fixing include paths
        4. Fixing linked libraries
      4. Going multi-platform
      5. Running on the device
      6. Summary
    20. 13. Deployment to Other Platforms
      1. Windows
      2. Mac OS X
      3. Android
      4. Google Chrome (native client)
      5. Linux
      6. Summary
    21. Index