Friday, September 11, 2009

On ur iPhone! Stealin' ur CPU cyclez!

Last night, I finally managed to build and run my engineering test app for my game engine on my iPhone. Since OS 3.0 have come out, what use to be a tricky and error prone process (I'm talking about provisioning and code signing) have been improved vastly (BTW, thanks Apple!). If you have been in the iPhone development business for more than 6 months, you know what I'm talking about.

In fact, since it had been a while since I had to create an app-id or a provision profile, I was pleased to see that Apple had added an assistant to complete such basic (and yet daunting) tasks! And what do you know, it did more or less work as expected! I said more or less 'cause I got a little confused when creating the app-id, and instead of ending with the id been com.cocoageek.test, I just ended up with the id test. Here, I'd like to blame the assistant for this, simply because it fail to giving some example of what each fields expect. Make you think that it will be nice to be able to delete app-id ...

Anyway, the test app is running well. The frame rate (with collision between objects happening) seems smooth (I haven't measured it) so far. I'm a bit disappointed, however, by the anti-aliasing which doesn't seems to be as nice on the device as it is on my laptop (within the emulator). I guess I'll have to dig this a bit more.

Tuesday, September 8, 2009

I can haz physicz?

Since these days I am mainly a full-time dad when I get home from the day job, I was somewhat surprised when I completed the integration of Chipmunk physics to my game engine over the long weekend (Labor day FTW!). Needless to said, it is pretty exciting when things are starting to come together after weeks of intense preparations :-)

Like I was saying in my previous post, there's various API to chose from when looking to add real world (2D) physics to your game. I picked Chipmunk mainly because it's in C and relatively simple. My main grip with it, is the lack of a complete, and correct, documentation. I found myself having to dive in its source code to understand or clarify some things, and while it's great to be able to do so, I shouldn't have to. A 3rd party API should be well documented, including comments in the header files! Here's a (lame) example: once you have created a body (cpBody) the API provide a set of functions which allow you to physically manipulate it, such as applying a force on it. The thing is, the wording of the purpose on the function cpBodyApplyForce is a little ambiguous: "Apply (accumulate) the force f on body at a relative offset r from the center of gravity. Both r and f are in world coordinates." ... Is the force applied for a single simulation step or permanently? It turns out that it will be applied at each steps, until all forces on the body are reset (using cpBodyResetForces) ... Maybe it's just me? The mention to "accumulate" should have been enough? Also, the r and f cited are most definitely NOT in world coordinate, but in offset from the body's center of gravity ...

Anyhow, overall Chipmunk physics is a big win, I could have grabbed Physics for Game Developers at my local book store, but this is saving me time and headache so: Yeah! :-)

Now that two majors items on my engine's to-do list are done with (the first been the rendering), I'm moving on to handling user inputs, which by it-self isn't that hard, but I'd like to be able to detect the basic gestures that we, as iPhone users, are used to: flicking and pinching. I'm not sure if I need them for the first game I have planned, but ... since I'm doing a game framework, mind as well try to be as complete as possible! At least, I'll need to provision for gestures handling even if I leave the detection for a later version of the framework ... That's one of the malediction of being a framework kind of guy, most of your time is spend on the framework rather than the end result ...

Thursday, September 3, 2009

Ping!

Hello dear readers (yes, the two of you)! Well I'm still around and kicking as you may have seen if you follow me on Twitter. I'd like to said that I have been über busy with making cool iPhone apps, but it will not be exactly accurate. I'm working on a couple of apps, that is true, but the reason that I haven't posted since June as more to do with the lack of interesting things to said (can't always blame Twitter ...). I'll try to improve this over the coming weeks (year right ...) even though idiotic rambling on this blog have never stopped me before ;-)

So, let's talk a bit about one of the project I'm working on: an iPhone game. Yep that's right, a video game. Now, this is my first game (I'll skip the lame ones I wrote in BASIC back in the days or the ones for my pocket calculators) so this is a brand new experience for me and so far I'm loving it :-)

Since I suffer from the NIH syndrome, I'm building my own game framework to support the development of this game (and others to follow hopefully!), when I could have just use one of the existing framework, such as the widely popular Cocos2D. My needs are pretty simple really as I'm making a 2D retrogaming style game (using OpenGL). I could have save myself the trouble, but since I thrive for challenges and enjoy learning stuff, I though it'll be more fun that way. And it is! :P

Yeah now, I'm not totally insane, so I have integrated Chipmunk physics into the engine, instead of spending the next months banging my heads on complex math&physic problems. Here again, there is a lot of physics frameworks to choose from, like Box2D, but I wanted something simple and in C (so that it'll be easier to integrate with my Objective-C based engine).

