Corona SDK and other Game Development Tutorials
@gamebuilding

Creating Circle Pop – Part 1

screenshot

Hello and welcome to another tutorial series for Corona SDK by That’s So Panda! In this series, we will explore simple game mechanics using the Corona SDK platform. Here’s an overview of what we will cover.

  • How to save high scores
  • How to load high scores
  • How to create numerous of on-screen objects
  • A quick and dirty introduction to Storyboard
  • Using Touch Events
  • And a lot more!

Although you are more than welcome to copy the code from my website, you can support this tutorial by purchasing the template at thatssopanda.com/corona-sdk-templates/. By purchasing this template, you are motivating me to create more high quality tutorials. Now, let’s get started!

Before we can start coding our app, let’s describe what it’s going to do. The game, Circle Pop, will consist of 2 screens – the main menu and the game screen. The main menu will display a start game button and the player high score. The game screen will consist of the actual game play and the game will present up to 50 circles to the player for the player to pop. For each circle popped, the player will earn one point and if their score is higher than their previous score, it will be saved to their high score. To get a better idea of the gameplay, you can watch this short video.

Now that we know what the gameplay is going to look like, let’s discuss the structure of the project. In Circle Pop, we are not using images or sounds in our game to keep it simple. By doing this, we have kept the number of files for our game to 5. Here are the 5 files in our app:

  • build.settings
  • config.lua
  • main.lua
  • mainmenu.lua
  • game.lua

And here’s a quick explanation of what each file does.

  • build.settings – build.settings is used for build time configurations such as app orientation, android permissions, and iphone settings. This file is used mainly when the app is being built for publication.
  • config.lua – config.lua is used to set runtime properties such as frames per second, the size of the app and much more.
  • main.lua – main.lua is where every app built with Corona SDK begins. In our main.lua file, we will store some global functions, set up our save file and start our app.
  • mainmenu.lua – The main menu will allow players to start the game and see how many circles they have popped so far.
  • game.lua – This is where the action happens. Players will be able to play the game while in the game.lua scene.

Now that we know the structure of our app, we will be taking a look at the build.settings and config.lua files in Part 2.

If you would like to purchase this as a template to support this website or to avoid having to retype all of this code, you can buy the template at thatssopanda.com/corona-sdk-templates/.

If you have any questions or comments, please leave them below! Thanks for reading!

Leave a Reply