Sunday, December 14, 2008

The Setup






Yes, yes...tomorrow is Monday.  I'm working on it...


Saturday, December 13, 2008

Babies and Fools

 My grandmother always said, "God looks after babies and fools."  Well, seeing that I'm no baby, that means I'm a...(nahhhhh).  Well, let me tell you what happened and you tell me.  Today (while sitting here in the lounge at Ski Liberty, PA, while my oldest son and his friend snowboard) I decided I would get something up and moving on the iPhone so that I can achieve the milestone I set for myself, and also get on with my learning.  

So, we got here at 10:30am, it is now 4:30pm (and they are still out on the slopes...how do they do it).  Well, I figured just fire up xCode, build and run the "Hello, World," app and go from there.  I fire up xCode so that I could get the IDE to drop down the iPhone project setting for me.  Wait a minute, it isn't there.  I know I installed the sdk properly, days ago.  So, I go back to the installation folder and click again, and all is installed.  So, I google, to find why its not working.  

That's when the sinking feeling sunk in.  I read that iPhone SDK/Simulator runs only on Intel based Macs.  You see, I never read and for some reason never heard that iPhone SDK/Simulator only runs on Intel Processor based Macs.  My Powerbook is only 3 years old, and it is a PowerPC G4.  Do you hear me screaming in my brain, WTF!!!  WTF!!!

So, I google to see if anyone has worked around this.  I know from experience hacking the Nintendo DS, that now a days, anything is possible.  So, the first thing I stumble across is that the sdk installer sees that the processor it is trying to load to, isn't Intel, so I doesn't add the files for the iPhone, and the simulator.  However, all 50 of the packages that are needed are still in the install folder and you have to manually install them yourself.  So, 2 hours of installing, you know the developer feeling (excitement mixed with trepidation).  I fire up xCode, and too my excitement and joy, the iPhone project option is now in the drop down menu. Woooohoooo!

Next, build and run.  Arrrgghhhh!!  I get the build error that I'm running on an "invalid architecture."  Sheesh.  So, google this error message, and I find another site that says exactly what to modify in the iPhone Simulator specification file.  

Viola!  

I'm now running the iPhone SDK and simulator on my G4.  Now, I haven't tried the code running on an actual iPhone, since I have not paid the $99 to get my certificate to run on the actual device.  I guess I will find out when I try.  Anyway, I didn't have to shelve out $3K for a decent development mac.  I can now develop and test...later when I get to the point of App Store submitting, I will spring for a cheap Intel Mac to recompile on, and certify the app (if needed).

Now, why would Apple lock out PowerPC G# owners.  Now, there could be some really good reason, but I believe the real reason, was to sell new machines.  I could be wrong, but if it only takes a few additions to a specification file (still new to Mac dev, but this file is basically a INI file in the PC world), then there is no real hardware limitation that I see.  However, I won't get to cocky, I could run into the reason down the road and be thoroughly upset.  In the meantime...I'm up and running baby!

Since there are a few steps to detail to get your G3, G4, or G5 working with the iPhone SDK/Simulator I will give the credit where credit is due, and you can go to the sites, "3by9" by Mike Rundle, and "Lehmamic's Web Blog, This and That" (author unknown) to see what's needed.  Or shoot me a comment if you don't wish to go fishing around.  I will post the steps on a blog entry.  Right now, I'm just psyched to get on with my coding and testing out the iPhone/Simulator.

Now to get a sprite up on the screen and moving.  I still have a few hours before the boys get tired of snowboarding and there still is...tomorrow, tomorrow, it's just a day away.

Friday, December 12, 2008

It's Here!

My free iTouch has been delivered! I will open the box this evening, and get started by setting it up to be in the Dev Program, and allow me to sign code to run on the device.

My personal challenge of having something up and running by Monday is still on. I've got the weekend ahead of me. :)

L8R

Wednesday, December 10, 2008

I believe, I believe, I believe

Hey,hey,hey, I'm a believer...

After reading through the first parts of Objective-C, I can say that I'm a believer. When I initially saw some source code of Objective-C a few years ago, I quickly turned away from it. Even when I started thinking about doing this game for the iPhone, I figured, "well I will just do the necessary Objective-C/Cocoa stuff to get the thing running, and then wrap C++ code into Objective-C wrappers."

Well, reading through the documentation, my eyes have been opened, and I'm no longer a xenophobe. I know, I know, I haven't finished reading all the way through the doc, but I already know that I will be doing the game completely in Objective-C, and making judicious use of the Dot syntax as opposed to the square brackets [] to invoke the accessor methods, for those not familiar with Objective-C, but have seen it, the dot syntax allows you to replace the square brackets [] you see everywhere, with a dot syntax...a short cut to do the same thing, and is just a bit more appealing, and comfortable to my C/C++ eyes.


I am not going to evangelize (be like those folks, who go to church for the first time in their life, and then come out on fire trying to convert everyone they see), nope...just wanted to post that my fears of Objective-C are gone.

