Chernobylite is a science-fiction survival horror RPG. Set in the hyper-realistic, 3D-scanned wasteland of Chernobyl’s Exclusion Zone, explore a non-linear storyline in your search to uncover the truth of your tortured past.
[h3][b]Hello Stalkers![/b][/h3]
Welcome to the new year 2024! We hope you had a nice Christmas and New Year's Eve. We, on the other hand, have returned from Christmas trips and immediately threw ourselves into work. There is a lot of it, but no shortage of excitement. It's going to be a very interesting year. We can feel it in our bones!
Meanwhile, we stay for a while longer in 2023, which was almost entirely dominated by one topic - artificial intelligence. AI has been at the center of attention in the mainstream media, but also especially among fans of technological stuff and those working in the game industry. And all indications are that this locomotive is not going to stop - in the new year AI will be just as loud.
That's why today we're going to tell ourselves just about the artificial intelligence in Chernobylite. How it was created, how it works and what mistakes should not be made when creating an NPC "reason". We try to answer those questions below.
[img]{STEAM_CLAN_IMAGE}/34474429/7a266820636a5adc2c02e539e09b3111bb507ea7.gif[/img]
What's the first thought that comes to a programmer's mind when designing character AI? How to make it deliver cool gameplay to the player, of course. But in addition to that, he has to think about how to "fool" the player - make him think that he is not dealing with dummies who have been assigned certain commands, but with thinking beings. We know from experience that people interpret the intellect of AI very differently. Sometimes the fact that a character crookedly holds a gun in his hands while reloading can be interpreted by someone as stupid AI behavior, even though it has nothing to do with its behavioral algorithms.
Behavioral algorithms define the operation of the enemy's "brain" in Chernobylite. Here we mainly used the tools provided by the Unreal Engine. Specifically, with a structure called a behavioral tree, where we were able to define the "states" of the character's behavior, which in turn trigger commands in turn.
[img]{STEAM_CLAN_IMAGE}/34474429/975cb34f1bcde764cbeabaac717d9a6d7b216a01.gif[/img]
In practice, it looks more or less like this: state "search an enemy" -> "review your list of target" -> "what is the nearest target that triggered the command" -> "select a point around the target to get closer (by the way, check if, for example, the player is sitting in the bushes; if so, don't go into them, but stand on their edge to make it seem to that player how clever he is, even though the AI knows perfectly well where he is, just doesn't go there on purpose to raise the excitement)" etc.
[img]{STEAM_CLAN_IMAGE}/34474429/5c35c3ea5958b0f90ae3c731b3745578e8861ddb.gif[/img]
Perception of the player by the AI on the level is most often done through three senses: sight, hearing and touch. As for sight, in Chernobylite we have defined 5 points on the player: both legs, both arms and the head, to which the AI "under the hood" shoots a laser at some frequency. If the laser stops on an object, which in this case is the player, it means that the player can be seen - the threat rate then increases. If the laser stops on another object (for example, on an invisible bush collision, which blocks only the laser and nothing else) then the player cannot be seen. The other senses work on a more or less similar basis: we define points on the player to be "noticed" by the AI (e.g. the concentration of sounds made when walking or shooting), and then the corresponding states are activated.
[img]{STEAM_CLAN_IMAGE}/34474429/456c1a742804ff16d568720c05f8adef2feb378c.gif[/img]
[url=https://store.steampowered.com/news/app/1016800/view/3871470326666753509]Previously, we wrote about how the game's character animations are created.[/url] Today, it is also worth knowing about the fact that character animations and AI are closely related. In the sense that AI logic must be readable. And this readability is most easily presented precisely in the form of animations.
[img]{STEAM_CLAN_IMAGE}/34474429/b193bcf9e457417362239a316b639c22096b8893.gif[/img]
Example: AI suspects that it has seen something. At this point, the logic system hidden under the hood of the game must send information to the animation system to trigger the appropriate animation. This also works the other way: when the AI performs some animation, such as an attack with its hands, the completion of this animation must send back to the logic system to return to normal operation according to the predetermined states.
[img]{STEAM_CLAN_IMAGE}/34474429/cd1593d2a79aa71943c93596ae1c7fb5b5075ca6.gif[/img]
The biggest issue is that often given gameplay actions have a very rigid technical framework based on the needs of gameplay, making it difficult to show them in animation form. Example: Chernohost's paw attack. We know that his attack has a meter range and that the player, walking with his back to Chernohost, is moving quite fast. The range is short and the target is fast. This means that you have to make the animation quite fast. But you can't overdo it with this, because the shorter the animation, the less readable, and the less readable something is, the more annoying it is for the player. In contrast, a long animation will simply make the fight boring. It's very hard to find that golden mean, and it's already at the mocap stage, that is, using real actors.
[img]{STEAM_CLAN_IMAGE}/34474429/1bc407fb4c4d04765dc120c340647373efa83781.gif[/img]
It is now worth addressing another issue that probably every gamer has had to deal with. Well, in many games we can encounter various strange AI behavior, such as characters going straight into a wall or shooting at the floor.
[img]{STEAM_CLAN_IMAGE}/34474429/525e924c5f94350bfe36e741c4996c1672ee6506.gif[/img]
Then we usually just say that the AI doesn't work. But what exactly does that mean? Well, in our opinion, "AI not working" is mainly due to the fact that we can't anticipate all the problems involved in creating AI for a game. It is one thing to design AI on a flat test map under laboratory conditions, and another thing to later play on a final map that should, but does not always support the design of the AI we have created. Such an undertaking is very difficult on the communication side, and therefore needs to be planned early. And this cannot be done just by drawing on a piece of paper.
"Coolness" of AI can be achieved only by checking its performance live in the editor by trial and error. Such a method, on the other hand, can not be afforded in the case of the construction of sizable game maps - such things need to be played with in advance. The whole process is mega-complex in terms of planning, where you can't simply expand the length of production for yourself. Especially when you're a small studio with a 10-, 20-, 30-person team.
[img]{STEAM_CLAN_IMAGE}/34474429/c6fd22b39a1db6d105f45fa4fe2acf7fbe2a0af5.gif[/img]
Both today and over the past weeks, we've given you a lot of technical knowledge. We hope it was an interesting and informative read. Now we're going to give you a respite to gather energy. You will need this one soon so that you can demonstrate your creative invention.
[h3][b]That's it for today![/b][/h3]
Take care, Stalkers!
[url=https://store.steampowered.com/app/1016800/Chernobylite/#app_reviews_hash][img]{STEAM_CLAN_IMAGE}/34474429/439d1596b1020a43aad99b2aa6cc317b8d26711c.png[/img][/url]
[h3]Follow our official channels to stay up to date:[/h3]
[url=https://www.facebook.com/ChernobyliteGame][img]{STEAM_CLAN_IMAGE}/7934388/645be83a137d3c70f8afea0a46f0ee092265b9be.png[/img] Like us on Facebook[/url]
[url=https://twitter.com/chernobylgame][img]{STEAM_CLAN_IMAGE}/7934388/30dcb8d455a3b750d6ec4d601b7dd58645122467.png[/img] Follow us on Twitter[/url]
[url=https://www.youtube.com/c/Chernobylite][img]{STEAM_CLAN_IMAGE}/34474429/c81706ba74720e4d1fb3d32e29bb6fcd3fa98262.png[/img][/url]
https://store.steampowered.com/app/1016800/Chernobylite/