MANUAL
The manual
How to build games with KroysEngine: the editor, C# scripting, editor plugins, multiplayer and shipping. Press F1 over any editor panel to open its page.
Engine0.1.0
Plugin SDK2.2.0
.NET SDK10.0.401
PlatformWindows, Vulkan
01
Get started
Download and installThe engine is one zip. Unpack it into a folder and start the editor: the player, the packaging tools, the .NET SDK for C# and this documentation are all inside.Build from sourceBuild the editor, the player, the dedicated server and the tools from the engine repository on Windows. Install four tools once; the build fetches and pins everything else.Your first projectCreate a project from a template, add a script to an entity and press Play. Everything a game needs lives in one project folder.The editorOne window with dockable panels, a command palette that finds everything, and a workspace for each kind of work. Press F1 over any panel to open its page in this manual.WorkspacesA workspace is a saved layout for one kind of work. Switch with the tabs in the toolbar or Alt 1 to 7; each remembers how you arranged it.What's newWhat changed recently in KroysEngine, newest first.Release notesEvery KroysEngine release, newest first, with what changed in it. The list comes from the engine's changelog, so it matches the download.
02
Editor
Scene and entitiesA scene is a tree of entities; an entity is a name, a transform and the components that give it behaviour. The Viewport, World and Inspector panels edit them.Lighting and renderingLights use physical units, a camera exposure turns scene light into the picture, reflection probes and probe volumes give rooms their own reflections and indirect light, and a quality preset decides anti-aliasing, ambient occlusion and other costs.MaterialsMaterials are node graphs that compile to shaders in the background while the old shader keeps drawing. Instances change parameters without a graph.AnimatorState machines, blend trees, layers and events for skinned characters, edited in one window with the character playing live at the bottom.VFX StudioEffects are graphs of emitters, parameters and events, edited in one window with the effect burning in its own preview and a profiler next to it.Image toolsPaint and edit textures without leaving the editor, and generate procedural textures and flipbooks from node graphs.UI editorGame menus and HUDs are UI documents laid out on a canvas at the player's resolution, with styles, bindings to input actions and a live preview.Placing assetsDrag assets from the Content panel onto the Viewport or the World panel. A ghost shows where they will land before you let go, and every drop is one undo step.Play mode and inputPlay runs the scene in the Game panel with the same rules as the shipped game. Input goes through named actions that players can rebind.Navigation and streamingBake a navmesh so characters and server bots find paths through the level, and split large worlds into chunks that load by distance.World streamingSplit a large level into cells that load and unload around the player while the game runs, with their colliders, navmesh and terrain, within a time and memory budget.
03
Extend the editor
Your first C# pluginBuild a small panel for the editor in C#, change it while the editor runs, and give it a command you can undo. About ten minutes.Panels and controlsA panel is a draw callback the editor calls every frame. Controls are one call each and report what the user did through their return value.Commands and menusA command is an action with a label, an optional shortcut, menu path, toolbar button and enabled state. Wrap scene edits in a transaction to make the whole command one undo step.Settings pagesGive a plugin a page in the editor's Settings window and keep its values per user, across reloads and restarts.Importers and asset typesTeach the editor new file formats: importers turn a source file into something the engine reads, asset types give your own files a place in the Content panel.Native plugins (C, C++)For native code, game systems and component types that ship with the game, write the plugin in C or C++ against the Plugin SDK: a plain C ABI and a header-only C++ layer, with any compiler and C runtime.Manifest and permissionsEvery plugin is a folder with a manifest that says what it is, what it needs and what it may use. The Plugin Manager enables plugins per project, installs and removes them.SamplesSmall, commented sample plugins, one per capability. Each is tested to build, load, work and hot-reload, and New Editor Plugin can start from any of them.
04
Scripting
Scripts and their lifecycleGame code is C#. A script is a class derived from EntityScript, attached to an entity; the engine calls its methods as the entity is created, updated and destroyed.Coroutines and waitingA coroutine is a method that can pause and continue later, so a sequence that takes seconds or several physics steps reads as one block of code instead of state spread across OnUpdate.Fixed step and every frameThe simulation runs at a fixed rate; rendering runs as fast as it can. Decide and move in OnFixedUpdate on the exact pose; drive visuals in OnUpdate from the interpolated pose.Physics and charactersRigid bodies, colliders, triggers and character controllers simulate in fixed steps. Scripts query the physics world, react to contacts and steer characters.Shared C# librariesCode several games share, such as a networking layer, maths or a data format, can live in an ordinary C# class library outside the project. The editor builds it, Play loads it and the packaged game ships it.
05
Multiplayer
Dedicated serverThe dedicated server is the same engine as the game without a window or GPU. It loads the level, runs the same physics, animation and navigation, and is the authority over everything that matters.Game modes and botsA game's rules are a C# class that runs on the dedicated server: it sees players join and leave, owns the match state, travels between maps and drives bots that move like players.Prediction and lag compensationPlayers move the moment they press a key; the client predicts its own character and quietly reconciles with the server. Hits are judged against what the shooter saw.Network testingPut any program behind simulated latency, jitter, loss and bandwidth limits, reproduce a session exactly from its seed, and run the network test suite with fuzzing and soaks.
06
AI assistants
07
Ship your game
PackagingBuild & Export compiles the game's scripts, cooks its content, gathers the player and its runtimes, audits the result and writes a folder and a ZIP you can hand to players.CookingThe cooker turns a project's Content folder into what the player reads: binary scenes, cached models, compiled materials and compressed textures. It is incremental, cached, parallel and deterministic.Server cookCook a dedicated server for your game: the level as the server needs it, the rules file and a start script, in a folder you can copy to any Windows machine. No editor, GPU or display needed.
08
Contribute to the engine
Change-based validationTools/SelectValidation.py reads which files a change touches and runs only the builds, tests and acceptance scripts that cover them, with a small smoke set every time and everything when shared code changes.Release gatesTools/RunReleaseGates.ps1 runs every release gate in turn, from clean builds to a soak of the packaged game and an update and rollback, and calls the build a release candidate only when every gate is green.ReleasesOne version number, one changelog and one script that builds the download. A release is cut with Tools/NewRelease.py, built with Tools/BuildEngineDistribution.ps1 and proven by the release gates and a check on a clean machine.Publishing the websiteThe website is the same documentation as the editor's Help, built for the web by one command. The download lives in a separate bucket and is uploaded by a script that checks every byte. Nothing here is uploaded automatically.
API
Reference
C# scripting APIEvery type a game script uses: entities, transforms, input, physics, animation, multiplayer.C# plugin SDKKroys.Plugins: panels, commands, importers, asset types and undoable scene edits for editor plugins.C/C++ plugin SDKThe C ABI and the header-only C++ layer for native editor and runtime plugins.
KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.