Archive for February, 2009

« Previous Entries

A simple Flash movie player with a fancy iPhone form factor!

The Play Premise

I had lofty plans for all the work I was going to get done this week, but instead found myself frittering away hours in the lounge, completely absorbed in someone else’s game of Mirror’s Edge. I’ve never played the game and have heard from diverse quarters that it’s not that great, but, at least for the spectator, it has a killer hook—what I’m calling its play premise—first-person parkour.

The play premise is the concept or idea around which a game is built. It’s not a narrative element, it’s not “you’re a mercenary tired of war trying to fight your way back home.” Nor is it what is frequently called “genre,” though it can be what distinguishes one game from another in an ostensibly similar genre. In Dead Head Fred, the play premise is that you collect heads which give you different abilities and can interchange them on the fly like a Swiss Army knife. This play premise obviously affects the game’s 3D third-person perspective and environmental puzzles, but it remains separate from them. The great frustration of this game is imagining how great it could have been had these elements been more tightly integrated.

In the case of Tiger Woods 09 PGA Golf, the premise is much simpler. You collect (or lose) confidence in each round of golf you play, and that affects all successive play, so if you rock Annika Sorenstam at St. Andrew’s, then you’ll sink more putts the next round. Conversely, if she beats you, you’re going to have to work harder. There are all sorts of mini-games (clean your shoes, time your breathing, spot your fan) that help to increase your confidence. You can even buy confidence-improving clothes and equipment at the in-game pro shop. The play premise is integrated into the gameplay, albeit a bit heavy-handedly. Notice also that this has little to do with it being a golf game; the same play premise would work in almost any other game.

I would argue that a large part of a game’s success has to do with how tightly the play premise is integrated with the game’s rules, narrative, and controls. Or, in economic terms, did the designers maximally capitalize on the premise? A successful example that springs to mind is Crush. Its brilliant play premise is that the player may move freely between 2D and 3D views but is subject in each case to the restrictions particular to their geometry. In Crush, the play premise is the game. Focusing on play premises might prove fruitful when trying to design original games within saturated genres.

Markov Rhymes

Continuing with the hip-hop theme, I thought it would be interesting to subject my painstakingly assembled compendium of Notorious BIG lyrics to our Markov filter from last week. Given Biggie’s particular way with words, I was curious to see whether the filter would generate new lines in his voice. The results, which lack his clever turn of phrase but retain his bravado, are below.

I tried to get the filter to accept arguments on the command line, but that was a no go, so I manually changed the order of the n-grams used to generate the following snippets of rhymes never sung. Orders below 4 produced nonsense while orders above 7 produced ArrayOutOfBounds exceptions (I suspect there are lines in my source text that max out at 7 characters—”uhh uhh”).

UPDATE: So the problems mentioned above are fixed. I was calling the constructor of a function that took arguments before passing in those arguments. I eliminated the arguments from the constructor and wrote a setter function and now I can pass in the order of the n-grams I want and their maximum length. The code is here and here.

I love the drug connotations of the n-grams after each title

Leave cars with me? (5-grams)

