Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Corona SDK Mobile Game Development: Beginner's Guide

You're reading from  Corona SDK Mobile Game Development: Beginner's Guide

Product type Book
Published in Mar 2015
Publisher
ISBN-13 9781783559343
Pages 372 pages
Edition 1st Edition
Languages
Author (1):
Michelle M Fernandez Michelle M Fernandez
Profile icon Michelle M Fernandez

Table of Contents (19) Chapters

Corona SDK Mobile Game Development Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Getting Started with Corona SDK Lua Crash Course and the Corona Framework Building Our First Game – Breakout Game Controls Animating Our Game Playing Sounds and Music Physics – Falling Objects Operation Composer Handling Multiple Devices and Networking Your Apps Optimizing, Testing, and Shipping Your Games Implementing In-App Purchases Pop Quiz Answers Index

Time for action – altering the game file


We will rename our current main.lua file to maingame.lua and add some additional lines to our game code. Be sure to change the file name within your Egg Drop project folder. To rename the file follow these steps:

  1. Remove the following lines near the top of the code. We'll hide the status bar in another scene that we'll create later on in this chapter. The gameGroup display group will be altered to fit within the Composer parameters:

    display.setStatusBar( display.HiddenStatusBar )
    local gameGroup = display.newGroup()
  2. At the very top of the code, implement Composer by adding local composer = require( "composer" ) and local scene = composer.newScene() so that we can call the scene events:

    local composer = require( "composer" )
    local scene = composer.newScene()
  3. After local loadValue = function( strFilename ), add in the create() event. We will also add back in our gameGroup display group, but under the scene's view property. Also, add in composer.removeScene...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}