Write games. Play games. Have fun. Is there really more? Well if you include photography, robotics and radio controlled aircraft then yeah, there’s more. There’s always more. Be extreme!
Tog vs Dino is in the Apple app store!
Write games. Play games. Have fun. Is there really more? Well if you include photography, robotics and radio controlled aircraft then yeah, there’s more. There’s always more. Be extreme!
Tog vs Dino is in the Apple app store!
Just a little shout out. One can’t program with out exploring ones imagination. Check out the Read An Ebook Week promotion at Smashwords.com. From March 4th through the 10th you can purchase Scribings Vol 1, through Smashwords at 50% off! Scribings is the book I worked on with a few friends. You can also get any of the other Lost Luggage Studios books at 50% off, the company we published through.
View our catalog at Smashwords
And just enter code REW50 during checkout.
With the release of Lion (OS X 10.7), Apple allows full virtualization, provided it is installed on Apple hardware which is also running Lion. VMWare did a great job of promoting that you can run Lion, but I had a hard time finding out HOW to install it. But I finally figured it out, and installed Lion in a virtual machine. Here’s how.
Note again that you can only install Lion onto a virtual machine running on a Lion installation.
Installing from a Lion installer (Install Mac OS X Lion.app) download:
You can find more detailed instructions on VMWare’s Knowledge Base.
I recently started teaching my nephew how to program. Since he wants to learn to program iPhone’s and iPad’s, it made a lot of sense to introduce him to Objective C right away. One of my favorite first programs to write is a math program. To do that, you need be able to read input from the user. In C you would do something like:
char name[80];
printf("What is your name? ");
scanf("%s", name);
printf("Hello %s\n",name);
In Objective C you read using a NSFileHandle using the fileHandleWithStandardInput. The below code will read a single line (i.e.: read until the user presses Return) and will trim the CR that is at the end of the string. You’ll notice I used printf instead of NSLog since I wanted to keep the cursor on the same line as the prompt:
printf("What's your name?");
NSFileHandle *input = [NSFileHandle fileHandleWithStandardInput];
NSData *inputData = [NSData dataWithData:[input availableData]];
NSString *inputString = [[NSString alloc] initWithData:inputData
encoding:NSUTF8StringEncoding];
inputString = [inputString stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceAndNewlineCharacterSet]];
printf("Hello %s.\n",[inputString UTF8String]);
Was rooting around for an old game I had prototyped, as I needed some equations from it. I never learned trig in school, so I keep having to use old source to figure out how to make a space ship float through space. Glad I had the source still around. Never delete your old source! On the same note, try to keep it clean enough that you don’t end up with a gig of useless projects.