Populate the world


Hello everyone,

after the shadermess has been settled I refactored my project a bit to have a clean point from which I can go on.  Now I want to tackle NPC movement and AI's. I have the idea to create NPC that can follow the player. A task could be to bring these home or in a safe space. They will only follow when they are in reach, so the player can lose control over them if she is not close enough.

I thought could be a nice idea to collect something in the game that makes the circle of light bigger, so Fiona can see better. In the beginning I was thinking about a torch that the player could manipulate to see the world around, but I dropped that approach in sake of the new shader and regarding how much headaches I had by figuring out how to get my old FOV-Scripts well integrated into the other systems and make a fun game-play out of it.
So the collectable should not be a battery or torch anymore but rather something organic. I came up with the idea to create glowworms that fly around on the map. So I created a yellow square and tried to give it some behavior. There are some very different behaviors I could figure out and the most interesting ones seemed to be "mistakes" in the first place.


Idle State



The glowworms stick to the player all in the same positions. It seems like they disappeared or merged. This could be the behavior for the glowworms to go home(safes-pace)



The glowworms stick to the player and float next to Fiona, so she can take them with her without losing the worms.


The glowworms are attracted by the player, they float around him(opposite to the sticking from the other behavior)

This range of "following patterns" I am already very happy, I think with these three I can already do some game-play stuff.  I found one behavior for following, one for gathering in one spot and one for getting attracted to a target but also with the ability to lose interest and to back to strolling along.
So with this I imagine how the player needs to collect glowworms to get a bigger light-circle. Maybe some stick to the player and follow him, others will be easily distracted and the player needs to maneuver  them around to solve his task. When the glowworms are in reach of their final destination they can gather on that spot and maybe disappear or float around the object, illumination the scene.

In the search for the "following-patterns" I ran into lots of mistakes in my calculation and found some buggy, yet interesting behavior. I would call this the "flee-patterns", because yeah as the name says it already, the glowworm are fleeing from the target instead of following. I decided to keep all that "buggy code" and now I am happy I did, so I won't go back to define some fleeing  behavior by purpose and maybe look on the wrong spot. Implementing the follow patterns already provided me with the flee pattern.
So here is what it looks like:


The glowworms avoid the player and will disappear if the player tries to collect them. It is very subtle in comparison with what comes next


The glowworms are fleeing from the player. it is very good visible how they spread apart.


This flee pattern I like the most, it looks dynamic how the glowworms try to dodge the player.

This flee patterns rise ideas about enemies that will cause the worms rather to flee then to stick to the player. Like this the player could lose visibility and needs to avoid sources of thread for the glowworms. Another idea was that depending on some status or value from the player they will rather avoid Fiona then be attracted to her. Also there could be different types of glowworms. I like the idea to wrap game-play around these new found friends. They can have various behavior depending on the situation each individual glowworm finds himself in.

Now all of these are quite practical and make sense for the game-play and if you reached the article till here I want to show you as well the behaviors that are interesting but not in the range of what I was actually looking for.


Glowworms have circular movement and gather on a place to make a strange dance and turn in a cycle when Fiona comes. I am not sure what it could be used for


Kind of the same strange behavior as above, more exaggerated


They have some aesthetics to them and could be some extra behavior later for the purpose of giving the glowworms more personality. It could be an ability the glowworms have once they reached a certain amount at their safe-space to open a door or trigger some other event in the game.
So these patterns open doors to lots of possibilities and I am excited to see where I can bring these glowworms to. I was already thinking about my shader and "how will I get them glowing and creating the light-circle around them" but that's is for another time. Functionality over look. Progression not perfection.

By the way if you have any ideas on how to use the glowworms or about some lore around them, I created a board about it here.

See ya.

Leave a comment

Log in with itch.io to leave a comment.