Getting started
To install Yae, you will need LuaRocks.
If you are on Windows, you can install it using this installer or via Chocolatey:
choco install lua
If you are on Ubuntu, run this command:
apt-get install luarocks
If you are on Arch Linux, run this:
pacman -S luarocks
And if you are on Mac OS X, you can install LuaRocks with this command:
brew install lua
Now, you will need to install Java Development Kit 7+ (JDK).
To additionally target iOS you will also need:
- A Mac, iOS Development does not work on Windows/Linux thanks to Apple.
- The latest XCode, which you can get from the Mac OS X App Store for free
After you have done above steps, you can proceed to installation. It is really simple, just run this command from console to install latest stable version:
luarocks install yae
To install latest development version, use this command:
luarocks install --server=http://luarocks.org/dev yae
If you are on Windows and installation is failing because of some weird error with MoonScript, then download MoonScript windows binares, place them to your PATH
and then run
luarocks build --server=http://luarocks.org/dev yae
Choose directory, where your future project should reside and open it in console. Here, run this command:
yae new "My Project"
To initialize your project in current directory. Replace My Project
with anything you like to use as name for your game or application.
After successfully making above steps, your directory structure should now look similar to this:
- path/
- .yae/
- assets/
- main.moon
- project.yml
All your application's resources should be stored in the assets
folder.
Note: .yae
is only temporary folder, don't worry about it or its contents (it contains cached data from previous builds to decrease build times, so when not needed, try to avoid removing it).
All configuration settings (and a lot more!) are stored in project.yml
. So now, open it with your favorite text editor (I personally prefer Sublime Text). Your project.yml
should look like this:
name: My Project
package: com.username.myproject
version: 1.0
And now, let's explain them:
- name: This is your project's name, used for creating executables, displayed in desktop window title and in iOS and Android launcher and during installation.
- package: Project package used as unique identifier for your application.
- version: Project version, used mainly internally.
Note: This is only very basic configuration file. project.yml
have also more advanced configuration features, but that is story for another tutorial.
And this should be everything for start. To test your project, simply run this command:
yae run
in root of your project directory. You can read more about running and packaging in this tutorial.
NOTE: Some tutorials are edits of LibGDX tutorials, what can be found here.