Tuesday, July 22, 2008

Social NPCs

I've been trying to write this essay, but it keeps turning into a book. Let's see if I can keep this short...

First, you'll need to read this. In order for a social NPC to be of any interest, they need to have some kind of feedback. It is best to link this into the gameplay - being friends with someone has an in-game effect of some kind. You may also choose to make it social or personal, such as them sharing secrets or childhood wishes. These should not, however, be the only kind of response.

The difficulty here is that the kind of game you're running will, by its nature, limit the kinds of responses you can have. For example, if you're doing a zombie game, the social NPCs are pretty much limited to responses that affect your zombie protection measures. Become friends, they'll share their food, or try to protect you rather than running away, or follow orders better, etc. You can add in the ever-present personal elements too: romance, personal friendship, etc.

This is very limited. In this kind of situation, the "edges" of the simulation, the parts where the players will naturally want to go, will be the parts that don't have anything to do with zombies. It's the "luxury" gameplay: once you've mastered getting people to cooperate with your zombie-protection efforts, you can move on to getting them to kiss you.

Unless you're aiming to make a pornographic game, this is going to be a pretty limited kind of relationship... so let's consider what kinds of feedback (what kinds of things the NPCs can do) would make the social situation "deep" enough to allow for "deep" social gameplay?

To me, the basic idea is the same as in every other form of gameplay. You need to have nested feedback loops. Once the inner one is learned, the next one out starts to spin, modulated by how the player is using the inner one. When that one is learned, you spin up the next one... just like a first person shooter where you learn to move, learn to navigate, learn to shoot, learn to fight, learn to use different weapons, learn to manage ammunition...

There are also side-loops that aren't directly in the chain, such as hacking or other 'mini-games' that don't directly involve the chain... and the chain isn't usually quite as clearly nested as I'm pretending... but overall, it's more or less like I describe.

Most games stick to only one "social loop", and a very one-dimensional loop: how much the character likes you. Once you learn how to make them like you, you get whatever useless reward they offer and then never see them again.

We can think of this linear scale as a first element, much like being able to move left and right in a Super Mario game. If we want to clone the same nested loops that Mario has, we have to implement a "level" (the "mental and social terrain" of the NPC). Moving left and right (being nice or cold) can't get you to the goal, because there's stuff in the way: just being nice all the time will make you fall down the pit because he or she gets suspicious of your cloying nature. Or you hit a wall: they don't mind you being nice, but it's not going to make them like you any better.

Navigating this terrain is important, so we add "jump" functionality, just like in Mario. Once you can socially "jump", you can navigate the terrain left and right - sometimes having to be cold instead of nice in order to get over some blockage.

What does the "jump" represent? What kind of social action "jumps"?

I would probably say "hanging out". Doing some kind of activity together, whether it's slaying monsters or watching a movie or whatever. Spending time together "jumps". We can make different kinds of hanging out have different effectivenesses on different characters: If you're trying to jump in a warrior's social world, watching a movie with them is just a little hop while fighting demon dogs with them is a big leap.

Continuing on the Mario framework, it's not simply jumping and walking around a still level: you have to navigate enemies. Some enemies can be stomped, some enemies can be stomped and give resources (shells), some enemies cannot be stomped and must either be evaded or fireballed.

The fireball would, I think, be a gift. Again, the size and speed of the fireball would depend on the kind of gift. If you're trying to be friends with a Star Wars geek, giving him a basketball would not produce much of a fireball.

At this stage we've built a complex level and method of navigation, although we're kind of pushing to the side any idea of representation. These nested feedback loops are guaranteed to make our social gameplay more interesting, so long as it's possible to see what we're doing. Unlike most games with social elements, we're not dictated as to exactly what we do, we're just dictated as to the kinds of challenges we encounter. How we deal with them is up to us.

In-world rewards are kind of scarce and boolean with this, though. What does beating a level get you, exactly? You win, they're your friend, you get their useless little thing, and then you never see them again?

Instead, I would have it so that every time you wanted something from them, a level is generated that you have to navigate. If you want them to give you their cool sword, you face a difficult level that will require a lot of being cold, being nice, hanging out, and giving gifts... You would get a different level (but the same general idea) if you wanted them to vote against the Orc Party in the senate...

