Giter VIP home page Giter VIP logo

moai-dev's Introduction

Welcome to Moai!

Thanks for checking out the Moai source code. Here's the scoop.

Sample code:
Go to the samples folder, which contains dozens of samples that can be run using one the hosts located in ant (Android), xcode (OSX and iOS), vs2008 or vs2010 (Windows). One of our priorities is to build richer samples for Moai developers, so if you'd like to see a particular code sample, let us know by posting in the Moai forums at http://getmoai.com/forums/.

Object model documentation:
You can view the object model documentation at http://getmoai.com/docs/.

FAQ:
Answers to frequently asked questions are available in the Moai FAQ at http://getmoai.com/marketing/moai-faqs.html.

Wiki:
You can find detailed documentation, instructions and other helpful information in the Moai Wiki at http://getmoai.com/wiki/.

Moai Cloud:
You already have a Moai Cloud account which allows you to upload Lua scripts to be hosted and run as web services via the Moai Cloud Dashboard at http://dashboard.moaicloud.com/. If you have support questions, post them to the Moai Cloud Developer Support Forum at http://getmoai.com/forums/moai-cloud-developer-support.html or check out the Moai Wiki at http://getmoai.com/wiki/.

License:
This SDK uses the CPAL license (http://www.opensource.org/licenses/cpal_1.0). Refer to the Made With Moai page at http://getmoai.com/marketing/made-with-moai.html for attribution screens to include with games made with Moai.

Happy game-making with Moai. Check out the Moai Wiki at http://getmoai.com/wiki/, ping us through the forums at http://getmoai.com/forums/ or email us at [email protected] if you need help. The Moai team is here to help.

Project structure: 

3rdparty - All of the 3rd party libraries we use.
ant - Android source and reference projects.
distribute - The files and set up used to create the SDK installers and other distributable packages.
docs - Moai documentation, release notes and attribution images.
samples - Lua samples and development test/experiment scripts.
scons - Google Chrome source.
src - Moai source code and headers.
test - Lua unit and stress tests for Moai.
vs2008 - Visual Studio 2008 source and reference projects.
vs2010 - Visual Studio 2010 source and reference projects.
xcode - Mac OSX and iOS source and reference projects. 

Developing on Windows:

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

Lua samples are located in the samples folder. To run, build moai.exe and set 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 sample folder.

Developing on Mac:

Open xcode/osx/MoaiSample.xcodeproj. Make sure a 32-bit architecture is selected (64-bit is not yet officially supported). The 'moai' project builds moai, a command line Moai host based on GLUT.

To try out the samples, configure Xcode's debug working directory and command line parameters. 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.

Set the working directory to the directory of the sample you want to try, relative to the Xcode project (for example '../../samples/anim/anim-basic'). Set the command line parameters to '../../config/config.lua main.lua' (config.lua sets up some richer error messages so it's a good idea to always pass it to Moai, main.lua runs the sample).

Developing for iOS:

Open xcode/ios/MoaiSample.xcodeproj. This sample project includes the Lua and image found in samples/anim/anim-basic. The Moai runtime is implemented in an OpenGL view. Look at AppDelegate.mm, MoaiView.mm and OpenGLView.mm 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 <>.

Developing for Android:

Run ant/make-host.sh. This will create a new Android host template in the folder ant/untitled-host. Edit the local and global settings files in ant/untitled-host to setup the environment and choose a sample to run - by default it is setup to run ../../samples/anim/anim-basic. 

Use the ant/untitled-host/run-host.sh script in the generated directory to create the Android host once it has been configured. This will create the ant/untitled-host/build directory which contains a full Android project that can be imported into Eclipse and then launches the application onto the default Android emulator or device.

moai-dev's People

Contributors

bjorn avatar ckohnert avatar danadrew avatar dubois avatar hach-que avatar harningt avatar jjensen avatar jlytledistinctdev avatar jonerduarte avatar joshlytle1 avatar kengonakajima avatar markusfisch avatar mirsadm avatar odie avatar patrickmeehan avatar pygy avatar rdalton avatar recastrodiaz avatar seanzipline avatar shanehyde avatar sporksmith avatar tommo avatar ziplineandy avatar ziplinejon avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.