diff options
author | Lorenzo Torres <123754451+lolzdev@users.noreply.github.com> | 2025-03-12 11:25:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-12 11:25:44 +0100 |
commit | 8c87cc3e36bb316a198faa3154fee3ef7e4127f9 (patch) | |
tree | 905556e0bd76a6fbc3ed543b6b62899f675970e1 | |
parent | 34369547047e22d1ba7cc7c45f48b0cc323a4587 (diff) |
Create design.md
-rw-r--r-- | documentation/design.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/documentation/design.md b/documentation/design.md new file mode 100644 index 0000000..ba84987 --- /dev/null +++ b/documentation/design.md @@ -0,0 +1,20 @@ +# Design +This document contains all the design decisions and features that are and will be implemented in the game. + +# Engine +## Rendering +The game engine uses Vulkan as the default graphics API but also implements an OpenGL backend for compatibility with older devices (some of them, while having Vulkan support, have better performance with OpenGL). +An abstraction over the graphics API allows clean utilization of the renderer in the engine, but also exposes a simple interface for mods. +glTF models are used for assets, but once loaded as the game starts, they are going to be converted to an internal intermediate representation format to increase loading performance. +A Metal backend might be implemented in the future for better MacOS integration. + +## Logic +An entity component system (ECS) internal API allows better usage of CPU cache lines while also providing a simple interface for the engine internals and mods. + +## OS interactions +The OS APIs are abstracted in a platform agnostic interface, used to make usual OS operations like opening files, creating network sockets, creating windows (X11, Wayland, Win32, Cocoa) and so on. + +## Mods +Modding is implemented using a custom Wasm (WebAssembly) virtual machine. The VM makes a sandbox for each mod so that they can't directly interact with each other nor accessing main memory or filesystem. +This safety features allow to download mods bytecode when joining a multiplayer game on the fly without worrying and without needing to install them locally before joining. +While not every language will be supported officaly, community projects can easily implement bindings for the engine modding API and then compile to a Wasm target.
\ No newline at end of file |