The first thing we'll learn is how to open the main game window using Moai SDK.
This is a relatively easy task. The code is as follows:
MOAISim.openWindow ( "Concentration", 320, 480 )
What we are doing here is calling the
MOAISim.openWindow class method with the necessary parameters, namely,
title for window (a string),
height. As you may have noticed, we used 320 x 480, which is the display resolution of an iPhone 3GS (without Retina Display).
If you run the script now, you'll see that a window opens. So that's it, our main window is ready. But before going further, let's take a look at an important aspect of Moai SDK.
Downloading the example code
You can download the example code files for all Packt books you ...