Getting a child’s attention

We have basic behavior for the children in our game, as you can see in my blog post “Making a child behave”, but I want to reach further into the depths of a child’s mind and implement attention. The children can currently be idle, lost or follow you blindly, but what if there is a pretty shining light nearby? Shouldn’t that distract them? What if there is an enemy chasing them? Should their focus not be on getting away?

I am now attempting to make the children come even more to life and for that I will have to implement even more states, but how would attention work? I think that certain objects and creatures should increase the chance of a child losing its focus. To keep the children focused on their mother, the player would have to communicate with them and not go too far away.

I am currently working to implement a communication system between the mother and the children and that hopefully will work well with our game and aesthetic goals.

Communication

Currently the player can use a sound which the children can answer to, if they are close enough, revealing their position both with light and sound. What I want to do is to give the player different commands to use, like: wait, follow or just respond

Wait
This command would make the children enter the Wait state, it would work much like the Lost state but now the children won’t follow you again until you ask them to or if you have been away for a longer while.

Keep Close
This command would make the children enter the Keep Close state, where they would hurry to be by your side even if they are close enough to be idle, before going into/back to idle state.

Attention

I am thinking of making attention in the form of a stat. It increases closer to the player and decreases further away. If a child with low attention pass by a distracting or frightening object or creature it will ether curiously move toward it or try to get a away from it. In the process the child would lose its focus on the player.

About Sebastian Wallin

2016 Programming