Hallelujah! Brother can I interest you in this pamphlet...haa haa...just kiddin'.

Tuesday, December 9, 2008

Late Start

Okay...I'm sitting down to read the Objective-C 2.0 doc, and the iPhone SDK is downloading. Getting a late start tonight, because I was helping my youngest son, prepare for his Algebra quiz tomorrow. I showed him how to transform a word problem into a linear equation, If Bob sells 200 items at a commission of 70%, and his weekly earnings is $1500, what is Bob's base salary?

I've ordered my FREE iTouch from the Apple Store using my American Express bonus points so it should be here by the end of the week (we'll see...the FedEx tracker said it was being shipped from Shanghai).

Going to read...oh by the way, if any of you have forgotten how to solve those algebra word problems via linear equation, it is...

1500 = 200 * .70 + base
1500 = 140 + base
1500 - 140 = base
1360 = base

Cya or Objective - Cya next posting.

Baggage Claim

The plane has touched down and I've made my dash to grab the translation manual (see previous post for reference). I realized that I personally need a better foundation before I will understand Cocoa. I am now going to read the Objective-C 2.0 Programming Language documentation. Others who are new to Cocoa & Objective-C might be able to understand Cocoa first before understanding Objective-C, but for me I need to be grounded in the actual coding language. To me its like learning Swahili, Spanish, or French, and being shown sentences, before learning the words. I'm going to go learn the alphabet first, then the words, and then I'll be able to construct sentences much more easily, and not only that, know WTF I'm saying.

So, off to...ahhh...I'm going to bed now...I'll start that tomorrow evening. Buhh-bye!

Oh yeah...I've provided a key now,for the Task/Status since some folks may not have read the earlier posts.

(Dude...did you say, "some folks," son... let me, let YOU, in on a little secret. NO ONE has read your earlier posts, no one cares what YOU have to say. How many comments have you read?...Well, there were 2 last year, and 1 just recently...how Gyuri even stumbled onto your *little* blog I don't even know.)

Key (red = task completed, green = in progress, black = not started)
Tasks/Status

1) Learn the iPhone Tech
* Download/install iPhone SDK
* Upgrade Mac OS $130
* Join iPhone Dev $99
* Read iPhone Docs/Samples
** iPhone OS Technology Overview
** Cocoa Fundamentals Guide
** iPhone Application Programming Guide
** iPhone Human Interface Guidelines
** iPhone Development Guide
** The Objective-C 2.0 Programming Language
** Write little test programs to learn the iPhone Capabilities (memory allocation, file I/O, iPhone audio, WiFi, graphics, etc...) - by Dec. 15th

2) Test my game concepts out on the iPhone
3) Build tool(s) if needed
4) Solidify Game Design
5) Architect the game code
6) Develop game w/ scratch art
7) Drop in real assets
8) Test/Debug
9) Ship It

Monday, December 8, 2008

Huhh...What?

Okay...right after work I went to the Apple Store in Bethesda, Md. and purchased the Mac OS X/Leopard, it is currently chugging away on my Mac Book Pro, installing itself. I'm spending my time continuing reading Cocoa/Objective-C and I must admit I'm bouncing around in my seat, hanging on for dear life, as I experience a bit of turbulence.

The Cocoa Fundamentals Guide is starting out to me at a very high altitude, "this is your captain speaking, we're experiencing a bit of turbulence, I'm turning the seat belt sign on...." I will continue pushing through, and hope that when I pay my $99 for the iPhone Developer Program that the Objective-C Primer I see listed will start with us boarding the plane. Hell, I'm flying high in coach, and I didn't even get stripped searched, pushed through the metal detector, thrown in that glass case and had that puff of air up my ass. What? You haven't experienced that at the airport check-in, must be because I'm a Black man! :)

I'll sit back and watch this foreign movie without the subtitles and see if I can make something out of it. As soon as this plane lands I'm hoping off, and grabbing a translation manual.

I'll pony up the $99 as soon as the Mac OS X upgrade finishes loading, and that will open the ivory tower up to me, and allow me to read the sacred tombs.

Tasks/Status

1) Learn the iPhone Tech
* Download/install iPhone SDK
* Upgrade Mac OS $130
* Join iPhone Dev $99
* Read iPhone Docs/Samples
** iPhone OS Technology Overview
** Cocoa Fundamentals Guide
** iPhone Application Programming Guide
** iPhone Human Interface Guidelines
** iPhone Development Guide
** The Objective-C 2.0 Programming Language
** Write little test programs to learn the iPhone Capabilities (memory allocation, file I/O, iPhone audio, WiFi, graphics, etc...) - by Dec. 15th

2) Test my game concepts out on the iPhone
3) Build tool(s) if needed
4) Solidify Game Design
5) Architect the game code
6) Develop game w/ scratch art
7) Drop in real assets
8) Test/Debug
9) Ship It