Cover by Michelle M. Fernandez

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

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.

  1. First off, create a new project folder to your desktop and name it Display Objects.
  2. In the Chapter 2 Resources folder, copy the glassbg.png and moon.png image files into your Display Objects project folder. You can download the project files accompanying this book from the Packt website.
  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 background = display.newImage( ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required