Showing posts with label Game. Show all posts
Showing posts with label Game. Show all posts

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) ;-)

Tuesday, September 16, 2008

The Force is weak with this one ...

The Force Unleashed has been out since yesterday for iPhone/iPod, and without much surprise it's really a huge disappointment, gameplay wise. Don't believe me? Check out this video provided by TouchArcade.com:




Yep ... and it get worst, people that reported having purchased it, said that they were able to complete it 90 minutes ... Sure it's only 10 bucks, but still ... Ah well, what can we do except skip it and spend more time playing with Enigmo ... Now, that's a fun (and yet very geeky) game :-)

Friday, August 22, 2008

Toying around ...

I purchased on the App Store the game Toy Bot Diaries from local company (Vancouver!) IUGO, after reading the review posted on touchArcade. I can only agree with the author, it's a very sweet deal (nice gaming, low price). Best of all, the game take advantage of the controls native to the platform, and it work out pretty well, except if you are trying to play while lying down ... In this setup, I found the control to not work too well. No big deal really, I shouldn't be playing right before sleeping anyway ... ;-)

Meanwhile, I have been continuing my Cocoa musing without Interface Builder, and banging my head on the (one will think) simple issue of filling the application menu. Hopefully for ma sanity, I came accross Jeff Johnson's blog which have a serie of great posts (and a sample XCode project), on how to create a Nibless application. Turns out it's not as simple as it should be. It's also more akin to hacking the framework than using it ... anyhow it does work.

Before I sign-out, I will like to point to a video from the lastest iPhoneDevCamp, which feature Neil Young's (no, not the singer) keynote on the iPhone as a gaming platform.