Jump to content


The Physics of Friends and Enemies


2 replies to this topic

#1 bfg

    New Member

  • Members
  • Pip
  • 2 posts

Posted 04 December 2008 - 12:28 AM

I've been out of the gaming industry for a while now, but I still have a bunch of fairly strange design ideas I thought might be useful to someone. So, feel free to use or derive inspiration as you see fit. The following is really a generic mechanism to facilitate an MMO scale faction system rather than a design fleshed out for a specific game.

The problem that inspired this relationship system (for lack of a better name) is really a data representation problem. While thinking about modeling the relationships between game world factions, individual players, and AIs, especially in an MMO environment, I was quickly facing the possibility of storing and processing literally billions of relationships of the form: foo.feelsAbout(bar, [some numeric value]). The other side of the problem was presentation. How do you present this complex web of relationships to a player? This generated a short list of requirements:

1) model the dynamics of relationships between a variety of entities
2) present an graphic representation of these relationships to players
3) facilitate real-time processing

My solution was to think of social relationships as a sort of political shadow world, complete with its own objects and physics. In this paradigm I think of entities (factions and so on...) as objects in the political shadow world, and rules of social interaction as the physics of this world. The benefit of this is that the conceptual model suggests a presentational model. If the distance between two factions indicates, for example, their affinity, it's fairly trivial to render for the player a large number of proximity relationships in a 2D or 3D world. Likewise, it's fairly trivial to measure the distance between the locations of two factions in order to derive how they feel about each other, calculate how fast their relationships are decaying or improving, and a number of other analytic characteristics. Complex and dynamic social relationships can be modeled using simple and familiar physical mechanisms like gravity, speed, vector, distance, size, and so on.

So what? Some good things and bad things that emerge from this system:

- Good and Bad: when an object moves in relation to another object, it also moves in relation to every other object. Depending on how you utilize this constraint, it's a bug or feature. It does make some sense that altering your relationship with one faction affects all other relationships, but, it's not necessarily an intuitive result.
- Good: This would be a nice foundation for a dynamic quest generation system, or a player generated quest system, or a preferably a hybrid of the two. It conveys a lot of information in a dynamic model rather than the traditional static relationships one generally finds in games.
- Bad: Even a 3D world has limitations as far as representing complexity goes. If one thinks of faction metrics as dimensions, 3 factors isn't much. However, I might argue that humans live in a 3D world, so are, in general, existentially prone to getting confused when ideas grow beyond that complexity anyway. Still, it can be an annoying data constraint.
- Good: because the model behaves according to familiar physical rules, players can intuitively plan strategies in a political context, that then are reflected in "real" game world behaviors.

Questions? Comments?

#2 alphadog

    DevMaster Staff

  • Moderators
  • 1641 posts

Posted 04 December 2008 - 02:29 PM

My first reaction is: why?

As in, to what specific purpose do you want to model a "relationship system"?

Not trying to sound hostile, but it sounds like a solution looking for a problem, wherein the solution is always too ambitious or nebulous because there is no well-defined problem that keeps it in practical scope.

To use a (poor) analogy: Key West. It has all sorts of fun things to do. Should I go to Key West, and what's the best way for me to get there? :(

#3 bfg

    New Member

  • Members
  • Pip
  • 2 posts

Posted 04 December 2008 - 08:38 PM

It solves multiple problems - maybe that's what is a little confusing. I'll try to flesh it out a bit. The first is a technical problem.

# The Problem of Exponential Relationships

Imagine a database with records like the following:

ID objectA relation objectB
1 SomePlayer likes AnotherPlayer
2 SomePlayer hates SomeFaction
etc...

If you have a world with 500,000 objects that could have relationships with each other, you have a relationship table whose size is 500,000 * 499,999 * 499,998 ... * 2 * 1 records long.
A table that looks like:

ID objectA location
1 SomePlayer 678,10
2 AnotherPlayer 66,33
2 SomeFaction 389,422
etc...

...where you calculate relationships at runtime rather than looking them up in a massive table is far far smaller and easier to manage. This problem is aggravated if you have thousands of AI agents frequently querying this table.
It also facilitates mechanisms that effect multiple entities at the same time using simple physics - imagine dropping a quest whose result drops a gravitational field onto the political map drawing neighbors toward a common point, essentially improving the relationships between those entities.

# The Granularity Problem

Most AI environments solve the above problem by limiting dynamic relationships to very broad categories like factions and races. At the individual NPC level, entities generally have a static relationship with their faction or race and inherit those relationships which are often themselves static. This doesn't give AI agents much to base realistic decisions on, nor does it facilitate a world where players can actually change the relationships between political entities in the game world.
The solution I'm suggesting allows one to construct a political model that can integrate multiple scales of dynamic relationships, from the love triangle between the backer, the butcher, and the butcher's wife, to the relationships between nations, to the relationship between the butcher and his nation.

# The Problem of Representation

If you run through a list of games that try to represent political relationships between entities, you get what amounts to a list of very badly represented relationship models. Civilization has that screen with pictures of leaders connected by coloured lines that indicate treaties between entities, while most MMORPGs simply do not represent political relationships at all or have a simple list of who is at war and who isn't. Any game that has a political dimension either runs into this wall, or simply doesn't include political relationships in their product.
Showing political entities spread out over a matrix where proximity equals affinity gives players the information to plan strategies, pinpoint potential allies, and avoid hostiles. It also provides a representation that can indicate the effects of quests and real world actions on the political environment.

# A More General Why

I guess the question of why, to some degree, is like asking why combat between players needs to be fleshed out into individual attacks instead of just an instant you win|you lose result. I would answer that there's more to play with.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users