You ass assumptions, lead led to dumpin
Sticks and Biggie Biggie Smalls the tripping of a superstar
Tell the crew run the right shit, out TV’s
no mo’ richest rest fo’ sho’ (YEAHH)
I know yo’ asshole!
Your crew, flipping,
And I just love process of this on the right wit’cha
(can I get a hundred shots
Got a nut
Shouldn’t have the show up my skirt but I state “You know we do.
So anyway I don’t take em all of this one,
pass that weed i got a bag bitch I left the liquor

And I just speakin (7-grams)

Had to re-up; see no more
Niggaz got to feel one, caps I got more Mack than Cortex singers:
“They pray..” 4X through, but I’m up in the phone call,
it couldn’t hit me on the rawess niggaz spit be counterfeit, robbery,
I’m the right one, pass that weed i got to “See-three-P.O.’s”
With my rocks
Fifty dollar and a half
Pendejo’s, I show you got to die, if I go to sleep safe, not to hear me
I wanna hear right boo [truuuueee]

I wanna get witch get wit’chou” (4-grams)

I fuck your way I don’t pass with my friend his wack
Thugs and pop-pa”
My moms and you see battle steam-and-Heavy rock with the kid’s why y’all
me scared the ransom no light,
I’m big speak all your burn me.
Always why they wit’cha
(can bullshit the fuckin hoes do mean stuck around flow up this than
Biggie gonna brick do’, in you in home, they broke, and stack of me,
talk your game, talk you see me one, pass witch)
Passthat rah rah rah shots that weekend

A Rap Concordance

CLICK TO ADVANCE THE FRAME.



Drawing on the brilliant hip hop powerpoint that made the rounds some time ago, I built a Processing sketch that builds a concordance of hip hop lyrics (in this case, Biggie Smalls’s, though any text can be fed in) and creates a series of appropriate data visualizations.

The code is here and here. It’s inelegantly hard coded in order to display nicely, but if my goal were to generalize the program to work for any hip hop lyrics, I’d build a nice interface that allowed you to select the words to be compared.

It would be cool to assemble concordances of various different rappers’ lyrics and compare the preferred pastimes of, say, Snoop and Biggie. I can imagine the categories being something along the lines of smokin’, blastin’, chillin’, raising hands in the aiyah, etc.

Trace(me)

I set myself the task of learning the Google Maps API for Flash this week. I created a map that tracks (with some omissions) my residences over the last thirty years. The map pans between locations and then zooms in to them. You can use the zoom slider to get an even closer look. The final click chooses a random location for me to live after I finish grad school.

Dead Head Tiger

Dead Head Tiger

This week I picked up two PSP titles entirely at random: Dead Head Fred and Tiger Woods PGA Tour 2008. I’d never heard of either. Both are third-person three-dimensional games with complicated controls that require an in-game tutorial to learn, and despite golf clubs wielded in common, you would never confuse the two. That’s because of what I’m calling their divergent “play paradigms.”

Caillois and Sutton-Smith would no doubt place each of these games within a larger historical or sociological tradition of games and play, and I’m willing to accept their categorizations without argument. I’m more interested in the next level down, in how these games fit into the ecosystem of modern console or PC-based video games. The first thing I noticed playing each for the first time this morning was how much my role—not as character but as player—differed between the two and how much more extreme the distinction felt than when playing, say, two different board games.

In Dead Head Fred, you navigate through a series of half-assed environmental puzzles and button-intensive fights to reach really long cinematic cut scenes filled with snappy dialogue. The play paradigm is fundamentally narrative, much like a movie. That such games miss the point by porting an atavistic choose-your-own-adventure narrative style in favor of the native capabilities and dynamism of code-driven narrative is irrelevant. What matters is that you the player are principally an audience. Your play drives the story forward, yes, but the story exists whether you play or not. The game is an excuse to make you work for a story. The complicated key combinations are the equivalent of a very hard-to-use DVD remote.

On the other hand, the controls in Tiger Woods, though just as complicated, are configured thus to mimic the physical complexities of real-life golf. With the notable exception of Wii games, most video games can’t rely on direct physical analogues for their input. A punch becomes a button press; a tumble is reduced to a tap on the top of a handheld controller. But the frustration of hooking a drive is the same, and that’s because in real life and in the game alike, it’s the player’s less than perfect motion that sends the ball off course. All the Tiger Woods stuff is just icing EA Sports uses to up the fantasy quotient: “I may not be able to beat Tiger in real life, but on my PSP, look who’s fifteen under par.” The play paradigm in Tiger Woods is based on mastering an abstracted simulacrum of golf. You play to improve your game and to beat your own records.

On a rainy day like today someone might suggest playing a board game. Though the play differs significantly between individual board games—the slow painful burn of Monopoly or Trivial Pursuit as opposed to the speedy fun of a rousing round of Pictionary—given two hours, there’s no real reason besides personal preference to choose one over another. Their play paradigm is the same—turns, a board, somebody wins. That’s the whole point.

It’s much harder, however, to imagine someone really in the mood for a round of golf choosing instead to watch a movie. Though they both can be construed as play, their paradigms diverge drastically—being entertained watching an imaginary story versus chasing after a bouncing ball with a racket. It’s the same with their video game counterparts; if I’m in the mood for golf, I’m not going to want to shoot zombies while searching for my misplaced head.

What all this boils down to is that the video game is simply a medium, an interface like the printed word. The disparaging parental “he’s up in his room playing video games” misses the point, and provides as little information as the equivalent but much rarer complaint “he’s up in his room reading.” What is being played or read is the important thing, what I would call the “play premise.” And that, dear reader, is what I will touch upon next week.

Shakespearator

For A to Z this week, I wanted to use regular expressions to replace selected words in a text. I started out with the idea of cliché algebra: using clichéd metaphors a la—time is money, business is war, bigger is better, less is more, knowledge is power, seeing is believing—to replace all occurrences of each word with its metaphorical equal. I tried on a couple of texts, but none of the words occur commonly enough in close combination to produce a noticeable effect, even on a list of headlines, and I wanted my filter to work on any text, not just on a specifically designed one.

I also played with the idea of censorship (removing all four letter words and replacing them indiscriminately with “sugar”) before settling on the Shakespearator—a relatively arbitrary set of rules to make a text seem Elizabethan. It works well on all texts but especially on texts with a profusion of second person pronouns. I ran the script for Goodfellas through it, which was less funny than it should have been, so I tried it on a bunch of other decidedly un-Elizabethan texts. Below are two of my favorites.

From the Adobe website:

Installation instructions for MacOSX and MacPPC

Installation of Adobe Flash Player mayst require administrativest access to thine PC, which is normally provid’d by thine IT department. For the installation to succe’d, thou wilt be ask’d to closeth all open browser windoweth during the installation.

Clicketh the download link to begin installation. If a dialog box appearest, followeth the instructions to save the installer to thine desktop. Save the Installer to thine desktop, and wait for it to download completely. An Installer icon wilt appearest upon thine desktop. Double-clicketh upon it.

Read and clicketh through the dialog boxes. Thou wilt be prompt’d to closeth all open browser windoweth to continue with the installation. When the Install button appearest, clicketh it to install Adobe Flash Player into thine browser’s plug-ins folder. Thou canst verify the version thou hath install’d by visiting the About Flash Player page.

And, even better, from How to Touch a Woman to Drive Her Wild:

Sensual touching is an art that thou shouldst definitely spend some time mastering — because it wilt be incredibly rewarding to both thou and the woman in thine life.

Touch her more. However much thou art already touching thine girlfriend, wife, or lover…thou canst dost it more often. I canst’t emphasize enough howeth much of an emotional connection and bond canst be form’d by this simple action. Women link many feelings of sexuality, love, and trust with the sensations that art arous’d in them when a man putteth his hands upon her…

Howeth’s that for the simplest tip ever?

Try it out. I promise that ’tis as effectivest as ’tis simple.

… When thou art putting thine hand upon her, whether thou art caressing or squeezing…or petting or holding or any other kind of touching…Look into her eyes as thou art doing it. Thou mayst think, hecketh, I already look at her when I touch her…But just try this — try being awarest of intentionally holding her eye contact as thou touch her.
I think thou wilt find that it maketh a very big difference.

Try touching her in new ways… Just placeth thine hand upon her shoulder, the backeth of her necketh, her thigh, arm, or hand… Let her feel thine masculine strength, but don’t, obviously, hurt her. If thou dost this righteth, she shouldst feel the tenderness and protectiveness behind thine touch.

The Expert Losers

Today was a day I look forward to all year: the day my fantasy baseball invitation arrives in my inbox, ripe with the promise of six months of lost sleep, maniacal statistics tracking, and indecorous online trash talk. But not for me (well, I might talk a little smack). I don’t believe watching Sports Center helps you win at fantasy.

The fifteen other guys in my league disagree. They will spend the weeks leading up to the draft this March fanatically researching every player, ranking and re-ranking their draft lists based on an arcane combination of personal team preferences and hearsay. On draft night, they’ll stay up to fight over a rookie second baseman that some obscure AM radio commentator called the next A-Rod. I’ll be fast asleep, letting ESPN autodraft me a team of solid if unexceptional players as I do every season. And, as I have every season for the last six years, I’ll finish in the top three amid accusations that I didn’t really play.

The guys in my league are the kind of guys who know all the odds for every possible poker hand and can tell you in an instant if you should hit when the dealer is showing a six. These are guys who take pride in knowing rules, who don’t drink when they gamble and scoff at gut feelings. But when it comes to fantasy, it’s as if they’d been knocking ’em back all night. They drop players based on a weekend slump and blatantly disregard the statistics they normally venerate, I’m guessing because they conflate fantasy baseball with the real thing.

I don’t follow baseball. But I do check my fantasy team daily, and I resent being accused of letting the computer win for me. If one of my guys gets hurt, I take him out of the rotation. If after the draft I end up with three shortstops and no catcher, I trade accordingly. If one of my guys is sucking consistently, I replace him. Otherwise, I let the team be, keeping my statistically strongest hand. The guys who resent me the most are the ones who like to play at being big league managers—and they certainly know a lot more about baseball than I do. But we’re not playing baseball, we’re playing fantasy baseball, and I play by its rules, not some bizarre transposition of the rules of real baseball. You can play a game for lots of reasons, but I play fantasy to win.

« Previous Entries