diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/Contributing/c-coding-style.md | 13 | ||||
-rw-r--r-- | docs/Contributing/naming.md | 29 | ||||
-rw-r--r-- | docs/getting-started.md | 7 | ||||
-rw-r--r-- | docs/index.md | 42 | ||||
-rw-r--r-- | docs/project-layout.md | 9 | ||||
-rw-r--r-- | docs/rendering.md | 7 |
6 files changed, 107 insertions, 0 deletions
diff --git a/docs/Contributing/c-coding-style.md b/docs/Contributing/c-coding-style.md new file mode 100644 index 0000000..4e268cc --- /dev/null +++ b/docs/Contributing/c-coding-style.md @@ -0,0 +1,13 @@ +--- +title: C Coding Style +--- + +A lot of these should be forced onto you by `clang-format` and `clang-tidy` but for posterity here are +a few of the styles that we stick to. + +* **Pointer next to type** - we use `type* variable` in function signatures and variable declarations e.g. `mat4* model` + + +## Memory + +### Arena allocation diff --git a/docs/Contributing/naming.md b/docs/Contributing/naming.md new file mode 100644 index 0000000..518c22e --- /dev/null +++ b/docs/Contributing/naming.md @@ -0,0 +1,29 @@ +--- +title: Naming Conventions +--- + +#### 1. Prefer SOV function names + +Prefer SOV Subject Object Verb naming for functions. + +This makes it very easy to find the functions you want with autocomplete and maintain a consistent naming convention +throughout the codebase. + +e.g. + +* `renderer_frame_begin` +* `engine_tick_begin` +* `texture_data_load` + +--- + +#### 2. Long-running systems + +systems that run for the lifetime of the application or for a very long time should have: + +* `bool system_init(system_state* state)` a `init` function +* `void system_shutdown(system_state* state)` and a `shutdown` function + +--- + +#### 3. TODO
\ No newline at end of file diff --git a/docs/getting-started.md b/docs/getting-started.md new file mode 100644 index 0000000..0baf21c --- /dev/null +++ b/docs/getting-started.md @@ -0,0 +1,7 @@ +--- +title: Getting up and running +--- + +The main build tool we use is [xmake](https://xmake.io/#/getting_started) so installing that is the main prerequisite. + +Once that is installed you *should* be able to simply run `xmake build` in the top-level directory.
\ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..54d6383 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,42 @@ +# Welcome to Celeritas + +Welcome to the Celeritas Game Engine's documentation! + +## What is it? + +Celeritas is a small 3D game engine written in plain ol' C **and** OCaml. + +The idea underlying celeritas is to have a small versatile "core" that can then be added to from other languages. +This means you could add gameplay systems in OCaml but rely on the celeritas core layer to do all the heavy lifting +when it comes to computation or rendering. I will be providing ocaml bindings to the C API but implementing Lua bindings for example +would be fairly trivial. + +**What does 'celeritas' mean?** + +Celerity is an English word meaning "alacrity" "swiftness". +Celeritas is the original Latin word for celerity that the English is derived from. + +## Feature Set + +**Implemented (core)** + +* Vulkan & OpenGL renderer backends (*need to port Metal renderer over*) +* Basic Blinn-Phong lighting model (*need to port from old project*) +* Task queue for loading mesh and texture data into memory on background threads + +**In-progress** + +* Skeletal animation + +**Roadmap going forwards** + +* Collision detection +* Terrain rendering +* GPU-driven rendering + +## Getting started + +Check these pages out + +* [Getting started](getting-started.md) +* [Project layout](project-layout.md)
\ No newline at end of file diff --git a/docs/project-layout.md b/docs/project-layout.md new file mode 100644 index 0000000..74a84aa --- /dev/null +++ b/docs/project-layout.md @@ -0,0 +1,9 @@ +--- +title: Project Layout +--- + +``` +deps/ - third-party dependencies +docs/ - these docs you're reading now that get built with mkdocs +TODO: the rest... +```
\ No newline at end of file diff --git a/docs/rendering.md b/docs/rendering.md new file mode 100644 index 0000000..05da5fc --- /dev/null +++ b/docs/rendering.md @@ -0,0 +1,7 @@ +# Rendering + +Rendering is split into 3 'registers'. + +1. **RAL** (Render Abstraction Layer) - thin abstraction over graphics APIs +2. **render** - implements the default renderer and higher-level functions like `draw_scene` +3. **immediate** - immediate-mode drawing API for things like debug visualisation and UI
\ No newline at end of file |