Skip to main content

dungeoncoder

The Python API for Dungeon Coder, a VS Code extension in which a Python script steers a hero through a pixel-art dungeon.

from dungeoncoder import Game

game = Game("playground.json")
hero = game.get_hero()
while not hero.is_at_goal():
    if hero.is_collision_in_front():
        hero.turn_left()
    else:
        hero.move()
  • With the extension: start the game in VS Code (Dungeon Coder: Enter the dungeon); the script talks to it over a local REST API.
  • Without VS Code: dungeoncoder.use_simulator() (or DUNGEONCODER_SIM=1) runs the same script in a pure-Python simulator of the game's rules: no picture, no waiting. dungeoncoder.testing.spiel(map_text) gives (game, hero) for pytest.
  • Levels from text maps: Game("karte.txt").
  • Setup check: python -m dungeoncoder says which Python and which copy of the package run, whether the game answers and whether its version fits.

The package has the same version as the extension. Install it with pip install dungeoncoder.

Metadata

Release files for dungeoncoder 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dungeoncoder 0.2.1
File Size Uploaded
dungeoncoder-0.2.1.tar.gz 67.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dungeoncoder 0.2.1
File Interpreter ABI Platform
dungeoncoder-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 174.6 kB

Release files / dungeoncoder-0.2.1.tar.gz

Download URL dungeoncoder-0.2.1.tar.gz
Size 67.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8f5d75f8e695a7878b89b690cf841978f1e6c37ee8038b755fb7cf4f69780aaf
BLAKE2b-256 checksum
How to use checksums
5fef298b12ed8faa4e5a44ae7936a15ed34efe05f1b668bb8a91aafa424656b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0rc2

Release files / dungeoncoder-0.2.1-py3-none-any.whl

Download URL dungeoncoder-0.2.1-py3-none-any.whl
Size 107.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ded39f3a2f0dadf2c8e4f82491f2e40e1f21a09017124375078502d1a7ca43ef
BLAKE2b-256 checksum
How to use checksums
7c53814e07c3c0e280fb632c21924a533978ef9d03dc6c883ffa011c7df64463
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0rc2

Release history Release notifications | RSS feed

1.0.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

This release

0.2.1 This release

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page