Enemy Map Behavior

Got a great idea for HoA or wish to discuss a current feature? Let us know about it!

Moderator: Staff

User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Enemy Map Behavior

Postby Roots » Fri Jun 17, 2011 8:06 am

There's been a number of discussions on IRC in recent days regarding ways to improve the way that enemies are presented on maps and how they engage the player. I thought it would be a good idea to start a forum thread for us to document these ideas, what we seem to agree upon, and in general any features we'd like to add in the future to make enemies a more integral part of maps. To begin, here's a list of our current set of features for how enemies interact on maps.

  • Zones can be defined which will spawn a number of enemy sprites in them. The spawn locations are random within the zone. The spawn timer is configurable.
  • Spawn zones can additionally have a "roaming zone" that defines where the enemy is allowed to move. If no roam zone is defined, a spawned enemy may move anywhere.
  • Enemy sprites can be defined to have multiple possible "encounter parties", which are the enemy parties that the player will encounter in battle.
  • Enemy sprites have an "aggression" where if the player gets within a certain distance, the enemy will actively seek out and "hunt" the player until colliding with the player (which triggers a battle), or the player escapes the aggression radius of the sprite (usually by running away), or the player gets outside of the enemy's roaming zone.
  • Enemy sprites can be moved and manipulated the same as standard map sprites (in theory...I've never tested this but even if it doesn't work now, it should be easy to get it working).


Now I have a ton of ideas for how to expand upon this feature set to make it better, but to keep the discussion focused for now lets just talk about aggression. One of the ideas we had discussed and pretty much universally approved was the idea that an enemy's aggressive behavior toward the player is dynamic. In other words, sometimes enemies are more aggressive in hunting down the player and forcing them into battle, and other times they may choose to try and run from the player instead. Data that would factor into the aggression calculation would include: the average experience level of the party, whether or not the dungeon has been "cleared" or major boss enemies have been defeated, etc. We could literally alter the aggression of a dungeon by anything we wanted to, including events in the story that have occurred outside of the map in question.


Here's my initial proposal for how such a system could work.

1) Every dungeon has an aggression rating with a range from 1 to 100. The base aggression rating for every dungeon is 50. The higher this rating, the more aggressive enemies are in that dungeon. The lower the rating, the enemies will instead try to avoid contact with the player.

2) The aggression rating determines the aggression range. The aggression range is defined as a radius from each enemy sprite that the player needs to be within in order for the enemy to "notice" the player and take the appropriate aggression response.

3) The aggression range is broken up into sections. Each section corresponds to a different aggression range and aggression response. For example, we could do the following section breakup: #1: 1-20, #2: 21-40, #3: 41-60, #4: 61-80, and #5: 81-100. and these would be their responses:

#1: Avoid player, aggression range 10
#2: Avoid player, aggression range 5
#3: Engage player, aggression range 2
#4: Engage player, aggression range 5
#5: Engage player, aggression range 10


So that's the basic idea. There's still a lot of room left here to consider other changes as well. For example:
- Should aggression rating also have an effect on the movement speed of the enemy?
- Do we want aggression to optionally factor in line-of-sight (e.g., enemy does not act unless its facing toward the player)?
- Do we want aggression to optionally factor in sound (e.g. player running creates more sound than player walking)?
- Do we want to report the aggression level of the dungeon to the player in any capacity?
- Do we want to optionally allow individual enemies or spawn zones to have aggression ratings that are different from the current one on the map, or should aggression remain a global map value?


Yeah so, enemy map aggression. What's your take on it?
Image
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: Enemy Map Behavior

Postby nemesis » Fri Jun 17, 2011 9:41 am

Sounds interresting up to here.
Roots wrote:- Should aggression rating also have an effect on the movement speed of the enemy?
Definitely. Basically, we can think of something similar to the run system of the player. So, if the enemies aggression is very high, it hunts the player with increased speed but limited stamina. So, the player may choose to run away or fight. In the first case, the stamina of the player compared to the enemy may decide, if the battle happens. Also, for very aggressiv monsters (>90), the enemy may be allowed to incease its own roaming zone.
Roots wrote:- Do we want aggression to optionally factor in line-of-sight (e.g., enemy does not act unless its facing toward the player)?
Yes, if it is not getting too complicated.
Roots wrote:- Do we want aggression to optionally factor in sound (e.g. player running creates more sound than player walking)?
That was one thing I also though about. Generally I think, footsteps (depending on the players speed) should be heard.
Roots wrote:- Do we want to report the aggression level of the dungeon to the player in any capacity?
That would be great. One can think about some initial dialogue (or narration) on entering the dungeon like:

Code: Select all

"A cold breeze touches your face. You can even feel the monsters only waiting for you..."
for a high agression rating.
Roots wrote:- Do we want to optionally allow individual enemies or spawn zones to have aggression ratings that are different from the current one on the map, or should aggression remain a global map value?
I do prefer the first one. E.g., if you kill the boss monster, some of its minions arround will be very agressive, while enemies far away may not be effected. But I do think, a rating for the zones will be sufficient.
User avatar
Bertram
Senior Member
Posts: 127
Joined: Fri Feb 26, 2010 10:08 am

Re: Enemy Map Behavior

Postby Bertram » Fri Jun 17, 2011 1:16 pm

Hi all :)

- Should aggression rating also have an effect on the movement speed of the enemy?

As for me, and IIRC, rujasu thought about spawning more and more ennemies between two fights.
Hence, i'd better see a greater new ennemy party spawn speed the higher the agression level is.
(As long as the ennemies speed is a bit higher than the character walk speed and less than its run speed, just like now.)

- Do we want aggression to optionally factor in line-of-sight (e.g., enemy does not act unless its facing toward the player)?

It could be fun to add this for certain dungeon, (let's imagine our heroes want to espace a prison, hence avoiding the guards...)
but it should be a script option, and not high priority in the long todo list IMHO.

- Do we want aggression to optionally factor in sound (e.g. player running creates more sound than player walking)?

What nemesis said :)

- Do we want to report the aggression level of the dungeon to the player in any capacity?

In Spiral Knights, a symbol is shown in the menu bar telling whether it's a good idea to go further in the dungeon. Maybe you can add a little icon in the menu next to the image representing whether "it's cool, we can do it", or "Are you crazy?!?". It could be the Hero's instinct icon. ;)

- Do we want to optionally allow individual enemies or spawn zones to have aggression ratings that are different from the current one on the map, or should aggression remain a global map value?

I guess that it's not high priority either, but I think that you may one day want to create a map with a bit steeper difficulty increase, hence wanting this feature in.

Anyway, I'm glad to see all this creativity at work here :)

Best regards.
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: Enemy Map Behavior

Postby nemesis » Wed Jun 22, 2011 8:33 am

Just one more thought.
nemesis wrote:
Roots wrote:- Do we want to optionally allow individual enemies or spawn zones to have aggression ratings that are different from the current one on the map, or should aggression remain a global map value?
I do prefer the first one. E.g., if you kill the boss monster, some of its minions arround will be very agressive, while enemies far away may not be effected. But I do think, a rating for the zones will be sufficient.

This may be implented very easily if we simply allow some kind of aggression level modificator for each enemy zone. This can be an offset (e.g. -30 to 30, default 0) or a multiplicator (0.5 to 1.5, default 1).

Return to “Ideas and Game Features”

Who is online

Users browsing this forum: No registered users and 2 guests