Book Image

Gideros Mobile Game Development

By : Arturs Sosins
Book Image

Gideros Mobile Game Development

By: Arturs Sosins

Overview of this book

Have you ever had an interesting idea for a mobile game? Have you ever wanted to jump on the mobile app bandwagon? Developing a mobile game has never been so fun and easy, and with the vast amount of smartphone users, it may also become a profitable thing to do. Gideros is a Lua-based framework that facilitates effortless native iOS and Android application development along with hardware acceleration. Gideros also comes with a built-in box2D physics engine and extended memory management features to make mobile game development a breeze. Gideros Mobile Game Development shows you how to develop an original and exciting game in Gideros, helping you create your very first project and guiding you through the configuration of settings and assets to help you target devices with different resolutions. This book teaches you everything you need to know about Gideros, from installing Gideros on your operating system to creating and efficiently managing your Gideros projects and creating your very first game, all with the help of well explained examples. You will learn how to quickly create game prototypes in Gideros, how to test and set up projects to automatically target devices with different resolutions, and how to polish your prototype with animations, sounds, tweens, and even physics to create your very first cross-platform game. By the end of this book, you will have learned everything you need to create visually stunning physics and exciting cross-platform games using Gideros.
Table of Contents (12 chapters)

Managing packs and levels


Now that we have finished the prototype of our game and see that it works, let's implement the pack and level logic, as well as player progression between levels.

This is the part where you take your game out of prototype state and gamify it with more engagement loops and sense of progression, and make it into something you could show to others. I usually start to bother my friends with trying the new game after implementing the simple tutorial level pack.

Defining packs

First let's create a simple file, where we would define our packs and the number of levels in them. So head to your Gideros Studio and add a packs.lua file to your project. Inside it we will define a simple packs table which would contain subtables, representing each pack with name of the pack, and the number of levels in it.

packs = {
  {
    name = "First pack",
    levels = 15
  },
  {
    name = "Second pack",
    levels = 15
  },
}

Now based on this definition, we can create a scene, where we can...