Can I Use Python Instead?

I primarily program in Python and would rather use it with Armory than Haxe. Can I do that? It makes sense to use Python because it’s already part of Blender and is used for just about everything as far as extensions is concerned. Python works for my workflow the best (and I’m sure many others). Is it possible? If not would it be possible in a later release?

The short answer is that you cannot use Python to program Armory games, and you probably won’t be able to in the future, but here is a more in-depth explanation:

Armory is built on Kha, which is a platform abstraction layer for making graphics programs in Haxe. Kha is designed to be ultra portable, and was built on Haxe because it is the only language that has such a robust ability to publish to multiple platforms. Haxe and Kha is the secret to how Armory can publish to all of the platforms that it can publish to and it is an integral part of Armory that isn’t going to change in the future.

That being said, because Kha is so portable that it can run on multiple runtimes such as C++, C#, Java, and Javascript, it might be possible that you could create a Kha backend for Python that Armory could run on, but it could be a lot of work and it would likely be slower than the other Armory runtimes.

1 Like

These guys have done some pretty good work converting Python to Haxe:https://github.com/nightblade9/dragon. It doesn’t work for KHA and is still newly under development but it shows what could be done. But I guess using nodes and a small amount of Haxe won’t kill me either.

2 Likes

Another option is Javascript if you are only targeting Desktop and Android.

1 Like

Javascript instead of Python? Lol! That’s rich! Haxe sounds like a much better option;)

2 Likes