Skip to content

Commit c86fcfb

Browse files
author
Patrick Meehan
committed
cleaning up in anticipation of new, less confusing layout and docs; removing out-of-date or misleading docs (look in docs/docs-legacy)
1 parent 000329f commit c86fcfb

File tree

192 files changed

+296
-4230
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+296
-4230
lines changed

‎README.md‎

Lines changed: 44 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -1,184 +1,67 @@
1-
# Welcome to Moai!
1+
Moai SDK is an embeddable cross-platform game development SDK written in C++ and scriptable in Lua. You can use Moai to write games or apps, or you can embed Moai in other programs. You can also use Moai as an overlay in your apps.
22

3-
Thanks for checking out the Moai source code. Here's the scoop.
3+
Multiple build systems are supported in this project. Sourcecode is kept in a common folder. There is a separate folder for each build system in the project root.
44

5-
Linux CI: [![Build Status](https://travis-ci.org/moaiforge/moai-sdk.png?branch=master)](https://travis-ci.org/moaiforge/moai-sdk)
6-
OSX CI: [![Build Status](https://travis-ci.org/moaiforge/moai-sdk.png?branch=travis-osx)](https://travis-ci.org/moaiforge/moai-sdk)
7-
## Introduction
5+
For IDE build systems (Xcode, Android Studio, Visual Studio), reference projects are provided. Cmake is also supported for Android and HTML5.
86

9-
Moai SDK is an open source game framework for quickly developing great mobile games.
7+
Third party libraries are included as git submodules (in some cases). The rest are vendored in. As a rule, we do not make any code changes to third party libraries. If functionality must be configured or replaced, we use a header injection pattern to do so.
108

11-
You can work in Lua or C++, and Moai SDK runs on multiple platforms including iOS, Android, Chrome, Windows, Mac and Linux.
9+
A goal of the project is one-step build for the reference binaries. We don't want users to have to download and configure dependencies, or build parts of the SDK in advance. If you open the xcode/osx project (for example) and click 'build,' then Moai SDK should build for you in its entirety. This goal isn't always realized across all platforms, but it is something we strive for and if you want contribute build process improvements, please keep this goal in mind.
1210

13-
## Download
14-
Please clone the source in the following way.
11+
The project's principal developer (patrickmeehan) primarily works on OSX these days. As a result, the xcode/osx project is typically the most actively maintained. (For major releases, we update and test all projects.)
1512

16-
git clone https://github.com/moai/moai-dev.git
17-
cd moai-dev
18-
git submodule init
19-
git submodule update
13+
### pito
2014

21-
## Setup
22-
Tools needed to build the MOAI SDK.
15+
pito is a command line toolbelt for automating some aspects of the project. pito is just a bootstrapper that use command line Moai to run lua scripts. To use pito, make sure moai-dev/pito is somewhere in your path. When you first run pito, if the Moai binary is missing, pito will attempt to build it.
2316

24-
* [Android SDK](http://developer.android.com/sdk/index.html)
25-
* [Android NDK](http://developer.android.com/tools/sdk/ndk/index.html) (32bit Only, r8e or earlier)
26-
* windows: http://dl.google.com/android/ndk/android-ndk-r8e-windows-x86.zip
27-
* linux: http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86_64.tar.bz2
28-
* osx: http://dl.google.com/android/ndk/android-ndk-r8e-darwin-x86_64.tar.bz2
29-
* [Java SE 6](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
30-
* [Ant 1.9](http://ant.apache.org/)
31-
* [CMake 2.8.11](http://www.cmake.org/)
32-
* [Ruby 1.9](http://www.ruby-lang.org/)
33-
* [Visual Studio 2010](http://www.visualstudio.com/) (Windows only)
34-
* [XCode 4 or 5](https://itunes.apple.com/app/xcode/id497799835?mt=12) (Mac only)
35-
* [MinGW64 TCC](http://tdm-gcc.tdragon.net/) (Windows only, needed for android luajit support or can build mingw version of moai)
36-
* [Emscripten](https://github.com/kripken/emscripten)
37-
38-
The following tools are required to build the API documentation.
17+
At the Moai SDK project level, pito does very little beyond generating the HTML documentation for Moai's Lua interface and running some build scripts that can be used for CI. If you want to extend pito with other commands, type 'pito help' on the command line and you will see an explanation of how pito searches upward through the directory hierarchy for extensions.
3918

40-
* [Bundler](http://gembundler.com/)
41-
* [Doxygen](http://www.doxygen.org/)
19+
### Project Structure
4220

43-
On Mac OSX some tools need to be installed with homebrew:
21+
* __3rdparty__ - Submodules and third party source.
22+
* __3rdparty/contrib__ - Third party code snippets included in Moai.
23+
* __android-ndk__ - Android JNI build project.
24+
* __android-studio__ - Android Studio reference project.
25+
* __bin__ - Moai executables, organized by OS type, generated by the various build systems.
26+
* __cmake__ - Cmake build project.
27+
* __docs__ - Legal notices and attribution images. Run 'pito make-lua-docs' to generate API reference.
28+
* __lib__ - Moai static libraries, organized by OS type, generated by the various build systems.
29+
* __pito__ - Moai command line utility.
30+
* __samples__ - Moai SDK desktop and mobile samples.
31+
* __samples-legacy__ - Old samples from the before-time. We'll bring these forward Soon(tm).
32+
* __src__ - All Moai SDK source code for Moai libraries and hosts.
33+
* __test__ - This is a legacy, Lua-based test runner. Will be replaced by Google Test.
34+
* __vs2015__ - Visual Studio reference build system and reference project.
35+
* __xcode__ - Xcode build system and reference projects.
4436

45-
$ brew install xctool ios-sim cmake
46-
47-
cmake needs to be 3.3 on osx
37+
Be sure to check for README files in these folders.
4838

49-
On Mac OSX, Linux and Windows, Android studio version should be 1.4+ and
50-
Android ndk can be r10e+
39+
### Reference Projects
5140

41+
Reference projects are the projects we use for day-to-day development work on Moai. We do not provide any kind of Moai project generator or IDE templates (though this functionality is somewhat provided by Cmake). The usage pattern for Moai is to copy one of the reference projects, manually update the paths to either the Moai source or libraries, and tailor it to your needs. This might sound onerous, but in our experience, if you know how to use the IDEs it should only take you a few minutes.
5242

53-
Please set the following environment variables.
43+
In the past, members of the community have provided extensions to pito that generate high quality IDE projects from project templates. We don't maintain these in moai-dev; the moai-community repository was created to hold them.
5444

55-
### Mac OSX
45+
### Hey, there aren't any docs! How do I use this thing?
5646

57-
export MOAI_BIN=<install_path>/moai-dev/release/osx/host-sdl/bin
58-
export MOAI_CONFIG=<install_path>/moai-dev/samples/config
47+
Start with command line Moai. Add moai-dev/bin/<os> to your path then run some of the samples. We try to keep these up to date, but don't always have time (though for official releases of the SDK they all should work).
5948

60-
### Linux
49+
The samples are very, very simple. You will find Moai to be unopinionated and low-level. It is very much intended to be an SDK. You can piece it together however you want to make your game or app.
6150

62-
export MOAI_BIN=<install_path>/moai-dev/release/linux/host-sdl/x64/bin
63-
export MOAI_CONFIG=<install_path>/moai-dev/samples/config
51+
Once you get the hang of using Moai, start your project using a window size that uses a resolution/aspect ration you are comfortable with. You can adapt this later to handle multiple resolutions and aspect ratios. It is fine to prototype on desktop; mobile support is robust enough that you can port your work once you have something going.
6452

65-
### Windows
53+
### How do I get help?
6654

67-
set MOAI_BIN=<install_path>\moai-dev\release\win32\host-sdl\bin
68-
set MOAI_CONFIG=<install_path>\moai-dev\samples\config
55+
There's no official support for the project right now. Check the forums or see if you can get an invite to the Slack team.
6956

70-
## Build Hosts
71-
Please build according to the following procedure.
57+
If you have lots of money and want to hire someone to work on features for you or help you with your Moai project, you can try your luck by emailing 'moai-sdk' at fallguyconsulting.com.
7258

73-
### Windows Host
59+
### Tips
7460

75-
cd moai-dev
76-
.\bin\build-win.bat
77-
78-
### OSX Host
79-
80-
# Build
81-
cd moai-dev
82-
./bin/build-osx.sh
83-
84-
# Run
85-
cd <sample_directory>
86-
$MOAI_BIN/moai main.lua
87-
88-
### iOS Host
89-
90-
cd moai-dev
91-
./bin/build-ios.sh <lua_dir>
92-
93-
### Linux Host
94-
95-
# Build
96-
cd moai-dev
97-
./bin/build-linux-sdl.sh
98-
99-
# Run
100-
$MOAI_BIN/moai main.lua
101-
102-
### Android Host
103-
104-
# Build
105-
export ANDROID_NDK=<path_to_android_ndk>
106-
cd moai-dev
107-
./bin/build-android.sh
108-
109-
# Edit Setting
110-
cd release/android/host
111-
vi settings-global.sh
112-
vi settings-local.sh
113-
114-
# Run
115-
./run-host.sh
116-
117-
### HTML Host
118-
119-
#build
120-
export EMSCRIPTEN_HOME=<path_to_emscripten_1.7.1>
121-
cd moai-dev
122-
./bin/build-html.sh
123-
124-
#run
125-
<http-serve> cmake/build/host-template/www
126-
127-
#see src\host-html\readme.md for more info
128-
129-
## Create IDE Projects
130-
131-
### Visual Studio
132-
Execute `create-projects-win.bat` in `moai-dev\bin`.
133-
By default, this creates a Visual Studio 2012 solution in `moai-dev\cmake\projects\vs2012`. To generate project files for a different version of Visual Studio, specify your desired version (`vs2008`, `vs2010`, `vs2012`, or `vs2013`) as a command-line argument.
134-
135-
### iOS
136-
./bin/create-projects-ios.sh
137-
open cmake/projects/moai-ios/moai.xcproj
138-
139-
### OSX
140-
./bin/create-projects-osx.sh
141-
open cmake/projects/moai-osx/moai.xcproj
142-
143-
## Sample code
144-
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), or Visual Studio (Windows).
145-
146-
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](http://getmoai.com/forums/).
147-
148-
## License
149-
150-
This SDK uses the [CPAL license](http://www.opensource.org/licenses/cpal_1.0). Refer to the for attribution screens to include with games made with Moai.
151-
152-
## Forks
153-
154-
* [patrickmeehan/moai-dev](https://github.com/patrickmeehan/moai-dev)
155-
* [moaiforge/moai-sdk](https://github.com/moaiforge/moai-sdk)
156-
157-
## Links
158-
159-
### Moai Pages
160-
161-
* [Moai Web Site](http://www.getmoai.com/)
162-
* [Moai FAQ](http://getmoai.com/marketing/moai-faqs.html)
163-
* [Moai SDK Framework Reference](http://getmoai.com/docs/)
164-
* [Moai forums](http://getmoai.com/forums/)
165-
* [Moai Wiki(getmoai)](http://getmoai.com/wiki/)
166-
* [Moai Wiki(github)](https://github.com/moai/moai-dev/wiki)
167-
* [Moai API Documentation](http://moaiforge.github.io/moai-sdk/api/latest/).
168-
* [MoaiFiddle](http://moaifiddle.com/) An online Moai editor and player.
169-
* [Moai Site Redesign Proposal](http://moaiwebsite.github.io/)
170-
171-
### Tutorials
172-
* [GameFromScratch MOAI Tutorials](http://www.gamefromscratch.com/page/Moai-tutorial-series-The-adventures-of-an-intrepid-programmer-in-the-lands-of-Moai.aspx)
173-
* [moaisnippets](http://www.moaisnippets.info/)
174-
175-
### Libraries
176-
* [Rapanui](https://github.com/ymobe/rapanui)
177-
* [Hanappe](https://github.com/makotok/Hanappe)
178-
* [MOAI GUI](https://github.com/derickd/moaigui)
179-
* [Shilke2D](https://github.com/Shrike78/Shilke2D)
180-
* [Spine MOAI](https://github.com/tangerinagames/spine-moai)
181-
182-
### Tools
183-
* [moaicli](http://halfnelson.github.io/moaicli/)
184-
* [MoaiUtils](https://github.com/DanielSWolf/MoaiUtils/blob/master/README.md)
61+
* For any kind of serious app, you will need to figure out how to handle transitions yourself (screen-to-screen or level-to-level). There is no official way of doing this.
62+
* Don't get too wrapped up in writing class systems of abstractions on top of Lua or Moai. At least not at first. A light touch is usually the way to go.
63+
* Moai does not attempt to hide or abstract low-level graphics concepts. To get the most out of Moai, you will need to understand coordinate systems and shaders. Game development is hard. Our goal is to provide convenience, flexibility and power, not to simplify.
64+
* You will eventually need to manage the garbage collector and hunt down objects that get left in scope. Don't worry: when you get there you will find that there are powerful mechanism in Lua and some memory analysis tools build in to Moai that will make this tractable.
65+
* Once you understand Moai viewports and scale settings, you will understand how you can write your app to use a device-independent coordinate system. For 2D games, you will be able to update your assets to use higher or lower resolutions without changing object dimensions. In our projects, we typically use at our highest targeted resolution for all assets and downsample for lower resolution devices.
66+
* Plan your letterboxing scheme early. You will want to decide up front if you will reposition UI elements or draw extra UI to avoid black bars.
67+
* Prototype on desktop, but test (a bunch) on device, well ahead of release.

‎docs/.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lua-docs-html/

‎docs/README.txt‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)