Some situations would have time pressure - can you convince them to vote before the senate meets? Others wouldn't. But time would be measured in terms of "real-world" time rather than "Mario-level" time.

Anyway, I have lots more thoughts on the matter, and there are a lot more games I want to clone and demonstrate (particularly ones that don't start with a 1D navigation), but this is already long enough.

Do you see what I'm getting at? Do you understand? What do you think?

Sunday, July 20, 2008

Amber Alert Commentary

This is totally off-topic

Today I was taking a break in Starbucks when I read an article in the local (Boston) paper about the Amber Alert system. I was surprised.

For those of you who aren't up-to-date on paranoid mothers, the Amber Alert is when the government posts state-wide panicked messages about kidnapped children to every media available.

I don't like it.

Not because of what it is, but because of the fact that it doesn't work efficiently. It just makes people feel good about themselves and their politicians. Lemme explain.

The Amber Alert was designed to help find children who are kidnapped by deranged strangers with bad things in mind. However, most deranged-stranger kidnappings resolve (usually poorly) within a few hours, long before the Amber Alert is issued.

Along the same lines, the Amber Alert is usually issued for children kidnapped by family in custody battles gone awry. This is because deranged family members are far more common than deranged strangers. Unfortunately, the Amber Alert is not designed to help in these sorts of situations, so it's not very effective.

You may have seen the apologist ads for the Amber Alert. They generally say something like "95% of Amber Alerts end with the child being found." This is a little like claiming "95% of my blog posts end with the internet still being operational". The Amber Alert almost never has anything to do with the safe rescue of the child: it's usually the police tracking down the deranged family member who kidnapped the child.

I also don't like the way that Amber Alerts are posted, because they imply that the child was whisked away by a deranged stranger. This lets moms get all worked up about the number of kidnappings... but it's just a distraction. Your child is at more risk from people you know than from strangers, and thinking otherwise means your worry will be pointed in the wrong direction. (Your child is probably not even at any significant risk from people you know, either. But if you're going to worry, worry about the right things!)

Anyway, I like recovering children from kidnappers, I think it's good. But I don't really like the Amber Alert: it's just theater. It has successes, but a more carefully planned and researched system would have more successes. With, you know, less panic and misinformation.

...

I was reading this Boston paper and... they said the same thing.

I was absolutely stunned.

Okay, they didn't say the same thing. They presented a "fair and balanced" view that aired both sides of the question. But that they even mentioned my side is astonishing. It's pretty rare for a paper to question theater because, let's face it, news media is 99% theater.

I was... surprised.

Of course, the rest of the paper was basically fluff. I guess they have a quota.

Saturday, July 19, 2008

The Nature of Cool

This has no spoilers.

So, like most of you, I've been watching Dr. Horrible. One thing I'm curious about is the last five minutes (from 12 minutes) in episode three. By now, it's probably off-line, but it's the part where he starts to sing his long final song, the one that mutates several times. Specifically, the high point at 12:53 (walking into the board room) makes me curious.

That scene was really cool.

I've written a few essays in this space, but I keep deleting them. It's very hard to talk about "cool", especially since most people think of kung-fu fights, explosions, and giant robots. The kind of quiet, cold, long-term cool you get from the last scene of Dr. Horrible is unusual.

There are only a few things I can work out for sure. One is music: without the music, the scene is much weaker. Actually, the music is most of the cool. The images punch it up and focus it.

But I was thinking: imagine a Dr. Horrible Puzzle Game. Pretty stereotypical third-person action-puzzle game starring Dr. Horrible, except that the cut-scenes are all at that level of cool. Doesn't have to be coherent: just kind of a "rock opera" interspersed with levels of puzzles. A bit like Portal, perhaps.

Don't you think that would be fun?

Sunday, July 13, 2008

Fairy Tales

I've been thinking, and I've come to the realization that most of our games are very childish.

I don't mean that in a bad way. I mean that most of our games are based around achieving the same kind of experience that we had as children, hearing fairy tales. A game is often trying to get that same sense of excited wonder... except, of course, we're adults now.

Sure, there are games that arguably aren't trying for that. I don't know that match-three games or go are trying for it. I don't see how football tries for it.

But the kinds of games I like to play - RPGs, shooters, weird indie games - they all have the same smell as a fairy tale. Not just the stories, but the gameplay itself is like a fairy tale on crack. In a fairy tale, the hero would get his father's sword, or the mightiest armor in the land, or whatever. In our video game fairy tales, that just happens over and over and over... but it's fundamentally the same basic event. Similarly, our endless fights are the same basic events as the fewer fights of fairy tales.

For a while, I've been basically, unconsciously, trying to figure out how to make a game more like a fairy tale. Make the fights more unique, the pacing more... like when we were young.

But let's look at what the experience I'm talking about is. What is the experience of a child hearing a fairy tale?

There are several elements at work, but one of them is that, at least if you used to be me, kids don't let tales die. You hear the story, but then you spend a long time thinking about it. Going over it. Admiring it. Perhaps thinking about different ways it could have turned out. If you were me, you spent more time doing that than the story could possibly have taken to tell.

This was not during the story, though. During the story, you'd be too busy listening (or reading) and imagining. If the story was broken up over several days, the intervening hours could be sheer pain waiting for more story, even if the story really wasn't very good in the first place.

Another element is that feeling of newness. These days, a story has to be really spectacularly interesting to get a flicker of that old feeling. I've just seen too many elves firing arrows at too many orcs.

But here's the thing... I picked up some fairy tales from other cultures. Japan, middle Europe, and the classic "Arabian Nights". Reading these fairy tales gives me that feeling, even though they aren't any more complex than, say, Rapunzel's or Loki's stories.

As far as I can tell, those are the two main components, and that started me thinking.

It's a fragile situation. Over the years, I've started to read differently. The stories I read these days try to make up in length what they lack in newness - not their fault, exactly, I just have seen a lot of stuff. But this has made me read in a very different way, a way not suitable to fairy tales.

I find that, reading these foreign fairy tales, the effect is strongest if I slow way, way down. Even read aloud, or pretend someone is reading it aloud. And then, when I reach the end of one or two tales, I stop. I find that they whirl around in my mind for hours, just like they did twenty years ago.

Looking at it, games are the same way as the books I normally read.

So... what if we decided to treat it like a fairy tale?

I was playing Persona 3: Fez. It's a rather spectacular game, but I'll never finish it. It's toooooooooo looooooonnnnnnnnnnnnggggggggggggggggg. The ideas are excellent and rather fresh for me (since I haven't played much of the other Persona games), so it starts off by hitting the right "fairytale notes".

But they bloat it up with gameplay.

"Ahhhh! What is this fool saying? Gameplay is what a game IS!"

Well, yes, but there's such a thing as too much. A steak is nice. A whole cow is not, even though it contains many steaks and is more deeply complex.

If you think of gameplay like food, then playing Persona 3 is like sitting down to dinner at a sushi restaurant. It's great, a lot of subtleties. Except that the chef keeps serving you sushi and sake and won't let you leave. Hour after hour.

How much sushi can you eat?

Apparently, I'll eat sushi for 43 hours.

But that's not what I want. And although the story is fairytale-ish, the actual experience certainly isn't. The fairytale-ish experience would be that the sushi chef shows you a hundred platters of sushi, but you can only taste three of them... They taste so good that you can't forget, and you can't help but stay awake at night, wondering how the other rolls might have tasted.

For a child hearing a fairy tale, there is a kind of half-comprehension. There are big ideas, they are fascinating and interesting, but there's also this feeling that there's a lot more to it, a lot more you can't quite see... but maybe if you think about it for a while, or maybe if you hear the next fairy tale...

To me, a game is a fairy tale PLUS the ruminating you do afterwards. Except that instead of hearing the fairy tale and then ruminating, you're asked to ruminate while you hear the fairy tale. That's not right!

In the end, what this ends up doing to me is the "endless restart syndrome", which I'm sure you're all familiar with. I'll play the game for a few hours, then I'll restart as a different character. I'm ruminating on the experience of the game... except that I haven't finished the game, haven't even seen the depths the gameplay can reach.

I'm really, really bad about this. I've played Oblivion for at least a hundred hours since it's release, but I've never played any character for more than fifteen - usually five or six. It's gotten to the point where I generally decide to ignore whole chunks of potential, just so I can finish the game. IE, I'll decide to play as a wizard and never, ever even think about how the game might have gone if I was a warrior or a thief.

This isn't good. That's like reading a fairy tale and saying, "okay, let's skip all the parts about Mordor so I can finish the damn thing."

In the past, I've been very hesitant about my opinions on length of play and replay value. I've always felt, in my heart, that short games (6-15 hours) with high replay value are better than long games... even if the long games also have high replay value.

I've always been a bit hesitant to say so, because a lot of people seem to hate the idea. They want to be able to play the game once, get everything there is to get out of it, and then throw it in the trash. And I could never place my finger on exactly why that's such a shitty way to do it. I always blamed it on artistic aspirations on my part, even though that didn't quite fit the bill.

The reason I want short games with high replay values is because I want to ruminate on them. I want assisted rumination: once I've finished the game, I want to be able to say, "wow, that was cool... let's see that again, from a slightly different angle."

With a long game, I don't get ruminations, either assisted or the more ordinary kind. There's simply too much, and too much of it is bland. I might say, "woo, that boss was cool!", but I'm not going to sit in bed unable to sleep because I can't forget that boss.

With short games, I do. Katamari Damacy... it's kept me awake. I've also had dreams about it, which is really how I judge whether a game is a classic or not. If I dream about it or it keeps me awake, I can write a truthful review: This was a triumph. I'm making a note here: "huge success". It's hard to overstate my satisfaction.

Perhaps it's just me. Perhaps there's nobody else out there who feels the same way.

But I want short games full of fascinating ideas.

Stop force-feeding me!

Geeks Are Dangerous!

Something that's happened in the past few days is a weird and overblown fiasco with Pharyngula. Today, he published a few of the death threats he got, including the headers.

Scanning down the comments thread, I'm reminded of an alternate reality game, such as I Love Bees. Except, in this case, the puzzle the geeks are solving is not an alternate reality: they've more or less torn someone's life apart.

I guess I'm supposed to feel sorry for the guy after writing something so somber as that, but I don't. Instead, I'm just reminded of the newest holy grail in game design: using humans to do Useful Things while they play their games. There's a few examples out there, all very polite, very clever, very harmless.

But geeks are not harmless. In this world, we have a tremendous amount of power, and it is not terribly limited by any kind of civilized force.

So it strikes me... using players to accomplish Useful Things... what if it wasn't polite or safe?

It used to be that the impolite, dangerous people were largely disorganized. If you had a stalker, it was bad... but it was just one stalker. Even if you were Madonna or something, all your stalkers would act independently. But if there's one thing geeks are good at, it's organizing... we can even do it without any leaders. We can do it anonymously (and Anonymously). (Of course, we're basically pacifists in the real world, no matter how brutal we get on-line...)

So if it was built right, a project could grow exponentially and out of control as long as there was still something to do and a reward to be achieved. ARGs are limited because they require writers. Games like the new galaxy-detection system or visual pattern definition systems are limited because they have no real rewards...

Can you think of anything that could be arranged more perfectly? Dangerous and impolite? Self-propagating, self-rewarding?

Useful?

Think of it as this: Griefers for Progress. How would you do it?

Thursday, July 10, 2008

Cheap Computing Means...

One thing that always amazes me is the way that people can't understand that "more" does not necessarily mean "surplus". The cost of computing is getting so cheap that any punch-card programmer teleported to the modern era would be unable to comprehend how we could use a cell phone's processor at 100%, let alone a desktop's. But we do. Constantly.

It's only going to get cheaper, of course. What are we going to do when computation gets so absurdly cheap it is close to free?

I like this silly idea, and I'd love to see you comment with your own ideas. But remember: no miracle breakthroughs. Just the ever-present doubling.

My idea is this: a mesh network made out of super-cheap nodes. Yeah, pretty tame. Probably be here in five years. So let's kick it up a notch.

Let's give every node a speaker that can pump out high-hertz pulses, and a mic to pick up the same.

So, the first step in this mess is that the mesh network tries to map itself out. By sending out a wireless notification and a sound pulse at the same time, other nodes can calculate by the time elapsed between wireless and sonic reception to determine how far away the node is. With at least three nodes in sounding range, they can compare numbers and come up with exact relative positions.

This is obviously messy when we're talking about, say, inside a house. However, by measuring sound quality we'll probably be able to at least tell that we're not on a clear path. (Sound that echoes from walls and is channeled through doorways/windows is going to be much "fuzzier" than the same sound going straight through the air.)

If you have enough nodes, it's actually possible to map out the blockages by who hears who at what resolution... but let's skip that, because it's not required.

Okay, who cares? Why do we want a mesh network that knows its own physical locations? How POINTLESS!

Ahhh... what we've actually built is a distributed sonar system.

A node sends out a sonar pulse and receives back a mess of echoes. Because a node is not a wide array of mics, it cannot personally interpret these echoes. (It probably has two mics, one on each end, but that's not really enough to be able to tell much.)

However, all of the other nodes within sounding distance hear the pulse, and also get a wad of echoes. Different echoes, because they're in a different location.

What we have is a wide array of mics. We know their exact location. By sharing their information, we can calculate what echoes originated where, and we can build a sonar map.

By originating from different nodes, we can get different angles on our sonar, and clearly see "behind" and "through" things that any given node can't handle.

By changing the frequency of the ping, we may even be able to tell what kind of materials any given surface consists of.

So, what we have now is a mesh network that knows the world around it. Because these are intended to be pathetically cheap, this is not a real time sonar analysis: it has an averaged map because it pings maybe once every few minutes. So if every street lamp had one, the street would be mapped but cars and pedestrians would be "traffic blurs" rather than "this car is moving at 60mph down main street".

Okay, this is starting to be kind of interesting. If done right, it would be the ultimate traffic system, able to tell how bad traffic is, whether there's construction happening, and so forth. Hell, because the speed of sound is slightly different depending on temperature and moisture, you might actually be able to tell what the weather is. You can certainly hear rain!

Let's keep going.

The point of a mesh network is that you can drop new nodes in. So let's say that you carry a portable node with you. Using the locater ping (not a full sonar burst, just a ping like we talked about first) you can easily be tracked if you want to be. So the mesh network not only allows to you connect and do data-stuff, it also knows precisely where you are.

There are some interesting uses at this stage, but let's push it further.

Your node has headphones. You wear the headphones.

Suddenly, there's a "sonic world" around you. All of the nodes know precisely where you are (perhaps even specifically your left and right ear), so they can tell your headphones exactly what kinds of sounds it should play.

This intermediate step would allow for some interesting "phantasmal presences"... but let's push on to the big finish.

Assuming a slightly greater amount of computation, let's make your node have a camera and playback system. Slim little VR goggles, for instance. The nodes all know where you are and where you are looking. They know exactly what you can see, or should be able to see.

They can map what you ARE seeing to that. They can build up a full internal representation of what the world should look like, and they can play it back to you.

This would allow for a lot of interesting things. For example, they could tag other augmented-reality users, make them glow. They can highlight a path you should take - a big step up from "in 300 yards, turn left" of today. They can "clear up" bad weather and let you clearly see where walls and curbs are even in the dark. They can allow you to post messages on any surface, using any kind of grouping: "tag" a bus with something only your friends (or internet group) can see.

Virtual pets are, of course, a given: able to run around the physical world, they are rendered with loving care by the mesh network, realistically interacting with things from that world.

Advanced uses might include "virtual makeovers": interactive mirrors that let you see yourself dressed in whatever the shop is offering (or you've found on line). Custom displays for various surfaces, such as windows that display a view of mars, or a street that is tagged with the locations of every accident in the past five years... cars that are "souped up cyber-rides" - take off your specs, it's a Pinto. Put 'em on, it's half batmobile, half pneumatic main battle tank.

And this is all with the mesh network not being able to get moment-to-moment sonar data. If we were to upgrade the network to use something more continuous, it would be able to do a lot more things!

These are just the uses I can think of... I'm sure there are a lot of others. I'm sure that, in fifty years, augmented reality will be as important as real reality in the same way cell phones are often as important as real conversations...

What sort of future-shock do YOU see cheap computation accomplishing?

Sustainable Farming + Genetic Engineering, Redux

I've mentioned before that I like the idea of sustainable farming, but hate the woo that goes with it. So this makes me happy.

Obviously, care must be taken. But, just as obviously, the science and advancing technology of genetic engineering is not fading away. And that's good.