Category Archives: iPhone

Making a board game

It’s been too long, so I’m diving back into IOS development and making a board game. I have a test app (not even close to the final thing) for working out the UI pieces of the game that I just got to a reasonable baseline (i.e. it builds, runs on iPhone and iPad, and can be OTA updated with TestFlight).

The game is Hnefatafl – not quite an ancestor of chess, but somewhat related. The board is 11×11, and the game is unusual in that it’s an asymmetric game. It’s harder to win as one player than the other.

I first learned about this game through a book (the Mabinogion) that had a reference to a game called Gwyddbwyll (from ‘the dream of rhonabwy’ – see how this crazy stuff all ties together?). Nobody really knows the details of gwyddbwyll, but there’s some reference to say its related to other games from that era – Irish and Welsh, all of which seem to be the asymmetric “save the king” tafl games.

Right now I’m building this on iPad and iPhone, but I’m not sure if I’ll release it under the iPhone – only because the squares are so damned small on that interface. I have a few ideas for how I want to make the interface function, and once I get beyond that I’m going to aim to make it a turn-based multiplayer game using Apple’s GameKit (just an excuse to use the new stuff, course). A multi-player only game seemed kind of limiting though, so I purchased a book on game AI (Artificial Intelligence for games) so that I could make a reasonable single-player game. It’s a darned good book – so we’ll see how I do implementing some of those algorithms in Objective-C. I bought the whole book for Chapter 8 (Board Games), and don’t regret a penny of the purchase.

Artificial Intelligence for Games, Second Edition

I’ve been thinking it’s time to cobble another IOS app up for sale, not just fiddle around with open source client apps (which is a lot of the IOS work I’ve been doing lately). So I found a board game idea that I liked, and thought I’d make a stab of doing it – maybe using some of the new IOS5 features for a multiplayer turn-based game.

As I got into the game, noodling on the design and how the interaction would work, I came to the realization that I really would like to have a reasonable single player game as well, and that I didn’t have a clue about how to do board-game AI to make a good game experience.

After looking around through a pile of game AI books, I came across “Artificial Intelligence for Games, Second Edition“. Heavy book, hardback – some $80 if you pick it up outside of Amazon’s discount mechanisms. It looked good after a glance-through and minimal reading, so I took it home to dig in depth. I’m really glad I did!

This book does an excellent job of describing the AI algorithms in pseudo good and good ole english, as opposed to many which seem to be littered with mostly un-parse-able fragments of C++. They reference a number of modern games, but rather than catalog “these used this type of AI, the others didn’t” (which I saw in a number of books), they took some time to explain the tradeoffs in choosing the AI mechanism in the game, even if they didn’t have the “why” of the game designer to pull from.

I liked it enough to put up a review on Amazon, and hey – I’m writing this too. If you’re looking for a good overview of AI algorithms and how they work, I recommend the book.

WWDC 2010

Ticketing system replaced and launched, I’m ready for a decompress. There’s pretty much no better place to do that, in my mind, than at WWDC in San Francisco this coming week.

I used to send myself every other year. Strangely, I’ve been attending for over 10 years now. Seems odd that it’s been so long. It’s been wild watching the changes in the conference over the years. This year is no different. There’s hardly any “just” MacOS X sessions now – iPhone and iPad (not surprisingly) crowd out the whole schedule. The time to selling out the conference is shorter this year than before, and I rather expect the crowds to be as insane as ever. Fortunately, many of my friends from Seattle Xcoders will be there – even if they love taking digs at each other over sax interface xml parsing code and “unnatural love”.

Best of all, the really big project weighing on my mind for the past month is out – I can go play, hack, drink, laugh with my friends, and not worry about deadlines for a while.

Looking for a full time Cocoa programmer

Gus, El Presidente at Flying Meat Inc., is looking for a full time Cocoa programmer to come work with him up in Everett, WA.

Here’s the details:

Do you love programming for the Mac and iPhone and think Objective-C is the bees’ knees?  Are you sick of your boring 9-5 job and wish you had more interesting problems to solve?  Would you like to join an indie Mac shop in the heart of downtown Everett, Washington?

