Pycaster
A simple 2.5D raycasting engine inspired by Wolfenstein 3D
Install / Use
/learn @raydotsh/PycasterREADME
Features
- Grid-based 2D world
- FOV-based raycasting
- Distance-based wall shading
- Minimap showing player position & rays
- Smooth movement with arrow keys / WASD
- Runs on Termux X11 (Android) or desktop Tkinter
Controls
| Key | Action | |------------|-------------------------------| | Left/Right | Rotate player | | Up/Down | Move forward/backward | | M | Toggle minimap |
Run
Dependencies
- Python 3.12+
- Tkinter
- Termux X11 (for Android) or desktop Tkinter environment
Commands
# From repo root
export DISPLAY=:0
python src/pycaster/main.py
On Android, make sure Termux X11 is running before launching.
Project Structure
pycaster/
├── src/
│ └── pycaster/
│ ├── __init__.py # Makes it a package
│ ├── main.py # Entry point
│ ├── engine.py # Raycasting & rendering
│ ├── input.py # Input handling
│ ├── map.py # Map data
│ └── assets/
│ ├── screenshot.jpg
│ └── dodtabilla.gif
├── README.md
└── .gitignore
How It Works
The world is a 2D grid map (# = wall, . = empty space)
Player has position, angle, and FOV
For each screen column, a ray is cast until it hits a wall
Distance to wall determines vertical slice height
Optional minimap shows walls, player, and rays
Limitations
- Uses Tkinter, so performance is limited
- No textures (solid colors only)
- Arrow key input may not work on Termux/X11
<p align="center"> <img src="src/pycaster/assets/dodtabilla.gif" alt="demo GIF"> </p>
Related Skills
node-connect
341.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
