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:
Untitled Torch Game
2d plattformer fov
Status | In development |
Category | Other |
Author | postosaurus |
Genre | Adventure |
Tags | 2D |
More posts
- Bringing things togetherJul 19, 2022
- Introducing AIJul 12, 2022
- ShaderinsanityJul 08, 2022
- Playing around with shaders and found thisJul 06, 2022
- Flexible Movement, where to go?Jul 06, 2022
- Unitled Torch GameJul 02, 2022
Leave a comment
Log in with itch.io to leave a comment.