Hey hey! Hello there! It's that time of the week again! Your favourite Weekly Update blog just got another new fresh entry and this one is a bit interesting, to say the least...

This time it's all about AIs, behaviour trees and physics among other things...

So get ready to get amazed by the newest challenges the game will present you!

Better AIs

First off, I had to re-work the enemies a bit. While the enemies did properly attack the player that was about it... If no player were on sight then they would just stand there, doing absolutely nothing. While I never intended those enemies to be the final ones I still needed to have a solid AI foundation from which to build upon. I decided to revamp their behaviour trees a tad bit to give them a better brain.

Patrols

The first thing I added was a patrol mechanic. Basically, this gave the enemies something to do while searching for a target. Each room patterns have their own patrol pattern too. This means that, for example, an enemy in a chasm room will patrol the bridges, looking for any enemies or something to investigate.

The idea is that AI would loop around a given list of 3D points. Once the AI gets to its destination patrol point it can do a variety of actions. Typically this is just to look around a bit. Then it goes to the next point and so on...

The second an enemy is spotted the behaviour tree stops the patrol and start to give chase to the enemy. Once the enemy is gone they can resume their patrolling where they left it.

Of course, only really intelligent enemies will patrol, as we'll see later on...

Getting scared

Next, there's also an improved fleeing behaviour. Previously the behaviour was bugged and never actually occurred, but the idea is that when an AI gets really weak it will try to flee any enemies to protect itself.

Now, the behaviour is once again fully working and was also improved.

The Herd

One of the newest thing in fleeing behaviour is the herd concept. Basically, all enemies in a room constitute the room's herd. Once an enemy is trying to flee but doesn't see any particular dangerous entities it will try to get the closest it can form the center of the herd. This way it can actually protect itself by delegating its defence to the other member of its herd.

Once in the herd, they will then try to scramble around to really try to blend into it. If they encounter any danger the AI will then forget the herd and try to get as far away as they can form the danger in a typical fleeing behaviour.

While smarter AI will prefer to patrol around, weaker and dumber enemies will usually try to maintain a cohesive herd and stick together. This is particularly important as we'll see later.

Looking Around

Thirdly, there's now been another improvement in the "looking around" task. For those who didn't know if an AI loses track of its target, it will try to search around the last known position to spot them again. Previously this was a unique animation that played only once. If the enemy didn't spot anything then it will simply move on. Now, enemies will look around more thoroughly and multiple time. They will try to turn around in an attempt to relocate their target. If it fails, they then will return to their patrolling duty.

This is only the beginning, though. I might try to add a bit more interesting behaviour later down the line but this is clearly an improvement.

Oh, and here's a video showing off how AI works now:

Hamburger

Next up, I want to introduce you to your newest nightmare; the hamburger.

This enemy is quite easy to understand. It's a hamburger, and hamburgers aren't the brightest. They will essentially hop around aimlessly until they spot an enemy. It will then try to lunge themselves onto any enemies.

Because of their small stature, they aren't the strongest neither... To have better odds of survival they'll try to stick together and count on each other's back.

While they aren't the strongest nor the smartest, the sheer number of them and their annoying habit to pop-in behind your back can be quite staggering.

Each of the hamburger's components is linked through physical joints, making them react much like how you would think a sentient burger would move around...

Also. much like humanoid enemies hitting specific parts of a hamburger will deal different amount of damage. For example, hitting the patty will count as a headshot, which will multiply the damage by 5.

There are many different types of hamburger, but as of now, there are three different types of burgers...

Each burger got its own appearance and physical attribute to make them easily distinguishable from each other.

Cheeseburger

This is the typical hamburger. Nothing special at all.

They have a typical lunge and got literally no brains at all. They deal normal damage and doesn't have any particular behaviour at all.

So it's your run-of-the-mill burger.

Nastyburger

This is one of the special variety of hamburgers. This one is quite nasty.

This is, of course, a reference to one of my favourite show while I was growing up...

The idea is that this is an expired hamburger, and is therefore really toxic. There are even flies flying around if you listen closely.

Every attack dealt by it can result in poisoning, so the player must use caution while dealing with this type of burger.

Hotburger

This is another special variety of hamburger. This is quite a spicy one.

This is a hamburger topped with strong peppers, baked with hot sauce and server with an even hotter sauce.

Any contact with this flaming hot burger will put anyone on fire, so be careful while dealing with this one.

You might need a lot of ice cream too!

So here's a quick video on the burgers:

Minor Updates

Fixed bugs with behaviour trees

Refactored most behaviour trees for reusability

Fixed bugs with status not behaving well with hamburgers

Optimized some MonoBehaviour to remove some of the null checks in properties

Updated the .NET version form 3 to 4.

Refactor most class to fix some wrongly used word cases.

Fixed some potential problems with the map generation failing to generate the level.

Next Week

I'm planning to continue my AI and enemy quest next week. In fact, I might say that this is going to stay the same for quite a while. Meanwhile, I also need to fix some of the code for my level generation. I may even add other room props too!

I'm also planning on really implementing the focus system and perhaps add a bit of piece of equipment to go with it.

Aside from that, it's your usual suspects, which are special rooms, relics, capacities, activated items among many others.

Still no plan for a demo, but my ultimate goal is something by September... At least a demo or something.