You are previewing Learn Corona SDK Game Development.
O'Reilly logo
Learn Corona SDK Game Development

Book Description

Corona SDK is one of the most popular app and game mobile development platforms in the world, and Learn Corona SDK Game Development walks you through creating a full-featured Corona game from scratch to the App Store.

You'll learn Lua basics (the foundation of Corona), how to add and manipulate graphics, and how to use controls like multitouch, accelerometer, and gyroscope. You'll also learn how to use Box2D (Corona physics under the hood), and how to add sound effects and music.

As you're polishing your game, you'll also learn about ads, in-app purchases, and OpenFeint and Game Center integration. Finally, you'll learn the ins and outs of getting a game into the App Store or other app marketplaces.

Whether you're developing exclusively for iOS, or whether you're developing for Android or other platforms, Learn Corona SDK Game Development explains just what you need to launch your career as a mobile game developer.

What you'll learn

  • Just enough Lua to get started with Corona

  • How to put your Corona code together

  • How to work with images and effects

  • Adding music and sound

  • Game physics and AI

  • Working with app stores and marketplaces

Who this book is for

Beginning mobile game developers, with a grasp of the basics of programming, who want a complete walkthrough of the Corona app and game development tool, or iOS or Android developers who want to learn about Corona SDK.

Table of Contents

  1. Title Page
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Author
  6. About the Technical Reviewer
  7. Acknowledgments
  8. Introduction
  9. Part 1: Get Ready . . . Get Set . . .
    1. Chapter 1: Say Hello to My Little Friend: The Corona SDK
      1. A Long Time Ago In a School (Perhaps) Far, Far Away . . .
      2. Back to the Future
      3. Hey, Wait, Isn’t This Book about the Corona SDK?!
      4. Corona: History at a Glance
      5. A Tool That Works for You
      6. Baby-Steppin’ It
      7. Summary
    2. Chapter 2: The Pillar of Creation: Lua
      1. A Jack of All Trades
      2. The Bare Necessities: Lexicology
      3. The Keys to Success: Keywords
      4. Making a Statement: Commenting
      5. A Place for Your Stuff: Variables, Values, and Types
      6. Expressing Yourself: Expressions and Operators
      7. Let’s Table This Discussion: The Mythical “Table”
      8. Getting Functional: All about Functions
      9. Taking Control: Control Structures
      10. Knocked for a Loop: The for, while, and repeat Constructs
      11. Compartmentalizing: Modules
      12. Variations on a Theme: Changes Made to Lua in Corona
      13. Summary
  10. Part 2: Go!
    1. Chapter 3: Basic Application Structure
      1. The Year Is 2258 . . . The Name of the Place . . . err, Game . . .
      2. Mapping out the Astro Rescue Game
      3. You’re Sceneing Things: The Storyboard API
      4. Back to the Beginning: The main.lua file
      5. Utilities
      6. Even Further Back: build.settings and config.lua
      7. Summary
    2. Chapter 4: Title, Menu, and Settings Scenes
      1. Welcome, Ladies and Gents: The Title Scene
      2. What’ll You Have? The Menu Scene
      3. The Choice Is Yours: The Settings Scene
      4. Summary
    3. Chapter 5: The Game, Part 1: Core Game Code
      1. The Game Scene Kicks It All Off
      2. Getting to the Heart of the Matter: The gameCore Object
      3. Summary
    4. Chapter 6: The Game, Part 2: Main Loop
      1. enterFrame
      2. processShip
      3. processColonist
      4. processFuelPod
      5. showFuelPod
      6. processAlienUFO
      7. showAlienUFO
      8. showDeadPopup
      9. showEnteredBayPopup
      10. More on Native UI
      11. Summary
    5. Chapter 7: The Game, Part 3: Player Control Input
      1. Handling Touch Input
      2. Handling Accelerometer Input
      3. Updating Audio and Animations
      4. More on Input Handling with Corona
      5. Summary
    6. Chapter 8: The Game, Part 4: Collision Events
      1. When Worlds Collide
      2. Forward unto the Code
      3. Show Me The Boom!
      4. Are We on “E” Yet?
      5. Summary
    7. Chapter 9: Wrapping Up
      1. A Few Variables to Start
      2. Creating the Scene
      3. Other Scene Methods
      4. Touch Events
      5. Kicking It All Off
      6. Summary
  11. Part 3: The Postgame Show
    1. Chapter 10: Odds and Ends
      1. Files Are So Passé: SQLite Database
      2. Talkin’ to the Outside World: Network Access
      3. LUAFileSystem
      4. Ads
      5. In-App Purchases
      6. Social Gaming
      7. Analytics
      8. Summary
    2. Chapter 11: Testing and Publishing
      1. Feed the Robot: Building for Android
      2. An Apple a Day: Build for iOS
      3. The App Store Model of Distribution
      4. The Only Game in Town for iOS: The Apple App Store
      5. Summary
  12. Index