Paws and Pollution
Controls
- Arrow keys: Movement
- F: Open Quest Menu
- Escape: Pause and Main Menu
- X: Pick up trash (requires different equipment depending on type of trash)
- C: Place Flowers (requires flowers)
About
Paws and Pollution is a simple top down game where you clean up a badly polluted cat village.
This is a game was created as an entry for the Gemini API Developer Competition. It has a unique feature where you can customize the personality of the non-playable characters. Generic dialog for those characters is then sent to Google Gemini along with the character's personality traits and it responds with text translated into the character's voice.
You can view the project presentation on YouTube.
Error Messages
If you see "Error calling Gemini, dialog using fallback" on screen the Gemini API calls are falling and the game has fallen back to non-customized character dialog. This issue can occur for a lot of reasons.
The game is using a Google Gemini API Key with a 15 requests per minute rate limit on it. If too many players play at once this rate limit will be hit. To avoid this you can generate your own API key at https://aistudio.google.com/app/u/1/apikey and then enter into into the game via "escape" and then clicking on "Settings".
Theme
The game's theme of cleaning up is a fun way to reenforce in kids the importance not littering and taking care of the environment.
As players progress though the game they are rewarded for their efforts by the smog clearing and being able to plant flowers.
Prompting Technique
Game developers have just started exploring how LLMs like Google Gemini can be used to enhance video games.
While Paws and Pollution uses a variety of prompting techniques a common one is telling Gemini to "translate text". Which is generic dialog that Gemini then converts into the style of the customized character.
"Translate the following into the character's words: Oh no, the smog has made you lose your voice."
The game's quest system has linear dialog timelines attached to it. That system selects the generic text that is sent to Gemini's 1.5 Flash model along with information about the current state of a pollution in the village.
Which gives Gemini the correct context so it doesn't mention things like the river being polluted after you've already cleaned it up.
Another approach that game uses is including a "directive" in the system prompt. This tells Gemini what the non-playable character wants to talk about while making sure it can still respond to what the player is saying.
Traditional games without any LLM use could use this technique to quickly experiment with different personalities.
Accessibility
The game is designed to be accessible to anyone who enjoys casual games. You don't need to speak or type to beat the game.
It has been tested and verified on Chrome, Windows, Linux, and macOS
It has basic accessibility features like adjusting the sound, brightness and text size
Implementation
Paws and Pollution is implemented in Godot 4 using a custom quest and dialog system designed to work with Google Gemini to generate it's dialog while having traditional linear quests
Google's AI Studio was used to quickly interate through prompting stategies with final results then being implemented into the game.
Gemini's Image generation feature was used to create references images for many of the sprites.
Status | Prototype |
Platforms | HTML5, Windows, macOS, Linux |
Author | laternRaft |
Genre | Educational |
Made with | Godot |
Leave a comment
Log in with itch.io to leave a comment.