Retirement Simulator
Loading...
Searching...
No Matches
Conversational NPC Experiments

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.


Lets you talk in real time to a video game NPC. You press space and then talk. After you release the spacebar, it converts your speech to text and sends it to chatGPT which is prompted to believe it is an npc in a video game. After ChatGPT generates its response, it is fed to a text-to-speech api which says it back to you in real time.

Author
Nathan Ulmer
Date
Saturday 20-01-2024

The intent was to experiment with the game design of an NPC which can generate new content, quests, interactions, etc. on its own without designer input. The designer would still have to give the NPC good prompts to tell it what its personality is, what it wants, etc. But the dialog itself could be generated to react to any input from the player, increasing immersion dramatically.

The end goal is to make a demo game where the NPC can operate as a bartender or trader that the player can interact with however they want. The npc should be able to trade and talk with the player. It should have knowledge of the world and its history and be able to see the player's clothes/appearance.

Todo
Fix references to secrets (api keys)
Todo
Refind prompts to make the ai more robust