Tag guest post

Gaming FourSquare with Bill Brasky

This is a guest post from a friend. They’ve requested to remain anonymous. If you like hacking and location-based services, this is some good fun:

Bill Brasky is a sonofabitch! For the unititiated, Bill Brasky was a short-lived character who appeared on Saturday Night Live in the mid to late ’90s. Bill, himself, rarely appeared, but his associates would swill scotch and recount all of Bill’s legendary–if not bizarre and often mean-spirited–accomplishments which, like any good folk hero, grew with each retelling.

Fifteen years on and Bill Brasky has signed up for FourSquare and his behaviour is no different; he’s still a dick and he’s looking to usurp your mayorship, but he also wants to be your friend. Bill Brasky is, obviously, not a real person, but in this case, Bill’s not even portrayed by a real person, he’s an automated script.

As a web developer, I’m regularly checking out different social networks and other novel online tools, and FourSquare has recently drawn my attention.

Immediately I realized that the location-based service was ripe for manipulation and, barring a major change in how either GPS or the Internet works, it will likely always be that way. The fundamental problem of check-in authenticity is a classic problem of “Never Trust The Client”. For the non-technical, ”The Client” is whatever is sending check-in requests to the FourSquare API. Many people use iPhones or other, similar, devices. With the software running on these, FourSquare gets a venue ID and, optionally, GPS coordinates. This is all well and good when you know you can trust the client. The standard iPhone application takes real location data from the device’s GPS and sends it along, but anyone with a web browser can access the FourSquare API and fake the requests. Essentially, FourSquare has to trust the user that they’re where they say they are and this leaves a major opening.

The folks I know who are regular users of the service seem to really like it, and mayoral statuses, especially for hot venues, are highly coveted. Knowing this, the service was practically begging for some tinkering. Enter: Bill Brasky.

I began work on some Perl scripts to play with the FourSquare API and setup an account (Bill Brasky) to test with. I gave Bill a list of locations I wanted him to check into and set him loose. Bill hits up each venue with a random time delay to, at least superficially, appear as though he’s an actual person touring the town. At the time of writing, Bill’s siezed mayorships at 11 different venues, in some cases displacing real patrons.

Right now, apart from the random timing of check-ins, Bill doesn’t do much, but I’ve got plans for him. In the future, Bill will begin friending those he steals mayoral status from. He’s going to start using actual venue lat/lon, with a touch of random positional noise added, in his check-ins to appear as though he’s actually “there” as a preemptive strike against FourSquare “locking down”. He’s going to start getting routes from Google Maps so his checkin times aren’t just random, but plausible, given the actual driving distance/time between venues. He’s going to start seeking out popular venues on his own and making moves to become the mayor. Basically, Bill’s going to start acting, or at least appearing, more human; albeit a semi-malicious one.

I must confess however, that this idea isn’t original. I have to give credit to Jim Bumgardner of KrazyDad.com who began similarly gaming FourSquare some time ago. Though this isn’t a new idea, I’m trying to push this further on the social side by establishing relationships, in particular with those people that Bill’s “bested”. I’m curious to see how folks respond to Bill’s constantly encroaching on “their bar”, especially as more people adopt the serivce. Beyond the social component, there’s the question of the obvious marketing potential of a service like FourSquare which we’re already seeing from some businesses which are offering freebies or discounts to those who regularly check-in or have mayoral status, and how an eligitimate player like Bill might start affecting that.

More than anything, this is just a fun exercise for me, and a curiosity to those who track the world of social media. It’ll be interesting to see how Bill fares over time, how other user’s respond, and what FourSquare might try to do to make the game harder for Bill to play. The social world is costantly evolving and reinventing itself and as we work towards total integration the stakes (and dollar signs) become bigger and bigger. What happens when the likes of Bill Brasky starts affecting the bottom-line as tools like FourSquare are used to promote and market businesses? I guess we’ll all just have to wait and see.

For the technical among you, I’ve started work on a (very simple) FourSquare module for Perl, which I’m hoping to get into CPAN in the near future, but I’m making the code available for now via this blog.

foursquare.pm – The Perl module for interfacing with FourSquare View Code | Download Code

dummy.pl – A sample script using the module. View Code | Download Code

The code is ugly, I know. It uses some gross techniques (e.g. regex for XML “parsing”), but it will be cleaned up as I work on it.

Editor’s Note: I would love to hear what any Foursquare people have to say about this, and the rest of you readers. Definitely interesting.

Magic Pen

By Don Smith

You should totally check out the Flash game Magic Pen. It’s a fun and simple game that starts easy and quickly becomes more challenging. The basic game play involves a ball and one or more flags spread over a small “level” where your objective is to get the ball to the flag(s). I know, it sounds kinda dumb; keep reading. Your mouse cursor is represented by a crayon which you can use to draw in the game, and when you draw shapes they immediately become part of the level. Although the graphics have a whimsical child’s drawing look to them, the shapes all interact with each other using fairly convincing physics; draw a downward pointing triangle above the ground and watch it fall and then tip depending upon which side is heavier.

In the first level, you need only draw a ball above the “game ball” so it drops on it, knocking it to the right and hitting the flag. From there you start moving into new terrain where you need to create ramps, and figure out ways to generate enough force to move the ball along, up, and over obstacles, overcoming the force of gravity. As you draw, top heavy items topple over, balls roll down slopes, and assembled structures can crumble when hit by sudden forces.

In addition to drawing shapes to coerce the ball along, you also have the ability to create pins and hinges. Pins allow two objects to be inflexibly anchored to each other. Since the object drawing engine will “smooth” objects out a bit, and doesn’t allow for concave shapes, when you need a concave shape (a hook for example), you need to build it out of pinned together convex shapes. Hinges–which really ought to be called pivots–are pivot points. Put a pivot onto a block and draw another shape around it and it’ll rotate, per the effects of gravity, in a pendulous manner. Using pivots and the force of gravity you can create pseudo-golf clubs to knock the ball around the level.

While it takes a bit to get a feel for the real time drawing and interaction environment, Magic Pen is a really neat use of Flash, a well implemented physics engine, and a humorous and challenging game.