PacktLib: Corona SDK Mobile Game Development: Beginner's Guide

Corona SDK Mobile Game Development Beginner's Guide

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

Getting Started With Corona SDK

Downloading and installing Corona

Time for action – setting up and activating Corona on Mac OS X

Time for action – setting up and activating Corona on Windows

Using the simulator on Mac and Windows

Time for action – viewing a sample project in the simulator

Choosing a text editor

Developing on devices

Time for action – downloading and installing Xcode

Time for action – creating a Hello World application in two lines of code

Time for action – modifying our application

Time for action – applying a new font name to your application

Testing our application on an iOS device

Time for action – obtaining the iOS developer certificate

Time for action – adding/registering your iOS device

Time for action – creating an App ID

Time for action – creating a Provisioning Profile

Creating the Hello World build for iOS

Time for action – creating an iOS build

Time for action – loading an app on your iOS device

Testing our application on an Android device

Creating the Hello World build for Android

Time for action – creating an Android build

Time for action – loading an app on your Android device

Summary

Lua Crash Course and the Corona Framework

Lua to the rescue

Valuable variables

Types of values

Time for action – printing values using blocks

Expressions

Strings

Time for action – getting our hands full of strings

Tables

Objects

Images

Time for action – placing images on screen

Runtime configuration

Time for action – scaling display objects on multiple devices

Time for some shapes

Functions

Optimizing your workflow

Summary

Building our First Game: Breakout

Breakout—bringing back old-school gaming

Understanding Corona physics API

Configuring the application

Time for action – adding build.settings file

Time for action – adding config.lua file

Building the application

Time for action – creating variables for the game

Understanding events and listeners

Transitions

Creating menu screens

Time for action – adding the main menu screen

Creating the gameplay scene

Time for action – adding game objects

Time for action – building bricks

Red alert!

Time for action – displaying game messages

Summary

Game Controls

Moving in the up direction

Let's get even more physical

Time for action – starting physics for the paddle and ball

Paddle movement

Time for action – dragging the paddle in the simulator

Time for action – moving the paddle with accelerometer

Ball collision with paddle

Time for action – making the ball bounce against the paddle

Removing objects from the scene

Brick by brick

Time for action – removing the bricks

Directional changes

Time for action – updating the ball

Transitioning levels

Time for action – resetting and changing levels

You win some, you lose some

Time for action – making win and lose conditions

Activating event listeners

Time for action – adding game listeners

The results are in!

Summary

Animating our Game

Panda star catcher

Let's get everything moving

The value of timed functions

Movieclips or sprite sheets. What's the difference?

Movieclips

It's sprite mania!

Game time!

Time for action – setting up the variables

Let's start the round

Time for action – starting the game

Poof begone!

Time for action – reloading the panda on the stage

Earn some points

Time for action – tracking the score

When the game ends

Time for action – displaying the game over screen

Background display

Time for action – adding the background elements

Heads up!

Time for action – displaying the timer and score

Time after time

Time for action – setting up the timer

It's so glowy

Time for action – making the power shot

Pandas!

Time for action – creating the panda character

Starry skies

Time for action – creating star collisions

Screen touches

Time for action – launching the panda

Organizing display objects

Time for action – reordering layers

Create stars

Time for action – creating stars in the level

Starting the game

Time for action – initializing the game

Summary

Playing Sounds and Music

Corona Audio System

Time to play

Time for action – playing audio

Time to take control

Time for action – controlling audio

Memory management

Alterations to audio

Performance tips

Summary

Physics: Falling Objects

Creating our new game: Egg Drop

Time for action – setting up the variables

Time for action – moving the character

Time for action – setting the score

Time for action – drawing the background

Time for action – designing the HUD

Time for action – counting the lives

Time for action – creating the character

Time for action – creating the egg collision

Time for action – adding the egg object

Time for action – making the egg drop

Time for action – calling game over

Time for action – activating the game

Summary

Operation Storyboard

Continuation of Egg Drop

Data saving

Time for action – saving and loading the high score

Pausing the game

Time for action – pausing the game

Storyboard API

Time for action – altering the game file

Organizing the game

Time for action – adding the new main.lua file

New game transitions

Time for action – changing screens after the game is over

Creating a loading screen

Time for action – adding the loading screen

Creating a main menu

Time for action – adding a main menu

Creating an options menu

Time for action – adding an options menu

Creating a credits screen

Time for action – adding a credits screen

Summary

Handling Multiple Devices and Networking your Apps

Return to configuration

Networking your apps

Time for action – adding Twitter in your apps

Time for action – adding Facebook to your apps

Facebook Connect

Time for action – posting scores using Facebook Connect

The wonders of OpenFeint

OpenFeint in a jiffy

Time for action – setting up OpenFeint leaderboards and achievements in Egg Drop

Summary

Optimizing, Testing, and Shipping your Games

Understanding memory efficiency

Distributing iOS applications

Time for action – setting up your distribution certificate and provisioning profile for the App Store

iTunes Connect

Time for action – managing your application in iTunes Connect

Building an iOS application for distribution in Corona

Time for action – building your application and uploading to Application Loader

The Google Play Store

Time for action – signing your app for the Google Play Store

Time for action – submitting an app to the Google Play Store

Summary

Implementing In-App Purchases

The wonders of In-App Purchase

Corona's store module

Create an In-App Purchase

Time for action – creating the In-App Purchase in iTunes Connect

Time for action – using the Corona store module to create an In-App Purchase

Testing In-App Purchases

Time for action – testing the In-App Purchase with the Breakout In-App Purchase demo

Summary

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers