Divvying the spoils

Something I don’t understand:

I’m no longer driving into work every day.  This saves me approximately an hour every day.  I’m doing some work at home, let’s call it eight hours a day (In practice, it’s probably a little bit less than that, but for the sake of argument, let’s call it eight hours per day), whereas I used to pretty regularly do 9-10 hours a day, at my old job.

So how is it that I have so little time for development?  I should have more time now than I did two weeks ago, I’d have thought.  But time seems to be behaving rather oddly;  I don’t seem to have nearly as much time in the day as the maths suggest that I should.

Tonight, I got a few little things done in MMORPG Tycoon 2.  First, I fixed the fill on the new, more sharply stylised mouse cursor.  The sharper angles on the arrow are a very subtle improvement, but I can’t tell you how thrilled I am to have them;  the shape of the mouse cursor has been bothering me ever since v1.1.

I also spent time getting my head back into the new combat system, and discovered that I’ve run into the same issue that heaps of real MMORPGs do;  how best to award experience points for defeating monsters.

Right now, monster will occasionally check their health values.  If someone has been attacking them enough to drive their health down to zero, they’ll say “whoops, I seem to be dead”, and despawn.  The problem is to determine how to award experience at the point when it dies.

Old-style MMORPGs used to award all of the experience to whoever struck the killing blow.  These games, unsurprisingly, had real problems with “kill-stealers”;  people who would wait around until you’d almost killed a tough monster, and then swoop in to deal the final blow and get the rewards for the whole kill.  This approach is nice from an implementation point of view, because it means that I’d only need to keep track of the most recent character to damage each monster.  This is great from my point of view, since it limits memory usage and CPU usage.  The downside, of course, is that the player AI won’t like it any more than a real player would;  players will often be fighting monsters, and not getting their just rewards as they ought to, when some other player comes in and gets the kill.

City of Heroes, I believe, was the first to award proportional experience, though it’s a relatively common system these days.  The idea is that if the monster has 100 health points, and player A did 80 points of damage, player B did 15 points of damage, and player C did 5 points of damage, then player A gets 80% of the experience, player B gets 15% of the experience, and player C gets 5% of the experience.  This effectively stopped kill-stealing in its tracks, since everyone was rewarded precisely in proportion to how much they helped.

Well, that is, except for the healers and other non-direct-damage-dealers.  City of Heroes didn’t actually award experience based upon the damage dealt by individual players, but rather on the damage dealt by whole teams.  So if team A did 80% of the damage, and team B did 20% of the damage, then 80% of the experience would be divided between all the members of team A, and 20% to team B.

This approach is obviously superior in many ways.  But it would require me to keep track of a potentially huge amount of information per monster, about all the players who have wounded it since its last spawn.  This isn’t a big issue in a real MMORPG where there’s a server farm that’s not doing much else than keeping track of data, but in a simulation of a whole MMO that’s running on a single home machine, that’s going to build up really fast.  I’d really like to avoid having to do this, if I can.  Will require more thought, I think.

I’m kind of tempted to just award all of the XP to the most recent person who hit the monster (or their party), and do something more fancy for boss monsters, who will have better rewards and will take more people to kill.   Maybe that’s the way I’ll go with this.  Will try it out tomorrow, see how it goes.