faultline-sim 0.1.0b2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- faultline_sim-0.1.0b2/CHANGELOG.md +19 -0
- faultline_sim-0.1.0b2/CMakeLists.txt +40 -0
- faultline_sim-0.1.0b2/CONTRIBUTING.md +66 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/CMakeLists.txt +237 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/README.md +233 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/data/README.md +1 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/app/fixed_step_runner.hpp +23 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/core/diagnostics/diagnostics.hpp +25 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/core/events/ordered_buffer.hpp +22 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/core/id/id.hpp +43 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/core/rng/deterministic_rng.cpp +41 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/core/rng/deterministic_rng.hpp +21 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/core/rng/stable_hash.hpp +34 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/core/time/simulation_clock.hpp +30 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/persistence/binary.hpp +120 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/persistence/save.cpp +545 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/persistence/save.hpp +47 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/persistence/schema_v1.hpp +64 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/persistence/schema_v10.hpp +10 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/persistence/schema_v11.hpp +11 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/persistence/schema_v12.hpp +12 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/persistence/schema_v13.hpp +18 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/persistence/schema_v14.hpp +18 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/persistence/schema_v2.hpp +20 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/persistence/schema_v3.hpp +13 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/persistence/schema_v4.hpp +11 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/persistence/schema_v6.hpp +11 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/persistence/schema_v7.hpp +11 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/persistence/schema_v8.hpp +10 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/persistence/schema_v9.hpp +104 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/combat/combat_state.hpp +52 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/combat/combat_system.cpp +200 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/combat/combat_system.hpp +50 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/factions/faction_state.hpp +85 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/factions/faction_system.cpp +392 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/factions/faction_system.hpp +23 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/history/history_state.hpp +36 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/history/history_system.cpp +281 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/history/history_system.hpp +12 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/market/market_state.hpp +38 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/market/market_system.cpp +159 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/market/market_system.hpp +13 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/missions/mission_state.hpp +324 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/missions/mission_system.cpp +814 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/missions/mission_system.hpp +61 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/npc/character_ai.cpp +180 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/npc/character_ai.hpp +58 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/npc/npc_state.hpp +41 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/npc/npc_system.cpp +326 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/npc/npc_system.hpp +23 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/player/player_script.hpp +15 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/player/player_state.hpp +31 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/player/player_system.cpp +162 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/player/player_system.hpp +13 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/police/police_state.hpp +131 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/police/police_system.cpp +516 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/police/police_system.hpp +47 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/prologue/prologue_state.hpp +29 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/prologue/prologue_system.cpp +242 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/prologue/prologue_system.hpp +28 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/runtime/game.cpp +252 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/runtime/game.hpp +90 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/runtime/game_state.hpp +50 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/story/story_state.hpp +33 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/story/story_system.cpp +209 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/story/story_system.hpp +15 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/territory/territory_state.hpp +45 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/territory/territory_system.cpp +201 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/territory/territory_system.hpp +21 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/vehicles/vehicle_state.hpp +46 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/vehicles/vehicle_system.cpp +423 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/simulation/vehicles/vehicle_system.hpp +18 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/generation/actor_generation.hpp +21 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/generation/actor_hash.cpp +44 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/generation/actor_names.hpp +52 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/generation/actor_validation.cpp +162 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/generation/faction_generation.cpp +134 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/generation/npc_generation.cpp +59 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/generation/relationship_generation.cpp +66 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/generation/urban_generation.cpp +258 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/generation/urban_generation.hpp +26 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/generation/urban_hash.cpp +50 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/generation/urban_types.hpp +58 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/generation/urban_validation.cpp +113 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/generation/world_generator.cpp +303 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/generation/world_generator.hpp +70 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/geometry/rect.hpp +47 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/geometry/rect_index.hpp +59 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/spatial/character_movement.cpp +68 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/spatial/character_movement.hpp +21 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/spatial/spatial_grid.hpp +62 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/spatial/streaming.cpp +109 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/spatial/streaming.hpp +33 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/spatial/world_position.hpp +54 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/state/actor_types.hpp +158 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/state/stores.hpp +71 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/state/vehicle_types.hpp +86 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/state/world_state.cpp +296 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/src/world/state/world_state.hpp +54 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/actor_tests.cpp +154 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/character_ai_tests.cpp +258 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/combat_tests.cpp +141 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/core_tests.cpp +94 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/determinism/character_ai_process.cmake +22 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/determinism/combat_process.cmake +11 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/determinism/history_process.cmake +14 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/determinism/map2d_process.cmake +88 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/determinism/player_process.cmake +21 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/determinism/police_process.cmake +16 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/determinism/prologue_process.cmake +21 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/determinism/simulation_process.cmake +28 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/determinism/story_process.cmake +12 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/determinism/vehicle_process.cmake +20 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/determinism/worldgen_process.cmake +12 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/faction_simulation_tests.cpp +276 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/fixtures/README.md +194 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/fixtures/create_v1_reference.ps1 +69 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/fixtures/phase16_writer.patch +665 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/fixtures/save_v10_phase16.flsave +0 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/fixtures/save_v11_phase18.flsave +0 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/fixtures/save_v12_phase19.flsave +0 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/fixtures/save_v1_reference.flsave +0 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/fixtures/save_v2_phase9.flsave +0 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/fixtures/save_v3_phase10.flsave +0 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/fixtures/save_v4_phase11.flsave +0 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/fixtures/save_v5_phase11.flsave +0 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/fixtures/save_v6_phase12.flsave +0 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/fixtures/save_v7_completed_history.flsave +0 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/fixtures/save_v7_phase13.flsave +0 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/fixtures/save_v8_phase14.flsave +0 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/fixtures/save_v9_phase15.flsave +0 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/history_tests.cpp +199 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/legacy_save_v1.hpp +39 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/map2d_tests.cpp +651 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/market_simulation_tests.cpp +231 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/mission_tests.cpp +314 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/npc_simulation_tests.cpp +315 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/persistence_tests.cpp +301 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/player_controller_tests.cpp +480 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/police_tests.cpp +379 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/prologue_tests.cpp +563 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/runtime_tests.cpp +68 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/save_compatibility.hpp +33 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/spatial_tests.cpp +76 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/store_tests.cpp +48 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/story_tests.cpp +181 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/territory_simulation_tests.cpp +427 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/urban_tests.cpp +139 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/vehicle_collision_tests.cpp +126 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/vehicle_tests.cpp +293 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/vendor/LICENSE.txt +21 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/vendor/README.md +3 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/vendor/doctest.h +7106 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tests/worldgen_tests.cpp +63 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tools/activate_toolchain.ps1 +17 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tools/bootstrap_windows.py +63 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tools/build.ps1 +18 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tools/characters/main.cpp +164 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tools/combat/main.cpp +38 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tools/history/main.cpp +77 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tools/map2d/main.cpp +1303 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tools/player/main.cpp +80 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tools/police/main.cpp +63 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tools/prologue/main.cpp +159 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tools/recover_phase16_fixture.py +29 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tools/savecheck/main.cpp +40 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tools/simulator/main.cpp +196 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tools/story/main.cpp +80 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tools/vehicles/main.cpp +221 -0
- faultline_sim-0.1.0b2/FAULTLINE_GAME_V1/tools/worldgen/main.cpp +128 -0
- faultline_sim-0.1.0b2/LICENSE +202 -0
- faultline_sim-0.1.0b2/LICENSING.md +27 -0
- faultline_sim-0.1.0b2/NOTICE +31 -0
- faultline_sim-0.1.0b2/PKG-INFO +59 -0
- faultline_sim-0.1.0b2/README.md +357 -0
- faultline_sim-0.1.0b2/ROADMAP.md +14 -0
- faultline_sim-0.1.0b2/SECURITY.md +40 -0
- faultline_sim-0.1.0b2/THIRD_PARTY_LICENSES.md +61 -0
- faultline_sim-0.1.0b2/docs/README.md +120 -0
- faultline_sim-0.1.0b2/docs/agent_framework/ARCHITECTURE.md +63 -0
- faultline_sim-0.1.0b2/docs/agent_framework/BENCHMARKS.md +57 -0
- faultline_sim-0.1.0b2/docs/agent_framework/BENCHMARK_RESULTS.md +42 -0
- faultline_sim-0.1.0b2/docs/agent_framework/CPP_SDK.md +71 -0
- faultline_sim-0.1.0b2/docs/agent_framework/DECISION_LOG.md +16 -0
- faultline_sim-0.1.0b2/docs/agent_framework/DEMO.md +34 -0
- faultline_sim-0.1.0b2/docs/agent_framework/DETERMINISM.md +15 -0
- faultline_sim-0.1.0b2/docs/agent_framework/DISTRIBUTION.md +56 -0
- faultline_sim-0.1.0b2/docs/agent_framework/EXTERNAL_CONSUMER.md +18 -0
- faultline_sim-0.1.0b2/docs/agent_framework/FILE_CHANGES.md +65 -0
- faultline_sim-0.1.0b2/docs/agent_framework/FL_NAVIGATION.md +50 -0
- faultline_sim-0.1.0b2/docs/agent_framework/GOOD_FIRST_ISSUES.md +11 -0
- faultline_sim-0.1.0b2/docs/agent_framework/KNOWN_ISSUES.md +15 -0
- faultline_sim-0.1.0b2/docs/agent_framework/MASTER_PLAN.md +17 -0
- faultline_sim-0.1.0b2/docs/agent_framework/MODEL_INTEGRATION.md +42 -0
- faultline_sim-0.1.0b2/docs/agent_framework/NEXT_ACTIONS.md +11 -0
- faultline_sim-0.1.0b2/docs/agent_framework/OPEN_SOURCE_DOSSIER.md +83 -0
- faultline_sim-0.1.0b2/docs/agent_framework/PERFORMANCE.md +53 -0
- faultline_sim-0.1.0b2/docs/agent_framework/PHASE_STATUS.md +18 -0
- faultline_sim-0.1.0b2/docs/agent_framework/PUBLICATION.md +130 -0
- faultline_sim-0.1.0b2/docs/agent_framework/PYTHON_SDK.md +40 -0
- faultline_sim-0.1.0b2/docs/agent_framework/QUICK_START.md +48 -0
- faultline_sim-0.1.0b2/docs/agent_framework/RC_AUDIT.md +58 -0
- faultline_sim-0.1.0b2/docs/agent_framework/RELEASE.md +32 -0
- faultline_sim-0.1.0b2/docs/agent_framework/RELEASE_ANNOUNCEMENT.md +16 -0
- faultline_sim-0.1.0b2/docs/agent_framework/REPRODUCIBILITY.md +45 -0
- faultline_sim-0.1.0b2/docs/agent_framework/SCIENTIFIC_FILES.md +33 -0
- faultline_sim-0.1.0b2/docs/agent_framework/SCIENTIFIC_PROTOCOL.md +74 -0
- faultline_sim-0.1.0b2/docs/agent_framework/SCIENTIFIC_RESULTS.md +49 -0
- faultline_sim-0.1.0b2/docs/agent_framework/SCIENTIFIC_STATUS.md +20 -0
- faultline_sim-0.1.0b2/docs/agent_framework/TEST_EVIDENCE.md +181 -0
- faultline_sim-0.1.0b2/docs/agent_framework/TUTORIAL.md +37 -0
- faultline_sim-0.1.0b2/docs/agent_framework/third_party/pybind11.LICENSE +29 -0
- faultline_sim-0.1.0b2/examples/model_agent.py +34 -0
- faultline_sim-0.1.0b2/examples/navigation_agent.py +32 -0
- faultline_sim-0.1.0b2/examples/python_quickstart.py +25 -0
- faultline_sim-0.1.0b2/examples/text_policy.py +22 -0
- faultline_sim-0.1.0b2/pyproject.toml +39 -0
- faultline_sim-0.1.0b2/python/bindings.cpp +88 -0
- faultline_sim-0.1.0b2/python/faultline_sim/__init__.py +17 -0
- faultline_sim-0.1.0b2/python/faultline_sim/__main__.py +98 -0
- faultline_sim-0.1.0b2/python/faultline_sim/_native.pyi +95 -0
- faultline_sim-0.1.0b2/python/faultline_sim/adaptation.py +66 -0
- faultline_sim-0.1.0b2/python/faultline_sim/agents.py +55 -0
- faultline_sim-0.1.0b2/python/faultline_sim/benchmark.py +101 -0
- faultline_sim-0.1.0b2/python/faultline_sim/continuity.py +33 -0
- faultline_sim-0.1.0b2/python/faultline_sim/llm.py +41 -0
- faultline_sim-0.1.0b2/python/faultline_sim/model.py +195 -0
- faultline_sim-0.1.0b2/python/faultline_sim/model_worker.py +33 -0
- faultline_sim-0.1.0b2/python/faultline_sim/navigation.py +113 -0
- faultline_sim-0.1.0b2/python/faultline_sim/py.typed +0 -0
- faultline_sim-0.1.0b2/python/faultline_sim/qualification.py +210 -0
- faultline_sim-0.1.0b2/python/faultline_sim/replay.py +223 -0
- faultline_sim-0.1.0b2/python/faultline_sim/scientific.py +226 -0
- faultline_sim-0.1.0b2/requirements/qualification.txt +12 -0
- faultline_sim-0.1.0b2/sdk/include/faultline/simulation.hpp +94 -0
- faultline_sim-0.1.0b2/sdk/simulation.cpp +240 -0
- faultline_sim-0.1.0b2/tests/native_consumer/CMakeLists.txt +13 -0
- faultline_sim-0.1.0b2/tests/native_consumer/main.cpp +100 -0
- faultline_sim-0.1.0b2/tests/python/test_benchmark.py +85 -0
- faultline_sim-0.1.0b2/tests/python/test_model.py +112 -0
- faultline_sim-0.1.0b2/tests/python/test_navigation.py +75 -0
- faultline_sim-0.1.0b2/tests/python/test_replay.py +78 -0
- faultline_sim-0.1.0b2/tests/python/test_scientific.py +53 -0
- faultline_sim-0.1.0b2/tests/python/test_simulation.py +73 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0b2 local qualification
|
|
4
|
+
|
|
5
|
+
- Added four versioned route challenge levels and measured 4,800 held-out episodes.
|
|
6
|
+
- Added typed model actions, a bounded HTTP transport and inference-free replay.
|
|
7
|
+
- Qualified Windows and Linux on CPython 3.12 and 3.14 with a source archive and SBOM.
|
|
8
|
+
- Added a standalone consumer, performance probes, and snapshot and trace fuzz harnesses.
|
|
9
|
+
- Recorded the local GLIBC portability limit and separate real-model evaluation status.
|
|
10
|
+
|
|
11
|
+
## 0.1.0b1
|
|
12
|
+
|
|
13
|
+
- Added the CPU-only C++ simulation SDK and CPython bindings to the existing engine.
|
|
14
|
+
- Added Gymnasium Navigation, Continuity and Adaptation plus random, heuristic,
|
|
15
|
+
planning and offline text policies.
|
|
16
|
+
- Added canonical replay and a benchmark CLI with split seeds, per-episode
|
|
17
|
+
exports and result comparison.
|
|
18
|
+
- Qualified the original game engine, native consumer and local Windows/Linux
|
|
19
|
+
wheels. See the [measured evidence](docs/agent_framework/TEST_EVIDENCE.md).
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.20)
|
|
2
|
+
project(FaultlineFramework VERSION 0.1.0 LANGUAGES CXX)
|
|
3
|
+
|
|
4
|
+
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
|
5
|
+
include(CTest)
|
|
6
|
+
endif()
|
|
7
|
+
|
|
8
|
+
# The same static engine libraries can also be linked into the Python module.
|
|
9
|
+
set(BUILD_SHARED_LIBS OFF)
|
|
10
|
+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
11
|
+
add_subdirectory(FAULTLINE_GAME_V1)
|
|
12
|
+
|
|
13
|
+
add_library(faultline_sdk STATIC sdk/simulation.cpp)
|
|
14
|
+
add_library(faultline::sdk ALIAS faultline_sdk)
|
|
15
|
+
target_compile_features(faultline_sdk PUBLIC cxx_std_20)
|
|
16
|
+
target_include_directories(faultline_sdk PUBLIC sdk/include)
|
|
17
|
+
target_link_libraries(faultline_sdk PRIVATE faultline_persistence)
|
|
18
|
+
set_target_properties(faultline_sdk PROPERTIES CXX_EXTENSIONS OFF)
|
|
19
|
+
if(MSVC)
|
|
20
|
+
target_compile_options(faultline_sdk PRIVATE /W4 /permissive-)
|
|
21
|
+
else()
|
|
22
|
+
target_compile_options(faultline_sdk PRIVATE -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion)
|
|
23
|
+
endif()
|
|
24
|
+
|
|
25
|
+
option(FAULTLINE_BUILD_PYTHON "Build the Python extension" OFF)
|
|
26
|
+
if(FAULTLINE_BUILD_PYTHON)
|
|
27
|
+
set(PYBIND11_FINDPYTHON ON)
|
|
28
|
+
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
|
|
29
|
+
find_package(pybind11 CONFIG REQUIRED)
|
|
30
|
+
pybind11_add_module(_native NO_EXTRAS python/bindings.cpp)
|
|
31
|
+
target_link_libraries(_native PRIVATE faultline::sdk)
|
|
32
|
+
install(TARGETS _native
|
|
33
|
+
LIBRARY DESTINATION faultline_sim COMPONENT python
|
|
34
|
+
RUNTIME DESTINATION faultline_sim COMPONENT python)
|
|
35
|
+
endif()
|
|
36
|
+
|
|
37
|
+
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR AND BUILD_TESTING)
|
|
38
|
+
set(FAULTLINE_SDK_EMBEDDED_TEST ON)
|
|
39
|
+
add_subdirectory(tests/native_consumer)
|
|
40
|
+
endif()
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Contributing to FAULTLINE
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in FAULTLINE, an independent C++ game and world simulation project. Contributions to the engine, tests, technical documentation, and tooling are welcome.
|
|
4
|
+
|
|
5
|
+
FAULTLINE is under active development. The design specifications contain both implemented behavior and future goals; please check the current source and tests before relying on a specification as an implementation guarantee.
|
|
6
|
+
|
|
7
|
+
## Getting started
|
|
8
|
+
|
|
9
|
+
For changes to the agent framework, configure CMake from the repository root.
|
|
10
|
+
Build `faultline_native_consumer` and run `ctest -R framework_native_consumer`.
|
|
11
|
+
Use the installed-wheel test procedure for changes to Python. Include the seed,
|
|
12
|
+
scenario version and expected outcome for benchmark changes. Use development
|
|
13
|
+
seeds while tuning. See the [framework quick start](docs/agent_framework/QUICK_START.md)
|
|
14
|
+
and [benchmark contract](docs/agent_framework/BENCHMARKS.md).
|
|
15
|
+
|
|
16
|
+
For route challenges, compare proposed changes on development seeds and
|
|
17
|
+
record the protocol before a held-out run. Check action replay and native
|
|
18
|
+
state hashes. Use an isolated wheel consumer for Python changes and include
|
|
19
|
+
the exact Python and dependency versions in your report. See the
|
|
20
|
+
[scientific protocol](docs/agent_framework/SCIENTIFIC_PROTOCOL.md) and
|
|
21
|
+
[independent consumer procedure](docs/agent_framework/EXTERNAL_CONSUMER.md).
|
|
22
|
+
|
|
23
|
+
1. Read the root [README.md](README.md) and the relevant technical specification.
|
|
24
|
+
2. Check existing GitHub issues and pull requests before starting work. For substantial architectural changes, open an issue first to discuss scope and trade-offs.
|
|
25
|
+
3. Fork the repository, clone your fork, and create a focused branch from the default branch.
|
|
26
|
+
4. Build and test the project. The current game source is in `FAULTLINE_GAME_V1/`; use its build configuration and existing test instructions.
|
|
27
|
+
|
|
28
|
+
A conventional CMake workflow, run from the repository root, is shown below. This is a starting point, not a verified clean-install recipe; dependency setup and supported configurations must be confirmed against the current source.
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
cmake -S FAULTLINE_GAME_V1 -B FAULTLINE_GAME_V1/build -DCMAKE_BUILD_TYPE=Release
|
|
32
|
+
cmake --build FAULTLINE_GAME_V1/build --config Release --parallel
|
|
33
|
+
ctest --test-dir FAULTLINE_GAME_V1/build -C Release --output-on-failure
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Engineering guidelines
|
|
37
|
+
|
|
38
|
+
- Follow the existing C++ style and architecture. Keep changes small, purposeful, and easy to review.
|
|
39
|
+
- Preserve deterministic behavior where it is required. Use explicit seeds, stable ordering, and controlled inputs in tests. Avoid introducing nondeterministic state transitions.
|
|
40
|
+
- Treat persistent state, entity identity, serialization, schema evolution, and world-streaming boundaries as correctness-sensitive interfaces.
|
|
41
|
+
- Add regression tests for bugs and new behavior. Include relevant edge cases and failure paths, not only successful scenarios.
|
|
42
|
+
- For performance changes, provide the workload, environment, measurement method, and before/after results. Do not claim unmeasured improvements.
|
|
43
|
+
- Update relevant documentation when behavior changes. Distinguish planned behavior from implemented and tested behavior.
|
|
44
|
+
- Avoid committing generated builds, local configuration, credentials, or unnecessary binary files.
|
|
45
|
+
|
|
46
|
+
## Reporting bugs
|
|
47
|
+
|
|
48
|
+
Include the commit or version, operating system and compiler, steps to reproduce, expected and actual behavior, relevant logs, and a minimal reproduction if possible. For simulation failures, include the seed, tick count, configuration, and relevant state hashes when available. Remove private information from logs and attachments.
|
|
49
|
+
|
|
50
|
+
## Pull requests
|
|
51
|
+
|
|
52
|
+
Before submitting a PR:
|
|
53
|
+
|
|
54
|
+
- Describe the problem, proposed solution, and scope.
|
|
55
|
+
- Explain any architectural or persistence-format changes and compatibility implications.
|
|
56
|
+
- Report which tests were run, the results, and any limitations. Do not report tests as passed if they were not executed.
|
|
57
|
+
- Link relevant issues and specifications.
|
|
58
|
+
- Confirm you have the rights to submit your changes under the project's applicable license.
|
|
59
|
+
|
|
60
|
+
Reviews may request additional tests, documentation, or narrower changes before merging. A passing test suite does not automatically establish correctness for every simulation scenario.
|
|
61
|
+
|
|
62
|
+
## Licensing and assets
|
|
63
|
+
|
|
64
|
+
Original code, tests, and technical documentation are contributed under Apache-2.0, as described in [LICENSING.md](LICENSING.md). Do not submit third-party code, assets, music, textures, or generated material unless you have the necessary rights and can document the applicable terms. Preserve all required copyright and license notices. Proprietary creative assets are outside the default code license.
|
|
65
|
+
|
|
66
|
+
See [LICENSE](LICENSE) and [THIRD_PARTY_LICENSES.md](THIRD_PARTY_LICENSES.md) for more information.
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.20)
|
|
2
|
+
project(FAULTLINE VERSION 0.1.0 LANGUAGES CXX)
|
|
3
|
+
set(CMAKE_CXX_STANDARD 20)
|
|
4
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
5
|
+
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
6
|
+
include(CTest)
|
|
7
|
+
add_library(faultline_core src/core/rng/deterministic_rng.cpp)
|
|
8
|
+
target_include_directories(faultline_core PUBLIC src)
|
|
9
|
+
target_compile_features(faultline_core PUBLIC cxx_std_20)
|
|
10
|
+
function(faultline_warnings target)
|
|
11
|
+
if(MSVC)
|
|
12
|
+
target_compile_options(${target} PRIVATE /W4 /permissive-)
|
|
13
|
+
else()
|
|
14
|
+
target_compile_options(${target} PRIVATE -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion)
|
|
15
|
+
endif()
|
|
16
|
+
endfunction()
|
|
17
|
+
faultline_warnings(faultline_core)
|
|
18
|
+
add_library(faultline_world src/world/state/world_state.cpp src/world/spatial/streaming.cpp src/world/spatial/character_movement.cpp
|
|
19
|
+
src/world/generation/world_generator.cpp src/world/generation/urban_generation.cpp
|
|
20
|
+
src/world/generation/urban_validation.cpp src/world/generation/urban_hash.cpp
|
|
21
|
+
src/world/generation/faction_generation.cpp src/world/generation/npc_generation.cpp
|
|
22
|
+
src/world/generation/relationship_generation.cpp src/world/generation/actor_hash.cpp src/world/generation/actor_validation.cpp)
|
|
23
|
+
target_link_libraries(faultline_world PUBLIC faultline_core)
|
|
24
|
+
faultline_warnings(faultline_world)
|
|
25
|
+
add_library(faultline_simulation src/simulation/runtime/game.cpp src/simulation/factions/faction_system.cpp src/simulation/npc/npc_system.cpp src/simulation/npc/character_ai.cpp src/simulation/territory/territory_system.cpp src/simulation/market/market_system.cpp src/simulation/history/history_system.cpp src/simulation/story/story_system.cpp src/simulation/missions/mission_system.cpp src/simulation/prologue/prologue_system.cpp src/simulation/player/player_system.cpp src/simulation/combat/combat_system.cpp src/simulation/police/police_system.cpp src/simulation/vehicles/vehicle_system.cpp)
|
|
26
|
+
target_link_libraries(faultline_simulation PUBLIC faultline_world)
|
|
27
|
+
# story_system.cpp is already included in faultline_simulation.
|
|
28
|
+
faultline_warnings(faultline_simulation)
|
|
29
|
+
add_library(faultline_persistence src/persistence/save.cpp)
|
|
30
|
+
target_link_libraries(faultline_persistence PUBLIC faultline_simulation)
|
|
31
|
+
faultline_warnings(faultline_persistence)
|
|
32
|
+
add_executable(faultline_sim tools/simulator/main.cpp)
|
|
33
|
+
target_link_libraries(faultline_sim PRIVATE faultline_persistence)
|
|
34
|
+
faultline_warnings(faultline_sim)
|
|
35
|
+
add_executable(faultline_worldgen tools/worldgen/main.cpp)
|
|
36
|
+
target_link_libraries(faultline_worldgen PRIVATE faultline_world)
|
|
37
|
+
faultline_warnings(faultline_worldgen)
|
|
38
|
+
add_executable(faultline_savecheck tools/savecheck/main.cpp)
|
|
39
|
+
target_link_libraries(faultline_savecheck PRIVATE faultline_persistence)
|
|
40
|
+
faultline_warnings(faultline_savecheck)
|
|
41
|
+
add_executable(faultline_history tools/history/main.cpp)
|
|
42
|
+
add_executable(faultline_story tools/story/main.cpp)
|
|
43
|
+
target_link_libraries(faultline_story PRIVATE faultline_persistence)
|
|
44
|
+
faultline_warnings(faultline_story)
|
|
45
|
+
target_link_libraries(faultline_history PRIVATE faultline_persistence)
|
|
46
|
+
faultline_warnings(faultline_history)
|
|
47
|
+
add_executable(faultline_prologue tools/prologue/main.cpp)
|
|
48
|
+
target_link_libraries(faultline_prologue PRIVATE faultline_persistence)
|
|
49
|
+
faultline_warnings(faultline_prologue)
|
|
50
|
+
add_executable(faultline_player tools/player/main.cpp)
|
|
51
|
+
target_link_libraries(faultline_player PRIVATE faultline_persistence)
|
|
52
|
+
faultline_warnings(faultline_player)
|
|
53
|
+
add_executable(faultline_characters tools/characters/main.cpp)
|
|
54
|
+
target_link_libraries(faultline_characters PRIVATE faultline_persistence)
|
|
55
|
+
faultline_warnings(faultline_characters)
|
|
56
|
+
add_executable(faultline_combat tools/combat/main.cpp)
|
|
57
|
+
target_link_libraries(faultline_combat PRIVATE faultline_persistence)
|
|
58
|
+
faultline_warnings(faultline_combat)
|
|
59
|
+
add_executable(faultline_police tools/police/main.cpp)
|
|
60
|
+
target_link_libraries(faultline_police PRIVATE faultline_persistence)
|
|
61
|
+
faultline_warnings(faultline_police)
|
|
62
|
+
add_executable(faultline_vehicles tools/vehicles/main.cpp)
|
|
63
|
+
target_link_libraries(faultline_vehicles PRIVATE faultline_persistence)
|
|
64
|
+
faultline_warnings(faultline_vehicles)
|
|
65
|
+
add_executable(faultline_map2d tools/map2d/main.cpp)
|
|
66
|
+
target_link_libraries(faultline_map2d PRIVATE faultline_persistence)
|
|
67
|
+
faultline_warnings(faultline_map2d)
|
|
68
|
+
if(BUILD_TESTING)
|
|
69
|
+
add_executable(faultline_story_tests tests/story_tests.cpp)
|
|
70
|
+
target_include_directories(faultline_story_tests SYSTEM PRIVATE tests/vendor)
|
|
71
|
+
target_compile_definitions(faultline_story_tests PRIVATE FAULTLINE_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
|
72
|
+
target_link_libraries(faultline_story_tests PRIVATE faultline_persistence)
|
|
73
|
+
faultline_warnings(faultline_story_tests)
|
|
74
|
+
add_test(NAME story_tests COMMAND faultline_story_tests)
|
|
75
|
+
set_tests_properties(story_tests PROPERTIES LABELS "fast;story;determinism;persistence;simulation")
|
|
76
|
+
add_test(NAME story_standard_100 COMMAND faultline_story --range 1 100 --fixture-prologue)
|
|
77
|
+
set_tests_properties(story_standard_100 PROPERTIES TIMEOUT 900 LABELS "story;stress;determinism")
|
|
78
|
+
add_test(NAME story_process_determinism COMMAND ${CMAKE_COMMAND} -DSTORY=$<TARGET_FILE:faultline_story>
|
|
79
|
+
-P ${CMAKE_CURRENT_SOURCE_DIR}/tests/determinism/story_process.cmake)
|
|
80
|
+
set_tests_properties(story_process_determinism PROPERTIES TIMEOUT 120 LABELS "fast;story;determinism")
|
|
81
|
+
add_executable(faultline_history_tests tests/history_tests.cpp)
|
|
82
|
+
target_include_directories(faultline_history_tests SYSTEM PRIVATE tests/vendor)
|
|
83
|
+
target_compile_definitions(faultline_history_tests PRIVATE FAULTLINE_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
|
84
|
+
target_link_libraries(faultline_history_tests PRIVATE faultline_persistence)
|
|
85
|
+
faultline_warnings(faultline_history_tests)
|
|
86
|
+
add_test(NAME history_tests COMMAND faultline_history_tests)
|
|
87
|
+
set_tests_properties(history_tests PROPERTIES LABELS "fast;history;simulation;determinism;persistence")
|
|
88
|
+
add_test(NAME history_mass_1000 COMMAND faultline_history --range 1 1000 --small --fixture-prologue --replay)
|
|
89
|
+
add_test(NAME history_standard_250 COMMAND faultline_history --range 1 250 --fixture-prologue --replay)
|
|
90
|
+
set_tests_properties(history_mass_1000 history_standard_250 PROPERTIES TIMEOUT 900 LABELS "history;mass;stress;simulation;determinism")
|
|
91
|
+
add_test(NAME history_process_determinism COMMAND ${CMAKE_COMMAND} -DHISTORY=$<TARGET_FILE:faultline_history>
|
|
92
|
+
-P ${CMAKE_CURRENT_SOURCE_DIR}/tests/determinism/history_process.cmake)
|
|
93
|
+
set_tests_properties(history_process_determinism PROPERTIES TIMEOUT 120 LABELS "fast;history;determinism")
|
|
94
|
+
add_executable(faultline_tests tests/core_tests.cpp tests/runtime_tests.cpp tests/store_tests.cpp tests/spatial_tests.cpp tests/worldgen_tests.cpp tests/urban_tests.cpp tests/actor_tests.cpp)
|
|
95
|
+
target_include_directories(faultline_tests SYSTEM PRIVATE tests/vendor)
|
|
96
|
+
target_link_libraries(faultline_tests PRIVATE faultline_persistence)
|
|
97
|
+
faultline_warnings(faultline_tests)
|
|
98
|
+
add_executable(faultline_persistence_tests tests/persistence_tests.cpp)
|
|
99
|
+
target_include_directories(faultline_persistence_tests SYSTEM PRIVATE tests/vendor)
|
|
100
|
+
target_compile_definitions(faultline_persistence_tests PRIVATE FAULTLINE_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}" FAULTLINE_TEST_BINARY_DIR="${CMAKE_CURRENT_BINARY_DIR}")
|
|
101
|
+
target_link_libraries(faultline_persistence_tests PRIVATE faultline_persistence)
|
|
102
|
+
faultline_warnings(faultline_persistence_tests)
|
|
103
|
+
add_test(NAME persistence_tests COMMAND faultline_persistence_tests)
|
|
104
|
+
add_executable(faultline_faction_tests tests/faction_simulation_tests.cpp)
|
|
105
|
+
target_include_directories(faultline_faction_tests SYSTEM PRIVATE tests/vendor)
|
|
106
|
+
target_compile_definitions(faultline_faction_tests PRIVATE FAULTLINE_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
|
107
|
+
target_link_libraries(faultline_faction_tests PRIVATE faultline_persistence)
|
|
108
|
+
faultline_warnings(faultline_faction_tests)
|
|
109
|
+
add_test(NAME faction_tests COMMAND faultline_faction_tests)
|
|
110
|
+
add_executable(faultline_npc_tests tests/npc_simulation_tests.cpp)
|
|
111
|
+
target_include_directories(faultline_npc_tests SYSTEM PRIVATE tests/vendor)
|
|
112
|
+
target_compile_definitions(faultline_npc_tests PRIVATE FAULTLINE_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
|
113
|
+
target_link_libraries(faultline_npc_tests PRIVATE faultline_persistence)
|
|
114
|
+
faultline_warnings(faultline_npc_tests)
|
|
115
|
+
add_test(NAME npc_tests COMMAND faultline_npc_tests)
|
|
116
|
+
add_executable(faultline_market_tests tests/market_simulation_tests.cpp)
|
|
117
|
+
target_include_directories(faultline_market_tests SYSTEM PRIVATE tests/vendor)
|
|
118
|
+
target_compile_definitions(faultline_market_tests PRIVATE FAULTLINE_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
|
119
|
+
target_link_libraries(faultline_market_tests PRIVATE faultline_persistence)
|
|
120
|
+
faultline_warnings(faultline_market_tests)
|
|
121
|
+
add_test(NAME market_tests COMMAND faultline_market_tests "--test-case-exclude=five year*")
|
|
122
|
+
add_test(NAME market_multi_year COMMAND faultline_market_tests "--test-case=five year*")
|
|
123
|
+
set_tests_properties(market_tests PROPERTIES LABELS "fast;market;determinism;persistence;simulation")
|
|
124
|
+
set_tests_properties(market_multi_year PROPERTIES TIMEOUT 900 LABELS "market;stress;simulation")
|
|
125
|
+
add_test(NAME market_standard_multi_year COMMAND faultline_sim --range 1 10 --days 1825)
|
|
126
|
+
set_tests_properties(market_standard_multi_year PROPERTIES TIMEOUT 900 LABELS "market;stress;simulation")
|
|
127
|
+
add_executable(faultline_territory_tests tests/territory_simulation_tests.cpp)
|
|
128
|
+
target_include_directories(faultline_territory_tests SYSTEM PRIVATE tests/vendor)
|
|
129
|
+
target_compile_definitions(faultline_territory_tests PRIVATE FAULTLINE_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
|
130
|
+
target_link_libraries(faultline_territory_tests PRIVATE faultline_persistence)
|
|
131
|
+
faultline_warnings(faultline_territory_tests)
|
|
132
|
+
add_test(NAME territory_tests COMMAND faultline_territory_tests)
|
|
133
|
+
set_tests_properties(territory_tests PROPERTIES LABELS "fast;territory;simulation;determinism;persistence")
|
|
134
|
+
set_tests_properties(npc_tests PROPERTIES LABELS "fast;npc;relationships;simulation;determinism;persistence")
|
|
135
|
+
add_executable(faultline_mission_tests tests/mission_tests.cpp)
|
|
136
|
+
target_include_directories(faultline_mission_tests SYSTEM PRIVATE tests/vendor)
|
|
137
|
+
target_compile_definitions(faultline_mission_tests PRIVATE FAULTLINE_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
|
138
|
+
target_link_libraries(faultline_mission_tests PRIVATE faultline_persistence)
|
|
139
|
+
faultline_warnings(faultline_mission_tests)
|
|
140
|
+
add_test(NAME mission_tests COMMAND faultline_mission_tests)
|
|
141
|
+
set_tests_properties(mission_tests PROPERTIES LABELS "fast;mission;determinism;persistence;simulation")
|
|
142
|
+
add_executable(faultline_prologue_tests tests/prologue_tests.cpp)
|
|
143
|
+
target_include_directories(faultline_prologue_tests SYSTEM PRIVATE tests/vendor)
|
|
144
|
+
target_compile_definitions(faultline_prologue_tests PRIVATE FAULTLINE_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
|
145
|
+
target_link_libraries(faultline_prologue_tests PRIVATE faultline_persistence)
|
|
146
|
+
faultline_warnings(faultline_prologue_tests)
|
|
147
|
+
add_test(NAME prologue_tests COMMAND faultline_prologue_tests)
|
|
148
|
+
set_tests_properties(prologue_tests PROPERTIES LABELS "fast;prologue;determinism;persistence;mission;story;history")
|
|
149
|
+
add_test(NAME prologue_process_determinism COMMAND ${CMAKE_COMMAND} -DPROLOGUE=$<TARGET_FILE:faultline_prologue>
|
|
150
|
+
-P ${CMAKE_CURRENT_SOURCE_DIR}/tests/determinism/prologue_process.cmake)
|
|
151
|
+
set_tests_properties(prologue_process_determinism PROPERTIES TIMEOUT 120 LABELS "fast;prologue;determinism")
|
|
152
|
+
add_executable(faultline_player_tests tests/player_controller_tests.cpp)
|
|
153
|
+
target_include_directories(faultline_player_tests SYSTEM PRIVATE tests/vendor)
|
|
154
|
+
target_compile_definitions(faultline_player_tests PRIVATE FAULTLINE_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
|
155
|
+
target_link_libraries(faultline_player_tests PRIVATE faultline_persistence)
|
|
156
|
+
faultline_warnings(faultline_player_tests)
|
|
157
|
+
add_test(NAME player_controller_tests COMMAND faultline_player_tests)
|
|
158
|
+
set_tests_properties(player_controller_tests PROPERTIES LABELS "fast;player;movement;determinism;persistence;simulation")
|
|
159
|
+
add_test(NAME player_process_determinism COMMAND ${CMAKE_COMMAND} -DPLAYER=$<TARGET_FILE:faultline_player>
|
|
160
|
+
-P ${CMAKE_CURRENT_SOURCE_DIR}/tests/determinism/player_process.cmake)
|
|
161
|
+
set_tests_properties(player_process_determinism PROPERTIES TIMEOUT 120 LABELS "fast;player;determinism")
|
|
162
|
+
add_test(NAME player_batch_25 COMMAND faultline_player --range 1 25 --ticks 12000)
|
|
163
|
+
set_tests_properties(player_batch_25 PROPERTIES TIMEOUT 900 LABELS "player;movement;determinism;stress;persistence")
|
|
164
|
+
add_executable(faultline_character_ai_tests tests/character_ai_tests.cpp)
|
|
165
|
+
target_include_directories(faultline_character_ai_tests SYSTEM PRIVATE tests/vendor)
|
|
166
|
+
target_link_libraries(faultline_character_ai_tests PRIVATE faultline_persistence)
|
|
167
|
+
faultline_warnings(faultline_character_ai_tests)
|
|
168
|
+
add_test(NAME character_ai_tests COMMAND faultline_character_ai_tests)
|
|
169
|
+
set_tests_properties(character_ai_tests PROPERTIES LABELS "fast;character_ai;npc;movement;determinism;persistence;simulation")
|
|
170
|
+
add_test(NAME character_ai_process_determinism COMMAND ${CMAKE_COMMAND}
|
|
171
|
+
-DCHARACTER_AI=$<TARGET_FILE:faultline_characters>
|
|
172
|
+
-P ${CMAKE_CURRENT_SOURCE_DIR}/tests/determinism/character_ai_process.cmake)
|
|
173
|
+
set_tests_properties(character_ai_process_determinism PROPERTIES TIMEOUT 180 LABELS "fast;character_ai;determinism")
|
|
174
|
+
add_test(NAME character_ai_batch_10 COMMAND faultline_characters --range 1 10 --ticks 1000)
|
|
175
|
+
set_tests_properties(character_ai_batch_10 PROPERTIES TIMEOUT 900 LABELS "character_ai;npc;movement;determinism;stress;persistence")
|
|
176
|
+
add_executable(faultline_combat_tests tests/combat_tests.cpp)
|
|
177
|
+
target_include_directories(faultline_combat_tests SYSTEM PRIVATE tests/vendor)
|
|
178
|
+
target_compile_definitions(faultline_combat_tests PRIVATE FAULTLINE_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
|
179
|
+
target_link_libraries(faultline_combat_tests PRIVATE faultline_persistence)
|
|
180
|
+
faultline_warnings(faultline_combat_tests)
|
|
181
|
+
add_test(NAME combat_tests COMMAND faultline_combat_tests)
|
|
182
|
+
set_tests_properties(combat_tests PROPERTIES LABELS "fast;combat;determinism;persistence;simulation")
|
|
183
|
+
add_test(NAME combat_process_determinism COMMAND ${CMAKE_COMMAND} -DCOMBAT=$<TARGET_FILE:faultline_combat> -P ${CMAKE_CURRENT_SOURCE_DIR}/tests/determinism/combat_process.cmake)
|
|
184
|
+
set_tests_properties(combat_process_determinism PROPERTIES TIMEOUT 180 LABELS "fast;combat;determinism")
|
|
185
|
+
add_test(NAME combat_stress_100 COMMAND faultline_combat --range 1 100 --rounds 30)
|
|
186
|
+
set_tests_properties(combat_stress_100 PROPERTIES TIMEOUT 900 LABELS "combat;stress;determinism;persistence")
|
|
187
|
+
add_executable(faultline_police_tests tests/police_tests.cpp)
|
|
188
|
+
target_include_directories(faultline_police_tests SYSTEM PRIVATE tests/vendor)
|
|
189
|
+
target_compile_definitions(faultline_police_tests PRIVATE FAULTLINE_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
|
190
|
+
target_link_libraries(faultline_police_tests PRIVATE faultline_persistence)
|
|
191
|
+
faultline_warnings(faultline_police_tests)
|
|
192
|
+
add_test(NAME police_tests COMMAND faultline_police_tests)
|
|
193
|
+
set_tests_properties(police_tests PROPERTIES LABELS "fast;police;witness;determinism;persistence;simulation")
|
|
194
|
+
add_test(NAME police_process_determinism COMMAND ${CMAKE_COMMAND} -DPOLICE=$<TARGET_FILE:faultline_police> -P ${CMAKE_CURRENT_SOURCE_DIR}/tests/determinism/police_process.cmake)
|
|
195
|
+
set_tests_properties(police_process_determinism PROPERTIES TIMEOUT 180 LABELS "fast;police;witness;determinism;persistence")
|
|
196
|
+
add_test(NAME police_stress_100 COMMAND faultline_police --range 1 100 --ticks 240)
|
|
197
|
+
set_tests_properties(police_stress_100 PROPERTIES TIMEOUT 900 LABELS "police;witness;stress;determinism;persistence")
|
|
198
|
+
add_executable(faultline_vehicle_tests tests/vehicle_tests.cpp)
|
|
199
|
+
target_include_directories(faultline_vehicle_tests SYSTEM PRIVATE tests/vendor)
|
|
200
|
+
target_compile_definitions(faultline_vehicle_tests PRIVATE FAULTLINE_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
|
201
|
+
target_link_libraries(faultline_vehicle_tests PRIVATE faultline_persistence)
|
|
202
|
+
faultline_warnings(faultline_vehicle_tests)
|
|
203
|
+
add_test(NAME vehicle_tests COMMAND faultline_vehicle_tests)
|
|
204
|
+
set_tests_properties(vehicle_tests PROPERTIES LABELS "fast;vehicle;driving;determinism;persistence;simulation")
|
|
205
|
+
add_test(NAME vehicle_process_determinism COMMAND ${CMAKE_COMMAND} -DVEHICLES=$<TARGET_FILE:faultline_vehicles>
|
|
206
|
+
-P ${CMAKE_CURRENT_SOURCE_DIR}/tests/determinism/vehicle_process.cmake)
|
|
207
|
+
set_tests_properties(vehicle_process_determinism PROPERTIES TIMEOUT 180 LABELS "fast;vehicle;driving;determinism;persistence")
|
|
208
|
+
add_test(NAME vehicle_stress_100 COMMAND faultline_vehicles --range 1 100 --ticks 240)
|
|
209
|
+
set_tests_properties(vehicle_stress_100 PROPERTIES TIMEOUT 900 LABELS "vehicle;driving;stress;determinism;persistence")
|
|
210
|
+
set_tests_properties(faction_tests PROPERTIES LABELS "fast;simulation;factions;determinism;persistence")
|
|
211
|
+
add_test(NAME simulation_process_determinism COMMAND ${CMAKE_COMMAND} -DSIMULATOR=$<TARGET_FILE:faultline_sim>
|
|
212
|
+
-P ${CMAKE_CURRENT_SOURCE_DIR}/tests/determinism/simulation_process.cmake)
|
|
213
|
+
add_test(NAME simulation_long_run COMMAND faultline_sim --seed 12345 --days 365)
|
|
214
|
+
add_test(NAME simulation_batch_250 COMMAND faultline_sim --range 1 250 --days 30)
|
|
215
|
+
add_test(NAME simulation_year_batch_25 COMMAND faultline_sim --range 1 25 --days 365)
|
|
216
|
+
set_tests_properties(simulation_process_determinism PROPERTIES TIMEOUT 120 LABELS "fast;determinism;simulation;factions;npc;territory")
|
|
217
|
+
set_tests_properties(simulation_long_run PROPERTIES TIMEOUT 120 LABELS "simulation;factions;npc;territory;stress")
|
|
218
|
+
set_tests_properties(simulation_batch_250 simulation_year_batch_25 PROPERTIES TIMEOUT 900 LABELS "simulation;factions;npc;territory;stress")
|
|
219
|
+
set_tests_properties(persistence_tests PROPERTIES LABELS "fast;determinism;persistence")
|
|
220
|
+
add_test(NAME foundation_tests COMMAND faultline_tests)
|
|
221
|
+
add_test(NAME worldgen_checkpoint COMMAND faultline_worldgen --seed 12345 --validate)
|
|
222
|
+
add_test(NAME worldgen_mass_1000 COMMAND faultline_worldgen --range 1 1000 --validate)
|
|
223
|
+
add_test(NAME worldgen_process_determinism COMMAND ${CMAKE_COMMAND} -DWORLDGEN=$<TARGET_FILE:faultline_worldgen>
|
|
224
|
+
-P ${CMAKE_CURRENT_SOURCE_DIR}/tests/determinism/worldgen_process.cmake)
|
|
225
|
+
set_tests_properties(foundation_tests worldgen_checkpoint PROPERTIES LABELS "fast")
|
|
226
|
+
set_tests_properties(worldgen_process_determinism PROPERTIES TIMEOUT 120 LABELS "fast;determinism")
|
|
227
|
+
set_tests_properties(worldgen_mass_1000 PROPERTIES TIMEOUT 900 LABELS "worldgen;mass;stress")
|
|
228
|
+
add_executable(faultline_map2d_tests tests/map2d_tests.cpp)
|
|
229
|
+
target_include_directories(faultline_map2d_tests SYSTEM PRIVATE tests/vendor)
|
|
230
|
+
target_link_libraries(faultline_map2d_tests PRIVATE faultline_persistence)
|
|
231
|
+
faultline_warnings(faultline_map2d_tests)
|
|
232
|
+
add_test(NAME map2d_tests COMMAND faultline_map2d_tests)
|
|
233
|
+
set_tests_properties(map2d_tests PROPERTIES LABELS "fast;map2d;determinism")
|
|
234
|
+
add_test(NAME map2d_process_determinism COMMAND ${CMAKE_COMMAND} -DMAP2D=$<TARGET_FILE:faultline_map2d> -DCOMBAT=$<TARGET_FILE:faultline_combat> -DV12=${CMAKE_CURRENT_SOURCE_DIR}/tests/fixtures/save_v12_phase19.flsave
|
|
235
|
+
-P ${CMAKE_CURRENT_SOURCE_DIR}/tests/determinism/map2d_process.cmake)
|
|
236
|
+
set_tests_properties(map2d_process_determinism PROPERTIES LABELS "fast;map2d;determinism")
|
|
237
|
+
endif()
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# FAULTLINE — Game and Simulation Engine
|
|
2
|
+
|
|
3
|
+
**Build a world that remembers.**
|
|
4
|
+
|
|
5
|
+
> **Current checkpoint:** Phase 21 — Vehicles implemented and full Release verified on Windows.
|
|
6
|
+
> GameVersion `0.1.0` · GeneratorVersion `3` · SaveFormatVersion `14` · StateHash `FAULTLINE.state.v16`.
|
|
7
|
+
> The full canonical Release build/test gate passed on Windows from a clean GitHub clone (42/42 CTest tests). Phase 22 has not started at this checkpoint.
|
|
8
|
+
|
|
9
|
+
FAULTLINE is a purpose-built C++20 engine for a procedural crime sandbox with a persistent, deterministic world. The engine separates authoritative simulation from rendering and platform input, allowing worlds, actors, factions, missions and vehicles to be exercised through headless tools and automated tests.
|
|
10
|
+
|
|
11
|
+
The current project is an engine and simulation prototype, not a finished playable game or a production-ready SDK. Its development history and the scope of verified implementations are documented in [DEVELOPMENT_STATUS.md](DEVELOPMENT_STATUS.md) and the [Phase 21 verification report](docs/PHASE21_VERIFICATION.md).
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
Run the following commands from this directory (`FAULTLINE_GAME_V1/`).
|
|
16
|
+
|
|
17
|
+
### Prerequisites
|
|
18
|
+
|
|
19
|
+
- CMake 3.20 or newer (as required by [CMakeLists.txt](CMakeLists.txt)).
|
|
20
|
+
- A C++20-capable compiler and a supported CMake build tool.
|
|
21
|
+
- Git to clone the project. Python and PowerShell are only needed for the optional Windows tooling below.
|
|
22
|
+
|
|
23
|
+
The runtime libraries have no external library dependencies. Tests use the vendored doctest 2.4.11 single header under the MIT license ([license](tests/vendor/LICENSE.txt), [upstream information](tests/vendor/README.md)).
|
|
24
|
+
|
|
25
|
+
### Clone, build and test
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
git clone https://github.com/LuCa1506s/FAULTLINE.git
|
|
29
|
+
cd FAULTLINE/FAULTLINE_GAME_V1
|
|
30
|
+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
|
|
31
|
+
cmake --build build --config Debug
|
|
32
|
+
ctest --test-dir build -C Debug --output-on-failure
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The commands use standard CMake tooling. Full Release verification passed on Windows from a fresh GitHub clone and on Ubuntu 24.04 through GitHub Actions (42/42 CTest tests on each platform). Multi-configuration generators (such as Visual Studio) may place executables under `build/Debug/` or `build/Release/` instead of `build/`.
|
|
36
|
+
|
|
37
|
+
### Optional portable Windows toolchain
|
|
38
|
+
|
|
39
|
+
The Windows bootstrap installs development tools locally in `.tools/`, without requiring a system-wide compiler installation:
|
|
40
|
+
|
|
41
|
+
```powershell
|
|
42
|
+
python tools/bootstrap_windows.py
|
|
43
|
+
powershell -NoProfile -ExecutionPolicy Bypass -File tools/build.ps1
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The bootstrap is documented to download CMake 4.4.4, Ninja 1.13.2 and w64devkit 2.10.1. The build script uses Ninja and g++, and runs the complete CTest suite after building. For Release:
|
|
47
|
+
|
|
48
|
+
```powershell
|
|
49
|
+
powershell -NoProfile -ExecutionPolicy Bypass -File tools/build.ps1 -Configuration Release
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The execution policy option applies to that child PowerShell process only. For manual use, activate the portable toolchain in your shell with `./tools/activate_toolchain.ps1` (dot-source the script). Debug output goes to `build/`, Release output to `build-release/`.
|
|
53
|
+
|
|
54
|
+
## Architecture
|
|
55
|
+
|
|
56
|
+
The main library dependencies point inward:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
faultline_sim / gameplay tools
|
|
60
|
+
|
|
|
61
|
+
v
|
|
62
|
+
faultline_persistence
|
|
63
|
+
|
|
|
64
|
+
v
|
|
65
|
+
faultline_simulation
|
|
66
|
+
|
|
|
67
|
+
v
|
|
68
|
+
faultline_world
|
|
69
|
+
|
|
|
70
|
+
v
|
|
71
|
+
faultline_core
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
| Module | Responsibility |
|
|
75
|
+
| --- | --- |
|
|
76
|
+
| `faultline_core` | Typed IDs, deterministic RNG, canonical hashing, integer simulation time and diagnostics. |
|
|
77
|
+
| `faultline_world` | Entity and component stores, spatial indexing, streaming, versioned world generation and validation. |
|
|
78
|
+
| `faultline_simulation` | GameState, ordered commands, domain events, factions, NPCs, territories, markets, history, story, missions, player movement, combat, police and vehicles. |
|
|
79
|
+
| `faultline_persistence` | Versioned binary saves, validation, historical migrations and semantic-state restoration. |
|
|
80
|
+
| Headless tools | World generation, simulation, save inspection, history, story, prologue, player, characters, combat, police, vehicles and SVG map inspection. |
|
|
81
|
+
|
|
82
|
+
The authoritative simulation is single-threaded and independent of rendering and window/input devices. The fixed simulation tick is 50 ms (20 Hz). Renderer and platform code stay outside the simulation libraries; `FixedStepRunner` belongs to the application boundary. See [determinism contracts](docs/DETERMINISM.md) and the [source-file inventory](docs/FILE_INDEX.md).
|
|
83
|
+
|
|
84
|
+
## Implemented systems
|
|
85
|
+
|
|
86
|
+
| Area | Current scope |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| World generation | Versioned M1/M2/M3 generation: geography, roads, districts, parcels, buildings, faction territories, major NPCs and relationships. |
|
|
89
|
+
| Strategic simulation | Scheduled faction operations, territorial control, district markets, NPC activities and relationships, four-year strategic history. |
|
|
90
|
+
| Story and missions | Semantic story graph, generic mission lifecycle/objectives and the FIRST DELIVERY prologue. |
|
|
91
|
+
| Player and NPC movement | Fixed-tick physical player, static swept collision, active NPC movement and deterministic streaming residency. |
|
|
92
|
+
| Combat and police | Weapon definitions, ammo/cooldowns/reload, damage/death, witnesses, delayed crime reports, wanted-state logic and arrests. |
|
|
93
|
+
| Vehicles | V1 civilian and police cars, persistent identity, streaming bodies, enter/exit, driving, static collisions and save/load. |
|
|
94
|
+
| Persistence | Save format v14, StateHash v16, bounded encoding, historical migration and validation. |
|
|
95
|
+
| Visualization | Non-authoritative 2D SVG debug maps of generated worlds and saved state. |
|
|
96
|
+
|
|
97
|
+
The table describes implemented foundations, not complete gameplay systems. For example, full traffic scheduling, production rendering and Phase 22 content are not part of the current checkpoint.
|
|
98
|
+
|
|
99
|
+
## Run headless demos
|
|
100
|
+
|
|
101
|
+
Examples below use the portable Windows Debug build layout. For Linux or other Unix-like environments, omit `.exe`; for multi-configuration generators, adjust the executable directory as described above. From a standard Windows PowerShell shell:
|
|
102
|
+
|
|
103
|
+
### Generate and inspect a world
|
|
104
|
+
|
|
105
|
+
```powershell
|
|
106
|
+
./build/faultline_worldgen.exe --seed 12345 --validate
|
|
107
|
+
./build/faultline_worldgen.exe --seed 12345 --dump-factions --dump-npcs
|
|
108
|
+
./build/faultline_worldgen.exe --range 1 1000 --validate
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
GeneratorVersion 3 is the default. Versions 1 and 2 remain available with their historical BaseWorldHash contracts. M1 defines bounded geography and a connected road network; M2 adds parcels and urban geometry; M3 adds factions, NPCs and relationships. See [M2 generation](docs/WORLDGEN_M2.md) and [M3 generation](docs/WORLDGEN_M3.md).
|
|
112
|
+
|
|
113
|
+
### Simulate, save and resume
|
|
114
|
+
|
|
115
|
+
```powershell
|
|
116
|
+
./build/faultline_sim.exe --seed 12345 --days 30 --save ./build/seed12345.flsave
|
|
117
|
+
./build/faultline_sim.exe --load ./build/seed12345.flsave --days 335
|
|
118
|
+
./build/faultline_savecheck.exe --inspect ./build/seed12345.flsave
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
The headless simulator reports faction strategy, NPC activity, territory and market updates, and StateHash. Scheduled aggregate advancement skips only idle ticks; it uses the same authoritative tick pipeline at scheduled boundaries.
|
|
122
|
+
|
|
123
|
+
### History, prologue and player systems
|
|
124
|
+
|
|
125
|
+
```powershell
|
|
126
|
+
./build/faultline_history.exe --seed 12345 --fixture-prologue --replay --save ./build/history.flsave
|
|
127
|
+
./build/faultline_story.exe --load ./build/history.flsave
|
|
128
|
+
./build/faultline_prologue.exe --seed 12345 --verbose
|
|
129
|
+
./build/faultline_player.exe --seed 12345 --ticks 12000 --save ./build/player.flsave
|
|
130
|
+
./build/faultline_characters.exe --seed 12345 --ticks 1200
|
|
131
|
+
./build/faultline_combat.exe --seed 12345 --rounds 6
|
|
132
|
+
./build/faultline_police.exe --seed 12345 --ticks 240
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
The synthetic prologue fixture used by history/story tools is distinct from the runtime FIRST DELIVERY mission. These demos are headless and do not require a renderer.
|
|
136
|
+
|
|
137
|
+
### Phase 21: vehicles
|
|
138
|
+
|
|
139
|
+
```powershell
|
|
140
|
+
./build/faultline_vehicles.exe --seed 12345 --ticks 240 --save ./build/vehicles.flsave
|
|
141
|
+
./build/faultline_vehicles.exe --range 1 100 --ticks 240
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Vehicles have a persistent `VehiclePersistentId` independent of their transient physical `EntityId`. Fresh games seed a deterministic fleet from the road graph; loading and migration do not generate a new fleet. Streaming materializes and abstracts vehicle bodies, preserving semantic state and residency leases. V1 supports Sedan, Hatchback and PoliceCruiser archetypes, enter/exit, fixed-tick driving, and static swept collision with bounded damage.
|
|
145
|
+
|
|
146
|
+
### 2D debug map viewer
|
|
147
|
+
|
|
148
|
+
```powershell
|
|
149
|
+
./build/faultline_map2d.exe --seed 12345 --output ./build/seed12345.svg
|
|
150
|
+
./build/faultline_map2d.exe --seed 12345 --runtime --output ./build/runtime12345.svg --labels
|
|
151
|
+
./build/faultline_map2d.exe --load ./build/player.flsave --output ./build/save.svg
|
|
152
|
+
./build/faultline_map2d.exe --seed 12345 --output ./build/seed12345.svg --diagnostics
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Open the generated SVG in a browser. Map2D is a non-authoritative inspection tool: it does not advance simulation or change RNG, persistent schemas or state hashes. Raw seed mode has no player or physical NPCs. Runtime seed mode creates the canonical player and streaming residency without advancing a tick. See [Map2D documentation](docs/MAP2D_DEBUG_VIEWER.md).
|
|
156
|
+
|
|
157
|
+
## Testing and verification
|
|
158
|
+
|
|
159
|
+
After building, CTest provides fast, focused and stress suites:
|
|
160
|
+
|
|
161
|
+
```sh
|
|
162
|
+
ctest --test-dir build -C Debug -L fast --output-on-failure
|
|
163
|
+
ctest --test-dir build -C Debug -L persistence --output-on-failure
|
|
164
|
+
ctest --test-dir build -C Debug -R "vehicle|persistence|police" -LE stress --output-on-failure
|
|
165
|
+
ctest --test-dir build -C Debug -L stress --output-on-failure
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Fast or focused tests do not replace the full canonical milestone gate. For a clean Release validation:
|
|
169
|
+
|
|
170
|
+
```sh
|
|
171
|
+
cmake -S . -B build-release -DCMAKE_BUILD_TYPE=Release
|
|
172
|
+
cmake --build build-release --config Release
|
|
173
|
+
ctest --test-dir build-release -C Release --output-on-failure
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Recorded Phase 21 evidence
|
|
177
|
+
|
|
178
|
+
The [Phase 21 report](docs/PHASE21_VERIFICATION.md) records the following results after the review repairs:
|
|
179
|
+
|
|
180
|
+
| Check | Recorded result |
|
|
181
|
+
| --- | --- |
|
|
182
|
+
| Focused vehicle, persistence and police suites | 5/5 passed |
|
|
183
|
+
| Mass-seed vehicle run | 100/100 worlds, zero skipped |
|
|
184
|
+
| Simulation ticks per world | 240 |
|
|
185
|
+
| Vehicles encountered | 4,464 (1,488 police; 2,976 civilian) |
|
|
186
|
+
| Save, continuation, StateHash and identity mismatches | 0 in the tested scenarios |
|
|
187
|
+
| Additional deterministic collision cases | 5 passed |
|
|
188
|
+
| Vehicle mass-run BatchHash | `51e56c4d84beb3ec` |
|
|
189
|
+
|
|
190
|
+
These results are historical recorded evidence, not a fresh independent test run of the current GitHub commit. The report states that the full-tree build could not finish linking `faultline_history.exe` because another Windows process held the executable open. A subsequent clean-clone Release run on Windows passed all 42 CTest tests, including 14 stress tests. The subsequent Linux GitHub Actions run also passed 42/42 CTest tests.
|
|
191
|
+
|
|
192
|
+
## Persistence and determinism
|
|
193
|
+
|
|
194
|
+
| Contract | Current version |
|
|
195
|
+
| --- | --- |
|
|
196
|
+
| GameVersion | `0.1.0` |
|
|
197
|
+
| GeneratorVersion | `3` |
|
|
198
|
+
| SaveFormatVersion | `14` |
|
|
199
|
+
| StateHash | `FAULTLINE.state.v16` |
|
|
200
|
+
| VehicleSimulationVersion | `1` |
|
|
201
|
+
|
|
202
|
+
Save v14 adds the VehicleSimulation section with semantic vehicle state, driving identity and residency leases. Physical vehicle bodies are transient and are rebuilt on load. Legacy migration initializes a neutral vehicle simulation without seeding a new fleet or consuming gameplay RNG. See [Save format v14](docs/SAVE_FORMAT_V14.md) for validation and migration rules.
|
|
203
|
+
|
|
204
|
+
Historical world-generation hash contracts remain unchanged: v1 `2938f0ca42162bc9`, v2 `5f3a446fe0d2f974`, v3 `888c5dbd10c15886`.
|
|
205
|
+
|
|
206
|
+
## Scope and limitations
|
|
207
|
+
|
|
208
|
+
- Phase 21 is a V1 car simulation foundation, not a complete traffic or vehicle-physics engine.
|
|
209
|
+
- Streaming uses fixed 512 m activation and 640 m deactivation radii; the driven vehicle is pinned. Velocity-based prefetch is deferred.
|
|
210
|
+
- No inter-district vehicle travel/arrival scheduling, traffic density simulation, motorcycle/boat/aircraft gameplay, advanced tuning or police response vehicles is implemented in this checkpoint.
|
|
211
|
+
- No production renderer or complete playable game is claimed. Map2D is a debug tool.
|
|
212
|
+
- The Windows clean-clone and Linux GitHub Actions Release gates have passed. Hosted Windows CI also passed all 42 CTest tests. Phase 22 is outside this checkpoint.
|
|
213
|
+
|
|
214
|
+
## Documentation and development history
|
|
215
|
+
|
|
216
|
+
| Topic | Reference |
|
|
217
|
+
| --- | --- |
|
|
218
|
+
| Current checkpoint and historical phases | [DEVELOPMENT_STATUS.md](DEVELOPMENT_STATUS.md) |
|
|
219
|
+
| Published architecture and specifications | [Technical index](../docs/TECHNICAL_INDEX.md) |
|
|
220
|
+
| Determinism and source layout | [Determinism](docs/DETERMINISM.md), [File index](docs/FILE_INDEX.md) |
|
|
221
|
+
| Strategic simulation | [Factions](docs/FACTION_SIMULATION_M1.md), [NPCs](docs/NPC_SEMANTIC_M1.md), [Territory](docs/TERRITORY_M1.md), [Market](docs/MARKET_M1.md) |
|
|
222
|
+
| History and story | [Strategic history](docs/STRATEGIC_HISTORY.md), [Story graph](docs/STORY_GRAPH.md), [First delivery](docs/FIRST_DELIVERY.md) |
|
|
223
|
+
| Player, AI and combat | [Player controller](docs/PLAYER_CONTROLLER.md), [Character AI](docs/CHARACTER_AI.md), [Combat](docs/COMBAT.md) |
|
|
224
|
+
| Police | [Witness and police](docs/WITNESS_POLICE.md), [Phase 20 verification](docs/PHASE20_VERIFICATION.md) |
|
|
225
|
+
| Vehicles | [Phase 21 verification](docs/PHASE21_VERIFICATION.md), [Save v14](docs/SAVE_FORMAT_V14.md) |
|
|
226
|
+
|
|
227
|
+
Earlier phase reports are historical checkpoints; older version numbers and deferred features in those reports must not be interpreted as the current state. The public technical specifications describe design goals and may include features not implemented yet. The current code and development status are the implementation reference.
|
|
228
|
+
|
|
229
|
+
## Contributing and license
|
|
230
|
+
|
|
231
|
+
See [CONTRIBUTING.md](../CONTRIBUTING.md) for contribution guidelines. Preserve deterministic behavior, persistent identity and historical save compatibility; add reproducible tests for changes to simulation contracts.
|
|
232
|
+
|
|
233
|
+
Original project code and technical documentation are licensed under [Apache License 2.0](../LICENSE), subject to the scope and exceptions in [LICENSING.md](../LICENSING.md). Third-party materials retain their own licenses; see [THIRD_PARTY_LICENSES.md](../THIRD_PARTY_LICENSES.md). The identified third-party inventory is documented; remaining provenance and binary redistribution checks are tracked in the inventory.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Runtime definitions will live here when their roadmap phase is implemented.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
#include "core/time/simulation_clock.hpp"
|
|
3
|
+
|
|
4
|
+
namespace faultline {
|
|
5
|
+
// Application-owned elapsed time; backlog is retained rather than dropping ticks.
|
|
6
|
+
class FixedStepRunner {
|
|
7
|
+
public:
|
|
8
|
+
void addTime(std::chrono::nanoseconds elapsed) {
|
|
9
|
+
if (elapsed.count() < 0) throw std::invalid_argument("Negative elapsed time");
|
|
10
|
+
if (elapsed.count() > std::numeric_limits<std::int64_t>::max() - accumulated_.count())
|
|
11
|
+
throw std::overflow_error("Fixed step accumulator overflow");
|
|
12
|
+
accumulated_ += elapsed;
|
|
13
|
+
}
|
|
14
|
+
[[nodiscard]] bool shouldTick() const { return accumulated_ >= core::SimulationClock::tickDuration; }
|
|
15
|
+
void consumeTick() {
|
|
16
|
+
if (!shouldTick()) throw std::logic_error("No tick available");
|
|
17
|
+
accumulated_ -= core::SimulationClock::tickDuration;
|
|
18
|
+
}
|
|
19
|
+
[[nodiscard]] std::chrono::nanoseconds backlog() const { return accumulated_; }
|
|
20
|
+
private:
|
|
21
|
+
std::chrono::nanoseconds accumulated_{};
|
|
22
|
+
};
|
|
23
|
+
}
|