Flying Meat ( http://flyingmeat.com/ ) is looking for a full time programmer to work on our award winning applications for the Mac, iPhone, and iPad.

The ideal employee has real world experience with Objective-C, programming with Xcode, a friendly attitude when talking to customers, and a penchant for figuring out tough problems.

Location:
- Downtown Everett, WA.

Responsibilities:
- Programming (fixing bugs, adding new features, etc) on our existing applications, and help bringing about new ones for the Mac, iPhone, and iPad.
- Assisting with 2nd level support.

Requirements:
- Experience with Objective-C and Xcode.
- Experience with Subversion or similar version control systems.
- Ability to work with at least a couple of scripting languages, such as Python, JavaScript, Ruby, Bash, Lua, JSTalk, etc.
- Experience shipping an iPhone, iPad, or Mac application.
- Highly professional, with the ability to multitask and deliver solid work on tight schedules.
- A sense of humor and an easy to get along with personality.

Experience that will help you stand out:
- Ability to work comfortably with Mac OS X graphic APIs such as Core Image and Quartz.
- Familiarity with network protocols.
- Ability to zip around in Terminal.app while blindfolded.
- You know the Mac HIG inside and out.

Benefits:
- Paid vacation.
- Profit sharing.
- Relaxed working environment.
- Retirement plan.

How to Apply:
Please send resume in plain text to gus@flyingmeat.com .  Make sure to point to projects you’ve worked on, and we would also love to see code you’ve written!

sketching on the iPad

I ran myself completely down on my extrovert batteries this past week. So far down that I didn’t even leave the house for wanting to avoid all of humanity on Saturday. On Sunday, I relinquished a bit – and at least went to a coffee shop. While I was enjoying the complete anonymity of being alone in a crowd, I decided to take some more time to sketch with my iPad.

And yes, it hasn’t left my side. On of these days Karen might get to use it. Maybe. When I get a 3G version perhaps…

Anyway, it was time for the new experiment! I purchased a pogo stylus for working with the iPad. I originally saw one that an apple employee was using in an Apple Store (she wouldn’t give it to me, strangely enough), but she couldn’t tell me anything about it. I later saw an article from the Brushes help page on it, and went out and ordered one. Since I had the stylus, I wondered how different it would be to sketch with that instead of just my fingers. Pretty good, actually. Although I’ve got to admit I’ve become somewhat of a sucker for pressure sensitivity that you get with a Wacom tablet….

The end result is that you have to press a little harder, so in the end it doesn’t feel like a stylus – or at least not like any medium that you might be used to. There’s no scratch of paper, texture to the draw, and hard or soft and angle doesn’t make a different on an iPad. The good news is that you can see what you’re drawing a little better – as the stylus is about half the width of any finger, if not a bit thinner.

I’m still very much learning to use the application (Brushes) too. I have SketchBook Pro, which is pretty cool too – just haven’t really tried to work with it much yet – focusing on Brushes to start with.

Lunch at Macrina Bakery

I’ve learned to start sketching with really light opacity and a variety of thicknesses, repeating strokes to firm up lines. I’m also just now starting to get a handle on even the basics of textures with Brushes. It’s super flexible, but that just means I’m super lost right now too. The hardest thing to get used to is slowing down some of my motions, or making sure only the stylus touches – it’s very easy, if you’re a little sloppy with your hands – to make it thing you’re trying to double-tap when hatching a background, or to inadvertently “pinch/zoom” instead of making a stroke. Still, I’m happy with the initial results, even if I have a long way to go to get to the amazing quality of artwork I see others producing out there.

SeattleBus and the iPad

I received a call last night, rather out of the blue. “Are you porting OneBusAway to the iPad?” was the opening line.

“Uh… No, but then i didn’t write OneBusAway either. I wrote SeattleBus…”

That bit of confusion resolved, we talked some more about Brian Ferris’ very impressive work with OneBusAway and contributions that it’s made to Seattle Public Transit. I thought it was worth writing some here for more public consumption too.

I am incredibly impressed and whole-heartedly applaud the work that Brian has done with his web site, public and open API, and general efforts to improve the daily life of folks using public transit in and around Seattle. I think the opportunities to do some interesting things with that site and the iPad are tremendous, even more so if you look at some of the cool things that the WalkScore folks are doing as well with their open source graph server.

I’m keeping SeattleBus an iPhone only application. I originally wrote it for me, and I continue to use it on a regular basis. My concept for the application is really only meant for the iPhone setup. Brief, very direct access to the route information you need right then. There is a lot you can do with more screen real estate, more detailed information about routes, etc. That’s not what I want SeattleBus to be. The narrow focus is the important thing to me, and the larger format screen of an iPad just doesn’t seem needed. Glorious, yes, but not needed.

For the folks hacking away at similar things – I can assure you from feedback that I’ve received: There is desire to have something more. I would encourage you to look closely at Brian’s work for ideas and inspiration. He has requested that anything using his site and APIs be made freely available (non commercial) – a perfect platform for hacking and learning while also benefitting the community. Take advantage of what he’s made available, go forth, and make some great things.

So what next for SeattleBus? Not a whole lot in the near future. King County Metro is still somewhat freaky about the use of it’s data from a policy perspective. That’s a damper on future development for me. I don’t make even close to a living from SeattleBus and as you might suspect, other projects are taking most of my spare time right now.

I am looking for an application idea to create for the iPad that would fit a iPad. Way more than an iPhone application, somewhat less than a desktop application. I haven’t yet found that fit and inspiration, but I’m still looking and not feeling in too much of a rush to just do something. I’ll strike when I find the right thing. For now… I’ll keep looking around.

Hey, I’ve got an idea…

Hal Mueller (@halm), local Cocoa/Mac/iPhone instructor and one of the long time local Xcoders, responded to an email that I’ve seen or heard a dozen times before – the gist being, “Hey, I’ve got an idea, and I need a developer to help me make it real… anyone willing to donate their time?”

Hal’s response to the Xcoder mailing list was so incredibly well stated that I’m going to completely steal it and put up the response here. By “the group”, he’s speaking of the Seattle Xcoders:

Your best bet is to attend some meetings and get to know some people. The group has been very supportive of new ventures and new developers. But I don’t know any decent Cocoa developer who’s sitting around thinking “oh if only I had a project concept”. You will have some selling to do.

The risk in these “rev share” deals seems to me to fall mostly on the developer, particularly as an opportunity cost, since it amounts to an interest-free loan, to the business, of the value of that developer’s time. Ideas are easy; I have a notebook full of them (and if the value of your idea goes to zero as soon as someone else hears of it, there’s really no barrier to competitors). If I’m going to take on a partner I want to see a proven record in the business side: marketing, sales, management, fundraising. I want to see a complementary skill set with a dollar value comparable to what I would be putting into the venture.

python in a web browser

well, really it’s remote python through a web browser, but it’s still pretty cool. I caught these two links from an email that Brian Dorsey wrote, and thought they were worth putting up on the blog for later reference (thanks Google!)

http://try-python.mired.org/

Try-Python is a classic interactive python 2.5.2 (as of this writing) interpreter, so available through some javascript magic and running in what looks like a console window. For those little “How’s python do this again…” things, it’s amazingly quick. Okay – so I normally find it just as quick to pop open a terminal, but if I didn’t have a terminal available… this would be invaluable.

http://con.appspot.com/console/

Similar to try-python, but made with a very different intent – it’s meant to plug into Google AppEngine (they’ve made the source available at git://proven-corporation.com/app-engine-console/). Can’t beat that! Functionally, it’s pretty much the same as Try-Python except that it makes you log in first – which I can’t really complain about – if I were running an open interpreter like that I’d likely want to know who was doing what… or otherwise force a means of “cleaning” that system periodically.

The whole thread popped up on the local Seattle Python mailing list because Katherine Hernandez was interesting in poking at python, but was primarily working from an iPod (and soon, I think, an iPad) – where an interactive terminal is discouraged if not denied.

That denial means you can’t sell anything like that through the AppStore, but I’m beginning to wonder if I couldn’t knock together a python interpreter and the standard libraries as a development-only thing, and then make that available. Anyone with a dev license could compile and run it, and share it with a number of folks using the ad-hoc distribution model. It’s the only immediate work-around I can think to the AppStore controlled model, but it might do the trick.

Of course, I need another new project like I need a hole in my head, but it’s a neat idea…

iPad

I work, live, and play in technology. My job today is in technology – doing software to run software (a bit cyclical, yes)  - operations, in short. Almost everyone surrounding me at work is technical, smart, detailed, and very, very into computing and what it can do. To be honest, I’m mostly surrounded at work by people who happily use and understand Windows as a common operating system.

They’ve all been buzzing about the iPad. Shit, anyone in technology has been buzzing about it. Microsoft and HP (or laptop/tablet vendor of choice) had a decade to break this code and didn’t manage it. I’ve been hearing almost exclusively around why Apple fucked up, blew it, and why the Kindle and netbooks will continue to rule the roost. I won’t even go near the whole “Flash thing”.

I think they’re all dead fuckin’ wrong. Pardon the vuglarity, or not, as you please. It’s needed on this one. The iPad is a sign post. A marker of where we’re heading, and a sign of the change to come. I saw the preso, reading a few IRC channels and frantically refreshing web pages – and my thought was “Holy shit! I’m seeing something just like the first copy of NCSA Mosaic running on a Mac. This is going to change the world…”

And I found that I was completely unable to articulate this in any way that I could present to my coworkers. I didn’t bother demanding they listen, or that I was right, or any of that nonsense. I see it coming – they will too, eventually. In the past day or two, however, some very articulate fellows have done an amazing job putting down into text what I couldn’t. If you haven’t read these – do.

Thanks gents – I appreciate the words and thoughts – especially since I couldn’t seem to articulate them.