Skip to main content

A pure-python library to parse Clickteam TileMap files.

Project description

cttilemap

A pure-python library to parse Clickteam TileMap files.


How to use

from cttilemap import TileMap, Tile

# Load from a file
with open("tilemap.l", "rb") as f:
    tmap = TileMap.load(f)

# Get a tile and its data
# Accessing the tile at x=3, y=5

layer = tmap.layers[0]
print(layer[3, 5])
for sublayer in layer.sublayers:
    print(f"- {sublayer[3, 5]}")

# Set a tile and its data
layer[3, 5] = Tile.by_id(0xBEEF)
layer.sublayers[0][3, 5] = b'\xFF'

tmap.layers[0] = layer

# Save to a file
with open("tilemap.l", "wb+") as f:
    tmap.dump(f)

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

cttilemap-1.0.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

cttilemap-1.0.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file cttilemap-1.0.0.tar.gz.

File metadata

  • Download URL: cttilemap-1.0.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for cttilemap-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cf9c1e92d0abd0d98d3df85be00c26609e0fe06993cf10c3839cea83483ea325
MD5 c8a3c90d338f7b41d99b1c16ce772b06
BLAKE2b-256 4a3f6aa9690d7424faea43fe6cac80752ef7650bb4216c38a9763810993cc4db

See more details on using hashes here.

File details

Details for the file cttilemap-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: cttilemap-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for cttilemap-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c72176d6310f51a88a9e29534b85505d123723314a4e8ffd45be5366a008f0f9
MD5 f489452cc5c080a660bae3ebe27a1f15
BLAKE2b-256 55ab8e319758eb0040d9f189ee065c358d7faf34bf9884014c4f4749cc435022

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