Contents

 About the Author

 About the Technical Reviewer

 Acknowledgments

 Introduction

image Part 1: Get Ready . . . Get Set . . .

images Chapter 1: Say Hello to My Little Friend: The Corona SDK

A Long Time Ago In a School (Perhaps) Far, Far Away . . .

Back to the Future

Hey, Wait, Isn’t This Book about the Corona SDK?!

Corona: History at a Glance

A Tool That Works for You

Baby-Steppin’ It

Summary

images Chapter 2: The Pillar of Creation: Lua

A Jack of All Trades

The Bare Necessities: Lexicology

The Keys to Success: Keywords

Making a Statement: Commenting

A Place for Your Stuff: Variables, Values, and Types

Expressing Yourself: Expressions and Operators

Let’s Table This Discussion: The Mythical “Table”

Getting Functional: All about Functions

Taking Control: Control Structures

Knocked for a Loop: The for, while, and repeat Constructs

Compartmentalizing: Modules

Variations on a Theme: Changes Made to Lua in Corona

Summary

image Part 2: Go!

images Chapter 3: Basic Application Structure

The Year Is 2258 . . . The Name of the Place . . . err, Game . . .

Mapping out the Astro Rescue Game

You’re Sceneing Things: The Storyboard API

Every Event Needs a Handler

The Life (and Death) of a Scene

Making the Transition: Transition Effects

Scene Purging for Fun and Profit

Back to the Beginning: The main.lua file

Global Imports

Global Variables

Dealing with Game State: File I/O Operations

Where It All Begins: Initial Execution

Utilities

Talking to Yourself: Log Messages

Audio Mish-Mosh: Handling Cross-Platform Audio Concerns

Then, the Closer Comes in to Finish the Ninth Inning

Even Further Back: build.settings and config.lua

The build.settings File

The config.lua File

Summary

images Chapter 4: Title, Menu, and Settings Scenes

Welcome, Ladies and Gents: The Title Scene

Creating the Scene

Starting the Scene

Exiting the Scene

Destroying the Scene

Some Unused Scene Event Handlers

Handling Touch

Continuous Action

Wrapping up the Title Scene

What’ll You Have? The Menu Scene

Creating the Scene

Some Unused Scene Event Handlers

Oh, Those Beautiful Shapes!

Creating Graphics from Scratch

Wrapping up the Menu Scene

The Choice Is Yours: The Settings Scene

Creating the Scene

Some Unused Scene Event Handlers

Wrapping up the Settings Scene

Summary

images Chapter 5: The Game, Part 1: Core Game Code

The Game Scene Kicks It All Off

The World of the Real: Physics

The Scene Lifecycle Handlers

Getting to the Heart of the Matter: The gameCore Object

Stuff Is Better When It Moves: Sprites, Part 1

Moving Right Along

Where It All Starts: Initializing the Game

Loading Graphic Resources

Stuff Is Still Better When It Moves: Sprites, Part 2

Moving Right Along, Redux

Got to Begin Again: Resetting for a New Level

Kick It Off: Starting the Game

Okay, That’ll Do: Stopping the Game

Destruction: Cleaning Up After Ourselves

We Need a Playfield: Drawing the Current Level

Communication Is Key: Showing a Quick Message

Cut It Out Right Now, You Kids: Stopping Game Activity

Summary

images Chapter 6: The Game, Part 2: Main Loop

enterFrame

processShip

processColonist

processFuelPod

showFuelPod

processAlienUFO

showAlienUFO

showDeadPopup

showEnteredBayPopup

More on Native UI

Summary

images Chapter 7: The Game, Part 3: Player Control Input

Handling Touch Input

Touch “began” Handling

Vertical Thrust

Left and Right Thrust

Touch “ended” Handling

When All Is Said and Done . . .

Handling Accelerometer Input

Tilting to the Right

Tilting to the Left

Neutral Tilt

Again, Out of the Bullpen to Close It out . . .

Updating Audio and Animations

More on Input Handling with Corona

Summary

images Chapter 8: The Game, Part 4: Collision Events

When Worlds Collide

Bounding Boxes Collisions

Physics-Based Collisions

Collisions, Visualized

Forward unto the Code

These Are Bad, M’Kay? Crashing into Stuff

Set ’er Down Gently: Landing on a Pad

You’re All Clear, Kid, Now Let’s Blow This Thing and Go Home! Entering the Landing Bay

Err, Sorry, Sir: Hitting a Colonist

Getting Gas Isn’t Always a Social Faux Pas: Fuel Pods

Show Me The Boom!

Are We on “E” Yet?

Summary

images Chapter 9: Wrapping Up

A Few Variables to Start

Creating the Scene

Turning the Spotlight On

Get That Spotlight Moving!

Other Scene Methods

Touch Events

Kicking It All Off

Summary

image Part 3: The Postgame Show

images Chapter 10: Odds and Ends

Files Are So Passé: SQLite Database

What’s This SQLite You Speak of?

Let’s Create a Database Already!

Gettin’ at Your Data

Data Amnesia: In-Memory Databases

Talkin’ to the Outside World: Network Access

Some Basic Network Functionality

There’s More to Networking than Getting Content

I’m Always Losing My Gym Sockets: Socket Networking

LUAFileSystem

Ads

In-App Purchases

Social Gaming

Game Network Integration

Facebook Integration

Analytics

Corona Launchpad

Summary

images Chapter 11: Testing and Publishing

Feed the Robot: Building for Android

Deploying to Android Devices

On-Device Debugging with Android

An Apple a Day: Build for iOS

Creating an iOS App Store Package

Deploying to iOS Devices

On-Device Debugging with iOS

The App Store Model of Distribution

Google Play

Other App Stores: Amazon Appstore for Android and Barnes & Noble Nook Store

The Only Game in Town for iOS: The Apple App Store

Publishing to the Apple App Store

Summary

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.179.59