AI-powered dialogues and quests generation in role-playing games using Google's Gemini and Sentence BERT framework
J Hardiman, Dave Christian Thio, Alfi Yusrotis Zakiyyah, Meiliana Meiliana · Procedia Computer Science · 2024
Non-player Characters (NPCs) play a crucial role in shaping the player's experience and immersion in video games. However, despite advancements in technology and game design, NPCs continue to face several challenges that hinder their ability to provide engaging and realistic interactions. This has been true in some cases, such as open world games where the random NPCs do not have a lot of character depth or use repetitive sentences. This research aims to improve dialogue in video games by humanizing conversations between players and NPCs by using Google's Gemini API and Sentence-BERT framework. Gemini 1.0 Pro as a base model from Google to give natural responses and Sentence-BERT framework based on PyTorch and Transformers to compute sentence or text embeddings for more than 100 languages that can be compared with cosine similarity algorithm to find sentences with similar meanings. NPCs will be able to provide creative and unique quests to give to the players based on their conversations. This research provides insight on how LLMs such as Google's Gemini and Sentence BERT can be used in role-playing games to generate dynamic, unique conversations for NPCs without having to make the script manually