My game dev tool of choice thus far has been Unity. I have been using Unity to develop an iPhone game called Hanj’s Box in addition to the web game, Hall of Archery. Recently however Apple announced the new TOS for iPhone developers which throws doubt upon whether applications made by Unity will be accepted in the App Store. The new terms are effective when iPhone OS version 4 is released and the speculation is that they will exclude all middleware tools from Apple’s mobile app eco-system, including Unity.
“Well,” I said, “Why not learn Objective-C?”
When I first posed that question I knew nothing about Objective-C. Perhaps I was arrogant in asserting that “if I can learn 3-D math for Unity, I can learn anything!” Nevertheless despite my arrogance I knew that I had much to learn. I searched through the docs. I read. I tinkered with the tutorials. And I have developed… a headache.
Writing game behaviors in Unity is one thing. Learning object oriented programming and the Model-View-Controller paradigm is another. I have come to accept that I will not be writing a 3-D game as my first iPhone project. Hanj’s Box will sit on the shelf until – well perhaps until I am ready – whenever that is. This is probably for the best. I have grudgingly come to accept that when it comes to programming I probably only know enough to be dangerous, and in that only to myself. Hanj’s Box was a mess of spaghetti code threatening to strangle me.
So what to do?
Learn Objective-C, and in the process become a better programmer.
How to do it?
- Choose a modest project
- Divide the project into pieces
- Attack each piece one at a time
Choosing A Modest Project
When dealing with something unusual, the familiar is comforting. Interactive Fiction is familiar to me. I have made them before. A text adventure game is also modest from an output stand point being primarily text.
Dividing the project into pieces
I have begun this process, but not completed it. The simplistic version is three parts: model, control, and view. UIWebView will compose the View component drawing upon dynamically generated HTML or XHTML. The Controller will use the UIWebViewDelegate protocol to respond to the user, prompting the Model for information when text needs to be generated. The Model will also of course have all the game objects. I have not decided if I will use Core Data.
Attacking each piece one at a time
The first item of attack is UIWebView. This looks like a good tutorial to begin with.
And lastly it is probably a good idea to name your project so that it feels more real. This project will be called Lillie and Ransome based on a story idea I was working on in January.