A Cyberpunk Interactive Fiction powered by PyGame and Generative AI
Final Project for Stanford Code in Place 2026
MEMORABLE is a rich, pure-Python interactive fiction game set in the dystopian neon-lit streets of Nova City. You play as Ash Verlaine, a memory trafficker caught in the web of an omnipresent AI governor known as MNEMOS.
Instead of traditional static branching storylines, the game utilizes Generative AI (Groq API + Qwen3) to dynamically synthesize dialogue and generate bespoke endings based on the exact moral choices (Empathy, Rebellion, Cynicism, Control) the player makes throughout their journey.
- Pure Python Desktop App: Built entirely using
pygame, proving the power of Python without relying on browser engines or external rendering frameworks. - Dynamic AI Dialogue: Deep integration with the Groq API allows the antagonist, MNEMOS, to dynamically respond to the player's specific moral alignments in real-time.
- Custom Post-Processing: Features high-quality cyberpunk visual effects such as CRT scanlines, chromatic aberration, flickering UI, and matrix-style raining particle systems.
- Immersive Audio Engine: A custom-built asynchronous audio engine handles overlapping ambient rain, synthwave soundtracks, and dynamic typing sound effects that react to punctuation pauses.
- Graceful Degradation: If the player lacks internet access or the AI API fails, the engine seamlessly falls back to pre-written hardcoded dialogues without interrupting gameplay.
Don't want to mess with Python environments? No problem!
You can play the fully compiled Desktop .exe version of the game immediately without installing anything.
- Download the Game: Download game.exe from GitHub Releases OR Download from itch.io
- Run: Double-click the downloaded
game.exefile. - Play: A popup window will ask for your Groq API Key. Paste it in, and the game will launch with full audio and AI features!
Follow these steps to run the game on your own computer:
Ensure you have Python installed (Python 3.10+ recommended). You can download it from python.org.
Open your terminal or command prompt and clone/download this repository. Then, install the required dependencies:
# It is highly recommended to create a virtual environment first
python -m venv venv
# Activate the virtual environment
# On Windows:
venv\Scripts\activate
# On Mac/Linux:
source venv/bin/activate
# Install the required packages
pip install -r requirements.txtThe game uses the Groq API for dynamic AI dialogue generation.
- Get a free API key from Groq Console.
- In the root directory of the project, rename the
.env.examplefile to.env. - Open the
.envfile and insert your API key:GROQ_API_KEY=your_actual_api_key_here
Once your environment is set up and your API key is inserted, simply run:
python game.pyTip: Put on headphones for the best immersive audio experience!
T Mohamed Yaser
- Email: 1ammar.yaser@gmail.com
- LinkedIn: https://www.linkedin.com/in/mohamedyaser08/
This project was passionately developed as a capstone submission for Stanford Code in Place 2026. Special thanks to the teaching team and the amazing Python community!
