This a simple sample game powered by the Gemma.cpp for Unity plugin, and demonstrates the use of Gemma 3 in games.
The game features non-player characters (NPCs) whose dialogue is dynamically generated by a Gemma model.
The player moves between rooms to talk to Android-themed NPCs that generate real-time dialogue from predefined character personalities. The goal is to interrogate each Android to discover a secret word, allowing progression to the next room.
One such NPC is Chef Gus, a highly-regarded and temperamental chef. Gus's role and personality, along with game logic and rules, are defined in the Gemma 3 prompt, guiding his interactions and the riddle he presents to players in the game.
For more information, read the blog post about the game.
This is not an officially supported Google product.
- WASD: Movement
- E: Interact with NPCs
The player can type messages to the NPCs in the chat panel that appears upon interaction.
Pre-built releases are built using CI/CD and are available under the Releases tab. These releases bundle a copy of Gemma 3 4B.
- Download the runnable game from [release][game_download].
- Extract the ZIP file.
- Double-click the Gemma Journey icon.
The game targets Unity 6 (6000.0.33f1) and requires the Gemma.cpp for Unity plugin along with a copy of Gemma 3 4B.
- Open the
GemmaSettingsscriptable object inAssets/GemmaSampleGameor create one if it doesn't exist. - Note the Model Type and Weight format in
GemmaSettings. - Go to Kaggle to download the appropriate weights and tokenizer.
- Example: If
ModelTypeisGemma 3_4BandWeight formatissfp, download the Gemma C++ variation3.0-4b-it-sfp.
- Example: If
- Place the downloaded files under
Assets/StreamingAssets/[folder name].
For other variations, go to
Assets/GemmaSampleGameand update theGemmaSettingsscriptable object's Model type, weight format folder, and filename.
- Open Build Profiles by clicking
File > Build Profile. - Click
Build.

