Intelligent Spawn Area Entities

April 25th, 2008

You and a bunch of friends have just finished a month-long project of deciding on a city location, collecting all the resources and cash to build your city hall, planing the city layout and zoning, and then recruiting more people to build their homes in your young town. The central park has just been completed by the two aspiring terrain architects and everyone has agreed on the interior designer for the city hall. And then the orcs came. More specifically, an orc military outpost popped up nearly overnight just outside your city’s limits, and now you find orcs spawning ever closer to your city hall building.

You know that if you don’t get this thing nipped in the bud those orcs are going to destroy the fruition of all the work and time poured into your city. So you call on all your city’s residents to come out and kill orcs every time they spawn. You call on them to destoy the orc structures at every opportunity. You know that if you can sustain high enough destruction the orcs will give up and go away. However, if you don’t they will continue to spawn faster and faster and closer and closer to your city hall, every day causing ever higher maintenance costs for everyone in the town- especially those unfortunate enough to have their houses build on that side of the city.

Three days of what seems like concentrated destruction later, you realize the orcs do not seem to be getting discouraged. In fact, they haven’t even moved! So, the mayor calls an emergency city council. The topic is how much can the city afford to sink into hiring out for orc killing. After the number-crunchers do some calculating, it becomes apparent you can pay 13,500 credits per mission of 20 orc kills for 900 missions before the city treasury get too low to pay all the maintenance. Other cities have had success with hiring out 900 missions to get rid of a nasty orc infestation, and you have seen other cities offering 12,000 credits per 20-orc-kill missions, so you are confident word will spread and the missions will be completed. Hopefully, it will be enough additional sustained destruction to drive them off. If not, this could be bad news for your burgeoning city.

The mayor sets up the missions in the city’s new missions terminal and everyone stars spreading the word that money can be made killing orcs in your town. A strange thing happens though. Nobody shows up. Well, a sporadic smattering of would-be bounty hunters drop by, but they don’t do more than one mission. Some don’t even finish it. At the same time, you begin to notice the orcs are becoming harder and harder to kill, each one seeming to hit for more damage than before. With concern creasing your brow you start a large patrol around the orce encampment, which you note has sprouted spiked walls sometime in the last two days. As you race past, you notice with worry a smudge pop into view over the next ridge, a thick trail of smoke rising into the air above it. As the distance closes, your worry turns to alarm as you realize that smokey blob is a veritable orc boom town, complete with seige engine construction tents and an advanced barracks. The orcs at your town’s edge are being supplied and upgraded from this until-now unknown and un-addressed regional threat. The last time one of these was discovered, more than 2 player cities ended up razed to the ground, and it took the concerted effort of three major cities a full month to drive them off. Prior to that, those three player cities had been engaged in bitter war over resources. The campaign to rid their region of the orcs nearly broke them all, and once they succeeded they were the closest of allies; they discovered there were bigger, more dangerous things in the world than the feud with their neighbors.

Your thoughts are cut cruelly short when your air bike is blown out from under you and you see your health bar virtually disappear. And then you’re dead.

In shock, you see an orc stand up from behind a rock, outfitted in gear like you have never seen on orcs before. I his hands he carries an enormous, shimmering rocket launcher. Your worst fears have been realized. The orcs have learned something new. They have somehow discovered or been given some super-weapon. You look to the left to see what else is around, and just before your screen blips to the respawn building back in town you see three more. “And they can mass produce them…”

How do you make intelligent NPC factions that can develop, spread, migrate, and even play politics? It’s possible.

Deal with all creatures at the spawn spot level. The spawn spot is the true, persistent entity in an MMO. It’s not the creature. It’s not the dev-created-and-planted buildings or villages. It’s the spawn spot. It’s the spawn spots that really interact. It’s the spawn spots you are truly influencing when you, as a player, kill creatures.

Each spawn spot has a set of attributes that define it. They define the creatures it will spawn, they define how big it is, they define the threshold under which it can possibly die, they define what terrain types on which it will best perform, and they define the rate at which they spawn creature instances in the live game world. These attributes change based on its environment. When a player kills a creature it spawned, it is recorded and included in the periodic calculations that do the actual attribute adjustments. When a spawn spot comes in contact with another spawn spot, the two spawn spots engage in what amounts to an arena battle, virtually of course and without actually animating the whole thing- you can just use the combat scripts you use whenver two opposing creature instances meet and fight in front of a player in the live game world. The outcome of that combat round results in the attributes of both spawn spots being altered. If multiple spawn spots’ areas all overlap, then you do “combat” matches amongst them all, with each round altering their attributes.

