Conversing with in-game NPCs using LLMs to get in-game rewards
Even after several years of large language model development, we haven’t seen a lot of examples where this technology has been implemented in a video game.
There are probably a few reasons for this. First, the development cycle of a game is many years. There are games being released today that were probably started before ChatGPT. Second, the best models require an Internet connection and take upwards of a minute to get back a high-quality response.
Over time, high-quality models will work their way down to run locally. Refining these models can help them run faster, as a game will use its own corpus of data and not the entirety of reality.
The technical details will work themselves out, but game designers might wonder today how this technology might work in a future game and work on building the gameplay elements for a moment when the hardware is ready.
A year ago, I explored how a larger context window can be used to improve chatbot responses. In my Pokémon-themed game, players can ask questions to in-game characters through the PokéGear and get responses pulled from in-game data.
While players have been able to get a variety of simple answers, the gameplay has basically ended at that. There’s no real game element to it. This is helpful as an integrated player guide, but that’s it.
Pokémon World Tournament
A new gameplay feature was added. The Pokémon World Tournament is based on the in-game feature of the same name, where you get to battle NPCs based on characters from the broad franchise. One example are in-game gym leaders like Brock.
Players can battle a variety of characters in singles 3v3. If they win, they get simple rewards including a virtual trading card of the opponent. Their opponent’s contact info also gets added into your PokéGear. By connecting the battles to this chatbot system, it gives players something to work towards.
I also wanted to explore using the LLMs to do more than just act as a simple chatbot. I added a feature which gives players a reason to interact with them in particular ways.
If the players want to trade with an NPC who is configured to trade, a button appears in the chat response which takes them to a trading page.
This Geodude which the NPC is offering has a special bit attached to it showing that it’s Brock’s. This bit is kept even after the trade so that it’s saved in your collection as Brock’s. When players use it in future battles, it is still called “Brock’s Geodude”, which makes it a nice unique collectible which players can strive to get.
Other than this bit, it’s not different from other Geodudes. Players can evolve it, or trade it.
This is one simple example where LLMs can serve a way to expand gameplay. It doesn’t take away from the core game, but can subtlely enhance it and give players more content to enjoy.
