No description
  • C++ 87.6%
  • CMake 7.1%
  • Makefile 1.8%
  • Nix 1.8%
  • Shell 1.1%
  • Other 0.6%
Find a file
Martin Larsson b48828eb38
Feature/17/improve query caching (#33)
* Remove cumsum cache invalidation

* Refactor ECS queries to use archetype versioning for cache invalidation

* Improve query caching:
- Systems no longer own a filtered list of affected archetypes, that is
  directly delegated to the query.
- The query now holds a vector of entity tuples from each archetype
  rather than a combination of all of them. This allows for partial
cache updates. This also simplifies the cache build pipeline as the
memory directly mirrors how its stored in the archetypes.
- Drastically improve frame time and cpu usage by changing the threading
  rules of the chunks in each system. I cant explain why this helps, see
comment about it, but it consistently drastically improves frame time
and cpu usage across all operating systems, and a high and mid pc.

* Add partial cache maintenance, read changes that happened during the
frame and incrementally update cache instead of rebuilding it. This
drastically improves frame times and increase overall perf by about 10%

* Fix spelling errors in comments

* Make sure we dont crash if we try to process a change with an empty
components structure.

* Make sure to always update the cache buckets version, no matter which
cache maintenance method were using

* Add explicit return types to some methods in query.hpp

---------

Co-authored-by: Martin Larsson <larssonmartin1998-mac@Martins-MacBook-Pro.local>
2025-11-17 00:09:51 +01:00
.github/workflows Fix Mac Apple Silicon CI build failure in non-nix-build.yaml (#30) 2025-07-31 20:00:15 +02:00
generated Remove module traits include from generated file. 2025-02-18 00:28:01 +00:00
include fix: Error handling when dereferencing std::expected from clock.get_total_time_without_first_frame(). (#25) 2025-07-16 22:28:06 +02:00
modules/hephaestus Feature/17/improve query caching (#33) 2025-11-17 00:09:51 +01:00
src feat: Use miliseconds as time unit for measurement + light refactor 2025-07-10 00:34:12 +02:00
tests Feature/17/improve query caching (#33) 2025-11-17 00:09:51 +01:00
vcpkg@b509a07261 Add Non-Nix and Windows support for development using vcpkg, also add CI testrunners to keep this working 2025-07-16 23:05:02 +02:00
.clang-format style: Update clang-format for more readable code. 2025-06-22 01:20:49 +02:00
.clang-tidy Implement const-aware component access for ECS systems to enable better parallel scheduling 2025-07-01 00:30:54 +02:00
.gitignore Add Non-Nix and Windows support for development using vcpkg, also add CI testrunners to keep this working 2025-07-16 23:05:02 +02:00
.gitmodules Add Non-Nix and Windows support for development using vcpkg, also add CI testrunners to keep this working 2025-07-16 23:05:02 +02:00
BUILD.md Fix so workflows runs on master, not main and develop, fix Ubuntu C++23 2025-07-17 01:43:36 +02:00
CMakeLists.txt Fix so workflows runs on master, not main and develop, fix Ubuntu C++23 2025-07-17 01:43:36 +02:00
flake.lock Upgrade nixpkgs 2025-06-19 14:26:18 +02:00
flake.nix Add Non-Nix and Windows support for development using vcpkg, also add CI testrunners to keep this working 2025-07-16 23:05:02 +02:00
Makefile Add Non-Nix and Windows support for development using vcpkg, also add CI testrunners to keep this working 2025-07-16 23:05:02 +02:00
README.md Add Non-Nix and Windows support for development using vcpkg, also add CI testrunners to keep this working 2025-07-16 23:05:02 +02:00
setup-vcpkg.bat Add Non-Nix and Windows support for development using vcpkg, also add CI testrunners to keep this working 2025-07-16 23:05:02 +02:00
setup-vcpkg.sh Add Non-Nix and Windows support for development using vcpkg, also add CI testrunners to keep this working 2025-07-16 23:05:02 +02:00
SetupModules.cmake Simplify modules, use type index to store them instead of enum which has 2025-02-17 17:48:05 +00:00
vcpkg.json Add Non-Nix and Windows support for development using vcpkg, also add CI testrunners to keep this working 2025-07-16 23:05:02 +02:00
VcpkgSetup.cmake Add Non-Nix and Windows support for development using vcpkg, also add CI testrunners to keep this working 2025-07-16 23:05:02 +02:00

Atlas

Overview

Atlas is a modular, compile-time-configurable C++23 game engine designed for performance, clarity, and developer ergonomics. It emphasizes clean architecture, predictable behavior, and a Unix-inspired workflow.

Atlas is built for flexibility: everything is opt-in. Systems like ECS, rendering, physics, and networking are exposed as modular components that can be toggled per game project. This allows developers to tailor the engine to fit the exact needs of their game without including unnecessary bloat.

Naming Scheme

Atlas follows a naming convention inspired by Greek mythology:

  • Atlas — The core of the engine.
  • Modules — Named after gods (e.g. Hephaestus for ECS, Iris for the renderer).
  • Games — Named after demi-gods (e.g. Daedalus is a reference project built on Atlas).

Features

  • Modular Architecture — Compile-time selection of modules for clean builds.
  • Hephaestus ECS Module — High-performance, cache-friendly SoA ECS with multithreaded system execution.
  • Zero Dependency Core — Modules depend on external libraries, but the core engine stays minimal.
  • Cross-Platform Support — Linux-first, but designed with Mac & Windows as first class citizens.
  • Modern C++23 — Full usage of modern language features.
  • Nix — Full Nix Support, providing a reproducible and portable environment.

Getting Started

Atlas is intended to be included as a Git submodule in your own game repository.

# If using https
git submodule add https://github.com/LarssonMartin1998/atlas.git atlas
# If using ssh
git submodule add git@github.com:LarssonMartin1998/atlas.git atlas

git submodule update --init --recursive --force

Note: You don't need a game repo to develop Atlas, the build instructions also apply to just the engine, but use make test instead of make run.


Build Instructions

  • Build your game (You'll find the output binary in your_game_repo/result/bin/your_game_name):
nix build .

Nix workflow for development

  • Enter development shell:
nix develop

This gives you a fully configured environment with the correct compiler and tools. For a full list of dependencies, see flake.nix. When inside the nix shell, refer to the Non-Nix Users section for working with the game/engine.

To cross-compile for Windows from Linux using Nix:

This uses an example from the Daedalus project. You can refer to the flake.nix in that repository as a working example. Change the name from Daedalus to whatever you choose to name your game project.

nix build .#daedalus-windows

This produces a Windows-compatible executable in ./result/bin/daedalus.exe.

Make sure your flake defines a packages.daedalus-windows output using pkgs.pkgsCross.mingwW64 and a separate xstdenv.mkDerivation.


Non-Nix Users

⚠️ Important: Atlas is designed with Nix as the first-class citizen build environment. While we provide alternative build instructions, they may need additional configuration.

For detailed non-Nix build instructions, see BUILD.md.

💡 Recommendation: Consider using the Nix environment even on non-NixOS systems for the most reliable development experience.


Notes

Atlas is in active development and not production-ready yet. Contributions, feedback, and curiosity are welcome!

Check out Daedalus to see Atlas in action.


License

Atlas is licensed under the MIT License. See LICENSE for details.