Phantasm Engine is a "Meta-Horror" and "Desktop Augmented Reality" framework designed for creating games that manipulate the user's desktop environment. It allows characters to interact with other windows, "hijack" applications, and talk to the user via AI-powered voice or chat interfaces.
Show a character on the desktop that reacts to clicks with a glitch effect.
from phantasm.engine import DarkEngine
core = DarkEngine()
core.overlay_mode(
id=1,
image="./images/character.png",
chat="Why are you clicking me?",
pos="center",
anchor="center"
)Attach a character to a specific window (e.g., Chrome) and "shake" it.
core.hijack_mode(
id=2,
image="./images/scary.png",
target_name="Chrome",
effects="shake, clear", # clear minimizes other windows
pos="top-right",
anchor="top-left"
)phantasm/engine.py: Core logic for window management and modes.phantasm/sounds.py: Async audio manager for SFX and music.phantasm/intelligence.py: AI integration (Gemini, ChatGPT, Grok).phantasm/media.py: Windows media session tracking (Spotify, Browser, etc.).phantasm/files.py: Safe file/folder manipulation tools.
- Full API Documentation: Detailed reference for every class and method.
- Framework Internals: Conceptual guide on how the engine works under the hood.
- Sticky characters: Characters that follow specific Windows windows.
- Overlay Rendering: Render transparent, click-through characters on your desktop.
- AI Integration: Voice-to-text and text-to-voice interaction using modern LLMs.
- Media Tracking: Detect what the user is listening to and react accordingly.
- Meta-Horror Effects: Screen shakes, digital glitches, and window manipulations.
- Install Requirements:
pip install -r phantasm/requirements.txt
- Run the Example:
- Run
python game.pyto see the engine in action.
- Run
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.