The guard system is pretty much done, which leaves the rest of today to get player mechanics in place, and level design.
How it basically works:
-Guards stick to their patrol path until they notice something
-Sensations pulse out on a timer (or event related) to all guards
-Guards have low and high priorities for sensations: if they’re on patrol they’ll investigate low priority sensations, but high priority sensations (ie a new noise close by) will override them.
-When they reach a sensation they start wandering near it randomly to check for things
-Once guards have checked a sensation out, it gets marked and will be ignored for awhile (possibly forever)
-Guards have attention spans, if they’ve been following the same sensation for awhile they might lose interest and try another one.
-Naturally spotting a player overrides all other behavior in order to chase and, eventually, attack them.
On the downside, guard path finding is a bit janky around corners due to godot’s pathing not handling tile based pathing correctly. There’s a possible workaround, but I don’t really have time to add it.
Aside: We tried 8 directional movement for the first time (way better for pixel movement and guard sight angles), and it’s pretty sweet.
0 comments