Live data from Hacker News

Wi Flag (2002)

asheron.fandom.com

41–50 of 217 posts

Re: Wi Flag (2002)

#41

Some of my fondest gaming memories are from this game. There was nothing ever quite like it, and the allegiance system created a special type of community bond that I haven’t seen repeated. At one point I had 10 “vassals” sworn to me, and in our allegiance that came with the expectation that you assist and mentor those under you. Stakes were higher when our allegiance committed to being red dot PKs on a white server…

MMOs are just so expensive to develop now that innovation is almost dead. You either make a WoW-like or you die (and many times you die anyway). They really don’t make MMOs like they used to.

Re: Wi Flag (2002)

#42

What does "Wi" stand for in the stamp? Would have been better to have a flag of freshmeat.

As trynewideas says, “Wi” was the name of the player who famously described this problem. Source: I worked for Turbine at the time.

Re: Wi Flag (2002)

#43

tl;dr: players get attacked based on monster targeting RNG that's supposed to take an interval [0,num_players], assign players to subintervals that are shorter or longer based on a bunch of factors, and then roll a random number somewhere in that full interval. Whoever's subinterval the number ends in, they get targetted. Instead, the code assigned subintervals and then rolled a number between 0 and 1, instead of 0 a…

Is it so important? I think this made the community and game world more interesting. It's emergent behavior. As a game developer, I hope I can make things complicated enough to have emergent behavior, even if that's just from my bugs.

You know what would have made it even better though? Not having a bug that made your character cursed through no fault of your own without any recourse.

Re: Wi Flag (2002)

#44
Around 15 years ago, when casual little games on Facebook were still a thing (actually when Facebook itself was still a thing), I used to play Yahtzee on the site while watching TV shows or whatever. It was one of the most popular games on there. For me it was something to fidget with (there was no money involved or anything, just a personal high score), so I played it a lot.

I felt more and more that dice values of specifically 1 and 6 were harder to come by than other values, so one day I sat down for a few minutes and logged the value of 100 or so dice throws. Turns out I was right, the distribution was not uniform: 2-5 were fine, but it seemed that it was twice as hard to get a 1 or a 6 compared to any other value.

I even did a chi-squared hypothesis test, because I was crazy. (And because I was studying for my statistics minor in university at the time).

Seeing the result, the problem was pretty clear, without even knowing the source code. Almost certainly, they had a random number generator giving a number in a uniform range, let's say from 0 to 1, and did something like the following to get a dice value from 1 to 6:

   value = round(random()*5)+1
Do you spot the issue?

The problem is that round() rounds to the nearest integer. So any value between, say, 1.5 and 2.5 (exclusive at one end) rounds to 2, 2.5-3.5 rounds to 3, and so on. Add 1, and you have the dice value.

But the ranges for dice values 1 and 6, are only 0 to 0.5 and 4.5-5 respectively, so ranges that are only half the size.

The fix should be extremely simple:

   value = floor(random()*6)+1
The crucial point being to use floor() or ceil() instead of round(), to only round towards one direction.

I wrote up exactly this in a short email to the company that made the Yahtzee game. They did not reply and just silently fixed the bug, right after my email. I was disappointed and stopped playing.

Re: Wi Flag (2002)

#45
post #9

tl;dr: players get attacked based on monster targeting RNG that's supposed to take an interval [0,num_players], assign players to subintervals that are shorter or longer based on a bunch of factors, and then roll a random number somewhere in that full interval. Whoever's subinterval the number ends in, they get targetted. Instead, the code assigned subintervals and then rolled a number between 0 and 1, instead of 0 a…

> You'd always be it. It's slightly more complex than that: if you were farther away or otherwise in a better position than average your portion of the interval would be <1, and so even if you sorted first you still weren't guaranteed to be hit.

Until you were actually taking part in combat and did damage to something, at which point you'd be it.

Re: Wi Flag (2002)

#46
post #11

tl;dr: players get attacked based on monster targeting RNG that's supposed to take an interval [0,num_players], assign players to subintervals that are shorter or longer based on a bunch of factors, and then roll a random number somewhere in that full interval. Whoever's subinterval the number ends in, they get targetted. Instead, the code assigned subintervals and then rolled a number between 0 and 1, instead of 0 a…

> A unit test could have caught this I've always wondered the best way to write tests for "This event should happen x% of the time." Obviously we could re-run the test 100 times and see if it happened close to x%, but not only is that inefficient, how close is "close"? You'll get a bell curve (or similar), and most of the time you'll be close to x but sometimes you'll be legitimately far away from x and your test wil…

> I've always wondered the best way to write tests for "This event should happen x% of the time."

I use https://github.com/pkhuong/csm/blob/master/csm.py to set a known false alarm rate (e.g., one in a billion) and test that some event happens with probability in a range [lo, hi], with lo < expected < hi (e.g., expected +/- 0.01). The statistical test will run more iteration as needed. If that's too slow, you can either widen the range (most effective), or increase the expected rate of false alarms (not as effective, because the number of iteration scales logarithmically wrt false alarms).

Re: Wi Flag (2002)

#48
post #23

Hmm, when they told me they were assigning people to a list I kind of knew what the answer was going to be. What is curious is that it took them a long time to find. I’d think that -as long as you believe there is a bug- this should be fairly straightforward to spot.

I was waiting for them to say something like "then we take the random variable and multiply it by 3 to correct for this" and then explain some other, more subtle, bug. Looks like we all make stupid mistakes like this sometimes. I made a bug where I tried to get the month number for the next month, so you had to wrap at 12, but I just did "(current_month + 1) % 12" and left it at that, thinking for some reason that modulo works differently than it does in reality. Some stuff broke recently, due to that, and it was quite embarrassing.

Re: Wi Flag (2002)

#49

tl;dr: players get attacked based on monster targeting RNG that's supposed to take an interval [0,num_players], assign players to subintervals that are shorter or longer based on a bunch of factors, and then roll a random number somewhere in that full interval. Whoever's subinterval the number ends in, they get targetted. Instead, the code assigned subintervals and then rolled a number between 0 and 1, instead of 0 a…

> A unit test would have caught this, but didn't

The first unit testing library, JUnit (Java), was released in 1997.

Asheron's Call was released in 1999 after four years of development. It's quite possible that this bug was introduced before the concept of unit testing even existed or was widely known.

Re: Wi Flag (2002)

#50

Some of my fondest gaming memories are from this game. There was nothing ever quite like it, and the allegiance system created a special type of community bond that I haven’t seen repeated. At one point I had 10 “vassals” sworn to me, and in our allegiance that came with the expectation that you assist and mentor those under you. Stakes were higher when our allegiance committed to being red dot PKs on a white server…

MMOs are just so expensive to develop now that innovation is almost dead. You either make a WoW-like or you die (and many times you die anyway). They really don’t make MMOs like they used to.

Social media has taken a significant bite out of what I would consider the more important parts of the older MMOs, especially when it comes to apps like Discord. Not enough people want to interact in games anymore outside of specific gameplay scenarios.
Post reply on HN