Ripples of Change: A Faith-Based Story Game Where Players Talk to AI Villagers in Their Own Words
How NipsApp Game Studios built a non-violent narrative RPG in Unity 6 with OpenAI powered typed conversations, generated character voices, child-safe moderation and a secure relay, for PC and Mac.
Project Summary
Ripples of Change is a faith-based, non-violent, story-driven role-playing game for Windows and macOS, developed by NipsApp Game Studios for a client in the United States. The player is a traveler who arrives in Empathya, a village dimmed by a sadness called the Fade. Instead of fighting, the player heals the village by listening to five villagers, helping with practical tasks and choosing kindness.
The latest phase replaced the game's fixed multiple-choice dialogue with free typed conversations. Players now type whatever they want to say, and each villager replies in character using the OpenAI API, speaks the reply in a generated voice, acts it with the game's existing animations, and moves an emotional meter that drives the story. NipsApp designed, built and tested the full system: prompt design, scoring rules, moderation, voice, acting, memory, usage limits, a secure relay server and the player-facing rules screen.
Watch the Demo
This short video shows a typed conversation with Mara, the village greeter: the player types a message, Mara replies in her own voice, her face and body act the reply, and the meter beside the page rises as trust grows.
The Challenge
The client already had a working game with hand-written branching dialogue. Every villager had three fixed answers per round, and players quickly learned which option scored points. The client wanted something closer to a real conversation: the player should be able to type anything, the villager should respond to what was actually meant, and the story should only move forward when the player genuinely listens and helps.
The brief came with hard conditions that most AI chat demos do not meet:
- Replies had to stay in character, use only facts from the game, and never invent new story or new characters.
- Language had to be child-appropriate at all times, for both the player and the villager.
- Reply text had to appear within 3 seconds and speech within 4 seconds for at least 90 percent of messages.
- Every villager needed one consistent voice matched to their age and personality.
- No service key could ever ship inside the game, and usage cost had to be capped per player.
- All existing animations, cameras, rewards and story triggers had to keep working exactly as before.
What NipsApp Built
Typed conversations with five AI villagers
Each villager (Mara the greeter, Noa the farmer, his daughter Tavi, Eli the traveler and Sela the bridge keeper) has a character profile written with the client: personality, main concern, what they need from the player, how they speak, the game facts they know, a meter guide and a completion condition. The profile, a shared world description and a list of prohibited behaviours are combined into a system prompt. The unchanging parts come first so the OpenAI service can reuse them between messages, which cut reply times by about a third.
A structured emotional meter instead of a chat log
Every reply comes back as strict JSON with the spoken line, the villager's feeling, an assessment of the player's message (supportive, neutral or harmful), its strength, a suggested meter change, the conversation state and a one-line summary. The game keeps the AI honest: points are clamped to approved ranges, repeated messages earn nothing, flattery earns nothing, and the meter can only reach 100 percent after at least three meaningful exchanges and only when the villager's own completion condition is met. At 100 percent the game's original success sequence runs unchanged: the ripple of light, the fade, the animation and the story flag.
Child-safe moderation in both directions
Each player message is checked against a client-editable word list and the OpenAI moderation service before the villager hears it. A blocked message is not sent; the villager gives a gentle in-character refusal and the player sees how many attempts remain. A third blocked message ends the encounter at 0 percent. Messages that show distress or thoughts of self-harm are never passed to the villager and instead show a short, caring message. Villager replies are checked too, and a reply that fails is regenerated once before a written fallback line is used.
One voice per villager, with feeling
Replies are spoken with OpenAI text to speech using a fixed voice and a written direction for each villager, for example a woman in her mid-fifties with a warm, tired voice, or a farmer in his late sixties with a low, weathered voice. The feeling of each line is added to the direction, so a sad reply sounds sad. Every fixed line in the game, such as greetings, refusals and closing lines, was recorded once in the same voices and shipped with the game, so the villager keeps one voice even when the service cannot be reached.
Faces and bodies that act the reply
No new animation was made. Each feeling maps to an opening gesture, a speaking body, a closing gesture and a listening hold drawn from that villager's existing animation set, timed to the length of the spoken line. Mouth movement is worked out from the generated audio itself, and the face shows the feeling of the line with the character's existing face shapes.
Memory, limits and offline behaviour
When a conversation ends unfinished, a one-line summary is saved in the player's local save file, and the villager recognises the player next time. Conversations are capped at 20 messages each and 150 per player per day. If the internet is unavailable, the conversation does not open and the player is told why; no story information is ever lost.
A secure relay so no key ships in the game
The game talks to a small Cloudflare Workers relay that holds the OpenAI key as an encrypted secret, enforces the daily limit per anonymous installation, and serves the scoring, limits, word list and notices so the client can change them for every player without a new build. The relay never stores the text of conversations.
Results From Testing
Each villager was tested with supportive conversations that must complete, and with rude, repeated, nonsense, unsafe and distressed messages that must not. All five villagers completed only when their completion condition was met. Points alone never completed a conversation.
Screenshots





Technology Used
| Area | What NipsApp used |
|---|---|
| Game engine | Unity 6, Universal Render Pipeline, C# |
| Conversation AI | OpenAI GPT-4o mini with strict JSON schema output |
| Safety | OpenAI omni moderation, client-editable word list, distress detection |
| Voice | OpenAI GPT-4o mini TTS with per-character direction and emotion |
| Backend | Cloudflare Workers relay, KV storage, encrypted secrets, per-installation limits |
| Acting | Emotion to animation tables built from each character's existing clips, audio-driven mouth movement |
| Testing | Unity Test Framework: 43 offline rule tests and 13 live conversation tests, plus relay tests |
| Platforms | Windows 64-bit; macOS universal binary with Metal, full-resolution rendering on Apple Silicon |
Frequently Asked Questions
What is Ripples of Change?
Ripples of Change is a faith-based, non-violent story game for PC and Mac in which the player heals a village by listening to its people and helping them. It was developed by NipsApp Game Studios in Unity 6 and uses the OpenAI API so players can talk to the villagers in their own words.
How does the AI conversation system work in a Unity game?
The game sends the player's typed message, the villager's character profile and the recent conversation to the OpenAI API through a secure relay. The reply comes back as structured data containing the spoken line, the villager's feeling and a score for the player's message. The game uses the score to move an emotional meter, the feeling to pick animations and a voice direction, and the line to show and speak the reply.
How is the game kept safe for children?
Every message is checked against a word list and the OpenAI moderation service before the villager hears it. Blocked messages are not sent, three blocked messages end the conversation, and messages that show distress bring a caring message instead of a villager reply. Villager replies are checked the same way.
How fast are the AI replies?
In testing, the median time for reply text was 2.3 seconds, and 95 percent of replies appeared within 3 seconds. Speech begins as soon as the audio arrives, normally within 4 seconds.
How much does it cost to run AI conversations in a game?
Cost is controlled by limits: 20 messages per conversation and 150 messages per player per day, enforced by the relay. With GPT-4o mini for replies and short spoken lines, a full playthrough costs a few cents in API usage.
Can NipsApp add AI dialogue to an existing game?
Yes. This project added typed AI conversations to a finished game without changing its story, characters, animations or rewards. The same approach works for Unity and Unreal Engine games on PC, console and mobile.
Want AI conversations in your game?
NipsApp Game Studios designs and builds custom games with safe, fast, in-character AI dialogue, generated voices and secure backends. Tell us about your project and we will reply within one business day.
Contact usNipsApp Game Studios, [email protected]