Parallel-by-default game framework written in Zig
Go to file
kayomn 9ac61b614f Replace coral::readable / writable with coral::reader / writer 2023-02-19 23:06:17 +00:00
.vscode Port codebase to C++20 2023-02-18 03:34:40 +00:00
source Replace coral::readable / writable with coral::reader / writer 2023-02-19 23:06:17 +00:00
.drone.yml Port codebase to C++20 2023-02-18 03:34:40 +00:00
.gitignore Port codebase to C++20 2023-02-18 03:34:40 +00:00
build.py Rename core library to "coral" 2023-02-19 16:50:29 +00:00
config.kym Port codebase to C++20 2023-02-18 03:34:40 +00:00
readme.md Update build instructions 2023-02-18 13:34:20 +00:00

readme.md

Ona

Table of Contents

  1. Overview
  2. Goals
  3. Technical Details
    1. Requirements
    2. Building
    3. Project Structure
      1. No Headers
      2. All Code is Equal

Overview

Ona is a straightforward game engine with the aim of staying reasonably lightweight through its

Ona is also the Catalan word for "wave".

Goals

  • Fully-featured two-dimensional raster and vector-derived rendering capabilities.

  • Support major computer gaming ecosystems; Namely Microsoft Windows, SteamOS, and GNU Linux systems running on X11 or Wayland.

  • Avoid shipping external dependencies beyond the executible itself.

  • 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 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.

  • One data serialization and configuration system to rule them all backed by the Kym scripting language.

  • Opt-in overhead via a native C plug-in interface that allows for systems-level programmers to easily extend engine-level functionality and scripting language library tools.

Technical Details

Requirements

Ona currently depends the following third-party tools to build it:

  • Clang / LLVM toolchain with full C++20 support or above.
  • Python interpreter version 3.10 or above.

Additionally, Ona depends on the following third-party system-wide dependencies:

  • SDL2 version 2.0.20 or above.

As the project evolves, dependencies on libraries external to the project codebase will be minimized or removed outright to meet the goals of the project as closely as possible.

Building

Once all third-party tools and system-wide dependencies are satisfied, navigate to the root project folder and run the ./build.py Python build script.

By default, the build script will build the engine runtime, required for running games built with Ona, in release-debug mode.

Project Structure

As Ona uses C++20, it is able to make use of the new modules language feature. While this brings with it a number of drawbacks, like a lack of widescale vendor adoption, it also provides some key benefits.

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.

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.