QuadTree
QuadTree
A QuadTree. is a nice way to save performance for big games or games with a lot of entities. So instead of just making a quad tree. I decided that i would make it in a simulation. So I made a life simulator. where villagers have to survive by farming. and they can build houses. to find shelter for the night.
The basic rules of a relationship
- When a villager has a relationship they need to maintain it so that it doesn’t end up in shreds. by talking with their partner. if the conversation went well. The spark of the relationship goes up.
- If a relationship spark isn’t above the liking of either for the partners. then they will try to break up. If the other partner manages to save to relationship they’ll have a second chance.
Life Simulator
The basic Rules in life simulator.
- A villager gets hunger every 2 seconds. if the hunger is higher than their threshold. then they will try to search for food. If hunger reaches too high then they will take damage every 2 seconds.
- A villager if it isn’t hungry. it will try to make a house. But they need wood for that. so if they don’t have that they will try to find it
- When a villager has a house. he/she can do multiple things. regenerate health by sleeping in the house.
- A villager has a sexual desire. which makes him/her want to interact with villagers of the other sex. Then they can form a relationship. and maybe create children
- When a villager has a relationship they need to maintain it so that it doesn’t end up in shreds. by talking with their partner. if the conversation went well. The spark of the relationship goes up.
- If a relation
Final Product
For seeing the results. I added some UI to keep track of each variable on a villager. Now we can see how the Villagers evolve. I also implemented time. In this game 1 hour == 0.01 seconds, by doing this we don’t have to wait an hour in real life to see progress. We can also speed up the time if we don’t want to wait.