Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Corona SDK Mobile Game Development- Second Edition
  • Table Of Contents Toc
Corona SDK Mobile Game Development- Second Edition

Corona SDK Mobile Game Development- Second Edition

By : Michelle M Fernandez
3.8 (4)
close
close
Corona SDK Mobile Game Development- Second Edition

Corona SDK Mobile Game Development- Second Edition

3.8 (4)
By: Michelle M Fernandez

Overview of this book

This book is for anyone who wants to have a go at creating commercially successfully games for Android and iOS. You don’t need game development or programming experience.
Table of Contents (14 chapters)
close
close
13
Index

Time for action – placing images on screen


We're finally getting into the visually appealing part of this chapter by starting to add in display objects using images. We don't have to refer to the terminal window for now. So, let's focus on the simulator screen. We'll begin by creating a background image and some art assets by performing the following steps:

  1. First off, create a new project folder on your desktop and name it Display Objects.

  2. In the Chapter 2 Resources folder, copy the glassbg.png and moon.png image files and the config.lua file into your Display Objects project folder.

  3. Launch your text editor and create a new main.lua file for your current project.

  4. Write out the following lines of code:

    local centerX = display.contentCenterX
    local centerY = display.contentCenterY
    
    local background = display.newImage( "glassbg.png", centerX, centerY, true)
    local image01 = display.newImage( "moon.png", 160, 80 )
    
    local image02 = display.newImage( "moon.png" )
    image02.x = 160; image02.y = 200
    
    
    image03...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Corona SDK Mobile Game Development- Second Edition
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon