Skip to content

Team Feature Alignment

A good chunk of the day was spent having a nice, long team call to work through some of the unknowns we were encountering in the design. This ended up being a roughly 4 hour call. Things really started gelling when we all hoped onto the same Excalidraw. This helped really visualize what we were talking about and to lay out our ideas much quicker.

Below you can see all the different topics that we talked about. I'll go into them in more detail below, in no particular order.

Overview of all the topics discussed

Glimmerstalker Behavior

The biggest thing that we needed to nail down was how do the Glimmerstalkers, the main antagonists of the game, work. I think we had a rough handle on how it should work on a "conceptual" level but not really at all on a technical level. There was also some uncertainty about the different states and general behavior of the Glimmerstalkers.

Looking back, I should have made actual diagrams much sooner, as I was the main driving force behind how they would work. While I did have board items that textually described them (though probably not adequately) there is just something about being able to see a flow chart describing how it flows through the different states.

With that, I present you our state diagram for the Glimmerstalkers!

Glimmerstalker States

We defined five states that Glimmerstalker could be in: Harassing, Stalking, Attacking, Fleeing, and Satiated.

Note: The Glimmerstalker will be invisible unless otherwise noted. It will still move around the map to provide positional "dialog", among other reasons.

State - Harassing

In this state, the Glimmerstalkers will target one or more Crew and apply Morale debuffs to them, in an effort to make the Crew break/panic and run out of the light.

During this time, it is also checking to see if any character (either the Player or Crew) has been out of the light for a given amount of time. If it finds a "stalkable" character that isn't already being stalked it will enter the Stalking state.

State - Stalking

In this state, the Glimmerstalker stalks the target character and begins moving towards them. Once a minimum timer has elapsed, and the Glimmerstalker is close enough, it moves to the Attacking state.

The timer is there to help make the encounters more fair to the Player. Without the timer, if the Glimmerstalker happened to already be right next to the character, the Player would not have enough time to react before that character was eliminated.

If the Glimmerstalker is subjected to light while in this state, it will either: 1. If the Glimmerstalker is at the edge of the light, it will move to avoid it 1. It will "hover" around the light until its prey leaves the light again 2. If the character stays within the light for some amount of time, the Glimmerstalker will revert back to the Harassing state 2. If the Glimmerstalker is too close to the light, it will enter the Fleeing state

State - Attacking

In this state, the Glimmerstalker becomes "corporeal" and visible. It will charge the character. If it reaches the character, the character is eliminated and the Glimmerstalker will go into the Satiated state.

State - Fleeing

In this state, the Glimmerstalker kicks up a cloud of snow, then takes off into the sky, disappearing. It stays in this state for some time, then reverts back to the Harassing state.

The intent of this state is to allow the Player to rescue the Crew (or themselves) by throwing up a light (more on that later). It gives them a temporary reprieve from being Stalked or Attacked.

State - Satiated

In this state, the Glimmerstalker disappears and stays in this state for some time, then reverts back to the Harassing state.

The intent of this state is to give the Player a reprieve after they lose a Crew member. A calm after the storm, so to speak.

Repelling Light

One of the biggest things that came out of the discussion about the Glimmerstalkers was how we were going to handle lights in relation to the Glimmerstalkers.

We determined we needed to know two things: 1. How does the Glimmerstalker know to avoid the light? 2. How does the Glimmerstalker determine if it should Flee the light?

Choosing the Light Structure

We talked through a couple of ideas for detecting the lights: 1. Spherecasting to find lights 1. This sounded expensive, with each Glimmerstalker pinging the area around it every frame to find lights and reacting to them 2. Querying a Light Manager to find the closest lights 1. This would give the Glimmerstalkers a central point for determining where the lights were and provide a (hopefully) low-cost way to calculate the distances. 2. This solution would be good if we needed more granularity or specific behavior to move them outside the lights 3. Using colliders on the lights 1. The next idea that Terra had was to use colliders around the lights that the Glimmerstalker would collide with 2. This is probably the easiest solution for now and what we'll move forward with

The Implementation

Now that we determined the structure we want to attempt, it was time to actually figure out what that meant from a technical standpoint.

We decided to structure our "Repelling Lights" like this:

Repelling Light Structure

If the Glimmerstalker hits the outer collider, it will move to extract itself from the light. The exact mechanism of that will be worked out more once we get the Glimmerstalker actually put into the game and start figuring out what its movement control looks like.

