I help curate a website called Build New Games, which contains longform tutorials about making games for the open web with technologies like JavaScript and HTML5. One of our most popular articles is Sven Bergström’s Real Time Multiplayer in HTML5. I wrote something in the comments that I thought might be valuable to people setting out to make their first realtime online games, so I’m calling it out here. Note: none of this is going to be news to most professional game devs, but I’m putting this here because it’s an important thing for beginners to be aware of (it kind of blew my mind when I first learned it).

Yesterday someone named Chris posted the following comment:

This article was amazing for teaching the basic points of networking in games. That said, I tried out the demo and it was still nowhere near smooth. What’s the next step? There was pretty frequent jerkiness in your demo especially when changing direction after several seconds of holding down a key. What is this demo missing? If it’s so hard to make a rectangle move smoothly on a network connection, then I can’t even figure out how to make a networked pong game look smooth!

I wrote the following in response:

Believe it or not, you actually have MORE leeway when you’re not using rectangles. A lot of games compensate for lag (and hide lag) through careful game design. For example, in most MMOs, when you press the “action” button to do anything, there’s usually a windup animation of some kind: your character swings the sword back for about a second, or starts conjuring a spell, or whatever. The client is already sending a message to the server the moment you press the button: the animation gives the server 1s-2s (or even more) buffer in order to acknowledge that it happened, calculate the result, and return the result back to the client. Then, by the time your animation is done firing (and the sword actually “hits” the enemy”), the client says “Oh, the server already told me the enemy lost 5HP, so now I can tell you that at exactly the right moment to make it look like a zero lag transaction.”

The point is: a lot of the game design in multiplayer games exists solely to catch or hide lag and other edge cases. You’re never going to be able to guarantee a “real” lagless experience, so you design around it (and sometimes, for games like Halo, that involves a massive server infrastructure that you control, and really smart matchmaking that attempts to match people geographically close to each other, etc).

Compensating for lag in a way where you’re not “cheating” too much on the physics is a huge, huge, huge technical undertaking, which most games avoid by cheating like hell.

{ 0 comments }

I just finished playing BioShock Infinite. It’s a game with very high highs and very low lows. Plenty of people have said really interesting things about the game, and I won’t retread their words.

What I do want to talk about is Thomas Pynchon and videogames. It’s been a while since I last did that.

In 2006 he released a book called Against the Day. It takes place from 1893 to an unspecified time period after World War I. And I want to point out that there are an awful lot of parallels between Against the Day and BioShock Infinite.

***Plot spoilers for both works ahead!***

The World’s Columbian Exposition

BI is heavily influenced by the great 1893 World’s Columbian Exposition of Chicago. The entire game takes place at approximately the same time period in the airborne city of “Columbia,” whose architecture is heavily, heavily influenced by the architecture of its famed White City. When you arrive, there is a massive World’s Fair-like festival going on, and a character makes a reference to a Ferris Wheel, which was invented for the Columbian Exposition. Anyway this is an obvious and well-known thing about the game.

AtD opens with the Chums of Chance piloting their airship to to the Expo, and the first five or so chapters take place at or around the Expo.

While the idea that two creative works would both reference the Expo (one of the pivotal moments in American history) is really not remarkable on its own, the fact that AtD opens with both airships and the Expo is kind of interesting.

Bifurcation of people

One of the major themes of Against the Day is bifurcation, or doubling. As Sam Leith noted of the book in The Spectator:

“The book is shot through with doubling, or surrogacy. There are the palindromic rival scientists Renfrew and Werfner. [...] Events on one side of the world have an occult influence on those on the other. ‘Double refraction’ through a particular sort of crystal allows you to turn silver into gold. Mirrors are to be regarded with, at least, suspicion. It gets more complicated, and sillier. We’re introduced to the notion of ‘bilocation’ — where characters appear in two places at once — and, later, to that of ‘co-consciousness’, where someone’s own mind somehow bifurcates. ‘He wondered if he could be his own ghost,’ Pynchon writes of one character.”

There are several pairs of “twins” in AtD. Scarsdale Vibe hired a substitute to fight for him during the Civil War–a common practice among the wealthy. After the war, his substitute Foley Walker finds him, and they become mystically connected, referred to as “the twin Vibes”. Renfrew and Werfner are rival scientists who (if memory serves me) used to be the same person, but a botched experiment split them in two.

BI features notable twins, botched experiments, and multiple realities of its own. The Lutece twins (the best characters in the game) have a very Pynchonian origin. Rosalind Lutece is a Tesla-like genius scientist who harnesses quantum phenomena to open holes to other dimensions. In one of these dimensions she discovers her “brother”, who I think is just herself but born as a boy. She pulls him into her reality, and they form a weird pair that act as the player’s mysterious guides through the world. Comstock and DeWitt are also “twins”: they are twins who split at a key moment in DeWitt’s life involving his life as a soldier. Dewitt bifurcates into Comstock after experiencing trauma at Wounded Knee. Walker and Vibe merge into the same person after one of them experiences trauma in the Civil War.

