Our Favorite Bugs - Part IV

From Drunkapedia
Jump to: navigation, search

Original Link (now dead) - http://acdm.turbinegames.com/featuredarticles/?action=view&article_id=133


Our Favorite Bugs - Part IV


By Alicia Brown

It's a wrap! This will be the last in the series we have been presenting here about the favorite bugs the development team has discovered in the course of creating new content for that complex land known as Dereth. We hope we've given players an over-the-shoulder glimpse of the life of a game developer searching for that elusive "root" cause of a bug, an appreciation of the hard work one bug in the system can produce and a reason to laugh along with us, as well.

Just collecting the information has been fun, since it involves getting to hear team members laugh as they recall some of the funnier episodes - or see them grit their teeth as they re-live one of their all-night adventures in trying to unearth the cause(s) of an especially difficult bug.
We proudly present the last in our series of articles on Our Favorite (and most memorable) Bugs.

Gaerlan's Phylactery Needed Vitamins
When players reach the end of the Gaerlan quest, they approach Gaerlan's Phylactery - where appropriate rewards are supposed to be bestowed upon the worthy. But when it was first created, puzzled devs found that it continually failed to successfully hand over reward objects to those who had earned them.

Technically, Gaerlan's Phylactery is a non-player character (NPC), even though what players see is a floating pedestal with a statue of Gaerlan on it. Accordingly, it was assigned statistics for its attributes and skills. When Orion wanted to find out what was causing the problem, he tweaked the code so that he could observe what was being done, step-by-step. But, as far as he could tell, there was nothing wrong with his code. Even srand, when he handed it off to her, verified that it was not due to any error in the programming.

After reviewing this for nearly a whole day and traveling down many unsuccessful avenues in search of a solution for this one item, Orion called it a night. But when he returned, srand told him, chuckling, "Guess what? I took a guess and I was right - your phylactery is too weak!" Apparently, when it was first being designed, no one knew that it would need to create an object in its inventory and then hand the item over, so its strength was only set to 10! It could not even hold the object, and not having the strength to hold it was unable to go through the process of creating the object to be handed to the players. Once they knew the source of the problem, they adjusted the strength until it could successfully hand over the items - which, as it turns out, needed to be 150!

Mossman? - Not a mosswort!
Peering through the misty swamp, you see something moving: It's humanoid, but - it appears to have swamp moss for skin! Ugh!

What dimly and from a distance might seem just a hairy human turned out to be, instead, a "grassy" human who looked as if he'd spent far too much time in the swamp. We really needed to get this one fixed in a hurry, otherwise we'd have to call him "Swamp Thing" - and there are copyright problems that prevent us from doing things like that!

But until the bug got worked out, that's what that avatar looked like.. All because someone accidentally got the grass landscape texture on the human body. Luckily this was pre-beta and it was caught the same day it happened - but many a programmer was chuckling at the image produced that day.

You can buy it - but your can't wear it!
Social events are core to many role-player's interactions with people in the world of Dereth. Many enjoy the simple pleasure of shopping for a new outfit to wear to that next event, whether it be someone's wedding, a banquet or even an allegiance meeting.

But shopping is not a reward in itself - it's making use of the result of your shopping trip that is truly satisfying. So frustration would have abounded had this bug not been caught in time, since briefly there was a problem in not being able to wear any new fashions your character purchased! You could spend your money on a spiffy new dress or jacket, you could tote it around with you, but you couldn't put it on to show it off at the next social event you attended. What would have complicated this is the fact that many players like to hunt until the last possible moment, so they could have wound up bringing their new clothes with them only to discover that they either had to attend in their crusty and worn battle armor or go naked!

Fortunately, our resident artist noticed this problem and it was quickly corrected, so that you never had to run home, or even to town to purchase last year's fashions instead!

Invisible boundaries that wouldn't stay put
While testing the new residential quarters (RQ) before they were released to the world of Dereth, an unusual bug was found lurking unsuspected in the hallways. Randomly, while walking down any given hallway within a RQ facility, your character would suddenly be halted, unable to proceed in that direction. Well, okay, an invisible barrier of some kind, right? But if you turned and ran back down the hallway a bit, and then came back again, you suddenly could continue through the hallway! These invisible hallway boundaries appeared to come and go at random throughout the RQ facility for no perceptible reasons.

"It was pretty weird," srand stated when explaining this bug, "but the creepiest thing that happened was when I ran up against an invisible boundary while walking down a hallway, turned to go the other way and, suddenly, discovered myself bumping into another invisible boundary right behind me! I was trapped in one small section of hallway. Logging out and back in fixed it - which is also how I eventually figured out what was going on."

When your character travels within an RQ facility, your client is keeping a list of what we call "env cells" in your immediate vicinity; if those cells are associated with a specific RQ, whether or not you're allowed in that cell is also being tracked. This information is used to decide whether to allow you to walk into an area, and when to make you "edge-slide." Note, when you edge-slide along a house boundary you also see the blue sparkly effect, but this comes from querying the house object itself and not, oddly enough, from the env cell in the list.

Now, the list of env cells in a player's immediate area can be (and are) reused. So as you travel through the RQ facility, the information in these cells is cleaned out so that they can be reused to compile new information about the area you're entering.

What was causing the bug was that, while the env cells in the list were being reused, they weren't being properly cleaned out. Let's say you're over in hallway A, where you see apartment 52, which belongs to Fred. Then you walk over to hallway F, which is nowhere near apartment 52, so its cell gets reused for part of the hallway. However, it didn't clear out the part of the information which indicated that Fred owned it, so your client thinks Fred "owns" the section of hall in front of you and won't let you walk into it because it doesn't belong to you. But since there's no real house object in front of you, you don't get the blue sparkly effect when that space is queried.

So what was happening when you turned around and ran down the hallway and then came back again? On the way back, you'd likely get that bit of hallway in a new env cell in the list, one that didn't have an owner, so then you could walk through it. Logging out and back in again fixed that "trapped-in-a-hallway" scenario because it cleans out all the env cells in the list.

Thankfully, this was caught in advance, and your characters can enjoy their RQs and traverse the hallways, worry-free -- those "invisible barriers" are no longer lurking, waiting to pounce.