Archive for May, 2011

Sloppy Ports

Monday, May 16th, 2011

This blog post borders on gossip, but I couldn’t help but repost a rather long rant I wrote in the comments of another iOS board games blog post over on BGG. In it, the author, Gabe A. links to the latest Carcasonne app blog post by The Coding Monkeys, which ended with the following awkwardly worded dig:

Yeah, it sure takes us a lot of time to get these things done. We’re sorry for making you wait. We love the game and think it deserves the time to make it truly great, instead of doing a quick but sloppy port, like it unfortunately happens so often on other platforms and to others of our favorite board games. We want to do better. Thanks for having the patience to let us do so.

Gabe had this to say:

Strangely, they also the word “sloppy” in making a veiled reference to “others of our favorite board games.” Eh, what’s that about?

…and here was my comment:

I don’t think this is strange at all.

Carcassonne by The Coding Monkeys is to iPhone app board game conversions what the iPhone is to smartphones in general. Basically, it’s just a million times better. Sure, there are little nitpicky things that I would like to change (it’s impossible to please everyone), but overall, the experience is far superior to the competition.

Companies like Codito and Tribeflame should definitely be applauded for dedicating their development efforts to iOS ports of these games we all know and love, but they should also take a page from The Coding Monkeys playbook, and spend a bit more time and effort to polish those games until they shine before releasing.

I really wanted to like Through the Desert for iPhone. It’s one of my favorite (if not actually my favorite) board games in real life, and I was pleased as pie to be able to finish a game in half the time on my iPad as it would take to finish a game with all the physical bits. Unfortunately, that’s where the pleasantness pretty much ended. The game is not as buggy as EVERY SINGLE RELEASE FROM Codito, but the multiplayer has basically never worked for me, and another couple of weeks spent polishing the user interface would have gone a really long way, IMHO.

In contrast, Carcassonne was, for me, one of those played out games relegated to the back of the closet. Don’t get me wrong, I played a lot of the game back when I first discovered it in like 2004… but it hadn’t seen the table in ages. The Carcassonne app pretty much turned that around overnight. I play more Carcassonne now than I ever did before. And it’s certainly not because the game got better. It’s all about the awesome implementation — asynchronous play and ELO especially.

Now, I understand not every game is going to have the luxury of a year of development, and budgets obviously factor directly into how much spit and polish a game is liable to get, but I personally feel like many of these board games — especially the ones near the top of the BGG list — deserve better than they have been getting from their developers. These are games that have already stood the test of time. I just hope their app counterparts can do the same.

Code for my iPhone Game Programming Talk

Sunday, May 15th, 2011

When I did the talk last week on iPhone Game Development, I showed some code at the end of the talk written using the Cocos2D framework. In both talks, the tetris portion of the demo was almost (but not quite) finished. I promised I’d post the code on github when it was finished, so here it is, my intro to iPhone Game Development sample project on github.

Tetris is playable, but this code is barely working, to be honest. I haven’t played with it on a device yet, and I know there are cases in the rotatePiece method that haven’t been tested. I’ve got the next piece in the game model, but not showing up in the view. I was going to use Sneaky Input for the controls, but I ended up scrapping it and just using some really simple touch-based control instead.

Someday (hopefully soon-ish), I’ll be writing a blog post titled “how to write tetris in Objective-C using Cocos2D”. I’ll try and clean it up a bit then.

A new Tetris Documentary

Friday, May 13th, 2011

Details on a new Tetris documentary called Ecstasy of Order are emerging. It is, according to the website, “a feature length documentary set for release in 2012 that captures the greatest world record Tetris players as they prepare for the Classic Tetris World Championship”. (Via Zack, who sent me this Joystiq post about it yesterday.)

This led me to wonder how many documentaries there have been about Tetris already. I thought I had viewed at least two of them, but some quick googling only comes up with Tetris: From Russia With Love, which was a BBC doc from 2004. It appears you can still watch it online. I particularly liked that one of the commenters on that site called it “a Web Filter Unit test”.

