Files | |
| __init__.py | |
Package marker for the 2D mxvk_wrap Tetris example. | |
| main.py | |
A small 2D Tetris clone made with mxvk_wrap sprites and fonts. | |
A compact, playable 2D Tetris clone written with mxvk_wrap. It uses the block, background, and font files in this directory's data/ folder, and a Font passed to App.draw_text() for the HUD without changing the window font. Completed rows flash with the supplied gray block texture before collapsing. Gravity and the clear animation run on a fixed 60 Hz simulation step, so their timing does not depend on the rendering frame rate. The HUD also shows the next tetromino. The background uses data/background.frag.spv, an animated custom fragment shader driven by mouse position, render resolution, and elapsed time. Its paired data/sprite.vert.spv is included so the example does not depend on the current working directory for its custom shader pipeline.
From the repository root, build the MXVK Python extension:
Controls: Left/Right to move, Up to rotate, Down to soft drop, Space to hard drop, R to restart after game over, and Escape to quit.