Skip to main content

Standalone parser/loader for tilemap-editor JSON maps, sprite animations, and collision detection runtime.

Reason this release was yanked:

Wrong version

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
  • Chunked tile rendering: Efficient visibility culling and chunk-based rendering with TileLayerRenderer
  • Camera system: Centered/deadzone follow, lerp smoothing, screen-shake, and bounds clamping with Camera
  • Animation: Frame-based sprite animation with AnimationPlayer
  • Particle system: Configurable particle emitters with shapes, color transitions, alpha fades, gravity, and batch rendering with ParticleSystem + SpriteBatchRenderer
  • 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, Camera

# Load map and set up renderer
game_data = load_map("path/to/map.json")
renderer = TileLayerRenderer(game_data)

# Set up camera
camera = Camera(800, 600, mode="centered")
camera.follow(player)
from tilemap_parser import (
    CollisionRunner, CollisionCache,
    ObjectCollisionManager, CircleShape, RectangleShape,
    ParticleSystem, ParticleSystemConfig
)

# 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

# Particle system
particle_config = ParticleSystemConfig(
    particle_shape="circle",
    spawn_rate=10.0,
    max_particles=100,
    lifetime_min=0.5,
    lifetime_max=2.0,
    speed_min=50,
    speed_max=100,
    direction=270,
    spread=45,
    start_color_r=255, start_color_g=200, start_color_b=100, start_color_a=255,
    end_color_r=255, end_color_g=100, end_color_b=50, end_color_a=0,
    alpha_fade="fade_out",
    gravity_x=0,
    gravity_y=50,
)
particles = ParticleSystem(particle_config)

Links

Project details


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-5.0.0.tar.gz (120.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tilemap_parser-5.0.0-py3-none-any.whl (85.9 kB view details)

Uploaded Python 3

File details

Details for the file tilemap_parser-5.0.0.tar.gz.

File metadata

  • Download URL: tilemap_parser-5.0.0.tar.gz
  • Upload date:
  • Size: 120.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for tilemap_parser-5.0.0.tar.gz
Algorithm Hash digest
SHA256 00068f3923e0de516cbd0af7f90955cd1b1711c10df7aca389dc7d5c741c5868
MD5 b018261709710d5480a5c376d5ec74d9
BLAKE2b-256 e8d9d706e9d72c40e7c0eec194c3cf6373b14c637c305d59b83a4f0658ce5eb0

See more details on using hashes here.

File details

Details for the file tilemap_parser-5.0.0-py3-none-any.whl.

File metadata

  • Download URL: tilemap_parser-5.0.0-py3-none-any.whl
  • Upload date:
  • Size: 85.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for tilemap_parser-5.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51fd82cfb50d39fff0598bf890c12865c8cf8374e8a95e7c786b62aba4eb6ede
MD5 c54910236c22cfb44412695f629d6cc0
BLAKE2b-256 49efcb870aa66f0b81356f2dcb936fcb6cf70201036272a067c4c65a943826e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page