Skip to main content

Moonlight Drift — terminal version

The third version of the game, alongside web/ (browser) and wii/. Runs on the texastoast engine's terminal backend.

pip install magmacrunch-moonlight-drift
moonlight-drift

Hold SPACE or ↑ to climb, release to fall, thread the columns. It is also a cabinet in the magmacrunch arcade, and plays identically either way.

What is here

drift/config.py the browser's 1280×720 world, and every measurement in it
drift/projection.py that world onto character cells
drift/player.py gravity, thrust, and the two lethal edges
drift/obstacles.py the columns, their tapered silhouettes and collision
drift/characters.py 24 pilots — physics, hitboxes, a glyph and a colour
drift/stars.py the starfield, twinkling on a four-phase cycle
drift/scenes.py the title screen and the run

None of it imports the engine. tests/test_physics.py runs with nothing but pytest on the machine, which is what proves that claim.

The two things a terminal changes

A character cell is about twice as tall as it is wide. The Wii port has the same problem from the other direction — non-square framebuffer pixels — and solves it in wii/source/projection.c by deriving a pixel-aspect ratio and fitting the world's height to the safe area. Here that ratio is a constant 0.5, and the same fit applies: the gap and the player keep exactly the share of the screen they have in the browser, and the width is cropped. A short wide terminal sees less of the 1280 than a tall one, exactly as a 4:3 television sees less than a 16:9 one.

The player is about two cells wide and one tall. So a character cannot carry its art — on the web each is canvas primitives with hue cycling, on the Wii a baked PNG, and draw_image is a no-op in the terminal backend. What survives is a glyph, an accent colour from its web palette, and its physics — which is the part you actually feel.

Running the tests

pip install -e ".[dev]"
python -m pytest -q

The simulation suite needs no engine at all:

pip install pytest
python -m pytest tests/test_physics.py -q

Licence

PolyForm Noncommercial 1.0.0 — see LICENSE and NOTICE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

magmacrunch_moonlight_drift-0.1.0.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

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

magmacrunch_moonlight_drift-0.1.0-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

Details for the file magmacrunch_moonlight_drift-0.1.0.tar.gz.

File metadata

File hashes

Hashes for magmacrunch_moonlight_drift-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c2f71ad97603d85d605eb78896612f47fd26d2a6f2725bf98a9a1952dddb6941
MD5 75fa998bbcb1ce2250d70b79481c6894
BLAKE2b-256 ab86bb48c7f210b5f6aaca096d786bddffc67a34d1e24e2aaa2b485af7217d56

See more details on using hashes here.

Provenance

The following attestation bundles were made for magmacrunch_moonlight_drift-0.1.0.tar.gz:

Publisher: release.yml on magmacrunchmedia/moonlight-drift

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file magmacrunch_moonlight_drift-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for magmacrunch_moonlight_drift-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 396095ca7ba250265236eda8bce487062af65751c985c26efcea2f16ca1efe79
MD5 8e5855fcbbb22fe8229f58e09b792fc5
BLAKE2b-256 d7f03d09a1589286b61a066a151c69894ba110f99bceacf4ac94016268f64db5

See more details on using hashes here.

Provenance

The following attestation bundles were made for magmacrunch_moonlight_drift-0.1.0-py3-none-any.whl:

Publisher: release.yml on magmacrunchmedia/moonlight-drift

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.0

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

This release

0.1.0 This release

2 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