Skip to content
Robert Konrad edited this page Jul 11, 2015 · 17 revisions

Kha has several samples available for you to try!

The git urls are as follows:

git clone --recursive one of the projects - or if you want a fresh start, type: git clone --recursive https://github.com/KTXSoftware/Empty.git

If you use kha from haxelib it is sufficient to do a plain clone (without the --recursive option).

A complete clone can take a while, because it contains the complete source history of all used libraries. You can omit the history by adding the --depth=1 parameter.

Navigate to the directory and execute node Kha/make flash or haxelib run kha flash. This will create a FlashDevelop project file in a build subdirectory. You can load and build this project directly. Development is usually done in Flash due to the excellent debugging support in FlashDevelop. When everything is done, call khamake again with a different parameter to build your project for a different system.

Currently supported parameters are:

  • windows
  • linux
  • android
  • windowsrt
  • osx
  • ios
  • html5
  • flash
  • wpf
  • xna
  • java
  • psm
  • dalvik
  • tizen

If you are not building for html5 or flash, a separate system-build directory will be created inside the build subdirectory, containing the translated sources and a project for the native IDE of the target (Visual Studio, XCode, Code::Blocks or Eclipse respectively).

khamake tries to encode all assets for you automatically but due to the mp3 and aac patent restrictions those encoders are not included. To let khamake use external encoders for that job, call it like this:

node Kha/make flash --aac "/path/to/faac -o {out} {in}" --mp3 "/path/to/lame -S -h {in} {out}"
Clone this wiki locally