Anyway, things are looking good at this point although I'm mostly working on the game engine, while the game concept is maturing in my head (with some great inputs from experienced game developer @madgarden). Unlike many other iPhone developers, like Owen Goss, I'm a little hesitant to reveal too much about the game itself, at least until it is well advanced. It's not that I'm working on a revolutionary game (far from it, really!), but the competition is fierce on the App Store! Since I have no idea how long it is going to take me to complete it, I rather not be beaten to the store if you see what I mean (even though there's already similar game in the store) ;-)

Sunday, June 14, 2009

It's Twitter's fault!

Alright, alright ... it's not totally Twitter's fault, but yeah my blogging has definitely taken a serious hit since I joined the twitterverse, and since nothing really exciting have happened, there was nothing much to report.

Anyhow, so our first iPhone app have been on the store for over 2 weeks now, and as expected, it is not exactly flying off the shelves, but we still made 55 sales in the first 2 weeks. Which is not too bad :-) I'll definitely won't be quitting the day job any times soon, but it's a nice feeling to know that around the world there is people using our app, and that they are happy about it (hopefully).

So, what's NeXT? Well, it's not set in stone yet, but we have two apps idea which need more preparatory work. I'm also pretty excited about finally getting and iPhone (3GS FTW!) this coming Friday (if I can get one ...). I'm not overly happy about enslaving myself to Rogers, but the choice is limited here in Canada ...

Wednesday, May 20, 2009

We're in! ... well almost.

After 17 days in review, our first iPhone app was accepted yesterday afternoon. It took that long because the first version we submitted on May 2nd was rejected (after 7 days) for HIG violation. Apple wasn't happy with us using a Disclosure Button to lead to a simple UIAlertView, when this type of button should invoke the display of a new view.

To be honest, we though this may be an issue. However, this was the button that made the most sense in the context (we're diclosing extra information) and sliding a new view was just wasteful since we only had 2 lines of info to disclose. Anyhow, their suggestion was to use a custom icon instead, and that's what we did. At first, we considered using the built-in Information button (e.g UIButtonTypeInfoDark), but then we though that since that is associated (incorrectly when you think about it ...) with Settings, we were going to get barred entrance to Apple's walled (lush) garden. So instead, Susan quickly created our own version of an Information button, similar to Apple's one, and yet different enough to avoid confusion (ahem ...) :

Soooo ... where can you get this new revolutionary app? Why in the App Store, of course! ... NOT! Unfortunatly, our Sales Contract is still in process (+3 weeks and counting ...) so the Application is now pending contract ... When will it be? Who knows ... :-(

Tuesday, May 5, 2009

Better late than never ...

If you happens to be following me on Twitter (and reading this blog? No way!) you probably already know that we have finally submitted our first iPhone application this past Saturday. Yup, that's right, the very same application I have been talking about since November! iTunes App Store here we come! ...

Contraction Tracker is, more or less, a basic contraction timer, designed to be used in the days/hours leading to the delivery of a baby. Nothing game changing here, sadly. But it's a start, and it was written mainly for our own use. Back in November, there was only an handful of similar applications on the store (2 to be precise). None were quite what we wanted, so making our own was most definitely a good idea (especially since it allowed us to get acquainted with the platform). Unfortunately, once the baby arrived, the time I could spare to work on the app dropped from 2-3 hours daily to a mere 30 minutes per days, on lucky days. That is the main reason why it took us soooo long to go from almost finished app (late November) to released app (early May). Sadly, today there is much more similar app available (10 including ours), so the competition is going to be fierce ... that's what you get for being slow to deliver! :-|

Now, of course, the submission euphoria is gone, and have been replaced by anxiety: How long will the review process take? Will we get (paid) customers? Have we left any embarrassing bugs behind? ... and of course the ultimate question faced by thousands of developers on a daily basis: Will we be rejected by Apple?

In case you are wondering, allo the application's icons were made for us by Alex Ventpap (alexventpap on Twitter) which we definitely recommend for iPhone artwork, among other things.

Wednesday, April 15, 2009

Release Candidate!

Yay! Finally! [Redacted] is officially in its "Release Candidate" form. Man, this has been a long road ... I'm planning to do a Postmortem post here once it is on the App Store. The plan is to submit it this coming week-end, for review. If everything check out and that Apple respect it's advertised delays, the app should be for sale within 7 days. Since it's a relatively simple application, which does not walk on the borderline of the SDK agreement, I'm hoping the acceptance will be swift ... but then again who knows what's going on within the wall of the App Store review office(s).

Tomorrow is the Vancouver iPhone Developers meetup downtown. I'm looking forward to it. I'm a bit nervous though. I haven't been to any developer oriented event for years! The last one I attended was a BeOS meeting in Paris back in 2000 (or was it 2001?) ...