Multiple realities

In addition to the reality-bending stuff above, AtD features plenty of alternate realities.  There is an eerie scenes (my favorite in the novel) where someone notices that a photograph is essentially a differential of light: the dx/dt is a moment and that moment is captured by the photo–so they invent a way to take the integral of a photograph, and are able to peer inside and infer what life the moment that was captured lives: almost but not quite our own reality.

BI of course, is all about multiple realities, the “infinite” in its title referring to the infinite number of BioShock-like universes out there. Paraphrasing Elizabeth at the end: “There will always be a man, and his city, and a lighthouse.”

Anachronism

My favorite conceit from BI is that many of the songs you hear in the game are actually modern pop songs, sung in old timey style to the point where you might not even recognize them (I sure didn’t until the credits rolled!). Pynchon loves filling his books with anachronistic references (see my Tetris piece, or this famous Simpsons reference) and especially songs and references to pop music.

 

I’ll end with this quote from Louis Menand’s review of AtD, summarizing the overall theme of Against the Day:

An enormous technological leap occurred in the decades around 1900. This advance was fired by some mixed-up combination of abstract mathematical speculation, capitalist greed, global geopolitical power struggle, and sheer mysticism. We know (roughly) how it all turned out, but if we had been living in those years it would have been impossible to sort out the fantastical possibilities from the plausible ones. Maybe we could split time and be in two places at once, or travel backward and forward at will, or maintain parallel lives in parallel universes. It turns out (so far) that we can’t. But we did split the atom — an achievement that must once have seemed equally far-fetched. Against the Day is a kind of inventory of the possibilities inherent in a particular moment in the history of the imagination. [emphasis mine]

If that doesn’t ring  a bell for anyone who’s played Bioshock Infinite, I don’t know what would.

{ 3 comments }

Two new projects: Clickbait and @darius_at_gdc

March 25, 2013

A brief note: this past weekend I launched two projects. Clickbait is a little page born of my anger at Complex Magazine’s 40 Hottest Women in Tech article (purposefully not linking it here, you can find it if you want to). To see two of my friends reduced to a “hotness” ranking made my blood [...]

Read the full article →

Basic Twitter bot etiquette

March 16, 2013

So you want to make a Twitter bot! That’s great! Here are some basic rules for making a bot that isn’t an asshole (and also reduce the chance of the bot getting banned by Twitter). Don’t @mention people who haven’t opted in Don’t follow Twitter users who haven’t opted in Don’t use a pre-existing hashtag [...]

Read the full article →

RapBot: an ’80s freestyle battle rap generator

February 20, 2013

I recently released a new project, called RapBot. You go to the site and it generates an absurd ’80s freestyle battle rap for you. I also wrote a blog post for the Bocoup blog that covers some of the technical implementation details. And lastly, you can check out the source code for RapBot here!

Read the full article →

Twitter Blocking and My Own Privilege

February 13, 2013

I was talking to Cameron Kunzelman today and he mentioned that he has a hard time blocking people on Twitter. I used to have a hard time hitting the block button too. It seemed like I was being rude or maybe I was purposefully ignoring inconvenient opinions or something. Then I noticed that women, people [...]

Read the full article →

Super Mario Bros, the way I remember it

January 14, 2013

When people write about Super Mario Bros., they often include an image like this: Look at those pixels: clear as a crisp Spring morning! For a lot of people, this signifies a retro aesthetic. It’s also a wholly modern aesthetic, divorced from the experience of playing on physical monitors in the 80s. (Jason Scott wrote [...]

Read the full article →

New Twitter bot: @LatourSwag

January 12, 2013

I had a few too many drinks last night, and made a Twitter bot called @LatourSwag as a birthday present for Ben Abraham. Basically how it works is I get the last 100 Twitter search results for “#swag” that also contain the word “and”. Then I grab the last 100 tweets from @LatourBot. I take [...]

Read the full article →

Games of the Year 2012

January 1, 2013

2012 was overall a shit year for mainstream games, and as far as indie-games-that-you-have-to-pay-for go, it seems like there were plenty of games people loved but not many of them struck a chord with me (Journey, Dear Esther: I’m lookin’ at you). I also played far fewer videogames this year than in the past, as [...]

Read the full article →

In case you missed it…

December 17, 2012

I took 20 minutes and made a thing for my buddy Cameron Kunzelman. GAZE UPON ITS GLORY HERE

Read the full article →