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): 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.2.tar.gz
(84.1 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.2.tar.gz.
File metadata
- Download URL: tilemap_parser-3.1.2.tar.gz
- Upload date:
- Size: 84.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0604e2dcdca847ae974f8aefc62ce845c0849b4178ddd49b0ea7a97309d18ced
|
|
| MD5 |
0477c9407744ec55a462bf4f80de8e37
|
|
| BLAKE2b-256 |
cd1d19f2cde7cace769edb01fea645ec9123afe6c4486cd13d239aa4cc999405
|
File details
Details for the file tilemap_parser-3.1.2-py3-none-any.whl.
File metadata
- Download URL: tilemap_parser-3.1.2-py3-none-any.whl
- Upload date:
- Size: 61.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f7de76a1b78397b19e99f87d93c484ec99ca4b0bb36e6d59c2f74456b7dafcc
|
|
| MD5 |
e02cb91242d4fd57cfec0add1025d0b2
|
|
| BLAKE2b-256 |
ca052e29e012c9c7f4c018dd609fb9b4025da98ae0a5978284c416f5da5bbea7
|