Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Gideros Mobile Game Development

You're reading from  Gideros Mobile Game Development

Product type Book
Published in Nov 2013
Publisher Packt
ISBN-13 9781849696708
Pages 154 pages
Edition 1st Edition
Languages
Author (1):
Arturs Sosins Arturs Sosins
Profile icon Arturs Sosins

Table of Contents (12) Chapters

Gideros Mobile Game Development
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Setting Up the Environment 2. Managing Scenes and Gideros OOP 3. Implementing Game Logic 4. Polishing the Game Index

Creating scenes


Now we should have the main.lua and test.lua files in our project. The first one is empty, and the second one has our experiments with project settings. But note this, if we add some code to main.lua too, the code from both the files (main.lua and test.lua) will be executed. That is because Gideros automatically executes all added Lua files. This might be something new even to experienced Lua developers, as you won't require every file you want to use; and it provides a much more flexible approach in handling projects. But it also has its own limitations.

For example, if all the code is executed automatically, how should we separate different scenes, we want to use in our game, in a better way? Or in what order are the files executed? What if one file depends on another one?

By default, files are executed in the order they were added, but we can assume that the execution order is random and we should not rely on it. The correct way to manage a project is to divide all your...

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 €14.99/month. Cancel anytime}