Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Lua to Objective-C

edited October 2012 in General Posts: 266

The first type of programming I ever did was in Codea. This is was the first language I learned. I released my first app: Gravity Drop and I'm about to release my second made in Codea. Now, I plan to transfer from Codea to Xcode and Objective-C. I haven't really used Xcode besides when following @Reefwing's tutorials (which are great). I have a couple questions:

How different is coding in Xcode compared to Codea?
Are there any good tutorial sites that you guys used for learning Xcode and Objective-C?

I'm thinking of using http://teamtreehouse.com/ because it teaches web design, iOS development, and Android development. However, its a paid site. Any good free (yet great) tutorial sites?

Comments

  • Posts: 580

    http://www.raywenderlich.com/ has a ton of great tutorials, both for UIKit, and several for Cocos2d as well, which is a great open-source engine I like to use for iOS game development.

  • Posts: 115

    On a side note, I actually touched my first Macintosh yesterday. It was a Mac book Pro a co worker had just purchased. It was interesting to see how Xcode was integrated within the OS. The built-in iOS simulator was indeed spiffy though was only a iPhone/iPod Touch simulator. I suppose an iPad simulator was possible but I could not find an option for it.

    There was a quick(ish) app developer program built in but I did not continue as I did not want to add files to his system. I read a great deal of instructions for creating an app but could not ascertain the difference between Xcode and Objective-C.

    I'm sure I could find a lot of info on the subject on the interweb but thought my friends here would help understand the difference between the two.

    I know I will have to buy a Mac at some point in order to get my apps published to iTunes but was hoping some soul here would give me a little heads up on what to expect. I know I have to purchase an Apple Developers Kit or whatever but should I get ahead of the game by trying to learn Xcode or Objective-C?

    Any links would be appreciated. Thanks to ReefWing for supplying much needed info and general tutorials on this and other subjects.

  • edited October 2012 Posts: 563

    .@Keebo - If you want to distribute your Apps on iTunes then you are going to have to learn a bit about Xcode and Objective C. The difference between the two is that Xcode is the development environment (equivalent to Codea or Visual Studio) and Objective C is the language that you develop in (equivalent to Lua or C#). There is an iPad simulator as well as an iPhone version. Xcode knows what sort of device you are developing for and displays the appropriate simulator.

    .@veeeralp - Developing in Xcode/Objective C is more difficult than using Codea/Lua but the principles are the same. There are three main things you need to learn:

    1. The syntax of Objective C (i.e. expressions, loops, classes, etc), this is the easy bit;
    2. Common Objective C design patterns - you want to work with the language, not try and force the Lua way onto Objective C, this is the bit that takes time; and
    3. Learn how to use Xcode, Interface Builder and the other associated instruments (which will come with practise).

    My suggestion is the best way to learn is to jump in and write some code. Apple has TONNES of docs, videos and sample code which you can access as a developer. I would also read some books on the subject. Here are some to have a look at:

    • Beginning iPhone Development: Exploring the iPhone SDK by Dave Mark and Jeff LaMarche is a really good introductory book.
    • Programming in Objective-C 2.0 by Stephen Kochan for the Objective-C foundation.
    • The iPhone Developer's Cookbook by Erica Sadun takes a recipe type approach which is handy if you want to solve a particular problem although she sometimes takes a bit of a hackish angle.

    The free courses on iTunesU from Stanford Uni aren't bad either.

    EDIT: The other point I meant to make is that if you are making games then IMHO in many cases Codea/Lua is a better option than Xcode/Objective C. It is certainly simpler and you get many of the benefits of OpenGL without the complexity. Certainly if you need physics then Codea is the go. If you need bleeding edge performance then you probably need to do it the hard way.

  • Posts: 115

    Thanks for the info @Reefwing.

  • Posts: 266

    .@toadkick wow. that website it great. Even has tutorials for some new iOS 6 features.

    .@Reefwing I'll definitely be checking out these books. I've started watching some of the Stanford videos and they're actually really well made

  • edited October 2012 Posts: 580

    .@veeeralp Yeah, I think that's one of the best (if not the best) iOS tutorial sites on the net. Over the last couple of years Ray has gathered together a whole team of tutorial writers, and they release new tutorials every week.

    I've mentioned it before, but I can't recommend cocos2d highly enough for making games with Xcode and Objective-C. I've been using it for years now and it is very powerful, very well put together, and once you've gotten the hang of Objective-C it's not difficult to get the hang of. It also has a great community built up around it, and their forum is pretty good too. I would recommend becoming a little more fluent with programming in Objective-C and learning your way around Xcode first though, it's certainly a lot to take in at once.

    It's also worth mentioning that cocos2d comes bundled with Box2D (the same physics engine that Codea uses), and also with another physics engine called Chipmunk, which has some features that Box2D doesn't (and, if you're willing to pay for it, an iPhone-only version with more bells and whistles and optimizations). While Codea does use Box2D, you can do a lot more with it when you can get a little "closer to the metal" so to speak.

  • Posts: 266

    .@toadkick wow thanks for the great response. I actually started reading the iOS for high school students tutorial he has. He explains the code really well. I prefer written tutorials rather than video tuts so then I could go at my own pace. The main reason I want to learn objective c and Xcode is to make more advanced games and applications. In the future, I want to make more Productivity apps rather than games. Also, since Lua was the first language I learned, I want to learn more. Thanks for the site again. I favorited it.

Sign In or Register to comment.