Whenever two spawn spots of the same faction interact, their loot tables interact. The loot tables contribute to the overall spawn spot attributes, so what’s in a spawn spot’s loot table really matters. An epic item can do a lot to make an otherwise squishy NPC become a formidible foe. Two mutually-isolated pockets of spawn spots of the same species can over time develop very different loot tables which result in very different levels of difficulty. If the two meet and interact, there will be a significant sharing of loot table items from the more advanced one to the less advanced one. In effect, the less advanced one “learns” from the more advanced one. By manually injecting a few epic items into just one spawn spot of orcs in the far northern reaches, over time the orc faction very well could expand their reach, both through creating new child spawn spots as they thrive due to the additional strength they have through their stronger loot tables (and thus attributes), as well as through the process of “teaching” their unlearned brethren spawn spots the glories of their epic loot table.

A spawn spot’s attributes will also determine how much it attempts research and development on its own loot table. In addition, not all spawn spots will be as amenable to “learning” as others may be, that is, the “coefficient of loot transfer” makes it less likely that the roll to choose which of two loot table items is better will fall in favor of the truly better one. A spawn spot’s attributes will define how much it will attempt to build upgrade structures. Granted, these structures will have to be dev-defined, but the actual chances of building them will be up to the available resources in its current location, the viability of the terrain type, and the “coefficient of construction”. Buildings can simply be an additional item to the spawn spot’s loot table for as long as they exist, that is, for as long as players don’t kill them at a significantly greater rate than they are defined to spawn. If players specifically target the seige engine building in their raids, wherever it may spawn in the spawn area, and over time destroying its instances at a rate that matches or exceeds that building’s spawn rate, then eventually the building will “die” and its benefit will be removed from the spawn spot’s loot table benefits. Also, there will cease to be seige engine instances that spawn from that spawn spot.

It’s doable. It really is. Just break down the complexities into discreet components that can each be calculated and added into one long addition problem ;)

PvP Implications

April 23rd, 2008

I’m finding it difficult to comment on issues. I’m more into directly tackling the problem. Well, maybe it’s just at times that’s what I’m into. So, I’m going to do something I have found to be rather productive: writing what amounts to a stream-of-consciousness analysis of some game mechanic or system. Today’s rambling will be on some of the implications of Player vs. Player combat systems.

It seems that often more risk = more reward. Things gain significance as more is put at risk. The flip side is that some thing or activity will not be particularly important if there is or was nothing put at significant risk. I’m thinking of accomplishments, though dedication to a goal is significant. So, it’s not just risking something… in addition there is the significance of dedicating one’s time and energy to a goal. But I’m getting off track. I’m supposed to be digging into a PvP-related mechanic and its implications. I thought I needed build up some justification that to have a truly valuable gaming experience you had to have everything put at a very real risk. Ah, but it doesn’t have to be “either, or”. A valuable game experience can come from either dedication to a goal or from truly putting something on the line in the hopes of accomplishing some goal, or a combination of the two. I’d say most MMO design has been squarely focused on the latter, and I think as a result the potential for truly valuable game experiences is gimped from the get-go; gimped by half, or nearly so.

Anyways, we want as much user-generated content as possible. That implies player cities. These cities must be as open-ended as possible. That means there is little that is directly dev-defined. Start with a fully-developed player city. What does it look like? Well, there are houses. Lots and lots of houses. But loads of houses all packed in close to each other does not define a city. There has to be some official thing al the players do to trigger a cluster of houses to become recognized as a “city” or “village”. They have to have built a city hall. That city hall structure, once built, essentially creates a sort of “spawn area” with a defined territory, that is, the city limits or an area of influence. This city hall requires a mayor, who is elected somehow by the owners of all the houses within the town hall’s area of influence. This mayor, then, can set what objects are protected within the area of influence of the town hall, whether they be specific players, specific clans, structure types, creature types, etc. When an entity is on the “protected list” of the town hall, whenever it is inside the area of influence of the city hall it is flagged as “not attackable”. So, player cities then become safe zones.

If a player is not on the “protected list” of a city hall, he is fully attackable by anyone while he is within the city limits, just as he would be if he were outside any city limits; he cannot attack anyone on the “protected list” while inside the city limits. However, if someone on the “protected list” attacks him, that player is immediately flagged temporarily as attackable, even though he is within city limits. Any entity at any time may be put on or off the “protected list” by the mayor or designated player with those permissions.

