Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Gideros Mobile Game Development
Gideros Mobile Game Development

Gideros Mobile Game Development: With Gideros you can develop games for both iOS and Android faster and more simply. This book shows you how with a real-life project you undertake yourself. All that's required is a little familiarity with Lua.

eBook
£7.99 £22.99
Paperback
£28.99
Subscription
Free Trial
Renews at £16.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Gideros Mobile Game Development

Chapter 2. Managing Scenes and Gideros OOP

Now that we know all the basics, let's create our own game. We will be creating a clone of a Mashballs game, a simple 2D physics puzzler, where the main objective of the game is to drag and launch the main ball in any direction to bounce and hit all other balls on the screen. You can find more information about the game and also download it from: http://jenots.com/mashballs.

We will use Gideros Object Oriented Programming (OOP) and create our own classes, which we will be using throughout the game. As well we will learn to manage multiple scenes and switch between them, and also how to store persistent information for our app.

The following are the topics we will be covering in this chapter:

  • Setting up our project

  • Introduction to Gideros OOP

  • Introduction to scene manager

  • Creating your own scenes with Gideros OOP

  • Creating a start screen for the game

  • Creating an options screen for the game

  • Storing persistent information

Setting up our project


Open up Gideros Studio and create a new project. Let's call it MashballsClone. While we are there, let's create the main.lua file for our initial code and also create the images folder to store our images in.

Just to make our project more maintainable, it is better to copy the files of the Gideros project in the same folders as you add them inside Gideros Studio. For example, create the images folder (and any other folder we will be creating) in your filesystem, and before you add images to Gideros project folder, copy them into the corresponding folder and only then add it in Gideros Studio. That way the structure will be the same for both Gideros project and your filesystem.

Now let's do the necessary settings. Right-click on the MashballsClone folder inside the Project pane and select Properties. Click on the iOS tab and select For iPhone and iPad as value for both Retina Display and Autorotation, which means we will support both iPads and iPhones with Retina display...

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...

Summary


We have successfully created the first working scenes of our game. In this chapter we learned how to create Gideros classes, by creating the Button and Settings class. Then we learned how to manage different scenes using Gideros OOP and scene manager. We also learned to use events and store information persistently.

In the next chapter we will start creating the game logic, including managing packs and level loading and unlocking, as well as adding the logic for running the game itself and creating a physics model for our objects.

Left arrow icon Right arrow icon

Key benefits

  • Develop engaging iOS and Android mobile games quickly and efficiently
  • Build your very first game following practical and easy-to-understand instructions
  • Full of code examples and descriptions to help you master the basics of mobile game development

Description

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.

Who is this book for?

This book is for developers who are new to mobile game development or who have tried the native development of mobile games and want a simpler, faster tool that can support a wide variety of platforms and devices. Readers are expected to be at least partially familiar with the Lua game scripting language that Gideros uses for its scripts.

What you will learn

  • Install Gideros and set up one-click, on-device testing
  • Divide games into logical scenes for proper asset end memory management
  • Use the built-in physics engine inside Gideros
  • Implement pack, level, and level progression logic
  • Manage background music and sound effects
  • Use tweens and animations
  • Manage highscores for your players

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 13, 2013
Length: 154 pages
Edition : 1st
Language : English
ISBN-13 : 9781849696715
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Nov 13, 2013
Length: 154 pages
Edition : 1st
Language : English
ISBN-13 : 9781849696715
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
£16.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
£169.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts
£234.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total £ 95.97
Mobile Game Design Essentials
£41.99
Gideros Mobile Game Development
£28.99
L÷VE for Lua Game Programming
£24.99
Total £ 95.97 Stars icon
Banner background image

Table of Contents

