Aeternalis Evolution, a custom-engine persistent evolutionary MMO. This first commit establishes the project skeleton: - Architecture and design docs: project vision, system overview, engineering constitution, roadmap, 19 ADRs, and the simulation, world, network, persistence and infrastructure architectures. - Headless engineering proof: deterministic synthetic particles, component lifecycle, explicit PRNG streams, canonical snapshots and restored execution. - Build and tooling: CMake 3.28+ / Ninja presets, C++23 feature check, clang-format and clang-tidy config, format check script, Windows check script, and a Docker build context. - Tests: unit tests, benchmarks, a snapshot fuzz target and CLI integration wiring. No gameplay, renderer, network service or running deployment yet. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
54 lines
1.6 KiB
C++
54 lines
1.6 KiB
C++
#include "evo/simulation/world.hpp"
|
|
|
|
#include <chrono>
|
|
#include <exception>
|
|
#include <iostream>
|
|
|
|
int main() try {
|
|
try {
|
|
constexpr std::uint64_t seed = 123456;
|
|
constexpr std::uint32_t count = 10'000;
|
|
constexpr std::uint64_t ticks = 1'000;
|
|
evo::SimulationWorld world{seed};
|
|
for (std::uint32_t index = 0; index < count; ++index) {
|
|
if (!world.create_entity()) {
|
|
return 1;
|
|
}
|
|
}
|
|
const auto start = std::chrono::steady_clock::now();
|
|
for (std::uint64_t tick = 0; tick < ticks; ++tick) {
|
|
if (!world.tick()) {
|
|
return 1;
|
|
}
|
|
}
|
|
const auto elapsed =
|
|
std::chrono::duration<double>(std::chrono::steady_clock::now() - start);
|
|
std::cout << "{\"benchmark\":\"synthetic_tick\",\"seed\":" << seed
|
|
<< ",\"entities\":" << count << ",\"ticks\":" << ticks
|
|
<< ",\"seconds\":" << elapsed.count() << ",\"state_hash\":\"" << std::hex
|
|
<< world.state_hash() << "\",\"compiler\":\""
|
|
#if defined(__clang__)
|
|
<< "Clang " << __clang_version__
|
|
#elif defined(_MSC_VER)
|
|
<< "MSVC " << _MSC_VER
|
|
#elif defined(__GNUC__)
|
|
<< "GCC " << __VERSION__
|
|
#else
|
|
<< "unknown"
|
|
#endif
|
|
<< "\",\"build\":\""
|
|
#if defined(NDEBUG)
|
|
<< "release"
|
|
#else
|
|
<< "debug"
|
|
#endif
|
|
<< "\"}\n";
|
|
return 0;
|
|
} catch (const std::exception& error) {
|
|
std::cerr << error.what() << '\n';
|
|
return 1;
|
|
}
|
|
} catch (...) {
|
|
return 1;
|
|
}
|