Skip to content
Robert Konrad edited this page Jan 12, 2020 · 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/Kha-Samples/Empty.git

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 html5. This will create project files for different IDEs in a build subdirectory. Then call node Kha/make --server and navigate to localhost in your browser to see your application running. Development is usually done in HTML5 due to the fast build times which can be achieved that way. When everything is done, call khamake again with a different parameter to build your project for a different system.

To build from the command line, you can run node Kha/make --compile (compiles only) or node Kha/make --run to build and run.

Currently supported parameters for khamake are:

  • krom
  • windows
  • windowsapp
  • ps3
  • ios
  • osx
  • android
  • android-native
  • xbox360
  • linux
  • html5
  • html5-native
  • html5worker
  • flash
  • wpf
  • java
  • psm
  • tizen
  • unity
  • node
  • debug-html5
  • empty
  • pi
  • tvos

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 --ffmpeg "/path/to/ffmpeg.exe"