Gideros Project Template for your Indie Games

Game configuration

Gideros Project Properties
  • Settings tab: current version of the game, build version, retina display and autorotation.
  • Window tab: scale mode (recommended letterbox), logical dimensions, window size, orientation (Portrait or Landscape) and FPS (30 or 60).
  • Input tab: behaviour of mouse and touch events.

Starting point file

Gideros Main File

Game assets

  • The images folder where all your game graphics are placed.
  • The sounds folder where music and sounds of your game are set.
  • The fonts folder where all your game fonts are localized.

Loading game

-- Loading function
local function draw_loading()
loading =

local font ="fonts/firstfun.ttf", 50)
local text =, "Loading")
local posX = (application:getLogicalWidth() - text:getWidth()) * 0.5
text:setPosition(posX, 280)
loading.text = text

  • Creates a loading Sprite object which must contain the Loading text message.
  • Defines a local font variable which uses the TTFont Gideros class to load firstfun TrueType font with size 50.
  • Creates a local text variable which is a TextField object with Loading string text.
  • Sets the X position and the text color of the text variable.
  • Adds the text variable to the loading Sprite object
  • We wish to render loading text in screen, so adds the loading Sprite object to stage.

Detecting Platform

local iOS = application:getDeviceInfo() == "iOS"
local android = application:getDeviceInfo() == "Android"

Scene Manager plugin

Gideros SceneManager Plugin
require "scenemanager"
require "easing"

Game scenes

Menu Scene

  • First a scenes folder is created within Files, this folder is where all game scenes are placed.
  • Second the menu.lua file is created within scenes folder with the following Lua code:
MenuScene = Core.class(Sprite)-- Static setup
function MenuScene.setup()
end-- Constructor
function MenuScene:init()

Game Scene

GameScene = Core.class(Sprite)-- Static setup
function GameScene.setup()

-- Constructor
function GameScene:init()
Gideros Menu Scene

Using scenes

stage:addEventListener(Event.ENTER_FRAME, preloader)
  • Invoke the local draw_loading function.
  • Add ENTER_FRAME event listener to call the preloader function the first time screen must be rendered. Click on ENTER_FRAME event for specific info about this event.
local function preloader()
stage:removeEventListener(Event.ENTER_FRAME, preloader)
-- Load all your assets here
-- List of scenes
scenes = {"menu", "game"}
sceneManager ={
["menu"] = MenuScene,
["game"] = GameScene

-- MenuScene is the first scene to show
local currentScene = scenes[1]

local timer =, 1)
-- Remove loading scene
loading = nil
  • Remove the ENTER_FRAME event listener. We only need to call the preloader function once.
  • Invoke MenuScene.setup and GameScene.setup functions to load the scenes assets.
  • Define the game scene list that will be used by sceneManager variable.
  • The variable currentScene defines the MenuScene as the default game scene.
  • Use Gideros Timer class to wait 2000 miliseconds until the Menu scene is shown by sceneManager variable.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store