30 November 2012

Linear

Here’s a tip for video/console/computer/iOS† game designers:

Free wandering doesn’t make linear gameplay non-linear.

Rather, adding free wandering to a linear game tends to be tedious at best and frustrating at worst.

†Is there a good general term to use here?

29 November 2012

strncpy

If you aren’t a C programmer, bail now.

I’ve long wondered why strncpy and strncat were so brain-dead. Recently, I came across the answer. (Which made me go, “Oh...duh!”)

These functions look brain-dead when you try to use them to prevent buffer-overflows. But they weren’t designed to prevent buffer-overflows. They’re simply for copying a substring from the source. Their size parameters are simply meant to be the number of characters to copy from the source, not anything to do with the size of the destination buffer. The expectation, as with strcpy and strcat, is that you’ll figure out if the destination buffer is big enough beforehand.

Look into the strlcpy and strlcat functions from BSD if you haven’t already. They are designed for preventing buffer overflows. It also appears that the similar strcpy_s and strcat_s are on their way into the Standard.

(And now I’m wondering if there should be a strlncpy, that would take both the size of the destination buffer and a count of characters to copy from the source.)

You can also get by with snprintf as a safer replacement for strcpy if adding strlcpy or strcpy_s is not an option. Unfortunately, it can’t stand-in for strcat as easily since passing snprintf the same buffer as the destination and a source is a no-no.

28 November 2012

Plate mail

There seems to be a misconception about the term “plate mail” from TSR-era D&D among armor enthusiasts dealing with spread of D&D jargon as well as among some gamers.

D&D plate mail armor is not plate armor. In D&D, “plate mail” refers to mail armor augmented by some pieces of plate armor.

In D&D, actual plate armor—distinct from plate mail armor—is called “suit armor”. (D&D Master Players’ Book p. 15) In AD&D, plate armor is called “field plate armor” or “full plate armor”. (AD&D Dungeon Masters Guide p. 27; Unearthed Arcana pp. 75–76)

Yes, “plate mail” is an unfortunate term. (I’ve been using “mail and plates” until I find a better term.) It should be considered game jargon rather than a general term or historical term. And it should not be considered a synonym for “plate armor”.

(You may notice that plate armor, likewise, is typically augmented by some bits of mail.)

Note that—unlike “plate mail”—the use of “banded mail”, “ring mail”, “scale mail”, or “splint mail” in D&D is not similarly justified. It would be better to drop the word “mail” from these terms.

For what it’s worth, banded and ring armors might never have existed.

While “chain mail” has come into common use, in medieval usage it was called simply “mail”.

The “plate mail” drawing comes from the AD&D Dungeon Masters Adventure Log. The plate armor is Telecanter’s clean up of an image from Charles John Ffoulkes’ Armour & Weapons

20 November 2012

Surface

What do I think of the Microsoft Surface?

I think I tried enough Microsoft powered tablets in the past. They didn’t produce anything useful to me before. I now have a tablet that I’m very happy with, so I have zero incentive to consider the Surface.

Although I will welcome any serious competition that keep Apple improving their tablets. So, I wish Microsoft the best.

11 November 2012

Total defense in Classic D&D

Over at Delta’s D&D Hotspot, there was a discussion of the parry rule in AD&D. In general, this is a pretty useless rule because a character gives up their attack for a bonus to AC. (Well, it’s a penalty to the opponent’s “to hit” roll, but we’ll consider that equivalent.) In D&D combat, if you aren’t attacking, you’re conceding. But special circumstances can arise where this tactic does make sense.

AD&D compounds the uselessness of the rule, however, but setting the bonus equal to the characters “to hit” bonus due to strength.

Chainmail has a parry rule as well. Though it is complicated by its weapon classes rules. The weapon class rules are reasonable, but more complexity than I’d want. The important bit is that Chainmail makes the benefit a flat +2.

Dan also makes a good argument that a +1 in Chainmail should become a +2 in D&D.

It turns out that the d20 SRD has a similar total defense rule, which gives a +4 to AC.

So, that’s what I’m going with...

If a character chooses total defense, they may not attack that round, but they gain a 4-point bonus to AC.

10 November 2012

Touch won’t hold the kids back

Coding Horror: Do You Wanna Touch:

Although I love my touch devices, one thing I've noticed is that they are a major disincentive to writing actual paragraphs. On screen keyboards get the job done, but if I have to scrawl more than a Twitter length reply to someone on a tablet or phone, it's so much effort that I just avoid doing it altogether, postponing indefinitely until I can be in front of a keyboard. By the time that happens I've probably forgotten what I wanted to say in the first place, or that I even needed to reply at all. Multiply that by millions or billions, and you have a whole generation technologically locked into a backwater of minimal communication.

That “whole generation”? They’re not as attached to keyboards as we are. They’re going to take what they have and make those touch keyboards sing.

09 November 2012

iOS 6 uptake

The real reason for the rapid uptake of iOS 6.

The people who obsessively clear any icon badges.

08 November 2012

Thief retries

D&D Basic Rulebook (1981) p. B8

