In Familiars , players become a witch who can create potions, consult tarot cards, and explore an endless forest with an animal familiar. Players can talk to their loyal companion by typing any text input, and a response is generated using natural language processing techniques. The familiar can recognize special commands to perform tasks for the player, but otherwise, it is a chatbot.
I love cozy games and companion AI. My goal for this game was to combine those two concepts; I wanted to create a world where players could enjoy a relaxing environment, perform optional thematic tasks, and bond with a friendly AI.that displays opinions and emotions. This project was created in 3 months using my personal C++ engine.
A single concept tag represents a group of many words. For example, the terms 'kiss', 'hug', and 'adore' may all be under the Love concept. Developers determine the appropriate words to include; while this approach is more time consuming than scraping data, it automatically prevents rude and inappropriate language from being mishandled, unlike some less ethical chatbots.
Player Input Normalization
To catch as many concept tags as possible from the player input, the input must be normalized. Punctuation was removed, all strings were forced into lower case, and common sentence structure terms such as "the", "about", etc. were removed before parsing for tags.
Available responses can be associated with one or more concepts. The more concepts are flagged within a response, the more appropriate the response is deemed; specific responses are always given priority over generic responses.
AI can occasionally flavor these responses with unique catch phrases to give the appearance of different personalities.
Additionally, some input triggers an action rather than a response; players can ask or command an AI to fetch them an object or give them a hint.
All player input was logged, and upon exiting the game, the log would be parsed to find unidentified words. This process helped me identify which common words were missing from my concept libraries.
This game was honestly a little dream project! It has all my favorite parts of games: a whimsical theme, stress-free mechanics, a cute helpful companion AI. I am super proud of the final product, especially since I had such limited time to work on it.
I learned that if players think your AI is smart, you've succeeded, no matter how naïve the actual system is. Also, you don't need to handle every case as long as your system fails gracefully.