What about when a non-attackable player attacks someone outside city limits and immediately runs into the safety of the city limits? Well, when a player engaged in combat with another player or creature enters into a city’s limits, he is given a cool off timer that keeps him attackable until it expires. It has a default time, but a city can set how long that timer lasts by donating resources.

The area of a city’s limits changes based upon population, chosen city upgrades, surrounding cities’ limits and their relative strengths, as well as what buildings have been constructed. Envision the system in Rise of Nations where your nation’s borders adjust based on the relative strength of adjacent nations. If a mayor builds a turrent tower near the edge of the existing border, the city’s limits will bulge out around that tower. If a player builds his house near the edge of the limits, the city limits will bulge out around that house, though not as much as for the turret. A mayor could choose to engage the “expansion” city upgrade that boosts the city’s limits, but for a cost in resources and currency which must be paid for out of the city treasury, which in turn is fed by the mayor’s selected tax rate. To allow for some very meaningful commodoties market influence, city maintenance must consist of not only cash but specific kinds of resources, all of which must either be donated or purchased on the player-generated market with city funds.

Interestingly, a player not on the “protected list” could build a house inside city limits, though both he and his house will be continuously marked attackable. This allows for players to build harvesting equipment inside an enemy city’s limits as part of a challenge to their influence. After all, it’s one thing to lay claim to something, it’s another to be able to defend it. This defense, however, will be stacked in favor of the occupants of the city, since they can choose when and how to rid their land of the intrusive structures. A pre-existing structure will remain attackable unless marked otherwise by the mayor or his designate.

Turrets and other defense structures will automatically attack anything marked attackable so long as they are fully maintained (paid for) and stocked with ammunition. They, however, will not be attackable by those being fired upon, as they are city structures (unless they are marked attackable for some reason). All city structures are technically destroyable, but only when the city’s defenses have been unlocked by an invading faction. A city’s defenses can be unlocked by essentially paying for it, and even then there is limited window of opportunity within which all structures are attackable. To unlock a city’s defenses, an invading faction member must first get into the city hall and pay the necessary fees to unlock the defenses (the fees are “laundered” through a city-unlocking item crafting system). The exact “price” will be calculated based upon existing city defenses, population, donated cash and resources to the defense fund, etc. Then, the defending city’s mayor has 24 hours to choose the window of opportunity within which his city will be attackable; the time windows will be discreet 2-3 hour chunks within the following 2 days. Some likely balance issues can be worked out by adjusting the required “fees” to unlock city defenses or by requiring additional missions or quests to be completed (think of the Task Forces in City of Heroes, something very challenging for the elite members of the attacking faction).

When a city is attackable, all buildings are, well, destroyable. The attackers can win the city by either destroying the city hall or capturing it. Upon capture, the highest-ranking member of the attacking faction can choose to raze all buildings in the city or assign ownership of each one to any member of his faction, even himself. Upon destroying the city hall, the city is stricken from server records and all the buildings simply return to being a cluster of buildings.

Upon destruction, a structure can be salvaged and looted. Salvage and loot amounts will be some random percentage of the total materials and items present before destruction. If the owner of a house in an attackable city doesn’t want to lose his stuff, he has to either pack it all up and move or defend it ferociously. Alliances with other factions, and the ability recruit mercenaries would really really matter when your stuff is at stake. When a city is in an attackable window of time, it’s a free-for-all, just as if the battle were taking place in the middle of the nowhere. Anyone can join in the skirmish. To help make it more obvious who is on what side, members or allies of a player’s faction are flagged friendly. Those not members or allies are flagged as enemy. The faction system must allow for quick allying and un-allying.

An interesting hook in this system is that it can fit right in with a dynamic creature population management system. A city is really just a spawn area. It additionally adds a terrain definition to its territory as being a “city”, so the various creatures that have an affinity for “city” terrain will eventually be found there. The competing city limits system is an extension of spawn area interaction system - it simply treats each city as just another spawn area. NPC factions can then calculate what kinds of activities it needs to engage in in order to optimize its own situation, and creating missions and quests are included as an available activity.

Another interesting hook is that player cities will become the start points for new players. When a new player chooses where to begin his adventure, she can choose one of several qualifying player cities, each of which has built a “newbie building” which puts them on the list. The benefits of attracting newbies would include larger population, meaning stronger defenses, larger economy, larger land area, more security, etc. Significant kingdoms are quite possible.