Open Locks may only be tried once per lock. The thief may not “try again” on a difficult lock until until he or she has gained another level of experience.

What if we generalize this to one retry per level per lock. So, if a second-level thief had tried to pick a lock when they were first-level, they’d get a second try now that they were second-level as per the rule. When faced with a locked they hadn’t tried before, however, they’d get two attempts.

The down side is that each attempt takes more time. I don’t recall the amount of time required being specified, so let’s go with the default “1 turn” (i.e. 10 minutes) for each attempt. If that seems excessive to you... Well, you don’t need me to tell you to use whatever you want. I will say that based on my admittedly amateur attempts, I’m not sure that is unrealistic.

This means that, given unlimited time, a second-level thief’s overall chance of opening a lock is (2 tries at 20% each) 36%. For a third-level thief it is (3 tries at 25% each) 57.8%.

This, of course, is a boost for thieves. Some, however, will say that thieves can use every boost they can get. Unfortunately, it is a boost that pays off much more for higher level thieves—who need the boost less—than for lower level thieves.

Given the low chances at low levels, I’m tempted to allow unlimited retries. The time trade-off remains. After each failure, the party must ask: Is it worth standing around for another 10 minutes to give the thief another try?

Well, “unlimited” is perhaps too much. A cumulative penalty for each try after the first seems reasonable.

07 November 2012

Classic D&D prayer beads

In my classic D&D campaigns, the question always comes up whether I will allow clerics (a.k.a. crusaders) to swap out memorized spells for “cure” spells as in the Spontaneous Casting rule from the d20 SRD. I have a hard time deciding.

Then, I came across this, which I find much more interesting. From AC 4: The Book of Marvelous Magic (1984) by Frank Mentzer and Gary Gygax, p. 16:

Prayer Bead: This valuable item allows a cleric to exchange one known spell (not yet cast) for another if both are of the same spell level. For example, if the cleric knows detect magic but needs cure light wounds, the cleric may use the bead to forget detect magic and gain knowledge of cure light wounds. The new spell may be cast as soon as desired. The cleric need not be fully rested to use the bead. After changing one spell, the bead disintegrates.

(For those not familiar with classic D&D jargon, “knows” means “prepared” and “forget” is equivalent to “lose” in the Spontaneous Casting rule.)

If these prayer beads were as available as holy water or—in some campaigns—healing potions, then it’s an interesting resource management mechanic. (Assuming you find resource management mechanics interesting. And classic D&D might be the wrong game if you don’t.) And it is more flexible too.

Trivia: In the original text, the name of the second spell was styled—both times—“cure light wounds”. I have assumed this was a mistake and put “cure” in italics as well.

06 November 2012

Replacement is not a guarantee

You’ll love it, or we’ll replace it. Guaranteed.

That is not a guarantee. That is the minimum that any business should do.†

If you tout this as a “guarantee”, I don't want a replacement. You’ve made me suspect the flaw is endemic rather than a fluke.

†As with any generalization, there are exceptions.

05 November 2012

The myth of myths

There is a myth that those of us who believe in God do so in order to explain what we can’t understand.

There is no doubt that this has always been a superficial use of some myths. Look more closely, though, and it is easy to see that the purpose of a myth is more to teach a lesson than to explain anything. Many myths lack a “explain the unexplained” part entirely.

04 November 2012

Evaluating teachers

Should teachers be evaluated based on their students’ test scores. I don’t know but I do know this:

They shouldn’t be evaluated on their students’ test scores unless they are given the freedom to choose how they do their job. If the state and district were focused primarily on enabling teachers, then we could discuss whether test scores are a valid way to measure their performance.

If the state and district are going to dictate how teachers teach, then it is the state and district that needs to be evaluated; not the teachers.

(i.e. If you dictate how they teach, then you should evaluate them on how well they follow those rules; not on the results of following those rules.)

03 November 2012

Prometheus

Ambiguity is good...

...in moderation.

The film, Prometheus, leaves too many open questions for me to find it satisfying on its own. I give it an Incomplete.

02 November 2012

Unable or unwilling?

From Epicurus...

Is God willing to prevent evil, but not able? Then he is not omnipotent. Is he able, but not willing? Then he is malevolent. Is he both able and willing? Then whence cometh evil? Is he neither able nor willing? Then why call him God?

Seen in a post by Jeff M.

For a metaphysical entity, I’m not convinced that there is a meaningful difference between unwilling and unable.

01 November 2012

The expanded universe trap

You have something...a movie, a book, whatever...that’s really good. So good that it demands sequels and spin-offs. This “expanded universe” then fills in all kind of additional information about the elements of the original work. Every thing in the “expanded universe” ends up hanging off those original elements until they become these epic things they were never meant to be.

And so, the “expanded universe”—with all its back-references to the original work—ends up feeling pretty small. By making even the ordinary elements of the original into the epic and iconic, it seems to even tarnish what made the original special as well.

I don’t really mean to say that such an “expanded universe” is a mistake. It’s just an observation. It would be nice to see an effort to counteract that trend.