Krotox Engine › Docs › Krotox Manual › Getting Started
The parts of Krotox Engine and how they connect: the editor, the C++ core, Vulkan 1.3 rendering, Box2D physics, Mono C# scripting, and the files a project is made of.
Krotox Engine is a 2D game engine written in C++17. You build a game in the Krotox Editor, write gameplay in C#, and ship it to Android or Windows from the same project. This page explains the moving parts so the rest of the manual makes sense.
| Part | What it is | Where you meet it |
|---|---|---|
| Editor | A dockable desktop app built with ImGui. Scene view, hierarchy, inspector, asset browser, tile painting, build settings. | Everything you do by hand. |
| Engine core | The C++17 static library every game runs on. Holds the scene, the renderer, physics, audio and the asset manager. | Invisible, but it is what your game *is* at run time. |
| Renderer | Vulkan 1.3 only, using dynamic rendering and synchronization2. 2D sprites, shapes, text and lines are batched into as few draw calls as possible. | The Viewport and your finished game. |
| ECS | EnTT entity-component system. An entity is an ID; everything it does comes from the components you add. | Hierarchy and Properties panels. |
| 2D physics | Box2D 3.x, stepped on a fixed clock (60 Hz by default) and interpolated for drawing. | Rigidbody 2D, colliders, joints. |
| Scripting | Mono C#. Hot reload in the editor on desktop; Full-AOT (compiled ahead of time) on Android. | Script components and your .cs files. |
| Audio | miniaudio, with Master, SFX, Music and UI mixer groups. | Audio components and AudioCommand. |
| Packaging | Assets, scenes, shaders and font atlases are compressed with miniz into one data.pak. | Build Settings. |
Krotox does not use deep class hierarchies for game objects. A game object is an entity: a 64-bit ID with a name. What it looks like and how it behaves is decided by the components on it:
Components are grouped by dimension, and the editor labels them with coloured badges: [2D] in emerald, [UI] in amber, [CORE] in slate. If an entity mixes components that cannot work together, the hierarchy shows an amber warning and the inspector offers a one-click fix.
Think of components as data and your scripts as behaviour. A script reads and writes components; it rarely needs to store copies of what a component already holds.
Scripting uses two assemblies:
KrotoxEngine-ScriptCore.dll is the engine API: the Entity base class, component wrappers, math types, input, physics queries and so on. It talks to the C++ core through internal calls..cs files under the project's Assets/Scripts/ folder. By default it is written to Binaries/<ProjectName>.dll.Every script is a class that derives from KrotoxEngine.Entity. See Writing scripts & the lifecycle.
Every frame of a running game goes through the same order. Knowing it explains most "why did that happen first?" questions:
OnUpdate(ts) runs on every script.OnFixedUpdate() runs, Box2D steps, and collision and trigger callbacks fire.OnLateUpdate(ts) runs on every script.The full detail is in the lifecycle reference.
| File | What it holds |
|---|---|
MyGame.ktxproj | The project file (YAML): name, settings, build options, a stable project ID. |
*.ktx | A scene: every entity and component in it. |
*.prefab | A reusable entity tree you can place many times or spawn from code. |
*.meta | A sidecar next to every asset. It keeps the asset's 64-bit ID stable across machines and version control. |
*.ktxasset | A ScriptableObject data asset (shared data such as weapon stats). |
*.cs | Your C# scripts. |
EngineSettings.yaml | Machine-wide editor settings (theme, Android toolchain paths). Lives next to the editor, never inside a project. |
Commit the .meta files together with their assets. They are how a scene keeps pointing at the right texture after a teammate pulls your changes.
When you build, Krotox packs the scenes and assets that the game uses into data.pak and places it next to a small runtime:
KrotoxEngine-Runtime.exe, data.pak and the required DLLs.libengine.so for arm64-v8a), your C# compiled ahead of time to native code, and data.pak inside the APK or AAB.See Building for Android and Windows builds, resolution & scaling.