iOS Eurogame Podcast and Links

Friday, May 13th, 2011

So, a new post on my favorite iOS boardgaming blog was published today, and it included a link to the second Boardgame Babylon podcast about iOS boardgames. I listened to the episode tonight, and while there were some good descriptions of the gameplay for various iPhone/iPad eurogame implementations, I didn’t feel like it actually said anything new or particularly exciting to me. I had played all of the games mentioned with the exception of Michael Schacht’s Gold, which I knew about, but had passed on for various reasons.

Coincidentally, Gold was on sale yesterday, for $.99, (also mentioned in the iOS Board Games blog post), and if it had still been on sale while I was listening to the podcast, I would have picked it up, but alas, by the time I checked, the price had gone back up to $3. Normally, I would purchase a game I’m interested in for $3, no sweat, but the reasons I passed on Gold the first time I heard about it still remain, and I guess I just feel like there are a lot of games competing for my time… For $.99, I’ll buy almost any app just to try it out and see if I like it. For $3, I feel I have to actually want to play the game before I’ll purchase. It’s not that I don’t want to play Gold, but I just can’t see myself playing it for any real length of time.

But really, here are the reasons I passed on Gold the first time around: 1) Lack of online multiplayer. Would pick it up in a heartbeat if it had asynchronous. For $3 or even $5, for sure. 2) The rules seem really simple to me. Like maybe too simple. 3) The game was made by the same person/folks who did a few other iOS games I already own, namely High Society, and Money. This game looks to be pretty nearly identical (visually) to those games. Sure, it’s a different game, it’s got different rules, but if it doesn’t FEEL like a different game to me, I will still feel somewhere inside (no matter how irrationally) that maybe it’s too similar. This is one reason I’m not a big player of card games played with a standard 52 card deck, to be honest — those games just don’t feel different enough from one another to be interesting to me in anything other than an abstract game-theory type way. (Which is not to say that I don’t find them interesting, or won’t play them, only that once I’ve played them enough to feel like I “get” what’s happening, I lose interest very quickly.)

So after being slightly disappointed that I’d missed the Gold rush (as it were), I somehow ended up on a site that features articles by the game’s developer, Shannon Appelcline. I think I’d read some of these posts by him before, possibly What Makes a Great Mobile EuroGame?, or Making Computers Think Like Auction Players, or Turning Reiner Knizia’s Money into an iPhone Game, all of which were apparently written after a specific game release. His most recent post about iPhone board game dev (written just after releasing Gold) was Sweating the Details for iPhone Card Games: Visuals, AIs, and Player Numbers. These articles are definitely worth reading, but ultimately feel a bit too much like thinly veiled marketing to me. They aren’t technical enough to qualify as howto articles, and yet that’s what it feels to me like they’re pretending to be.

As a nice bonus, I found out today that someone I’m ostensibly working with (but have yet to meet), wrote a nice roundup of Go implementations for OSX and iOS. He mentions Smart Go Kifu as the winner for him on the iPad, and that’s been on my appshopper wishlist for some time now. I have yet to pick it up, mostly because it is $20, but it looks to be well worth it, with a database of 33,000 games, 30 of which are even annotated in english. The developer, Smart Go, inc, also has a universal app with a bunch of Go books as in-app purchases. If I had all the time in the world, I would read a book about go on my iPad right now. Instead, it’s about time I go to bed.

Introduction to iPhone Game Development

Wednesday, May 11th, 2011

I had the pleasure last week of presenting this talk twice, first for the local meetup.com iPhone developer group, and a second time the following Saturday at MinneBar. Here are the slides from the event, embedded for your pleasure:

For the talk, John Hibshire and I also created a spreadsheet listing all the iPhone game frameworks, libraries and SDKs we could find. I’m going to try and keep this data up-to-date, and add any additional projects as I find out about them.

