Week 6 - Needy Citizens & Wells in the Sky
Citizens With a Goal
Last week, the three final characters were added to the game. These characters only had the 'stray' behavior applied with a basic food need. That is no longer the case this week. The majority of this week was dedicated to the development of all needs involved in need-based behaviors. The needs that a citizen must satisfy can be seen below:
After a time of about 6-7 minutes, a citizen will become hungry. The citizen satisfies their hunger by visiting the marketplace nearest to them. This was developed last week.
A marketplace that citizens can visit if they are hungry
After a time of about 3 minutes, a citizen will become thirsty. The citizen satisfies their hunger by visiting the nearest well; a new building added this week.
A well that citizens can visit to quench their thirst
After a time of about 15 minutes, the citizen will become tired, and will travel towards the nearest house (not necessarily their own), and rest on the spot for a minute.
After a time of about 7-8 minutes, a citizen will require a social interaction. This citizen will find another citizen that also needs a social interaction, and the two will travel towards each other until they meet. This is one of the first instances of AI characters interacting with each other.
Citizens engaging in a social interaction
A citizen sleeping in their home at night
The 'value' of these needs all lower linearly over time, with no particular priority given to the first four. However, a citizen will travel to fulfill a need even at night. Now, the city looks much more alive & active!
Buildings in the sky
In the process of creating the 'thirst' need, a new structure template building was added to the city. Unlike the typical building generator, a structure template has all the blocks predetermined; the building is simply dropped into place. This now makes two structure template buildings out of all the possible buildings in the city.
The other structure template building is the blacksmith, which had some minor problems with placement since the beginning of the project. However, with a second building added, these problems are very noticable, with buildings randomly placed in the sky, in the ground; anywhere but where they are supposed to go!
At this point, this bug is the most noticable in the entire project, and I will put great effort into solving it as soon as possible.
On the wrong path
One major part of the proposal was pathfinding, so characters could travel large distances without getting stuck in a holes/corners. There are prexisting behavior nodes for this purpose, but some of them rely on old versions of the Pathfinding module, so they had to be updated. Now, I'm coming across an error with the MinionMoveComponent which is used in these nodes. A path can be properly saved to the node, but throws an error when it is actually saved to the component. This is currently stopping pathfinding from working as intended, and is a problem I will need to solve in the coming weeks.
Over the Next Week
- Finish the outstanding tasks with need-based behaviors, such as pathfinding and a UI that displays character needs.
- Fix issues with character movement, most prominently the tendancy of characters to get stuck on the way to their goal.
PRs & Issues
- https://github.com/Terasology/MetalRenegades/pull/11 [WIP] Need Based behaviors and Implementation of Final Characters
- https://github.com/Terasology/MetalRenegades/pull/15 Fix reference to 'blacksmith' building inside of the default culture
- https://github.com/Terasology/DynamicCities/issue/35 StructureTemplate placement still off at times
- https://github.com/AndyTechGuy/Behaviors/tree/pathfindingChange/ Branch with pathfinding changes