Armory Engine. Introduction





So, I will tell you about such a wonderful game engine like Armory3D . It was written and developed by Lubos Lenco , a Slovak programmer. He also wrote Armory Paint , a program for painting PBR textures on 3D models. Let me tell you why it is remarkable:



  • Open source (zlib license)

  • Cross-platform (Windows, Android, IOS, Linux, macOS)

  • Completely free (you can donate to the author for development).



The engine is written in Haxe, C / C ++ and WebAssembly, comes as an add-on for Blender, but other 3D modeling and animation packages are also easily integrated. The engine is optimized for performance, portability and lightness of the code, unlike such monsters as Unity, Unreal, CryEngine etc.



Engine components



The engine consists of several components, which I will discuss below:



  • Render. The engine has its own Iron rendering system. It is based on the EEVEE / Cycles Blender shaders, but only partially. Here is a list of those you can use .

  • Scripting system. Scripts in Armory use traits (feature, trait), part of the logic attached to the object (more on it below)

  • Multiplatform. The engine supports out of the box all available popular platforms - PCs (Windows, Linux, macOS), consoles (Xbox One - Series X, PS4, Nintendo Switch, and mobile OS (Android, IOS).



Now about scripts, there are 4 types of scripts in the engine:



  1. LogicNodeTraits: This is the analogue of blueprints for Unreal Engine 4.

  2. Haxe Traits: traits written in Haxe.

  3. Canvas Traits: UI, menus and more.

  4.  WASM Traits: traits written in WebAssembly, Rust, C / C ++.



Engine technology



The engine uses Iron, KHA and Haxe:



  • Iron . The internal rendering engine is written in WebAssembly, KHA and Haxe. Easily scalable as it is modular. Iron itself handles rendering containers, so you can write your own graphics engine based on it.

  • Haxe. , , , -. . . python lua, c++ . .

  • KHA. SDK   . , . KHA API , . , (Metal, Vulkan, DirectX, WebGL OpenGL). .



The engine does not have a huge community like Unreal or Unity, but nevertheless it deserves attention. After all, it uses all modern technologies, lightweight and modular. The author is gradually developing and improving his brainchild, and the source code is available to everyone.



Installation and configuration



Now I will tell you how to install the engine and make your first test level (in the next lesson). Before you get started, you need to know how to work with Blender - it's your main tool. If not, well, there are enough lessons on the net. On my own behalf, I can recommend courses from Artem Slakva (never an advertisement).



What we need:



  • Stable version of Blender (the author recommends version 2.8, since 2.9 is unstable with the engine)
  • Add-on to Blender on the official website (the engine comes in the form of an add-on, if you don’t mind the author)


Installation is pretty simple - download and unzip the engine archive. Install as an addon to the installed Blender.  Edit > Preferences… -> Add-ons -> armory.py.



Armory.py is in the unpacked archive. Next, enable the added add-on with a tick in  Render: Armory Preferences: Add-ons.



Now you need to check if the engine is installed correctly. In the tab, Rendercheck the path SDK Path. It must correspond to where you have the SDK. For example, D:\ArmorySDK2011\ArmorySDK,if not, then by clicking on the folder icon in the same place, select the path where your engine is unpacked.





Save the .blend file and press the F5 (play) button located on the panel Properties > Render > Armory Player. Common installation problems can be found here .



The engine already includes Haxe and Kha, so you don't need to install them separately.



Code editor



Armory will automatically install the "correct" code editor. It works like this: the engine scans the variables of the installed IDE, and if, for example, you have Visual Studio installed, then the default will be VS. If not, the environment variable of the console code editor will be used. 



Author recommends Kode Studio





"haxe.executable": "ArmorySDK/Kha/Tools/haxe/haxe-linux64",
"kha.khaPath": "ArmorySDK/Kha",
"krom.kromPath": "ArmorySDK/Krom"


But any editor can be used: Sublime, Atom, Notepad ++ etc. Just point in the Code Editor Executablepath to your editor.



The next lesson will create the first test level.



All Articles