Thursday, December 31, 2009

Keep on blogging ...

In my quest for a better blogging output, I've come across Tumblr, which to me is somewhat of a cross between Blogger and Twitter. And, this is something which I believe is more akin to get me to blog more often especially since Tumblr's got a (free) iPhone app (one of many goodies) which allow to post things (including multimedia stuff) more easily.

Anyway, so I'm sort of moving this blog over to Tumblr, sorry about the inconvenient this may cause :P You can follow me from now on there.

Wednesday, December 9, 2009

This is Cocoaaaaaaa!!

Once again, sorry for the extra long delay between posts ... I know how hard it must be for the five of you :P ... The usual excuse apply: Twitter, lack of time & Tiger Woods all came together to create a worm whole in which I vanished for a while ...

Anyway I finally started, two nights ago, the implementation of that game for iPhone I was talking about a while go ... Except it's not the same game! A couple of weeks ago, I completed the grunt of the work on the game engine (including the audio stuff!) and I was seized by an uncontrollable spur of creativity focused on different concept than the one I had been toying around with. Now, thanks to my paranoia, I'm not going to share much on the game itself for a little while, at least not until it is well advanced. All I can said, is that it'll be retro (graphics, sounds and concept) and hopefully fun (or so I hope). What I can talk about, however, is some of the design/implementation decisions. So stay tuned :)

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 ... :-(