Repository navigation
Conversation
…isions - Register TileMap2D node in pite-core. - Add .ptmap TOML schema, coordinate math, and serialization in pite-scene. - Implement greedy 2D rectangle collider merger and Rapier2D static bodies in pite-physics. - Add frustum-culled rendering, hot reload, and collision loading in pite-runtime. - Implement Python scripting API (pite.TileMap2D) in pite-script. - Add tilemap validation and atlas frame usage verification to pite check in pite-cli. - Add interactive tile palette, layer switcher, and viewport painting/erasing in pite-editor. - Update documentation in docs/scene-format.md, docs/scripting-api.md, and docs/editor.md. - Add unit and integration tests across crates. Signed-off-by: Mahan Khalili <khalili1388mahan@gmail.com>
mkh-user
force-pushed
the
feat/tilemap-support
branch
from
November 5, 2026 11:54
b10eb53 to
6217f05
Compare
mkh-user
force-pushed
the
main
branch
11 times, most recently
from
November 5, 2026 18:20
b7a3248 to
9d909ae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds first-class 2D tilemap support to Pite via the
TileMap2Dnode type, backed by an external.ptmapTOML specification, greedy 2D rectangle collider merging with Rapier2D static bodies, frustum-culled rendering, embedded Python scripting, asset verification, and interactive editor tools.Key Changes
pite-core): Registered"TileMap2D"inNodeTypeRegistry.pite-scene): Addedtilemapmodule withTileMapDoc,TileMapLayer, andTileCellschemas (sparse[col, row, "frame"]), coordinate conversion helpers (world_to_map,map_to_world), and canonical TOML serialization (load_tilemap,save_tilemap).pite-physics): Implemented greedy 2D rectangle merger (merge_tile_cells) to eliminate internal edge snagging for character controllers (move_and_slide()), and addedadd_tilemap_collidersinPhysicsWorld.pite-runtime): Added.ptmaploading, hot-reloading on file change, static collider building inrebuild_physics, and frustum-culled batch sprite rendering indraw_into.pite-script): Implementedpite.TileMap2DPython class exposing cell query/mutations (get_cell,set_cell,erase_cell,clear), coordinate mapping (world_to_map,map_to_world), layer introspection (layers,get_used_cells), andtile_size.pite-cli): Extendedpite checkto validateTileMap2Dnode properties, ensuring referenced.ptmapfiles, atlas sheets, and tile frame names exist.pite-editor): Added inspector panel with active layer selector, collision toggles, brush/eraser tool buttons, and atlas tile palette; added viewport snapped grid hover preview and left-click paint / right-click erase with auto-saving.docs/): Documented the.ptmapschema inscene-format.md, Python API inscripting-api.md, and editing workflows ineditor.md.Verification
cargo fmt --all -- --check: Passed with no formatting diffs.cargo build --workspace --locked: Built with zero errors.cargo test --workspace --locked: 100% test suite passing across all workspace crates.cargo run --locked -p pite -- check: Passed onexamples/minimal-2d.