DAILY ROUTINES

Exoplanet: First Contact

Build your path in this alien world. Do a dirty job for food or become the one who makes calls. Sometimes the right word makes a bigger impact than a big gun. Explore local culture and mysteries, and discover the harsh yet beautiful nature in this handcrafted singleplayer action RPG.

Hey friends! Today we would like to explore another complex topic that significantly enriches the world of Exoplanet — NPC daily routines. We were inspired to give characters daily activities by Gothic, one of the first games to create a world where many characters have minor daily tasks. These tasks correspond to the roles of NPCs on The Edge — guards secure their locations, patrols monitor the territory, and traders scavenge for scraps. At first glance, it may seem simple, but in reality, there are many nuances in designing daily activities that we will discuss further. [img]{STEAM_CLAN_IMAGE}/27028179/ea75783210e3264e21e865574c337bd49c763d4f.png[/img] Before realizing the need to develop a separate subsystem to handle NPC daily routines, we used quest logic. However, this approach led to many problems — we had to manually consider whether a character is alive or not, whether they are in combat, or if they have moved to another location to participate in a more important quest. To avoid numerous errors and unnecessary actions, it was decided to develop daily routines within the framework of our artificial intelligence system — the NPC behavior tree. It is a part of the AI responsible for decision-making. Its logic runs several times per second, constantly determining which branch of actions to execute for the NPCs. Based on the results of the evaluation, requests are generated for them, which are handled by another part of the AI. [img]{STEAM_CLAN_IMAGE}/27028179/b1fa61c2d70eade77b344335d6542979b325b30c.png[/img] [h3]What does the use of the behavior tree provide?[/h3] [list][*] A convenient environment for developing daily routines:[/list]To avoid numerous errors and unnecessary actions, we decided to develop daily routines within our game engine's editor called "Sahara Engine." This way, it could have access to all game data, simplifying the control of NPC daily routines. Now, we can quickly, easily, and conveniently set time intervals for specific actions, define their priorities, and determine the rules for execution. Thus, the game checks the in-game time first and then the character starts performing the assigned action accordingly. For example, in the morning, abori can scavenge for scrap, talk during the day, and sleep at night. [list][*] Simplification of NPC state checks:[/list]By having a unified system, checking the state of characters became much easier, and the number of overlooked situations and bugs in the game significantly decreased. It also became much easier to handle situations where NPC activities were interrupted for various reasons - thanks to the new system, the character simply resumes their task from the beginning. Moreover, the performed task is not a repetitive chain of actions - there are specific branches for each time of day. Therefore, even if the routine is interrupted, the immersion in the game remains intact as the character's behavior always corresponds to the time of day. [list][*] Automatic prioritization:[/list]Regular tasks are automatically assigned the lowest priority. The system first checks various aspects, such as whether the character is alive, engaged in a quest, or involved in a conversation with Jack, and only then sends them to perform the task. [img]{STEAM_CLAN_IMAGE}/27028179/be086e87d6501c39f444470127590c4efa110bc4.gif[/img] By the way, assigning daily tasks also has its own rules and system. Each character is planned to have 2-4 different actions based on their occupation and habits, corresponding to their profession. Some characters have hobbies — for example, growing plants. The behavior of other characters may hint at their dark past. For instance, the Hermit trembles in sleep, haunted by nightmares of the past. [h3]What types of tasks exist in the game?[/h3] [b][i]Behavior of significant characters:[/i][/b] We wanted to create several distinct characters with complex, diverse, and interesting tasks. Their selection was based on their backstory, characteristics, and the timing of their encounter with Jack. Here are a few interesting examples: [img]https://i.imgur.com/1tGEnUr.gif[/img] Rusty Nails is the first NPC Jack encounters, marking the beginning of his interaction with the Abori race. Therefore, we added as many details to this character as possible. Rusty scavenges for valuables in the trash, attempts to break open a safe, claiming its mechanism is too complex to crack, and goes to sleep at night. [img]https://i.imgur.com/jXScfmK.gif[/img] Garry is the owner of an abandoned mine and a broken hoverbike. He roams around Lucky Hole town, converses with the trader Vaga, and occasionally indulges in drinking and causing a ruckus. Sometimes you need to search around the town to find him. By the way, in the daily routine logic, it is taken into account whether Jack completed the quest "Fixing Garry's Old Hoverbike". In that case, Garry's garage will be open, and he will periodically go inside to tinker with the mechanisms. [img]https://i.imgur.com/r1JovJG.gif[/img] Mad Miner is one of the most mysterious characters. By his actions you can see, for example, how he threatens old posters of bounty hunters with his fist. A funny fact — to our surprise, the crazy Abori recently started undertaking tasks that nobody assigned to him! He switched from targeting wanted posters to a group of renegade Abori, initially getting himself killed in an attempt to provoke them and then learning to escape. Recently, he started to annoy a nearby grazing cabarog too! We have not yet found the reason for this change, considering it another mystery of K'Tharsis. [i][b]Behavior of ordinary NPCs:[/b][/i] [img]https://i.imgur.com/ILEsuGh.gif[/img] Ordinary inhabitants of the world receive simple tasks that correspond to their occupation. However, this guard not only guards the gate but also takes care of watermelons. I wonder what will happen if Jack dares to touch his harvest. [img]{STEAM_CLAN_IMAGE}/27028179/fe474454e7c6a4829716747e6b36ce6f5cd02db2.jpg[/img] Stranger always performs the same action. After appearing in the game, he can be found sitting near a cliff edge. However, he has a specific goal — why else would he invite Jack to sit with him? [i][b]Behavior of animals:[/b][/i] [img]{STEAM_CLAN_IMAGE}/27028179/40d6fe94288315d2813495ef872315b0b46c46cd.jpg[/img] Currently, animals simply wander around their spawn points, but in the future we plan to add more routines to them. We still have a lot of work ahead of us in assigning routine tasks to characters, and as always, your feedback is crucial. Please share your thoughts on character routines in the comments, and be sure to [url=https://discord.gg/WY4fumXJ9y]join our Discord[/url] to ask questions, share your impressions, or find out about upcoming updates from the devblog!