Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cargo run --locked -p pite-cli -- check

## Architecture (crate → role)

`pite-cli` (the `pite` binary) → `pite-runtime` (window, main loop, hot reload) → `pite-core` (node tree, handles, lifecycle) + `pite-scene` (TOML load/validate/cache) + `pite-script` (embedded `pite` module) + `pite-render` (`Renderer2D` wgpu seam) + `pite-assets` (`Importer` trait, uid registry) + `pite-audio` (WAV/OGG/MP3/FLAC, silent-simulation fallback) + `pite-project` (`pite.toml`, `res://`, templates) + `pite-export` (binary + resolved content) + `pite-player` (lean run-only binary — the runtime without the editor) + `pite-editor` (egui panels, LSP client). Docs in `docs/` are authoritative per topic: `scene-format`, `scripting-api`, `assets`, `editor`, `manifest`, `export`, `lsp`.
`pite-cli` (the `pite` binary) → `pite-runtime` (window, main loop, hot reload) → `pite-core` (node tree, handles, lifecycle) + `pite-scene` (TOML load/validate/cache) + `pite-script` (embedded `pite` module) + `pite-physics` (pure-Rust rapier2d 2D physics subsystem) + `pite-render` (`Renderer2D` wgpu seam) + `pite-assets` (`Importer` trait, uid registry) + `pite-audio` (WAV/OGG/MP3/FLAC, silent-simulation fallback) + `pite-project` (`pite.toml`, `res://`, templates) + `pite-export` (binary + resolved content) + `pite-player` (lean run-only binary — the runtime without the editor) + `pite-editor` (egui panels, LSP client). Docs in `docs/` are authoritative per topic: `scene-format`, `scripting-api`, `assets`, `editor`, `manifest`, `export`, `lsp`.

## Gotchas agents miss

Expand All @@ -36,4 +36,4 @@ cargo run --locked -p pite-cli -- check

- Conventional commits (`feat:`/`fix:`/`docs:`/`chore:`), one focused change per commit/PR; never commit secrets, `target/`, or local paths.
- New Rust files start with `// SPDX-License-Identifier: MIT OR Apache-2.0` (Python: `# …`); `examples/` game scripts stay header-free.
- Pinned values bump in multi-file lockstep (12 internal path-dep pins, scene `FORMAT_VERSION`/`CACHE_VERSION`, the pyright pin in `lsp.rs` + docs + CI, `python_bundle.rs` pins) — checklist in `CONTRIBUTING.md`.
- Pinned values bump in multi-file lockstep (13 internal path-dep pins, scene `FORMAT_VERSION`/`CACHE_VERSION`, the pyright pin in `lsp.rs` + docs + CI, `python_bundle.rs` pins) — checklist in `CONTRIBUTING.md`.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
- Editor code pane opens config text files (`toml`/`cfg`/`ini`/`json`/`yaml`/`yml`) for plain editing; LSP completion, hover, and diagnostics stay Python-only.
- Editor code pane highlights Python and config text (keywords, strings, numbers, comments, `[...]` headers) in palette colors.
- Editor menus reorganized: `Scene` (new/open/recent/save/save-as/quit, native dialogs, `Ctrl+N/O/Shift+S/Q` shortcuts), `Project`, and `Help` (repo/issues links, about, clipboard debug info); the `Run` menu is gone, transport buttons remain.
- MacOS support (both dor editor and games) with cross-compile added.
- MacOS support (both dor editor and games) with cross-compile added.
- 2D physics subsystem with Rapier2D: pure-Rust 2D physics powered by `rapier2d 0.23` in a new workspace crate `pite-physics`, running in a fixed 60 Hz simulation loop (`dt = 1/60`) and driving `_physics_process(delta)` in Python scripts.
- New node types: `StaticBody2D` (immobile bodies), `CharacterBody2D` (kinematic controller with `move_and_slide()`), `RigidBody2D` (dynamic forces and gravity), `Area2D` (trigger zones), and `CollisionShape2D` (`box`, `circle`, and `capsule` geometric colliders).
- Kinematic character controller: `move_and_slide()` computes sliding obstacle collision response against solid geometry while ignoring trigger sensors, automatically updating velocity and contact flags (`is_on_floor()`, `is_on_wall()`, `is_on_ceiling()`) relative to `up_direction`.
- Dynamic rigid bodies: `apply_impulse((x, y))` and `apply_force((x, y))` for simulation, with configurable `mass`, `gravity_scale`, and `lock_rotation`.
- Area trigger signals: `Area2D` emits engine-owned `body_entered`, `body_exited`, `area_entered`, and `area_exited` signals with node ID arguments.
- Spatial raycasts: `pite.raycast(from, to, mask=1)` performs line intersection queries against solid obstacles, returning intersection point, surface normal, distance, collider node, and body node.
- Editor visualization and inspection: `pite-editor` paints semi-transparent collision shape wireframe overlays (`box`, `circle`, `capsule`) directly in the viewport in design mode, with shape dropdowns and physics property controls in the Inspector.

## v0.2.0

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cargo run -p pite-cli -- check

The `v*` tag flow automates almost nothing — bump these by hand, every release:

- `Cargo.toml`: `version` + all 12 internal `pite-*` path-dep pins (nothing enforces lockstep; `cargo publish` breaks otherwise).
- `Cargo.toml`: `version` + all 13 internal `pite-*` path-dep pins (nothing enforces lockstep; `cargo publish` breaks otherwise).
- `CHANGELOG.md`: move notes from `## Unreleased` to the release heading.
- MSRV proof re-runs automatically (weekly + manual); if it goes red, fix code or raise `rust-version`.
- Only when the toolchain changes: `python_bundle.rs` (`PINNED_PYTHON`, `PINNED_BUILD`, filenames, checksums).
Expand Down
Loading
Loading