I can’t think of a title for this post- there’s so much to say. The short version: I attended an intense 2-day hackfest for the iPad down at the eBay offices in San Jose, called iPadDevCamp (used to be iPhoneDevCamp). We were hesitant app developers, we made a tiny little dice throwing app – connecting an iPhone and an iPad using Game Kit- and we won the Best of New Developer award. Wow. To say it was a long shot, and unexpected, is not enough.
On the second day, after demo’ing our app, I didn’t even attend the award ceremony. “But what if we get something? Stacie said as I left.” “Um, then you can receive it?” We laughed. Seriously, we were coding from the seats of the demo’ing event. We had only one computer on day 1, we didn’t have a developer license (necessary for a networking app) and Stacie had not written one lick of Objective-C before that weekend. I had one app done, but not in the Store. We were a team of two against teams of 5… etc. It was a long shot. I remember thinking, as I walked away, “Well people need to lose so that others can win, and I’m sure our app will strike the judges as one that can lose.”
(Judges at work from @dom’s feed)
Anyways, I escaped to my sister’s after the demo’ing ended, and then tried to show her & the kids, but it was pretty bumpy, not as good as when we demo’d in front of hundreds, with 4 big TV screens around the room. Went home. Checked messages, and had one from Stacie. Walking up the hill in the fog, glad to be out of the heat of San Jose, and the intensity and focus of Silicon Valley, she told me that we’d won- not only a bag of stuff and the attention of the award, but more meaningful to me, the respect of our peers, many of whom I’d worked with in that sweaty intense room for two days. She said, “They were really excited about this award and gave a little speech about how important it is to bring new people into the community.”
We went over facets of our app- how it demo’ed rather well- and how we’d been encouraged by guys in our room to submit. It was almost a group project, we’d gotten so much help from others. I had convinced Stacie to submit the contest application, but when I found out the demos were open to the general public and media, I got scared and choked a bit, and ended up botching our code (within 10 minutes of thinking of the media and general public!). Thankfully we had done source control and I could roll it back.
Watching the telecast of the awards that night, I was energized and excited all over again by the sheer amount of invention and creativity that came out of our 2-day hackfest.
OK enough of the introspection. Onto the geekery. Stacie and I met at She’s Geeky unconference, when I was on a talk about pair programming, and I proposed to write an iPad version of Settlers of Catan. She thought that was interesting, so we did some research that day at that conference. We met one other time, to crack open some open source version of Catan Solitaire and figure out how we’d do it. After much emailing and purchasing of iPads, we decided to attend the hackathon and get some skills and movement on this project.
So: we want to make a big game, but since we only had 2 days, we kept scoping it down, from a board game, to the most difficult pieces that we could then reuse (and open source). The dice roll, and the networking, were the hardest parts. Especially since most of the game play had been coded in the open source solitaire version. In the game, we envision players having iPhones or iTouches, and holding their cards, as well as throwing with a gesture, the dice, which lands in an animated vector, onto the iPad. This is all technically possible, really. If you’ve seen some of the cool apps coming out of the hackfest, like the best game one- the Slot Machine- you will understand how we can capture movement, relay data, and associate players, although is not suitable for little kids and for these is better to check the wooden playhouses for sale as kids love to play in playhouses.
So we dug into Game Kit, this is the networking framework available to iPhone developers. As we started to work on it- side-by-side with other groups who were also using it- we realized we had to really really shorten our scope. No more animation, just connecting the devices. Then, no fancy card holding. We spent that first day getting a developer license so Stacie could connect her and my devices. I had thought it a smart idea not to bring my laptop. To a hackfest. Dumb. As my carpooling buddy Xavier said on the second day. ‘I forgot my badge, but you didn’t forget your laptop, you intentionally didn’t bring it.” LOL.
I networked a bit, talking to folks- a friend from Kodak, Eric, was across the room working on GameKit. He’s an experienced iPhone developer but was having issues with the network protocol too, which made us feel like less of total dolts. One of the co-founders of iPadDevCamp told me that the team upstairs, working on Tank Game, had built an OpenGL (graphic library) dice animation. He came down at one point and we chatted for a while. Enough to know that during this hackfest we would probably not be able to crack the framework and use it. He said it was really thorny and if you haven’t used OpenGL- which dates back to pre-macbooks- you should give it a longer weekend, ha. So we shelved animation for now.
So one computer, no dev license, and we coded until 9pm when I had to call it a day. We were stuck. The iPhones weren’t finding the server app on the iPad. The iPad wasn’t finding the iPhones. Here is a graphic to break up the tedium of this post: Stacie holding up our devices.
One of our testing choices was to color the screen of our iPad dark blue- “the screen of death”- our table mates joked. We were sitting with 5 or so hackers who were there for the ambiance (really I had no idea why they were wasing a gorgeous sunny day inside, but hey) and a fellow who was working on a developer tool. Across the room- more Game Kit developers, similarly to us converting a board game to an iPhone/iPad combo. Then a table of more GameKit developers upstairs, who ended up winning the “coolest app” category.
So end of Day 1: we are definitely the slowest of the Game Kit folks, functionally. People are racking it up to network flakiness, but we’re using BlueTooth which is relatively unaffected. I tried to pry Stacie away but she ended up working some extra hours that night on our methods- callbacks to the GameKit foundation, and I went home with my carpool buddies and rehashed events of the day. What apps we thought were cool- Slot Machine was already making some noise as neat- and how game development was definitely where it was at. Then for about 30 minutes winding our way up 101 through Bernal and Potrero, we shared our early games we loved. Civilization, Deja Vu, etc.
Day 2: Wake up at ungodly hour to pick up carpool mates, one has fallen off, but Xavier is game. He’s working on a Twitter visualization timeline (won an Honorable Mention, and sounds super cool). Show up at 9:30 and Stacie and I meet and start again. She’s broken through the sound barrier! The callback works and she can make a connection. I realized last night that while we are passionate about pair programming, I’d like to spin off and do some graphic work, which is relatively easy for me to do. I call it “putting its hair up in barrettes and doing its nails”- the visual candy that makes such an impact. I can’t do candy but I can make it presentable. I was also inspired as I went up to the Tank Game guys right before leaving last night- they had a graphic designer with them who was doing all their stuff, and I – as probably most people do- appreciate the design right off when I’m playing a game. The device itself is so design and graphics oriented, too. In fact, in making the Icon- a 2-dice- the iPhone gives it a nice bevelling look automatically. So cute! Barrettes and painted nails!
So I propose this to Stacie, and I start making dice and the green baize of the iPad, adding it to the app. This is what we come up with- a simple dice animation. It’s UIImageView that holds an array of images, and then you set the order and loop.
You can make the dice shuffle appear random, by creating an array of objects not in order, but shuffled up. The final dice side/state will be what the iPhone sends it. So ideally the iPhone generates a random number (between 1 and 6 for two objects) and sends those to the iPad, where the animation runs, and then the final image shown is the number from the iPhones.
And the Viking-looking dice cup, which is on all of the client app devices:
We manage, around noon, to get the iPad to recognize and increment the “# of players.” I start integrating the UI stuff, which I’d done in a separate app, and then go to get lunch. In the hallway I run into Eric, who says “Get your contest application in!” I’m like, what? So sure. Why not? I scribble off the form – Stacie has very little input, ha- and then go off again to get some food.
No food, as I realize we have 1 1/2 hrs before the demo’ing presentation. So we start cookin’. She starts getting the sendData callbacks and packets working. I start getting the animation onto the iPad. This is when I hear that the public is coming and botch it up and have to roll back.
We end with 15 minutes to spare, having checked it into source control, and tested on our devices. We go out into the big hall- crowded with people, huge movie screens, and 3 stations to demo. The early ones are great- they were prepared to demo and knew they were going to be in the contest. Stacie, I guess was thinking about the app, so she opened up her MacBook and started futzing with it in the audience. I joked that if she got it stable, we’d push it to the device and demo that. Well, she did! She added the other set of dice (at this point we only had 1) and rearranged some of the objects on the green baize pad. We had loaded up my iPad in the developer room, but now switched to hers and synced the new build.
By the time it gets to us we’re with the “oh sure, why not” applications. One Game Kit group is behind us, and Tank Game demo’d great. We want to show the connection on stage since that’s 80% of what we did! It’s kind of ballsy but we go for it. Setup the iPad, get the client dicecups going. They’re searching, searching, for the iPad. The audience is silent. We’re switching between mine and hers. I start talking on the Mic “what’s supposed to happen now, is….” then applause. I’m not aware of it, but the dice on the screens roll, showing that the clients connected.
I tell them that it was crazy since Stacie hadn’t known obj-c before then (she said that was OK to say on the mic, ha) and we only had 1 computer yesterday, no developer license, etc. It was a short but sweet little demo. And, more importantly, it worked!
I learned a ton at iPadDevCamp and will doubtlessly write blog posts about those nuggets, to share the wealth, etc.
If you’re interested in this- some fun links, apps, etc. for iPadDevCamp. And see you there next year!
DicePad: Our open source code for the app.
iPadDevCamp: at 5:35 (but watch it all, it’s great- along with the demo stream) Stacie receives our award, it’s very sweet.
iPadDevCamp at CrowdVine the official location for the meetup
ipaddevcamp hashtag follow the twitter talk re: the event
Game Kit Framework Official app documentation