Contents
Part 1: Get Ready . . . Get Set . . .
Chapter 1: Say Hello to My Little Friend: The Corona SDK
A Long Time Ago In a School (Perhaps) Far, Far Away . . .
Hey, Wait, Isn’t This Book about the Corona SDK?!
Chapter 2: The Pillar of Creation: Lua
The Bare Necessities: Lexicology
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
Variations on a Theme: Changes Made to Lua in Corona
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
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
Dealing with Game State: File I/O Operations
Where It All Begins: Initial Execution
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
Chapter 4: Title, Menu, and Settings Scenes
Welcome, Ladies and Gents: The Title Scene
Some Unused Scene Event Handlers
What’ll You Have? The Menu Scene
Some Unused Scene Event Handlers
Creating Graphics from Scratch
The Choice Is Yours: The Settings Scene
Some Unused Scene Event Handlers
Wrapping up the Settings Scene
Chapter 5: The Game, Part 1: Core Game Code
The Game Scene Kicks It All Off
The World of the Real: Physics
Getting to the Heart of the Matter: The gameCore Object
Stuff Is Better When It Moves: Sprites, Part 1
Where It All Starts: Initializing the Game
Stuff Is Still Better When It Moves: Sprites, Part 2
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
Chapter 6: The Game, Part 2: Main Loop
Chapter 7: The Game, Part 3: Player Control Input
When All Is Said and Done . . .
Again, Out of the Bullpen to Close It out . . .
More on Input Handling with Corona
Chapter 8: The Game, Part 4: Collision Events
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
Files Are So Passé: SQLite Database
What’s This SQLite You Speak of?
Let’s Create a Database Already!
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
Chapter 11: Testing and Publishing
Feed the Robot: Building for Android
On-Device Debugging with Android
Creating an iOS App Store Package
The App Store Model of Distribution
Other App Stores: Amazon Appstore for Android and Barnes & Noble Nook Store
The Only Game in Town for iOS: The Apple App Store
3.145.179.59