I think my session was recorded, possibly by folks at the Uptake, but I have no idea if that recording is online (as a few others from the event are). If it was, I’ll definitely update this post to link to it, since these slides are pretty useless without my running commentary. There are some nice links in a “Resources” section in the last few slides, so you can enjoy those if nothing else.

UPDATE: I just posted a link to the sample code for this talk on github in a new blog post. The code shows various examples of how to do really basic things in Cocos2D, including using the schedule method to create a game loop, using the CCMenu class, drawing various particle types, and finally, how to write tetris in Objective-C using a Cocos2D texture atlas for the different piece types.

iOS Board Game Links

Wednesday, May 11th, 2011

A couple of quickies here:

  • First, I’ve been meaning to post a link to Reiner Knizia’s page of all his mobile games for a while now. I didn’t realize until fairly recently that he is on twitter under his own name (@ReinerKnizia). Apparently he is also looking for android developers.
  • Secondly, I’ve discovered a really great blog getting posted on Board Game Geek called simply iOS Board Games. They are MUCH better at writing regularly than I am, and also at finding all the juicy details about stuff that is forthcoming, and recently released. BGG has a nice subscription feature, so I get notified whenever there is a new post. (Of course you can subscribe via RSS as well.) Good stuff, and definitely worth following if you are a publisher/creator in this space.

iOS Book Reviews: Professional iPhone and iPad Database Application Programming

Wednesday, May 11th, 2011

Disclaimer: I do not generally read programming books from start to finish! Instead, I read them much as I would read a blog that I’ve discovered for the first time, skimming the archives (table of contents), and then taking-in the first few sentences of parts that look interesting to me, and bookmarking posts that I want to read in greater depth (dog-earing pages that deserve a second glance). I almost never go back for those second glances, so basically I have a bunch of programming books laying about that look like they’ve been heavily read, when in fact they’ve hardly been cracked. My excuse is that programming books are so seldom relevant past their publish date that keeping them for reference seems silly. If I’m paging through a book’s contents in search of some solution, it usually means I just don’t know the right search terms. When I find some pages that seem relevant, I then turn to the web with my newfound knowledge, and feel vindicated when I find some piece of web-content that appears (at least at first glance) to be superior and more timely.

I do still tend to keep those books around, however, mostly so I can look through their code examples. I find books that consist of mostly code are almost always more interesting than those that try and teach you some general topic. You can usually find nice code examples on the web, of course, but they are seldom explained in as much detail as you would find in one of these “by example” books. In this case, I have in front of me two books that both attempt to teach some topic, but do so with heavy use of examples. They are hybrids, if you will, of books that teach a general topic, and books that consist of mostly code examples. Maybe all programming books exist on a spectrum with pure thought and abstract theory at one end, and pure code (and more easily out-of-date examples) on the other.

Professional iPhone and iPad Database Application ProgrammingThe first of these is Professional iPhone and iPad Database Application Programming, by Patrick Alessi, published by Wiley (Wrox) in 2011. With chapter titles like “Introducing Data-Driven Applications”, “The iPhone and iPad Database: SQLite”, “Displaying Your Data: The UITableView”, and “iPad Interface Elements”, you would definitely not know at first glance that this is an example-driven book. In fact, each of those sections (and all the other sections of the book) run you through the creation of a sample project, each building on knowledge gleaned in the previous chapters. The first chapter includes a very nice introduction to Xcode and shows you how to create a simple UITableView based application.

The following chapter, “The iPhone and iPad Database: SQLite”, goes a bit farther down the UITableView rabbit hole with its sample project, and introduces SQLite besides. This chapter definitely endeared me to the author when it said: “While Core Data is the recommended framework for creating data on the iPhone, you may want to forego Core Data and use the SQLite API directly for several reasons.” The author then lists several compelling reasons! This may be a heretical position to take, but avoiding Core Data has always been my preference, although I do occasionally wonder if there are ever good reasons to use Core Data of which I am simply ignorant.

