Examples
Every directory under examples/ runs standalone. All wiring below is tested and correct; these are the source of truth for the guide pages.
git clone https://github.com/FluffyBrudy/tilemap-parser
cd tilemap-parser
pip install -e .
cd examples/physics-crate
python main.pyFULL USE CASES
Three read-the-source examples that wire whole lanes end to end. Their pages show every file inline, so they double as the docs.
full-physics-world
The engine assembled: a runnable mini game with an animated player, pushable crates, a one-way platform and a layer-2 body. Four files, one job each.
main.py world.py player.py crate.pyfull-collision
A copy-and-fill template: tiles, bodies and a move_platformer player in one file. Runs as-is on a mini world before you fill in your paths.
main.pyfull-pathfinding
NavGrid, Pathfinder and PathFollower in one self-contained maze: click a target and the enemy walks the A* path.
main.pyTHE CARDS
physics-crate
[source]The canonical physics demo. Push kinematic crates across the floor; they block each other and the tile wall, and you can stand on them. This is the sliding box from the Physics guide.
main.pyplatformer
[source]Full side-scroller: gravity, jump, player state machine, enemies, parallax-ready assets. Uses move_platformer with step-up and one-way platforms.
src/main.py src/entities/ src/fsm/platformer-with-slide
[source]Slope-aware platformer built on move_platformer_with_slide: walks polygon floor surfaces, respects max_walk_angle, real tilemap-editor map + collision data.
src/game.py data/maps/map.json data/collision/tiny-quest
[source]A compact quest game: player entity, enemies, waterfalls, spikes, sounds. Shows character collision files wired to runtime sprites.
src/game.py src/entities/ data/character_collision/rpg-pathfinding
[source]RPG movement plus NavGrid / Pathfinder / PathFollower: an AI entity walks a computed path through the tile grid.
main.pyobject-collision
[source]The sprite-vs-sprite lane: character-vs-polygon and pair-comparison scripts over ObjectCollisionManager.
character-vs-polygon.py pair-comparison.pyparticles
[source]Particle system playground: emitters with shapes, color transitions, alpha fade, gravity, batch rendering. The full config lives in code.
src/main.py src/full.py data/map.jsongame-example
[source]Minimal game shell with its own collision data, a clean base to fork.
data/collision/comparison
[source]Benchmarks and honest trade-offs: broadphase naive-vs-spatial, AABB-vs-SAT, movement modes, culled-vs-chunked rendering, particle caching, spatial cell-size tuning.
collision-move-modes.py collision-aabb-vs-sat.py broadphase-naive-vs-spatial.py spatial-cell-size-tuning.py rendering-naive-vs-culled.py rendering-culled-vs-chunked.py particle-naive-vs-cached.py movement-naive-vs-parser.pyA SENSIBLE READING ORDER
- physics-crate: bodies, attach, the push loop, the sub-pixel probe.
- platformer-with-slide: slope walking, real map data.
- rpg-pathfinding: movement + AI on a grid.
- object-collision and particles: the non-physics lanes.
- comparison: when you start caring about frame time.