The placement of cities would also matter to a significant degree. Mostly static resource deposits would result in high strategic value to certain land areas. Cities placed in mountain passes would actually mean something if they could really restrict passage. Cities placed in close proximity could benefit from mutual protection or even engage in high-stakes economic competition. And none of this would require a single developer to define. It would just simply… happen.

The implied faction system fits right in with the way the creature management system handles relationships between any two creature species (or “factions”). You can apply and be accepted as an ally with any NPC faction, given you have sufficiently high faction rating with that faction. You can ally up with another player faction, given they choose to accept you. Your faction rating with other factions will be influenced by those with whom you officially form alliances. Only allies will receive any spoils of war through the game mechanics, though of course players can give stuff to helpers who were not officially allied. I’ll do another rambling on a faction system some other time. It’s cool stuff :)

The above is a snapshot, however fuzzy, of what MMOs will be. And oh how freakin’ cool they will be!

Small Steps

April 15th, 2008

The next big step forward we are all seeking seems to lie in two areas:
virtual ecologies and fully in-game, player-driven item schematic/recipe development. Interestingly, or maybe as expected, neither of these areas are direct content design; they allow for content design by unnamed others. When we can figure out how to make every entity in the game world effectively optimize its situation based on its environmental experiences, players will not only have a whole host of tools to fashion their own motivation to play the game, but it will allow for even more powerful tools for designers to create immersive content. When we can figure out the necessary game mechanics to allow players to create the specific item schematics used to create items (and keep the whole roiling mess an internally stable system) we will have taken this next big step.

I find it difficult to put words to the thoughts swirling in my head. The complicated nature of MMO design, specifically the above two mechanics, seems to be too compilcated to simply sit down and write out a complete, all-inclusive synopsis on how to do it. So, following my own copious advice to simply do what is over-obvious when stuck in a problem, I had to just write it. I know for sure the above is true, so starting there is, well, a starting point.

Jury Duty

March 12th, 2008

Well, I have jury duty possibly all this week and into next. It’s interesting and all thus far, but my overriding feeling is one of exasperation that we have to waste this much time and hassle into remediation of problems that didn’t need to be created in the first place. I can guarantee you the next time I’m about to commit something that could be construed as a felony I’ll think twice, if only for the poor jurors and the hassle my trial imposes on them ;)

Social Networking Analysis (SNA) Update

March 9th, 2008

Well, I surprised myself today with some cool breakthroughs in mapping social networks in Knight Online. I found a great program called Pajek released by some very intelligent folks in Slovenia. I really like these academically-inclined projects, especially when I’m quite interested in the subject for which they are created. Hopefully I can do justice to the rather impressive set of features they have created.

Anyways, here is a picture of a partial social network on one of our server clusters:

ares_partial_net.JPG

Each dot is a character. Each line indicates that the two dots had completed a trade of some sort in the last week. Incidentally, all the loosely-related dots between the tight clusters of dots are gold farmers who have used hack tools to abuse the game.

I’ll be mentioning more over the coming days for sure. This is some pretty exciting stuff. I have some server log technicalities to refine, so the data will become ever more accurate.

Social Networks in MMOs

March 8th, 2008

Just recently we have begun revisiting our server log file analysis systems for Knight Online. Our players generate a lot of data every day just doing their thing in the game, and until recently it’s been pretty tough to effectively make sense of it all. The game engine is now around 7 years old and it was never intended to handle the number of concurrent players thrown at it, so analysis of log files has presented quite a challenge… until now ;)

Having access to these files has been most exciting, and the latest bit of excitement came today when I took a stab at trying to map out the social network of one of our servers. Lo and behold, it will be quite possible! I set the script up to run in Excel so I could get visual in-process clues as to what was being found. You know, as clunky as VbScript may be, it’s great having it hook in to Excel (and everyone with Excel can use those scripts). Anyways, seeing these patterns emerge in real-time was thrilling. And it presents a whole range of additional tools in the ongoing battle with cheating, hacking, and exploit abuse.

So, in the coming days and weeks I want to figure out how to map out the social network of our game. Youtube has that nifty little feature that lets you see which videos are related to each other (view a video, make it go fullscreen, then look in the bottom left for a little button that looks like 3 circles with lines connecting them). I’m downloading Prefuse at the moment to see what I can do with it as far as visualization goes. I’m planning on doing some crude Excel-based ideas tomorrow too. I’ll be sure to mention progress.

btw, the dynamic creature management system is not dead. It’s still rattling around in my head.

Bugs or No Bugs

October 25th, 2007

