Your Very First Program

From GiderosMobile
Revision as of 16:33, 10 September 2018 by Anthony (talk | contribs) (Created page with "Now that you have installed Gideros Studio, it would be fun to see how it works. Let us look at the Hello World example to start with. The simplest way to display something i...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Now that you have installed Gideros Studio, it would be fun to see how it works. Let us look at the Hello World example to start with.

The simplest way to display something is on the console and the way to achieve that is using the lua print statement

  1. Start Gideros Studio
  2. Create a new project, give it a name, e.g HelloWorld
  3. After Gideros Studio starts, right click on the Project window and select "Add New File"
  4. Name it "main.lua" (all projects should have a main.lua file initially)

We type the following code in the main.lua file

print("Hello World")

Now click on the Player → Start Local Player menu, when the player windows comes up, you will notice the blue Play and the red Stop buttons are enabled. Click on the play button and look in the output window. You will see three lines

main.lua is uploading
Uploading finished.
Hello World

We have successfully created out very first "Hello World" mobile app using Gideros Studio.