PLEASE DON'T MURDER ME I AM JUST ASKING ! ... Can I program using Javascript?

I love Javascript, I hope the community is kind enough to allow me to express my love for it. [PLEASE DON’T KILL ME !!! Yes Yes C# is the king I got it I love Javascript what’s it to you ! ha ha ha]
It is a very simple language, and not strict at all, string, numbers, array and objects, arh…simple.

Is there a Javascript pathway to Armory ?
[Gosh I feel so guilty for asking this…almost like a guilty pleasure…]

Haha, don’t feel guilty. I can understand liking Javascript. The answer to your question is that it depends on what you are publishing to and how.

When you click the play button for Armory games in Blender, by default, it actually compiles your whole game from Haxe to Javascript, and then runs it inside of Krom. Krom is a backend built specifically for Kha, which Armory is based on. Krom binds Javascript to low-level graphics APIs similar to how NodeJS binds Javascript to native system calls. This means that if you target Krom, you can program in Javascript or WebAssembly.

Krom currently runs only on desktops, but it will soon run on Android and consoles. It has also been tested by Lubos to be faster than the native C++ target, which is interesting and convenient. :slight_smile:

There are some examples of writing Javascript/WASM for Armory.


Urks… are you serious? We will excuse this once but please do not talk about the ugliness that is C# ever again.

Have you seen the Call Hx example? the haxe script has an “eval javascript” statement in it. Perhaps you are in luck :slight_smile:

Just a new link for the JS usage in armory