Standalone parser/loader for tilemap-editor JSON maps, sprite animations, and collision detection runtime.
Project description
tilemap-parser
Standalone parser/loader for tilemap-editor JSON maps, sprite animations, and collision detection runtime.
Features
- Map parsing: Load and query tilemaps, layers, objects, and autotile data from JSON
- Animation: Frame-based sprite animation with
AnimationPlayer - Collision (tile-based): Polygon collision detection for tilemaps with slide, platformer, and RPG movement modes via
CollisionRunner - Collision (object-to-object): Spatial-grid mixed-shape collision detection (rect, circle, capsule, polygon) with layer filtering via
ObjectCollisionManager - Capsule support: Full capsule collision against all shape types
- Hit helpers:
CollisionHit.resolve(),involves(),other()for ergonomic separation
Quick Start
from tilemap_parser import load_map, TileLayerRenderer
game_data = load_map("path/to/map.json")
renderer = TileLayerRenderer(game_data)
from tilemap_parser import (
CollisionRunner, CollisionCache,
ObjectCollisionManager, CircleShape, RectangleShape,
)
# Tile-based collision
cache = CollisionCache()
tileset = cache.get_tileset_collision("data/collision/tileset.collision.json")
runner = CollisionRunner.from_game_type("topdown", tile_size=(32, 32))
# Object-to-object collision
manager = ObjectCollisionManager()
manager.add_object(player)
for hit in manager.check_all_collisions():
hit.resolve() # separate both objects
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tilemap_parser-3.1.22.tar.gz
(112.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tilemap_parser-3.1.22.tar.gz.
File metadata
- Download URL: tilemap_parser-3.1.22.tar.gz
- Upload date:
- Size: 112.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ddddaea9c5567792d82e4803f6b8691ef9133ae16167a5f36c513f91aa86171
|
|
| MD5 |
041825989acbd48cf1aa88402e2010f4
|
|
| BLAKE2b-256 |
36ecd45c6c72c13d2a4f51013fca318589ac95d74f5a37cb636127f70d911c2b
|
File details
Details for the file tilemap_parser-3.1.22-py3-none-any.whl.
File metadata
- Download URL: tilemap_parser-3.1.22-py3-none-any.whl
- Upload date:
- Size: 80.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6438a49e5176e4e694ca1f624bd0b6bcc7d4115f800c5dd7aedce5f90f14e94a
|
|
| MD5 |
1b6dd53e6223d418a0d8b649bccbaafb
|
|
| BLAKE2b-256 |
907da47706cd5e69fae7d456122828bfbc2163ac67f24e64416fd6f9e62a7249
|