4 Chapters
Setting Up the Environment Chevron down icon Chevron up icon
Managing Scenes and Gideros OOP Chevron down icon Chevron up icon
Implementing Game Logic Chevron down icon Chevron up icon
Polishing the Game Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.8
(8 Ratings)
5 star 75%
4 star 25%
3 star 0%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Shannon James May 19, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book does not waste time and gets right to the point. By the third day of reading, taking notes and coding, I felt WAY more comfortable programming with Lua in Gideros Mobile. What may have took me six to eight weeks to stumble upon through frantic Google searches and half baked You Tube videos, this book gave me in about two days! Gideros is a game engine that requires a lot of coding and planning. Not a lot of click and drag development. Bu this book really made it not only easy to understand, but really enjoyable. It answers a lot of questions about implementing classes and OOP logic in Gideros Mobile that I thought would go unanswered. It will give you the foundational knowledge you need to feel confidant about seeking out what more you can make Gideros Mobile do. If you have an idea for a multi platform game and are frustrated in finding a 2d Engine and book to help you fulfill your dreams, you have found the book. This book is an introduction book, not a complete desktop reference. However it will give you so much confidence that you can advance in the language (Lua) and game engine (Gideros) that you will feel emboldened to go on and create your own games. And most notably, all the code works fine. Despite being written about 7 years ago, the code actually goes off without a hiccup. Something I have not experienced yet in any book I have bought on game programming. I have been playing around with different programming languages and game engines for the last 5 years. I have been on the lookout for a game engine and book to help me in my pursuits. I must say that about halfway through most, my interest in them has faded. The books are not very comprehensive and create simple games that do not delve into the deeper aspects of the game engine. I was left with more questions than answers in almost all cases. This book has actually delivered what I wanted. I wish all game programming books took this approach. Hats off to the author. Thanks for a book that finally delivered what I wanted.
Amazon Verified review Amazon
Jason Oakley Dec 04, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Arturs has written a thorough and entertaining book on how to program for the Gideros platform. He elegantly covers all requirements to get you started on the road to making your own mobile games. All aspects of indie programming are covered from graphics to music and physics to managing your scenes. He goes into great detail explaining each section along the way and provides enough examples to help guide you to publishing your own game. Whether you are an absolute beginner or a seasoned professional, if you wish to learn the intricacies of the Gideros platform, this book has it all.Programming games and other applications for mobile platforms can seem very daunting at first. You need to keep in mind the differing platform requirements and App store restrictions. Mobile development needs to cover not only small mobile phones but also the larger tablet sized devices. You need to be able to cover a range of screen resolutions from 320x480 to over 1500x2000. Arturs effectively describes how it is possible to cover these dimensions to give your game the highest quality graphics and the best settings to cover all devices.The third chapter delves into demonstrations of Game Logic and optimising art. You will learn how to pack your textures for memory efficiency and speed as well as creating Level Packs for defining layouts for your game objects.A popular genre of mobile games are physics-enabled games. These include games such as Angry Birds and Mashballs (you will create a clone of this game while learning with this book). Arturs gives you example Lua code for developing your physics game and the caveats you need to be aware of to create your game successfully.You also need to be keenly aware of whether certain devices are touch-only or – in the case of Google’s Android – touch-and-buttons are used for input. Gideros Mobile Game Development covers each of these cases in chapter 4 and shows you how to get the best out of your application.Audio is very important when it comes to game development and sometimes not enough attention is paid to this particular vector when you are beginning your foray into mobile development. This book covers recommendations for audio file formats for background music and sound effects. Utilising the correct formats will ensure your game will be all it can be. Make sure you invest time in finding the best genre of music for your game.To complete your project, you will need to store and recover player high scores and other statistics. This gives your players the ability to compete for better game completion, bonuses and extends the longevity of the gameplay by lettings them try to achieve higher scores. Motivating your players with rewards provides a reason for them to keep coming back to your game.I highly recommend Gideros Mobile Game Development for anyone wanting to dip their virtual toes into the world of mobile development in a cheap (indeed, free) way. With this book, the support of the Gideros website forums and documentation, your development requirements will be complete. Even if you are a seasoned developer, you will find the Gideros platform useful for fast prototyping your games and will find this book invaluable.
Amazon Verified review Amazon
Boriska Mar 06, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
If you need a quick start creating your first Gideros game, go ahead and get this book. Arturs did a really great job, guiding it through the book through all the main steps of basic game development. He even introduced basic concepts of working with box2d. The book is short but it is worth every penny. The code in book is well commented and you can borrow a lot of techniques from there.Check Gideros community forum as well - people are really friendly there and ready to help. And you can be sure that when you post a question, Arturs will be normally the first one to reply!Well done, Arturs! Molodec!
Amazon Verified review Amazon
Javier Feb 10, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
It's easy to rate this book with five stars, it has typos and minor mistakes but it contains a lot of useful information. In this book you'll find everything you need to make your first game and also a lot of tools to use in your next games.The information is presented in an incremental manner, so you're never managing more than one concept at a time. First you get a prototype stage, then you add game managing features like changing levels, menu displaying and things that make it seem more like a game, later on you add animation, sound and some user engaging features like high scores.Finally what you won't find here and you might be interested about are social integration, ads, and handling purchases.
Amazon Verified review Amazon
paolofranciej Dec 16, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I really love this book.Gideros is a great platform for creating mobile games, but for a beginner it isn't so easy to put everything together. Arturs is already one of the major contributors of useful information in the Goderos forums and on his blog, but in this book he covers in a structured form all the best practices to create a game from scratch incredible games.It's a tutorial to the n'th power ! Well written, well articulated, doesn't leave anything important unsaid or unclear...Absolutely a must for game programmers using Gideros! Or for would be mobile game programmers !I'm really happy with this book (when my 1M$ app hits the market I'll send him a gift for sure :) )
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.