So, we’re building a game. Nofi and I, that is. Not the rest of you. No. You’re not sharing in our soon-to-be fortune. Please buy the game and help us make the fortune though, yes?
Ok, good.
As I mentioned in the comments in the earlier blog, I’m going to be talking about some technical aspects of the development process, along with other aspects such as: how annoying Nofi is, how awkward Nofi is, and how petulant Nofi is. I rather suspect I may regret saying that, given that it’s Nofi’s turn to blog next week, but we’re all friends here. I’m sure it’ll be fine*.
As you know, it’s an iPhone game that we are working on – with a possible Android port – and that threw up the first technical challenge: Xcode and Objective-C, and the fact that an Apple keyboard is as user-friendly to a coder as having your fingers repeatedly slammed by a piano’s lid**.
To understand why Objective-C – the programming language of choice for iPhone development – is a technical challenge I shall present a typical example of getting something to work using it. There follows a re-hashing of conversations I’ve had with my Apple Mac (named Mac) whilst trying to code the Apple way.
Me: Yo, Mac!
Mac: Hey, man. What’s up?
Me: Fire up Xcode, I’m going to do me some Objective-C!
Mac: *snigger* Sure, no problem.
Me: Yo, Xcode!
Xcode: Hello.
Me: Listen, I’m going to write an app, a game with some cool sprites.
Xcode: Hello.
Me: Erm…open a new file for coding.
Xcode: Hello.
Me: Erm…[[open alloc] initWithNewFile: forCoding = true]
Xcode: Hello.
Me: Umm…do a, you know, a new Objective-C class based on the UIView template. Please.
Xcode: Hello.
A bit like the Apple adverts the above sequence has been shortened, but to all intents and purposes it is correct. The end of the sequence would be a picture of the iPhone simulator showing an app with no sprites present, and then it would crash.
To provide some balance, here’s how a similar conversation goes when using our new language of choice: Lua and the Corona SDK (Super Duper Kooool!).
Me: Yo, Mac!
Mac: Hey, man. I’ll start up TextWrangler and the Corona Simulator right away!
Me: Yo, Corona, Lua, TextWrangler, whatever, I want to do a game with some cool sprites.
Corona: You mean like this? *complete game is displayed as per the specification in my brain*
Me: Yes! Thanks, Corona – you rock!
Now, now Apple zealots, let’s not get too over-excited by my horrific vitriol. In truth, the model that iPhone development is built on is actually very elegant. Once you get past the seemingly impenetrable mass of code then the language and tools – Objective-C, Xcode, and Interface Builder – are pretty swish. But, for me at least, it’s slow going. What I really wanted was something with the ease of use of AMOS, but with the performance of Objective-C.
So when I heard about Corona I was intrigued. Could there really be a new, easier route to iPhone development?
From my early dabblings it seems there is. I can’t vouch for the performance, although I’m sure it’s not going to be as fast as Objective-C itself, but I can vouch for the fact that our game almost has a prototype working. A prototype that has taken a few hours to create with a language and SDK that two weeks ago I had never seen. Now that’s performance.
Oh yes, the game. You want to know what the game is, do you not? Well, I’ll leave that for Nofi as it was his idea and I don’t really understand it.
I’d like to thank the people at Ansca Mobile for not only creating the excellent Corona, but also giving me and Nofi the chance to use it and create our special little game.
Stay tuned, Game Development Fans, as in my next blog I’ll go into a bit more detail about some of the elements of the game and how I’ve built them. You’re going to love it.
* I am in no way sure this will be fine. We still hate each other after that doomed website venture, thesixthaxis, that we started.
** Again, Apple zealots, it’s not all bad. Once you get used to coding like a gammy-fisted ape it’s actually ok. Of course, when I return to my day job on a PC I can’t work that keyboard anymore!
Crocadillian
You can learn C in about 1-2 weeks, then Objective-C takes about a month, but its quite an awesome language, one you shouldn’t cheat yourself out of!
Seeing as im in the middle of developing something using Cocoa, Id be curious to see how quickly this game develops in comparison. Good luck with the game!
lenn117
1-2 weeks???? ive been doing it since september and will be up till may…still have to do functions and currently doing dynamic memory allocation
Bladesteel
I’d modify that to “You can learn C in about 1-2 weeks, if you already know procedural programming, then objective-c takes about a month if you already know object oriented programming”
Michael
Objective-C is fine, probably much easier if you already know C. If you come from a more .net background like I did then you may find some of the concepts awkward to begin with. Once you embrace the MVC model then it is, as I said, a pretty elegant programming environment.
Crocadillian
I see. I came from no background programming knowledge, so I can understand the adjustment that would be required from one language to another. The MVC model is all that I know X).
gideon1451
Objective-C = Objective-Corona?
Dange
cool blog, good read
Jen A
I’d absolutely love to do something like this one day. Having a clue where to start is my main problem though!
Will be keeping an eye on the dev diary with much interest :)
Charmed_Fanatic
Ill buy the game if its £0.01 ;-)
bully1990
Day 1 purchase for me!
LeoSayer
AMOS – I havent touched code for a very long time and that takes me back!
YOURMUMANDME
I used to have an Amos program that I could talk to…. It actually held a conversation with you (spoke back with decipherable sentences) !
I love that you two are back working on a project, don’t do a GT5 though because I can’t wait already !