Dustmaker
Dustmaker is a Python library for reading, manipulation, and writing binary files used by Dustforce, primarily level files.
Documentation
Documentation can be found at https://dustmaker.readthedocs.io/en/latest/.
Installation
Install with pip through PyPi using
python -m pip install dustmaker
or clone this repository and install using
./setup.py install
Command Line Tool
Dustmaker comes with a few command line tools that can be accessed through running the dustmaker module.
$ python -m dustmaker --help
... listing of available utilities
$ python -m dustmaker transform --upscale 2 downhill big_downhill
... creates upscaled version of downhill and saves to "big_downhill"
Example: Creating a new level from scratch
from dustmaker.level import Level
from dustmaker.tile import Tile, TileShape
from dustmaker.dfwriter import DFWriter
# Create a new empty level and add some tiles.
level = Level()
level.name = b"my level!"
level.virtual_character = True
for i, shape in enumerate(TileShape):
level.tiles[(19, 2 * i, i)] = Tile(shape)
# Automatically figure out edge solidity and connectivity flags
level.calculate_edge_visibility()
level.calculate_edge_caps()
# Write level to a file
with DFWriter(open("mylevel.dflevel", "wb")) as writer:
writer.write_level(level)
Example: Counting how many apples are in a level
from dustmaker.dfreader import DFReader
from dustmaker.entity import Apple
with DFReader(open("mylevel.dflevel", "rb")) as reader:
level = reader.read_level()
apples = 0
for x, y, entity in level.entities.values():
if isinstance(entity, Apple):
apples += 1
print(f"Level has {apples} apples")
Metadata
Release files for dustmaker 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| dustmaker-1.2.0.tar.gz | 50.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dustmaker-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 107.6 kB
Release files / dustmaker-1.2.0.tar.gz
| Download URL | dustmaker-1.2.0.tar.gz |
|---|---|
| Size | 50.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
085df65371e82d91ee42c1c158b264df21d6e7f95aa146a3c6d19cd10f03f691
|
|
BLAKE2b-256 checksum How to use checksums |
4ca8120e990483567cd209ae06c94b73950e7397cef954dcc238108b38eb8c53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10
|
Release files / dustmaker-1.2.0-py3-none-any.whl
| Download URL | dustmaker-1.2.0-py3-none-any.whl |
|---|---|
| Size | 57.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3cdcb2be1db2683a8f384135b0bc539eb784d86ef51599170c1bba16ae0f206d
|
|
BLAKE2b-256 checksum How to use checksums |
3c547233875fab58a4ceab761680cddc93466d9b793035d66ac7c807d94857ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10
|
Security for dustmaker 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.