Harnessing the Power of Open Source
February 14th, 2008First, I found Twitter, thanks to co-workers here at Indigio. I quickly became addicted once I mixed Twitter with my BlackBerry.
Then, I found the Twitter API. I HAD to do something with it. So, one night I started to pull down the twitter public timeline, break each post up by words, and insert each word in to a MySQL Database. I fooled with this data for a while trying to get an idea. Pulled the top users @replied to in 24 hours, tried pulling the top websites posted in 24 hours. None of it was too interesting.
Another night, while drinking, I thought of fantasy sports games. And how horrible I am at them because the only sport I like is foosball. So why not bet on words used per day, instead of who hit the most touchdowns at the Detroit Red Wings game?
So after a night of drunk coding, I had… something. It was messy and clunky, almost like a drunk wrote it, but a good proof of concept for a fantasy twitter game. In the end, it turned out to be more of a mix between Scrabble and Family Feud. But it needed more. I wanted a community. I wanted an admin section for controlling users. I wanted a registration system with email validation and captcha support. I wanted avatars. I wanted a ton of features that were going to take forever to build.
So, I started with the community. That was an easy one, just install phpBB! So I installed it under /chat/ off my twitter app and *poof* a community. But I wasn’t satisfied. Once you log in to my game you shouldn’t have to log in to phpBB. So I considered modifying phpBB to use my session code… but that looked too daunting. My friend Ben the genius suggested, “I think it’d make more sense to go the other way around - that is, keep phpbb’s aauthentication structure, and just hack tweetwords to use that. Then registration is done for u too :)”.
My reaction was: “YOU ARE A GENIUS”. So very quickly I started reading phpBB’s cookies in my games session code. So now my login page posts to phpBB and gets a session, which then redirects to my game, which reads the cookie, gets the sessionid and then can pull all the user info out of phpBB’s database with the session id!
Instantly I had access to:
- User registration with email activation
- Preventing brute force login attempts
- All the user preferences in phpBB (avatars, timezones, email preferences, private messages and more)
- Forgot my password code for emailing out new passwords
- A full admin tool for administering users
And I’m sure there’s more I haven’t found yet too. Plus, now that I have the users session id, I can make my own forms in my game that post to phpBB. So I quickly built a “Shout” column for each round and users can now shout out taunts or what not.
So my game developed very quickly. Check it out here: TweetWords if you’d like. It’s been fun making it, and several friends testing it out with me have enjoyed playing it. Plus, more fun to come each week.
















