GreenFour / pencil-knight

TCSS 491 Computational Worlds project
MIT License
0 stars 1 forks source link

Wish List: Enemy activation (see comment) #85

Closed DevonS3 closed 6 years ago

DevonS3 commented 6 years ago

This can be extended to all enemies and hazards, but what I specifically would like right now is this:

The ability to have Crows become active at the same time to ambush Hero. Right now Crow will activate once the horizontal and verticle distance gets to a predefined value. This means we can't have a Crow spawn/activate behind him. Finding a way to get three+ Crows to spawn at once and have Hero surrounded would be awesome. It's surprising to the player, and it makes it so the player can't just purposefully draw aggro on a single crow at once.

pilocchii commented 6 years ago

I think this can be accomplished by

  1. Having behavior triggered by an enemy's property, like "canSee" or "aggro" or something. When the hero gets close enough, it's flipped on, and if they're too far away it's off.
  2. Create packs/mobs/groups (whatever you want to call it) and assign each enemy to it. When one's bool is flipped, they all are.
DevonS3 commented 6 years ago

A group of crows is called a murder.

I like your idea.

Oh! I just had another one. I already create the spikes recursively. I instantiate one, which then instantiates ‘n’ more. It’s way less tedious then lining them all up by hand and setting their activation offsets up properly.

Anyway, we could just put in an “on activation” behavior in update that spawns two (or more) Crows. All enemies already have a sight radius and associated logic with that anyway, so we can just put it there.

DevonS3 commented 6 years ago

I think we should also use the checkpoint system to spawn different entities for different areas of the map. It gives us a natural way of resetting everything past the checkpoint on death, and it means we don't have to have everything loaded from the very beginning. (Assuming a large batch of entity additions doesn't cause slowdown due to loading).