Friday, December 28, 2007

Monster AI and Points of Interest

One thing that was always a standard in fantasy settings has been the fact that abandoned points of interest such as the old wizard's tower or the ancient dwarven city is that they always attract new inhabitants, usually the unsavory kind. Given that my concept of mob placement and spawning involves dynamic, mobile spawn points as well as mobs that can be permanently defeated, this feature ties in well.

So with that we have the concept of Points of Interest. Rather than just being static places with some flavor, Points of Interest are their own living entities. They desire to be occupied by powerful forces, and in order to make that happen, they exert a magnetic Attraction that draws mobs to them. The Master Spawn Objects that control the mobs actions would be the ones checking for Points of Interest that fit their needs, are nearby and are exerting enough Attraction to draw the attention of the Mater Spawn Objects.

The Points of Interest would be flagged as to how strong their Attraction is and what types of creatures would be most attracted to that spot. So an abandoned wizard tower might exert attraction on all mob types, but it would have a especially strong Attraction for magic-using creatures.

Some Points of Interest might always exert Attraction and some might only attract when empty. So maybe a band of orcs has taken over an ancient city, but the city still exerts Attraction, resulting in a large dragon coming along and displacing the orcs who then look for a new home or maybe just rampage through the countryside in anger!

It would probably also be a good idea to have the Attraction factor of a PoI be malleable based upon strength and personality of any inhabitants as well as resources and treasure nearby. So, using our above example, the presence of the dragon might end up causing a negative attraction to its occupied PoI, keeping other mob groups away.

No comments: