Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ce5cc3c
Create a safe parity foothold for the C++ migration
Saaketh0 May 25, 2026
82022e7
Port deterministic physics primitives behind parity reports
Saaketh0 May 25, 2026
244e917
Lock entity-core behavior before the C++ port
Saaketh0 May 25, 2026
4a4be42
Prioritize headless world parity for Phase C
Saaketh0 May 25, 2026
174555f
Wire C++ entity-core parity into Phase C
Saaketh0 May 25, 2026
1a566e2
Generate Phase C entity parity from C++ state mutations
Saaketh0 May 25, 2026
547130f
Generate Phase C compatibility packets in C++
Saaketh0 May 25, 2026
a356eca
Make Phase C entity parity depend on real manager state
Saaketh0 May 25, 2026
27eb626
Generate minimal camera compatibility from C++ state
Saaketh0 May 25, 2026
46caa57
Lock the first gameplay parity baseline
Saaketh0 May 27, 2026
e9704e5
Prove the first gameplay fixture against C++
Saaketh0 May 27, 2026
30edcbc
Gate gameplay migration on a measured C++ speed signal
Saaketh0 May 27, 2026
2ab7c8c
Extend gameplay parity through death rewards
Saaketh0 May 27, 2026
3a81d48
Carry projectile kills back to their owner
Saaketh0 May 27, 2026
d78aadf
Lock projectile motion and lifetime parity
Saaketh0 May 27, 2026
95bdd65
Tie camera score changes to focused players
Saaketh0 May 27, 2026
5fdb41f
Preserve arena boundary behavior in gameplay parity
Saaketh0 May 27, 2026
be8576a
Keep team owner collision gates deterministic
Saaketh0 May 27, 2026
cf528b5
Filter ineligible bodies before collision parity
Saaketh0 May 27, 2026
1c154e5
Preserve solid-wall projectile contact parity
Saaketh0 May 27, 2026
e0bd1c1
Document the C++ parity migration handoff
Saaketh0 May 27, 2026
472e35a
Harden parity harness boundary checks
Saaketh0 May 27, 2026
094d970
Merge pull request #2 from Saaketh0/cpp-migration-parity-harness
Saaketh0 May 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
cmake_minimum_required(VERSION 3.16)
project(diepcustom_cpp LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

add_library(diepcustom_protocol
cpp/src/protocol.cpp
)

add_library(diepcustom_physics
cpp/src/physics.cpp
)

add_library(diepcustom_entity_core
cpp/src/entity_core.cpp
)

add_library(diepcustom_gameplay
cpp/src/gameplay.cpp
)
target_include_directories(diepcustom_physics PUBLIC cpp/include)
target_include_directories(diepcustom_protocol PUBLIC cpp/include)
target_include_directories(diepcustom_entity_core PUBLIC cpp/include)
target_include_directories(diepcustom_gameplay PUBLIC cpp/include)
target_link_libraries(diepcustom_entity_core PUBLIC diepcustom_protocol)

add_executable(protocol_golden_test cpp/tests/protocol_golden_test.cpp)
target_link_libraries(protocol_golden_test PRIVATE diepcustom_protocol)

add_executable(protocol_report cpp/tests/protocol_report.cpp)
target_link_libraries(protocol_report PRIVATE diepcustom_protocol)

add_executable(physics_report cpp/tests/physics_report.cpp)
target_link_libraries(physics_report PRIVATE diepcustom_physics)

add_executable(entity_core_report cpp/tests/entity_core_report.cpp)
target_link_libraries(entity_core_report PRIVATE diepcustom_entity_core)

add_executable(gameplay_report cpp/tests/gameplay_report.cpp)
target_link_libraries(gameplay_report PRIVATE diepcustom_gameplay)

enable_testing()
add_test(NAME protocol_golden_test COMMAND protocol_golden_test)
add_test(NAME entity_core_report_smoke COMMAND entity_core_report)
add_test(NAME gameplay_report_smoke COMMAND gameplay_report)
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ After doing so, download or clone this repository and install the dependencies w
$ npm install
```

## C++ Migration / Headless RL Parity

This repository is being migrated toward a deterministic C++ core for headless RL-agent training while the TypeScript server remains the behavior reference. See [docs/cpp-migration-status.md](./docs/cpp-migration-status.md) for the current parity harness, completed slices, verification commands, and next recommended work.

Key migration commands:
```bash
npm run test:conformance
npm run test:cpp
npm run test:parity
npm run bench:gameplay
npm run test:all
```

## Running the Server

Run the server with:
Expand Down
11 changes: 11 additions & 0 deletions conformance/entity-core/compare-parity.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env node
const assert = require('node:assert/strict');
const { execFileSync } = require('node:child_process');
const path = require('node:path');

const root = path.join(__dirname, '../..');
const tsReport = JSON.parse(execFileSync(process.execPath, [path.join(root, 'conformance/entity-core/report-ts.js')], { cwd: root, encoding: 'utf8' }));
const cppReport = JSON.parse(execFileSync(path.join(root, 'build/cpp/entity_core_report'), { cwd: root, encoding: 'utf8' }));

assert.deepEqual(cppReport, tsReport);
console.log('entity-core parity report matched TypeScript reference');
13 changes: 13 additions & 0 deletions conformance/entity-core/golden.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const test = require('node:test');
const { execFileSync } = require('node:child_process');

const root = path.join(__dirname, '../..');
const fixture = JSON.parse(fs.readFileSync(path.join(root, 'conformance/fixtures/entity-core-golden.json'), 'utf8'));

test('TS headless world snapshot plus minimal compatibility report matches golden fixture', () => {
const output = execFileSync(process.execPath, [path.join(root, 'conformance/entity-core/report-ts.js')], { cwd: root, encoding: 'utf8' });
assert.deepEqual(JSON.parse(output), fixture);
});
Loading