We have a choice between adding new content and features or consolidating what we have and adding new features later. I’ve written about this before, but I worry it’s a decision that too often is decided in favor of new features.

I’ve taken a stab at this topic before in “Frustration of Reasonable Desires“, bince since the topic has had some time to stew, I wanted to revisit it.

A lack of features is only frustrating when the features that are missing are pretty essential to the game experience. A feature that does not work cannot be truly considered a feature. If the core features of a game do not work well, and since to some degree every other feature depends upon those core features, one could conclude the game does not in fact consist of features, and to opine that more features need to be added at the expense of bug-fixing is to ignore the fact that it is not “features” that will be added, but rather ever more elaoborate bugs.

I’m trying to make the point that there comes a point where one must cosolidate that which one has created. Create, Consolidate, then create again, and then consolidate once more.

I read recently that it is merely a matter of opinion and preference whether or not one fixes bugs in existing features. If the existing bugs are not utter game-breakers then they can (even should) be left as-is in favor of new features and content. I’m reacting to that. I believe bug-free systems, elegant code, efficient production tools, happy customers, and a happy bottom line all go together.

Some good food for thought on the matter has been posted recently at Zen of Design: “Triage and Extrapolation“.

Tools

October 12th, 2007

What exactly is it that results in our tendancy to leave outdated tools as they are? What is the barrier that keeps us from immediately updating or fixing a tool that has become even a litttle bit outdated or broken? I betcha it’s linked right in with the preference to add new features over fixing existing systems/bugs/imperfections.

I think we’d all agree that letting some game operations tool remain “sort of broke” is not a good thing. The argument, however, then becomes “how much will it really gain us to fix it”.

Apple, iTunes, and the iPhone may help resolve this one. Every Apple product amounts to a subset of what, well, non-Apple products are. Apple products arguably don’t do as much and they restrict you to exactly what they designed the product to do and be. However, those things they have chosen to let you do are quite often a joy to use and as a result “it just works” resoundes from countless mouths. Apple has built a rabid fanboie nation on the habit of neglecting new features in favor of making a smaller set of features exceptionall well-done.

Faced with the question of whether to add new features or go back and make what we have exceptional, I choose the latter. I really think it’s the best route.

Game Master Tools

October 10th, 2007

In my ongoing experience as a Game Master for Knight Online I have found an ever-present challenge: that of a distinct lack of in-the-moment relevent tools.
By no means am I griping. It’s just this need for effective, relevent tools to facilitate the Game Masters’ roles of maintaining and enhancing the in-game play experience strikes me as an [other] opportunity to distinguish one’s game from the rest of the pack.
By “in-the-moment relevent tools” I am talking about tools to help GMs do things like identify patterns of player behavior so as to respond most effectively. I’m thinking of activities like tweaking tool interfaces so as to allow for the most efficient possible GM activities, creating new tools to help mine through various metrics to find useful tidbits, and working with the technical producer to identify what metrics would be most important to track.
The Game Master crew can be the best direct feedback mechanism for ongoing product development/fixes, so exceptional tools will likely enable [more] exceptional work. I think this may even be important enough that sacrificing GM staffing levels in favor of a full-time [web] developer devoted strictly to the development and maintenance of GM tools would yield a net profit of surprising levels.

Over its shelf life a game changes. The community changes, and the challenge is to keep the game relevent to the customers. It’s an ongoing challenge, and the Game Master crew is in the position to play a significant role.

That’s a thought that’s been simmering for a while now. For the time being I am flexing Excel and VBScript as much as I possibly can to make the tools I find I really ned on a day-to-day basis, but I am hitting the limit of what’s possible outside of more serious development work. I’m seeing opportunities for some really useful metrics creation that can be done without the need to hassle the game development staff. Sara Jensen would be proud ;)

User Generated Content… Game Industry Job too

June 11th, 2007

Gamasutra had an interview with John Smedley posted here. I thought the following quote indicates SOE’s Free Realms will be a very good project to watch:

I rather give people some lines, and say “color inside these any way you want.” Then you can’t just generate whatever you want, but you have users creating content themed towards our goals.”

On a tangential front, I just got a job with K2 Network in Irvine. So, this means I’m moving from London to Irvine- I’m there now, in fact. I’m very excited, and I start work tomorrow!

Since it’s a Korean-developed game imported and translated to Western markets, I will be most interested to get some first-hand knowledge on the issues surrounding the Play for Free business models, cultural translations, and the art of operating an MMO (rather than producing it in the traditional sense).