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.

More Dwarf Fortress Graphic Goodness

More people are jumping into the fray of trying to make Dwarf Fortress look pretty. The latest is a Map Visualizer created by Sinoth. You can find the beta download as well as some screenshots in this thread.

Saturday, December 15, 2007

Alterac Valley: The More It Changes, the More It Stays the Same

So it's been several weeks since the much lauded patch to fix Alterac Valley, and once again, we're back to the same old, zerg-the-enemy-base-ignore-opposing-players strategy. I blame both the developers for creating a crappy setup that promotes that sort of strategy, and the players who are too scared to actually engage the enemy in what is supposed to be a PvP instance!

Thursday, December 06, 2007

Simulating AI in Online Virtual Worlds: Preliminary Notes - Master Objects

Dynamic AI and spawn systems are something that has always intrigued me. UO tried it back when they were in beta testing, but the calculations required brought the servers to their knees and the concept was abandoned.

And no, increasing the spawn rate based on number of players in the vicinity does not count as dynamic in my book.

I've tried on numerous occasions to collate my notes into some sort of actual design-type document, but organization of it has always eluded me. So I decided to instead break things down into smaller components and try and put together some rough outlines.

For this first attempt we have Master Spawn Objects.

Master Spawn Objects are invisible objects that control a group of mobs. These not only tell the server when and where to spawn mobs, but they also help define a sort of group consciousness for the mobs in their group, giving the mobs reason and purpose beyond the basic concept of providing punching bags and loot pinatas for the players. This object is not designed to dictate every movement of the mobs within its area of control, but rather to provide a guiding force and also to maintain historical data that will be used to create a dynamic and flexible spawning system.

Master Objects

  • Provide an over-arching framework with which to control a group of mobs.

  • Serve as a way for mobs within this group to 'talk' to each other

  • Can spawn new mobs

  • Can add additional AI routines to individual mobs within its group

  • Can move the entire group (either as an attack on another settlement or as a means of self-preservation by moving away from areas where they're being 'farmed')

  • Keeps historical data on events that have happened with its group

  • Can alter its behavior based on the historical data

  • Can create and destroy temporary structures that are associated with its group

  • Can keep track of group-owned objects and storage, using that information to alter group actions and desires as well as providing appropriate spawns

There's a starting point off the top of my head. I hope in the future to clean it up and provide further details on what each part means. And, of course, this is only one part in a multi-faceted Dynamic Spawning AI system!

I would love to hear any comments or suggestions!