Installing Gideros

Exclusive offer: get 50% off this eBook here
Gideros Mobile Game Development

Gideros Mobile Game Development — Save 50%

A practical guide to develop exciting cross-platform mobile games with Gideros with this book and ebook

$20.99    $10.50
by Arturs Sosins | November 2013 | Games

This article, by Arturs Sosins, the author of Gideros Mobile Game Development, provides information on how to prepare everything to start developing a cross-platform game using Gideros and an easy way to start developing with Gideros, explaining all its basics and how you can apply them in creating your own cross-platform game.

(For more resources related to this topic, see here.)

About Gideros

Gideros is a set of software packages created and managed by a company named Gideros Mobile. It provides developers with the ability to create 2D games for multiple platforms by reusing the same code. Games created with Gideros run as native applications, thus having all the benefits of high performance and the utilization of the hardware power of a mobile device.

Gideros uses Lua as its programming language, which is a lightweight scripting language with an easy learning curve and it is quite popular in the context of game development.

A few of the greatest Gideros features are as follows:

  • Its rapid prototyping and fast development time by providing a single-click on-device testing that enables you to compile and run your game from your computer to device in an instant
  • A clean object-oriented approach that enables you to write clean and reusable code
  • Additionally, Gideros is not limited to its provided API and can be extended to offer virtually any native platform features through its plugin system
  • You can use all of these to create and even publish your game for free, if you don't mind a small Gideros splash screen being shown before your game starts

Installing Gideros

Currently, Gideros has no registration requirements for downloading its SDK, so you can easily navigate to their download page (http://giderosmobile.com/download) and download the version that is suitable for your operating system. As Gideros can be used on Linux only using the WINE emulator, it means that even for Linux you have to download the Windows version of Gideros.

So, to sum it up:

  • Download the Windows version for Windows and Linux OS
  • Download the Mac version for OS X

Gideros consists of multiple programs providing you with a basic package needed to develop your own mobile games.

This software package includes the following features:

  • Gideros Studio: It is a lightweight IDE to manage Gideros projects
  • Gideros Player: It is a fast and lightweight desktop; iOS and Android players can run their apps with one click when testing
  • Gideros Texture Packer: It is used to pack multiple textures in one texture for faster texture rendering
  • Gideros Font Creator: It is used to create Bitmap fonts from different font formats for faster font rendering
  • Gideros License Manager: It is used to license your downloaded copy of Gideros before exporting a project (required even for free accounts)
  • An offline copy of the Gideros documentation and Reference API to get you started

Creating your first project

After you have downloaded and installed Gideros, you can try to create your first Gideros project. Although Gideros is IDE independent, and lot of other IDE's such as Lua Glider, Zero Brane, IntelliJ IDEA, and even Sublime can support Gideros, I would recommend that first-time users choose the provided Gideros Studio. That is what we will be using in this article.

Trying out Gideros Studio

You should note that I will be using the Windows version for screenshots and explanations, but Gideros Studio on other operating systems is quite similar, if not exactly the same. Therefore, it should not cause any confusion if you are using other versions of Gideros.

When you open Gideros Studio, you will see a lot of different sections or what we will call panes. The largest pane will be the Start Page, which will provide you with the following options:

  • Create New Project
  • Access offline the Getting Started guide
  • Access offline the Reference Manual
  • Browse and try out Gideros Example Projects

Go ahead and click on Create New Project, a New Project dialog will open.

Now enter the name of your project, for example, New Project. Change the location of the project if you want to or leave it set to the default value, and click on OK when you are ready.

Note that the Start Page is automatically closed and the space occupied by the Start Page is now free. This will be your coding pane, where all the code will be displayed.

But first let's draw our attention to the Project pane, where you can see your chosen project name inside. In this pane, you will manage all the files used by your app.

One important thing to note is that file/folder structure in Gideros Project pane is completely independent from your filesystem. This means that you will have to add files manually to the Gideros Studio Project pane. They won't show up automatically when you copy them into the project folder.

And in your filesystem, files and folders may be organized completely different than those in Gideros Studio.

This feature gives you the flexibility of managing multiple projects with the same code or asset base. When you, for example, want to include specific things in the iOS version of the game, which Android won't have, you can create two different projects in the same project directory, which could reuse the same files and simultaneously have their own independent, platform-specific files.

So let's see how it actually works. Right-click on your project name inside the Project pane and select Add New File.... It will pop up the Add New File dialog.

Like in many Lua development environments, an application should start with a main.lua file; so name your file main.lua and click on OK. You will now see that main.lua was added to your Project pane. And if you check the directory of your project in your filesystem, you will see that it also contains the main.lua file.

Now double-click on main.lua inside the Project pane and it will open this file inside the code pane, where you can write a code for it.

So let's try it out. Write a simple line of code:

print("Hello world!")

What this line will do is simply print out the provided string (Hello world!) inside the output console.

Now save the project by either using the File menu or a diskette icon on the toolbar and let's run this project on a local desktop player.

Using the Gideros desktop player

To run our app, we first need to launch Gideros Player by clicking on a small joystick icon on the toolbar.

This will open up the Gideros desktop player. The default screen of Gideros Player shows the current version of Gideros used and the IP address the player is bound to.

Additionally, the desktop player provides different customizations:

  • You can make it appear on the top of every window by navigating to View | Always on Top.
  • You can change the zoom by navigating to View | Zoom. It is helpful when running the player in high resolutions, which might not fit the screen.
  • You can select the orientation (portrait or landscape) of the player by navigating to Hardware | Orientation, to suit the needs of your app.
  • You can provide the resolution you want to test your app in by navigating to Hardware | Resolution. It provides the most popular resolution templates to choose from.
  • You can also set the frame rate of your app by navigating to Hardware | Frame Rate.

Resolution selected in Gideros Player settings corresponds to the physical device you want to test your application on.

All these options give you the flexibility to test your app across different device configurations from within one single desktop player.

Now when the player is launched, you should see that the start and stop buttons of Gideros Studio are now enabled. And to run your project, all you need to do is click on the start button.

You might need to launch Gideros Player and Gideros Studio with proper permissions and even add them to your Antivirus or Firewall's exceptions list to allow them to connect.

The IP address and Gideros version of the player should disappear and you should only see a white screen there. That is because we did not actually display any graphical object as image. But what we did was printing some information to the console. So let's check the Output pane in the Gideros Studio.

As you see the Output pane, there are some information messages, like the fact that main.lua was uploaded and the uploading process to the Gideros Player was finished successfully; but it also displays any text we pass to Lua print command, as in our case it was Hello world!.

The Output pane is very handy for a simple debugging process by printing out the information using the print command. It also provides the error information if something is wrong with the project and it cannot be built.

Now when we know what an Output pane is, let's actually display something on the player's screen.

Summary

In this article, you've learned a few features about Gideros Studio, such as installing Gideros on your machine, creating your first project, how to use the Gideros Player, and trying out your first project.

Resources for Article:


Further resources on this subject:


Gideros Mobile Game Development A practical guide to develop exciting cross-platform mobile games with Gideros with this book and ebook
Published: November 2013
eBook Price: $20.99
Book Price: $34.99
See more
Select your format and quantity:

About the Author :


Arturs Sosins

Arturs Sosins is a developer living with his wife Anna and son Tomass. He has a Master's degree in Computer Science and even though he is working as a developer full time, he still loves coding and shares his knowledge with others in his spare time.

In his last years at the university, he started chasing the dream of creating his own mobile games for fun and personal satisfaction in his spare time. After trying out lots of different cross-platform frameworks for mobile game development, he found Gideros SDK in January 2012 and liked it so much that he decided to stick with it when developing his games.

In the summer of 2012, he founded a group of like-minded developers/designers who go under the indie label Jenots.com (http://jenots.com/). They released Mashballs (http://jenots.com/mashballs), their first game, in September 2012 and are currently working on a
couple of bigger game projects.

As there was a lack of learning materials and tutorials for Gideros and writing was one of the his favorite hobbies, he started creating different tutorials on how to accomplish simple things in Gideros. This led him to create his new blog http://appcodingeasy.com. Due to popularity of his tutorials and the support he provided on the Gideros community forum, he became the most active community member.

In February 2013, the Gideros team offered him the position in the Gideros developers' team, where he has been working since then, while continuing to work on games in his spare time.

Books From Packt


 Marmalade SDK Mobile Game Development Essentials
Marmalade SDK Mobile Game Development Essentials

Corona SDK Mobile Game Development: Beginner's Guide
Corona SDK Mobile Game Development: Beginner's Guide

 Building your First Mobile Game using XNA 4.0
Building your First Mobile Game using XNA 4.0

 Developing Mobile Games with Moai SDK
Developing Mobile Games with Moai SDK

 LiveCode Mobile Development Hotshot
LiveCode Mobile Development Hotshot

Learning ShiVa3D Game Development
Learning ShiVa3D Game Development

 HTML5 Game Development with GameMaker
HTML5 Game Development with GameMaker

GameSalad Beginner’s Guide
GameSalad Beginner’s Guide


No votes yet

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
d
R
4
Z
w
2
Enter the code without spaces and pay attention to upper/lower case.
Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software