The definitive multimodal RPG engine for local LLMs.
GemMaster is an immersive RPG narrative engine designed for the Gemma 4 Challenge. It transforms the classic text-adventure into a cinematic experience, bridging the digital and physical worlds through multimodal AI vision and dynamic visual storytelling with Gemma 4.
Important
Recommended Models: Optimized for Gemma 4 E4B and larger. Warning (E2B): While functional, the 2B model may occasionally struggle with the strict XML/Tag formatting required by the advanced Immersive Core narrative engine.
GemMaster isn't just a chatbot; it's an AI Director. Built with a focus on high-end aesthetics and tactical depth, it features:
- ๐๏ธ Visual Portal (Experimental): A high-tech multimodal UI for image analysis challenges. Capture your reality through the laser-scanning interface.

- ๐๏ธ Voice of the Director (Experimental): Using the Web Speech API to read the AI's internal intentions, creating a unique meta-narrative layer.
- ๐ Dynamic Ambilight Immersion: The entire UI atmosphere shifts colors and moods based on narrative intent.
- ๐ฒ Tactical Narrative Mechanics: Integrated stat-based dice rolls and physical Quick Time Events (QTE).

- ๐ญ The "Omniscient Narrator": A refined MJ personality that reasons internally before weaving its tale.
- The Lone Hero: A traditional solo RPG experience where you face the Destiny Master alone.
- The AI Sidekick (Experimental): Gemma manages a companion character that provides narrative support and tactical synergy during your journey.
GemMaster treats every response as a Game Frame, following a strict hierarchical pipeline:
- Meta-layer (
<voiceover>): Ethereal commentary read by the TTS engine. - Logic-layer (
<reasoning>): The AI's internal monologue about pacing and mechanics. - Play-layer (
NARRATION+[[OPTIONS]]): The interactive story delivered to the player.
Note: This structure is enforced through a "Silent Shepherd" system (dynamic prompt injections) ensuring high stability on small models like Gemma 4B.
- Clone the repository:
git clone https://github.com/QuentinMerle/gemmaster.git cd gemmaster - Run the installation script:
chmod +x install.sh ./install.sh
Start the engine:
python main.pyOpen your browser at http://0.0.0.0:8000.
Created with โค๏ธ for the Gemma 4 Challenge.
While Iโve spent far more time on this than originally planned, this is still an experimental engine. There may be some bugs or narrative "glitches" along the wayโI appreciate your indulgence, and most of all, I hope you enjoy the adventure!
