5.6 KiB
tags | ||
---|---|---|
|
A giant fucking ghoulie!!!
Summoned when the grunk alert maxes out. Hunts down the player and grunkifies 'em.
"The angriest dog in the world, and he fucking hates power washing"
Concept: No head, tall spindly legs. Visually, I imagine it straining to pull itself out of the grunk.
Behavior
See grunk beast behavior tree.canvas. Related to grunk alert.
The beast is inactive below alert level 2. When level 2 is reached, the beast #Spawning in the vicinity of the player.
At a high level, there are broadly three behavior types we want the beast to have:
- Lurking (unaware of the player, just meandering about)
- When lurking, the beast randomly wanders between preset lurk points.
- Tracking (actively looking for the player)
- When tracking, the beast investigates the latest point-of-interest (POI)
- Pursuit (chasing the player)
- When in pursuit, the beast directly chases the player.
The beast's behavior while active is controlled by anger level.
Anger level
Each beast maintains an independent anger level. This is a number between 0
and 150
.
- The beast will slowly relax over time if the player doesn't actively agitate it:
- Anger decreases by
1
per second
- Anger decreases by
- Sounds will slightly agitate the beast:
- A sound in the beast's hearing range increases anger by
10
, up to once per second.- If the sound is also in the beast's provocation range, increase anger by an additional
30
. - Set the POI to the location of the sound.
- If the sound is also in the beast's provocation range, increase anger by an additional
- A sound in the beast's hearing range increases anger by
- alarm will substantially agitate the beast and furthermore draw it towards the player:
- When an alarm is triggered, increase anger by
60
.- At alert level 4 or above, increase anger by an additional
60
. - Set the POI to the alarm's location.
- If the beast does not have a path to the player, additionally respawn near the player.
- At alert level 4 or above, increase anger by an additional
- When an alarm is triggered, increase anger by
- Any attempt by the player to fight back against the beast will greatly anger it:
- If the player touches the beast, increase anger by
35
, up to twice per second (once per 0.5 seconds). - If the player shoots the beast with a beam, increase anger by
100
, up to once per four seconds. - If the player sticks a sticker on the beast, decrease anger by
60
. #easter-eggs - Set the POI to the player's location.
- If the player touches the beast, increase anger by
- The beast should lurk when at low anger:
- When anger is
<30
: Slowly wander between lurk points
- When anger is
- The beast should enter tracking mode at medium anger levels:
- If anger is
>=30
and not in pursuit mode:- Pathfind to the POI. (middle speed)
- Once there, wander around in a small radius.
- (randomly with low probability) Sniff for the player, up to once per six seconds.
- When the beast sniffs for the player, if the player is within sniff range, increase anger by
40
and set the POI to the player's location.
- When the beast sniffs for the player, if the player is within sniff range, increase anger by
- If the POI moves outside tracking range, start tracking again from step 1.
- If anger is
- The beast should pursue the player when it gets angry enough:
- When not in pursuit mode and anger is
>=80
:- Increase anger by
20
and enter pursuit mode.
- Increase anger by
- In pursuit mode:
- Pathfind directly to the player at pursuit speed.
- Pursuit speed should be faster than the player's walking speed and just slightly slower than the player's running speed. The player can escape if they run fast and don't make any mistakes.
- If the player is in grabbing range, grab the player, up to once per four seconds.
- Start grab animation. If the player is still in grabbing range at the end of the animation, the player gets grabbed. GAME OVER MAN!!
- If anger is
>140
and the player is in pouncing range, pounce for the player, up to once per four seconds.- (ditto with the grab action)
- If anger is
<80
, stop pursuit mode. - If the beast does not have a valid path to the player:
- If the beast does not have line-of-sight to the player, decrease anger by
10
up to once per four seconds. - If the beast DOES have line-of-sight to the player, increase anger by 6 per second.
- If the beast does not have line-of-sight to the player, decrease anger by
- Pathfind directly to the player at pursuit speed.
- When not in pursuit mode and anger is
Spawning
The beast spawns by physically pulling itself out of the ground in a grunky spot.
We want the beast to spawn somewhere which would ideally have the following properties:
- Should be near the player.
- The player should see the beast spawn.
- The beast should block the player's easiest escape route.
Every area in the map is part of a spawn zone. Each spawn zone has a number of priority spawns associated, which are just small patches of the floor. Priority spawns are destroyed if sprayed/toothbrushed; therefore, the beast will only spawn in a place that is still substantially covered in grunk. Additionally, each spawn zone has an indestructible default spawn which will be used if all priority spawns are unavailable.
When it's time to spawn a beast, we select a spawn point as follows:
- Use the highest-priority priority spawn for this zone which the player is currently looking at (currently in frustum and line-of-sight unblocked).
- If the player is not currently looking at any spawn points in this zone, use the highest priority priority spawn which the player can see (line-of-sight unblocked).
- If the player cannot see any spawn points for this zone, use the highest-priority priority spawn.
- If there are no priority spawns for this zone, use the default spawn with the highest priority.
- If the player is not in a spawn zone or the spawn zone has no default spawns, use a randomly-select map-default spawn.
- If there are no map-default spawns, log an error and do not spawn a beast.
ADDITIONALLY: A spawn point touching the player will never be used.