Portable multimedia framework


Keywords
cross, game
License
MIT
Install
haxelib install kha 16.1.2

Documentation

Build Status Build status Stories in Ready

Kha

Kha is a low level SDK for building games and media applications in a very portable and very performant way, based on Haxe and GLSL.

Index

About

Kha is a low level SDK for building games and media applications in a portable way. Think SDL, but super-charged.

Based on the Haxe programming language and the Krafix shader-compiler it can cross-compile your code and optimize your assets for even the most obscure systems.

Kha is so portable, it can in fact run on top of other game engines and its generational graphics and audio API design gets the best out of every target, supporting super fast 2D graphics just as well as high end 3D graphics.

The main development is held by Robert Konrad

Things you can do now:

Features

Kha Features

  • Great performance in different target devices
  • Generational graphical API design
  • Generational audio API design
  • Support super fast 2D graphics
  • Support high end 3D graphics
  • Can run on top of other game engines
  • Write shaders in GLSL - cross-compiles to other shading-lanugages

Even more Features

  • Kha apps can also be compiled to C# or Java libraries
  • One API for all targets
  • No legacy code
  • Support for VR technology
  • Networking multiplayer support

Platforms supported by Kha

  • HTML5 (Canvas or WebGL)
  • Flash
  • Windows (Direct3D 9, Direct3D 11 or OpenGL)
  • OSX
  • Linux
  • Android
  • iOS (OpenGL or Metal)
  • Tizen
  • Unity 3D
  • PlayStation Vita (PlayStationMobile)
  • Xbox 360 (XNA)
  • Potential (modern) console/handheld support*

* Console support is only feasible if an official SDK is provided. With the SDK a new backend can be written. If you have a console SDK and want to help make this possible, contact Robert Konrad!

Game

The complete structure of Kha looks something like this.

Getting Started

Installing NodeJS

You can get a copy of NodeJS on its site here and install it.

Update NodeJS

If you have NodeJS already installed make sure it's updated! You can do so with the following commands.

sudo npm cache clean -f
node --version
sudo npm install -g n
sudo n stable
node --version

Starting with Kha

Kha projects are usually handled using git submodules so that every dependency is properly versioned. Even the Haxe compiler itself is just a submodule.

If you want to add Kha as a submodule for your git project just use

git submodule add https://github.com/KTXSoftware/Kha
git submodule update --init --recursive

You can also clone the Empty project and start from it!

git clone --recursive https://github.com/KTXSoftware/Empty.git

Updating Kha

If you want to update Kha and its submodules in your repository you can do it with just this command!

git submodule foreach --recursive git pull origin master

Games made with Kha

Kha Is relatively new but the community is already publishing games:

Game

Game frameworks with Kha

Kha already has a few game frameworks build on top of it. So if Kha is still too low level for you or you are used to another framework check our list and you may find one that fits your needs!

  • KhaPunk: Port of HaxePunk/FlashPunk to Kha.
  • ZBlend: 3D game engine that integrates into Blender.
  • Komponent2D: A component based game engine with Kha.
  • Kha2D: A simple 2D engine built using Kha.

Bugs?

If you find any kind of bug, or weird problems with the library add them to the Issue Tracker. Add as much information as possible, also upload the source code that causes the problem if you can :)!

License

You can check Kha license here.