The author does later dedicate five chapters (about a third of the book) to using Core Data, so he can’t think it’s entirely useless. He does not, IMHO, (at least in the cursory skimming I gave that portion of the book), provide any compelling reasons to use Core Data. The closest he comes is when he says (repeatedly) that using the graphical data modeling tool will dramatically speed up the development time of your data driven app. I fail to see how this is the case! If creating your db schema is taking up a lot of your development time, I think you’re probably doing something wrong, or possibly you just aren’t familiar with SQL in general.

(A decent db abstraction layer to handle your SELECT, INSERT, UPDATE etc. calls is also a must, and I am disappointed to report that Alessi’s book does not cover this topic. There is at least one decent open source wrapper available (called FMDB), although there are things I would change about it — namely the API for retrieving your result sets.)

Unfortunately, the portions of the book dedicated to the Core Data modeling tool fall into the “already obsolete” category of coding examples, because they do not appear to cover the Xcode 4 interface. I created a sample project using Core Data to look at the modeling tool, and like Interface Builder, it has been consumed by the “one window” paradigm prevalent in all things Xcode 4. Reading the first couple of chapters on Core Data will probably give you the base knowledge needed to use it anyway, but as I said earlier, google can probably do a better job.

The last third of the book consists of a couple of chapters about integration with web services. This topic makes a lot of sense to include in a book about data-driven applications, but it’s definitely given less attention than the previous two sections. I really think the book should have been expanded quite a bit, both to go into more detail about the stuff it does cover, and also to cover additional stuff that was notably absent. Off the top of my head, here are headings I would have liked to see: best practices for storing data retrieved from web services, how to deal with syncing issues, common tools for consuming web services, and at least one code example for parsing and consuming JSON. Unfortunately, JSON is given only a cursory mention, and its superiority to XML for the task at hand is not, as I feel it it should have been, firmly established.

In the beginning of chapter 10, “Working with XML on the iPhone”, there is a section called Synchronous Data Retrieval, in which some lip service is given to NSString‘s stringWithContentsOfURL: selector blocking your UI, but then it is not made clear that the subsequent code examples (using NSURL and NSURLRequest) are asynchronous in nature! Also, on the topic of “common tools”, the book pretty much writes everything from scratch in this section. I can understand the impulse that the author may have had to explain all the gory details of xml parsing and NSURLRequests without complicating matters by introducing open source libraries that simplify these processes, but they save far more time than I’m liable to believe you can save by using Core Data. If you are consuming web services from your app, you would be stupid not to use (or at least look at) ASIHTTPRequest. That little project has probably saved me dozens of hours in the last three months. On the subject of XML parsing, the question is not whether you should use an external parser, but rather which XML parser is right for your needs!

Overall, I didn’t expect to read as much of Professional iPhone and iPad Database Application Programming in detail as I ended up reading for this review. I don’t know how much of that was due to wanting to give it a fair read in spite of my bias against using Core Data, and how much was due to the author’s really well written prose. Database applications is about as dry a subject as they come, and yet I never felt lulled to sleep in the way that many programming books have a tendency to do to me. If you are not familiar with SQLite, or programming for UITableView, I would definitely highly recommend the first four chapters of the book. As for whether they are worth the asking price, (currently $30 on amazon), I’ll leave that up to you.

Unfortunately, I think I’m going to have to leave any in-depth review of my second learn-by-example iOS book for another day: Learning iOS Game Programming: A Hands-On Guide to Building your First iPhone Game, by Michael Daley, published by Addison Wesley in 2011. This book takes you through the author’s process of building an iOS game from start to finish. The game you build, Sir Lamorak’s Quest, is available as a free download from the app store, so you could potentially download it and see if it’s got stuff in it you’d like to know about. I haven’t actually looked at the game for more than a minute or two, but I know from personal experience that parsing through the source code of a game, even one I have no interest in ever making, is always fascinating to me, so I’m quite excited to dig into this book.