Pages

Friday, 8 May 2015

Rock, paper, scissors - and bots

Back from the arena of politics today to something much saner, calmer and more logical: game development. (Sure I'm serious. You'd rather crash-land on a white dwarf than a neutron star, right?) This is a fictionalized case study from my book Game Architecture and Design, co-authored with Andrew Rollings.

Some of the case studies in GAD read like horror stories, and the scariest part is they were based closely on real projects we'd worked on or had first-hand accounts of. I'm happy to report that the game development process has got a lot better in the decade and a half since we wrote the book.

Here's one case study that was entirely invented, and rather than being a cautionary tale of team-dysfunctional disaster (we're perilously close to politics again there) it was intended to illustrate intransitive game systems. That's Rock Paper Scissors in plain English, or strictly speaking Scissors Paper Stone, as we called it in the English Home Counties where I grew up. You'll appreciate that there's a spherical cow aspect to simplifying a discussion for teaching purposes, but the game design points made are interesting.

Picture by FangtheTyphoon used under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License

Peter, the lead designer of Warbots, is discussing some gameplay ideas with Charles, the project manager. Charles had requested a circular unit relationship, similar to Warcraft 2, and Peter is sketching out some possibilities.

"Say we have three main combat units," he suggests. "The Drillerbots are fast. Frighteningly fast. They can do lots of little attacks in quick succession that take the slower Hammerbots apart. They make this horrible sound as they do it, too... Nyeeowmm."

"I know, like my root canal work!" laughs Charles. "Ouch."

"Then you've got the Juggerbots. They're slow too, even slower than the Hammerbots, but they're massively armored. The Drillerbot can't even scratch them – sparks everywhere, but no damage. Meanwhile, the Juggerbot is pulling the Drillerbot apart like a crab taking a leisurely snack"

"And the Hammerbots? They can get through the Juggerbots' armor?"

"Crack 'em like nuts," grins Peter. "Only it's not so one-sided as those other matches. The Hammerbot wins, but it's a brutal slugfest with scrap metal flying everywhere."

"Good," says Charles. "So there's no best unit. Have you thought about what the player can do to change the odds?"

"I'm going to talk to Nick about that. He's still working on the physics system, which will affect a lot of things besides combat. It could be that the Drillerbots use laser drills, and they might get less effective as they move away from the player's power pylons, or maybe they weaken over time and then have to recharge."

Charles nods. "As long as it's an automatic recharge, like the units that use energy in StarCraft. We don't want players having to fiddle about sending energy to 'bots from their resource stocks."

"Agreed. Also, we could dispense with the mining 'bots. Drillerbots can mine as well as fight, so they have a versatility advantage."

Charles thinks about it. "No, keep the mining 'bots, but make them cheaper and have the Drillerbots better at blasting the ore but not collecting it. It'll give the player some interesting choices. And what about Hammerbots versus Juggerbots?"

"Underwater - under liquid methane, I should say - the Hammerbot's attacks will probably pack less punch. The Juggerbot fights with these kind of vice-grip pincers, which won't be affected so much."

"It all sounds fine," says Charles. As a longtime Warcraft fan, he is quite satisfied. "So much for combat. What about other factors? Visibility range, say. Can you get that to fit a cyclical pattern, too?"

This takes Peter by surprise, "Of course not - " he starts to say. Then, after a moment's thought, "Hey, maybe we could, at that! Suppose A has the longest radar range but the shortest sight range. B has the longest sight range, just a bit under A's radar range, but has no radar itself. C has a medium sight range and again no radar, but also is invisible to radar."

He writes on a pad, plugging in some numbers. "Yes. A spots B before being spotted itself. Same with B to C and C to A. Hey, that's nifty! I never would have thought you could get an intransitive relationship with visibility ranges."

"See, I'm too dumb to know what's not possible," laughs Charles. "But enough of this algebra stuff. Which units are we talking about here, A and B and C?"

Peter smiles as another realization dawns on him. "This has a big impact on gameplay. Say we have the Jugger spot the Driller, and so on, so that each 'bot can see the 'bot he's best equipped to take out. That'll make for a fast-moving aggressive game. The predator can always see his prey before he is seen himself. But, if we try it the other way around, so the Hammer sees that Driller coming, the Driller can avoid the Jugger, and so on... then you have a slower, more considered kind of cat-and-mouse game."

"Where the cats are made of titanium steel and the mice weigh eight tons apiece, sure." Sensing they could be one up on his favorite strategy game, Charles looks a little bit like a cat with cream himself right now. "Anyway, which way is better?"

"Better?" Peter looks up from his notepad. He couldn't look more astonished if Charles had just asked him to calculate the value of the truth-beauty equation. "I can't say which is better. It depends on the kind of game you want. We could even arrange it so that it sometimes works one way and sometimes the other. Making it vary depending on weather or the day/night cycle is one option. More interesting is if radar is messed up when there are lots of scrap robot chassises lying about, when metal buildings are nearby, that kind of thing."

"I see," says Charles. "So 'bots might see their targets, pounce, there's lots of vicious infight¬ing, but the more the bodies pile up the more difficult it gets to spot your victims...”

"And the easier to spot the 'bots to avoid. Yes. But even that's only part of it. We also have to settle on the attribute balance between visibility range and combat ability. Because, if the cost of building new 'bots is very high, winning every combat becomes critically important. If they're cheap, it doesn't matter so much. And then there's the question of not just whether a 'bot sees another, but the ability of each 'bot to close the gap or to get away."

Charles nods. "Okay, you're right. I was hoping for an easy answer for once, but there's only so far you can get with hand-waving and whiteboards, isn't there?"

“I'll get Nick to knock up a testbed. You'll be amazed what a couple days of tweaking can achieve."

4 comments:

  1. I loved the Condorcet Cycle stuff in your game book... cavalry beat archers, archers beat spearmen, spearmen beat cavalry. Gunpowder beat cavalry... but not at night and in the rain....

    ReplyDelete
    Replies
    1. I was well into combined arms theory at the time, James, as I was designing an RTS called Plague (later released in modified form as Warrior Kings). Hopefully all that stuff will have been useful to developers working in other genres.

      Delete
  2. I'll have to see if Warrior Kings is on Steam... it looked good in your book. So did Starcraft: Ghost as well. And "Dave Morris" is generally a mark of quality. The Total War games do that stuff well. IIRC gunpowder weapons are less effective in rain. Spearmen are great against cavalry.... but not if they are themselves moving, or are attacked from the side. Horse archers are great against infantry, but not against foot archers (who have greater range). Fall of the Samurai gives you some really interesting conflicts... Gatling guns versus Samurai, ironclads versus torpedo boats!

    ReplyDelete
    Replies
    1. So as not to mislead, I ought to say that I left the project when the publisher started insisting on "trad fantasy" elements and other changes, so the game that was released isn't quite what I designed. There had been fantasy - it wasn't just Total War, in other words - but not the Warcraft 2 meets Black and White it ended up with. Resources got hidden from the player, for one thing, which is the sort of thing I'd never do in a game. And the combined arms diagram breaks down a bit when you add giants, lol.

      Delete