Turn any text into a playable video game instantly.
PixelPrompt is an experimental "Text-to-Game" engine built with Python. It uses Google Gemini 2.5 Flash to analyze educational scenarios and Pollinations.ai to generate pixel-art graphics in real-time.
Simply type a sentence like "The firewall blocks the hackers" or "The white blood cells hunt the virus," and the engine constructs a unique game mechanism, rules, and visuals on the fly.
This project is an official submission for the Global GenAI Hackathon hosted by Machine Learning Kolkata.
- Generative Gameplay: The AI selects the best game mode (Shooter, Dodger, Sorter, Connector, etc.) based on the verb in your sentence.
- Real-Time Pixel Art: Entities are generated instantly using AI image diffusion.
- Psychometric Profiling: Analyzes player reflexes and decision-making styles.
- Persistent High Scores: Saves your best runs locally.
- Dynamic Audio: Adaptive sound engine that changes mood based on the game sentiment.
- SHOOTER: Destroy falling enemies (e.g., "Antibiotics kill bacteria").
- DODGER: Survive against chasing threats (e.g., "Avoid the meteors").
- SORTER: Categorize items into left/right bins (e.g., "Separate trash vs recycling").
- RESOURCE: Maintain balance/stability (e.g., "Keep the economy stable").
- CONNECTOR: Draw a path between two concepts without touching walls.
- COLLECTOR: Gather specific items before time runs out.
- Core: Python 3.13+
- AI Brain: Google Gemini 2.5 Flash (via
google-genaiSDK) - Graphics: Tkinter (Canvas) + PIL + Pollinations.ai API
- Build: PyInstaller (for EXE generation)
- Clone this repository.
- Install dependencies:
pip install google-genai requests pillow python-dotenv
- Setup API Key (Secure Method):
- Create a file named
.envin the project folder. - Add your Google Gemini API key inside it like this:
GEMINI_API_KEY=AIzaSyYourKeyHere... - Note: The
.envfile is ignored by Git to keep your key safe.
- Create a file named
- Run the script:
python "Gamified Assessment Generator.py"
- Download
PixelPrompt.exefrom the Releases tab (if available). - Run the file. No Python installation required.
This application requires a Google Gemini API Key.
- It uses the free tier of Gemini.
- If you fork this project, DO NOT commit your API key to GitHub. Always use a
.envfile.
Aryan Biswas
- Lead Developer & AI Architect
- Department of Computer Science & Business Systems (CSBS)
Nikhil Rai
- Project Manager & Presenter
- Department of Computer Science & Business Systems (CSBS)
Ayush Kumar
- Quality Assurance & Demo Lead
- Department of Information Technology (IT)
Created at Asansol Engineering College, West Bengal.