Aubergines Smart Entities

Here is an early demo of artificial life.
As it is an early demo, its not a very smart entity right now but the basics have been put and expanding the current finite state machine will be very straight forward from now on.

Webplayer for the demo.

Just watch the guy decide and change moods.
You can press space key to set a predefined mood.

Updated the demo!

Additions are;
*Entities have view frustum and can see objects in their surroundings
*Interactable objects in the world (for now, entities only see and acknowledge them)

I do plan to add;
*Examine interactable objects and use them for entities needs if necessary
*Add other entities to possible targets according to friendly enemy or neutral and interact with them accordingly.
*Sell the package for an outrageous price.

What do you think?

It looks pretty good, wondered if you were using coroutine() time lapse and switch state too create this behavior, i would continue and sell it on the asset store as i believe there are never enough AI solutions at least at this present time. :sunglasses:

No coroutines here.
Every entity has a FSM and it does update itself based on a ranged time value set while setting up the fsm itself.
But its about to change to both time and environmental triggers.

Small update for development debugging, now i can see the view area of entities.
Web player is updated in the first post.

Another small update;
*Entities now can see each other, from this point an entity can seperate humanoids and static entities which means i can put different behaviours when interacting with npc or static entities.

  • if a new entity joins the scene, other entities now recognise the new comer (press a key to pop up a new entity)
  • blue lines show what the entity is focused and looking at
  • green lines show where exactly entity is going to when he is wandering.

web player link is in the first post.

Getting better and better! Keep up the good work :slight_smile:

Its even better now, ive added random name constructor for npc’s and waypoint based pathfinding for entities to use when they want to go somewhere. Although its not in the webplayer yet.
This is as generic as it gets, for further improvements i need to decide what genre i should focus while developing this or leave it as is.

Soo, any suggestions welcome.

Awesome job! It would be great to see a collision avoidence with each other and aggressive state )))

The integrated pathfinding does not avoid collisions with entities already in motion. But they slide to each other with the help of a collider.
However, you can integrate your own pathfinding such as unity steer for the behaviour you want.

About agressive state, you can set as many states as you want, but it will be your job to program how it will behave when it gets to that state.

After all, although i am planning to sell this as a solution, it will still require alot of programming on your side too.

I have come to a point that no heuristic calculation gives the exact shortest path in any kind of A* pathfinding under different circumstances.
Although this gives variation and randomness to entities, sometimes they look really stupid.

Does anyone has any direction advices on how to proceed from now on?

Rewritten the whole thing and tidied up code. And Optimized the pathfinding.
Webplayer in the first post is updated.

Just press space key to force change current finite state to wander randomly, although forcing sometimes has unwanted effects.

A very big update on the Finite state machine, pathfinding and Entity specialization.

*Finite state machine now changes states both when a timer reaches to a defined value and if a goal is achieved or not.
*pathfinding is optimised and finds the exact shortest path to a position
*pathfinding now has predefined paths to point of interests
*pathfinding automatically recognises obstacles
*entities has unique identities, name, age, health…etc. kind of stuff
*entities all use character controllers now with a fps kind of motion, they are effected by gravity, collisions they can jump and fall and if fall a very high distance damage can be applied

WEB PLAYER

1 more update,

now there is a very agressive guy and he gets mad every 10 seconds and kills anyone closer than 5meters and calms back down for another 10 seconds, offcourse these are all adjustable but just for the sake of demo i pre set these values.

Killing is again also for the sake of simplicity, just a distance check. It can be if target is visible, if it causes a threat…etc

web player is on the top post.

By the way, Any comments people? Am i on the right track? Am i loosing time? Anything?

Another small update, for demo.
Now the guy has more chance of calming down after killing afew neutral guys.
And if there is no one left to kill, he kills himself.

Webplayer is in the first post.