Game
Project Smile
7 years ago

Devlog #1 - Introduction & The First Steps of the AI


Hi, my name is Dennis Karlsson and I am the leader of the group of students that develops Project Smile with Unreal Engine 4. The project has now been in development in about a week so we have seven weeks left. All of us in the team will be writing devlogs here on Game Jolt about our progress on the project and how that progress has been achieved. First off, I would like to tell about our plans for the project.

Project Smile is a first-person horror game mainly inspired by Outlast and Alien: Isolation. Like those games Project Smile will feature an enemy that you can’t kill, an enemy that will try to find and kill you. You as the player will be able to hide in hiding spots: inside lockers, under beds, and behind curtains for example. You will also be able to defend yourself by scaring the enemy off with light.

What makes this game special is that the AI will learn from the player. If the AI finds you inside a locker, it will learn that the player prefers lockers and will then mainly search that type of hiding spot in the future. The AI will also get more used to the light if you use it too much, so you will need to be more aggressive if you want to scare it away.

In addition to being the group leader I will be programming the sole AI of the game. I’ve made some progress already that I will share with you below. I am also the lead story writer. There will be some pages to find in the game that tells the backstory and we are hoping to have enough time to add a couple of cutscenes and scripted events for opening and ending the game.

Now it’s time to tell you what I’ve done so far with the AI. Firstly, I wanted to make the AI be able to patrol a certain area by giving it points to go to and orders for what to do at the point. For now, the AI will rotate between two angles to scout for the player.

I have used Unreal Engine 4’s Behavior Tree and Blackboard systems for making it do tasks in a specific order. The blackboard also stores what path node it wants to go to next. Firstly, it moves to that path node that is placed on the map. It will find its own way with the NavMesh system in the engine.

When a node has been reached it will check what type of node that was reached. At the moment there only is two; a “room node” and a “search node”. The “room node” functions as a main node for an entire room that connects other nodes within it. When this type of node is reached the AI won’t have any specific task except wait for a second. When a “search node” is reached the AI will stop and rotate between two angles that is stored in the node.

When a task is completed it will set the next node to go to. All nodes store a reference to another node which represents what node the AI should go to next. The AI gets the reference and stores it in the Blackboard so it can know where to go next. The “room node” is a bit different since it stores both another “room node” and a “search node”. Therefor it will check if this “room node” already has been reached. If it hasn’t reached it the “search node” is selected. If it has, the next “room node” is selected.

At the moment the patrol system is almost finished and has two problems that needs to be solved. The most important problem is that when it scouts, it won’t rotate continuously. The rotation seems to be set to the first angle and then the other after a while, you can see this in the GIF below. This happens because I rotate the character in a while-loop that doesn’t show the rotation until it’s finished. I plan to fix this by making a custom event in AI controller that rotates it with a Timeline. Timeline is unfortunately not available in Behavior Tree Tasks.

5d0a9b95e897e.gif

The other problem is that when a “room node” is reached, the AI will choose to go to the another node than the one assigned. It is always the node that the first “search node” has stored so there is probably something obvious that I have missed. I’m sure I will find the reason soon. When all problems are solved with the patrolling I will make sure that the AI can detect and hunt the player.

So this is how far I’ve come so far personally with Project Smile. My fellow group members will also share their own progress too soon so be sure check it out!

Dennis Karlsson



0 comments

Loading...

Next up

Here's a peaceful little forest scene for this #screenshotsaturday, from the beginning of the game.

Runestones: from concept to in-game model🗿

I have added rewards for quests so that villagers can give you something in return for your hard work helping them. 🥳

I want to know - what's your favourite quest reward?

Strange Umbrella

An infected room from the second part of Cybel ! Are you up for some cleansing?

Today I tackled drawing different variations of facial expressions for one of the main characters in Eden. What do you think of it? :) Eden: https://gamejolt.com/games/Eden/592698

OK, this starts to be too tricky puzzle already :D

#platformer #indiegame #puzzle

Only true badasses may pass! #conceptart #art #gamedesign

A sneak peek at the new OST, can you guess what this song will be used for? 🤔

A 1h30 painting, coffee break.

My twitter: https://twitter.com/loupil100