No description, website, or topics provided.
Switch branches/tags
Version-0.4-Beta-Revision-11 Version-0.4-Beta-Revision-10 Version-0.4-Beta-Revision-9 Version-0.4-Beta-Revision-8 Version-0.4-Beta-Revision-7 Version-0.4-Beta-Revision-6 Version-0.4-Beta-Revision-5 Version-0.4-Beta-Revision-4 Version-0.4-Beta-Revision-3 Version-0.4-Beta-Revision-2 Version-0.4-Beta-Revision-1 Version-0.3-Beta-Revision-3 Version-0.3-Beta-Revision-2 Version-0.3-Beta-Revision-1 Version-0.2-Beta-Revision-4 Version-0.2-Beta-Revision-3 Version-0.2-Beta-Revision-2 Version-0.2-Beta-Revision-1 Version-0.1-Beta-Revision-42 Version-0.1-Beta-Revision-41 Version-0.1-Beta-Revision-40 Version-0.1-Beta-Revision-39 Version-0.1-Beta-Revision-38 Version-0.1-Beta-Revision-37 Version-0.1-Beta-Revision-35 Version-0.1-Beta-Revision-34 Version-0.1-Beta-Revision-33 Version-0.1-Beta-Revision-32 Version-0.1-Beta-Revision-31 Version-0.1-Beta-Revision-30 Version-0.1-Beta-Revision-29 Version-0.1-Beta-Revision-28 Version-0.1-Beta-Revision-27 Version-0.1-Beta-Revision-26 Version-0.1-Beta-Revision-25 Version-0.1-Beta-Revision-24 Version-0.1-Beta-Revision-23 Version-0.1-Beta-Revision-22 Version-0.1-Beta-Revision-21 Version-0.1-Beta-Revision-20 Version-0.1-Beta-Revision-19 Version-0.1-Beta-Revision-18 Version-0.1-Beta-Revision-17 Version-0.1-Beta-Revision-16 Version-0.1-Beta-Revision-15 Version-0.1-Beta-Revision-14 Version-0.1-Beta-Revision-13 Version-0.1-Beta-Revision-12 Version-0.1-Beta-Revision-11 Version-0.1-Beta-Revision-10 Version-0.1-Beta-Revision-9 Version-0.1-Beta-Revision-8 Version-0.1-Beta-Revision-7 Version-0.1-Beta-Revision-6 Version-0.1-Beta-Revision-5 Version-0.1-Beta-Revision-4 Version-0.1-Beta-Revision-3 Version-0.1-Beta-Revision-2 Version-0.1-Beta-Revision-1
Nothing to show
Clone or download
Pull request Compare This branch is 1930 commits behind moai:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Project structure: 

3rdparty - All of the 3rd party libraries we use.
distribute - The files and set up used to create the SDK installers and other distributable packages
eclipse - The android-ndk/eclipse reference projects.
samples - Lua and tools samples as well as some development test/experiment scripts.
src - Moai source code and headers.
test - Lua stress tests for Moai. These were written to crash Moai. We'll be fixing Moai to handle more user errors gracefully (instead of crash) as the project develops.
vs2008 - Visual Studio 2008 reference projects.
vs2010 - Visual Studio 2010 reference projects.
xcode - Mac OSX and iPhone projects. 

Developing on Windows:

Start with the vs2008 or 2010 reference solutions. Make sure a 32-bit architecture is selected (64-bit not yet officially supported). The 'moai' project builds moai.exe, a command line Moai host based on GLUT.

Lua samples are located in samples/basics. To run, build moai.exe. Add the MOAI_BIN and MOAI_CONFIG environment variables:

MOAI_BIN = <path to Moai>/vs20XX/bin/Win32/<Debug|Release>/
MOAI_CONFIG = <path to Moai>/config/

If these two environment variables are set up correctly, you can run each sample simply by double clicking the run.bat file found in each folder.

Developing on Mac:

Open xcode/osx/moai-osx.xcodeproj. Make sure a 32-bit architecture is selected (64-bit not yet officially supported). Build moai as a command line utility.

To try out the samples, configure Xcode's debug working directory and command line parameters. Set the working directory to the directory of the sample you want to try, relative to the Xcode project (for example '../../samples/basics/anim-basic'). Set the command line parameters to '../../config/config.lua main.lua'.

config.lua sets up some richer error messages; it's a good idea to always pass it to Moai. main.lua runs the sample.

In Xcode 3, right click the executable and choose 'Get Info.' In Xcode 4, select 'Edit Scheme' from the Schemes drop down. You will find the settings on the 'Info' and 'Arguments' tab the scheme editor.

Developing for iPhone:

Use xcode/iphone/moai-iphone.xcodeproj. This sample project includes the Lua and image found in samples/basics/anim-basic. The Moai runtime is implemented in an OpenGL view. Look at AppDelegate to see how it is used.

As Moai is written in C++, we've generally preferred Objective-C++ for our work. To make dealing with Apple's reference counting easier, we use a smart pointer called RefPtr <>. If you're planning to extend MoaiView and don't mind using Objective-C++, try it out for yourself.