jellewie/Unity-Gnorts

AI

jellewie opened this issue · 4 comments

Start working on AI

  • Peasants come from the 'Keep' and the speed of this is influenced by the happiness factor of the player (1 every X / happiness Seconds) [happiness can go above 100%, this will just boost the rate]

  • Peasants will be tried to assign every (1 second?) to a building (like a woodcutter) to let them work

  • Peasants will slowly leave one by one (every Y seconds) the castle when happiness becomes below 50% (till a minimum number?)

The Ai should be written as compiled as possible, in the end game there could be a few 1000 peasants walking around. So if improvements can be made (like multithreading) it would need to be either documented for later or needs to be done. This would be a huge step...

Sounds like something suited for the new Entity Component System https://unity3d.com/unity/features/job-system-ECS

yes indeed, already start watching tutorials, but I'm still too new for unity to nicely start this in the proper way at this moment.

AI should be able ideally to walk through the building 'InHand' (and some types like Fire_Basket)