diff --git a/readme.md b/readme.md index 4606782..06ec8ab 100644 --- a/readme.md +++ b/readme.md @@ -9,11 +9,11 @@ 1. [Building](#building) 1. [Project Structure](#project-structure) 1. [No Headers](#no-headers) - 1. [All Code is Equal](#all-code-is-equal) + 1. [Module Conventions](#module-conventions) ## Overview -Ona is a straightforward game engine with the aim of staying reasonably lightweight through its +Ona is a straightforward game engine with the aim of staying reasonably lightweight through a modular architecture. Ona is also the Catalan word for "wave". @@ -27,7 +27,7 @@ Ona is also the Catalan word for "wave". * Be lightweight in base engine memory usage and disk size. -* Provide a simple scene graph system that translates its graph nodes into a cache-friendly representation at runtime. +* Provide a simple scene graph system that translates graph nodes into a cache-friendly representation at runtime. * Provide an execution-speed optimized scripting interface through a Lua-inspired language named "Kym", with features like first-class support for common mathematic types used in rendering. @@ -62,12 +62,34 @@ As Ona uses C++20, it is able to make use of the new modules language feature. W #### No Headers -All first-party code in the project is free of headers. Code is grouped in a module and package dichotomy, where each `.cpp` file in the root source directory represents the common package of a module grouping. - -Subdirectories then build further abstractions atop these common module files. For example, the `core.cpp` source file contains many common memory manipulation and floating point mathematics utilities, which are made use of in `core/image.cpp` for modifying CPU-bound pixel data. - -#### All Code is Equal - -Following on from no headers necessary, declarations, template metaprogramming, and definitions all go into the same place now. A typical Ona source file mixes all of these, traditionally separate, pieces of logic together in shared `.cpp` files. +A core benefit to the project, and the one which weighed most on this decision, is that all first-party code is free of header usage. Code is grouped in a module and package dichotomy, where each `.cpp` file in the root source directory represents the common package of a module grouping. Alongside the surface-level benefit of writing having fewer lines of code, this also means there is less work necessary to maintain the codebase at large and a smaller space to create duplication errors in. + +#### Module Conventions + +The standard is loose on how modules are named and structured, so this codebase enforces its own convention of a package-like structure. + +At the source root-level, each `.cpp` file contained represents the core module of each respective library. Higher-level extensions of the core library that do not cyclically depend on each other reside within folders that share a matching name (sans the extension). For example, the `coral.cpp` source file contains many common memory manipulation and floating point mathematics utilities, which are made use of in `coral/image.cpp` for modifying CPU-bound pixel data. + +Each module tries to manage a responsibility of the overall project while also not introducing too many inter-dependencies in each other. + +##### Coral + +Common operating system-independent memory, math, and data structure utilities for use in all other first-party library modules. + +##### Oar + +The (O)na (Ar)chive format; a non-compressing data bundling format optimized for quick I/O operations and resolving the problem of having free-standing asset files complicating the cross-platform application distribution process. + +##### App + +Operating system-abstracted interface for building graphical and headless applications. + +##### Kym + +Scripting language designed around an execution speed-optimized design, and features like first-class support for common mathematic types. + +##### Runtime + +Base execution environment for games built using Ona.