If the Glimmerstalker hits the inner collider (though, theoretically it shouldn't if it is avoiding properly), it will move to the Fleeing state and extricate itself from the area.

There are definitely some questions though:

  1. How does the Glimmerstalker know which way to move out of the light?
    1. We might be able to just take the position of the collision (i.e. where the Glimmerstalker collided with the collider) and the center of the hit light. That should give a vector that we can use to move directly away from it
  2. How can we get the Glimmerstalker to "hover" around the light, if its target is inside it?
    1. Unknown at this point. Hopefully as we build out the Glimmerstalker controller more ideas will come
  3. If the Glimmerstalker is already in a position and the light is spawned on top of it, will the colliders trigger or does it have to "collide" with the edge of it?
    1. We don't think the colliders will trigger in this instance, so we'll have to figure something out for the Light Spell, since that should be the only time that we are spawning lights dynamically

Light Spell

Closely tied to how the lights work is the Light spell. The idea for this spell was that the Player could burn some energy to create temporary safe zones around them. There was some vagueness if this would be something that they would have to "hold" the spell (i.e. it was active as long as they held the cast button)? Would it shoot out like a flare? Does it drop a light?

After some discussion, we decided that it should drop a Repelling Light where the player is standing when they click the cast button. We decided to go this way because it is simple, no targeting, reusing the Repelling Lights functionality, etc. It also has the added gameplay benefit of it being stationary while the Caravan is always moving forward. This means that the Player only has temporary reprieve and will have to move eventually (either because they need to catch up to the caravan or because the light goes out). We'll need to balance the radius, energy cost, and duration to ensure that it can't just be cheesed to provide unlimited safety.

Because we don't yet know if spawning a collider on top of an existing Glimmerstalker will actually trigger it, we are planning to do a spherecast (or two?) to detect if any IRepellables are within the radius to flush them out explicitly, then let the Repelling Light do the work from there.

Spell Structure Diagram

That wraps up all of the discussions related to light. Now we can go over the Crew behavior.

Crew Behavior

We've had the ideas for the Crew behavior for quite a while, but much like the Glimmerstalker, some of it wasn't very well defined. Generally, we wanted the Crew to follow the Caravan until they (inevitably) had their Morale break and they panicked. Then they would run off into the woods and would get eaten by a Glimmerstalker unless the Player could rescue them. Like, what actually happens when the Crew panics or what does it mean to "rescue" the Crew?

To help us hammer it all out, we made another state diagram (actually, it was a lot more involved than this one but this is more easily understood).

Crew States Diagram

We laid out five states: Caravanning, Fleeing, Cowering, Returning, and Dead

State - Caravanning

In this state, the Crew walk next to their designated sled in the Caravan. They do not really do much else besides that (and slowly freeze to death!)

When they acquire new negative Morale Modifiers, a check is ran to see if they "break", unless they are in Shock. The chance of this is determined by their current morale level (as talked about in a previous DevLog). If they break, the move into the Fleeing state.

State - Fleeing

In this state, the Crew picks a random target to run to, away from the Caravan, and start running towards it. They will also make some type of callout to alert the Player. We decided to place points around each sled that they could flee to. This may not be the best way to go about it, but we wanted more control over where they could flee to. We wanted to avoid them picking points that were directly in front of or behind the sled, since there could be more sleds in the way. I'd be interested in looking into other ways to handle this, like using a combination of Random.insideUnitSphere and some type of mask (probably programmatic) that would mask out the unwanted areas.

With the current plan, the Crew will pick a random target, check if it is reachable on the NavMesh, if it is reachable, then go to it, otherwise pick a new one.

Flee Points around Sled example

If the Player uses the Soothe spell on them, they will enter the Returning state. If the Crew reaches their "flee target" then they enter the Cowering state.

State - Cowering

In this state, the Crew cowers in place, awaiting their fate.

If the Player uses the Soothe spell on them, they will enter the Returning state. If the Player does not Soothe them in time, a Glimmerstalker will eliminate the Crew member and they will enter the Dead state.

State - Returning

In this state, the Crew attempts to return to the Caravan. If they make it back without being eliminated by a Glimmerstalker, they return to the Caravanning state but will be in Shock.

State - Dead

In this state, the Crew is dead and cannot move, be targeted, etc.