How long would it take (with some experience)

Discussion in 'iOS Programming' started by stingblah, Feb 28, 2009.

  1. macrumors newbie

    Joined:
    Feb 28, 2009
    #1
    I would like to make a basic game for the ipod touch (like minesweeper--i know it's been done but its just an example). I have the sdk and access to a mac, but haven't looked at the "Getting Started" videos on apple.com yet.

    I have good knowledge of Python and some C++ (still learning C++ actually). But I do understand very well the idea of object oriented programming, algorithms, functions, arrays, dictionaries, etc. I also know HTML and CSS. I have no experience with Cocoa/objective C.

    I have looked in forums across the internet, and I keep getting mixed answers on what iPhone apps are made in. Some say C++, some say JavaScript, some say Objective C. Currently I'm looking into learning JavaScript. What exactly do I need to know to build an iPhone app?

    How long would it take someone of my experience level to make a basic game for the iPhone? I have already made minesweeper in Python, and didn't think it was that hard. Also, is it possible to make a game in say Python and port it to the iPhone? idk if that even makes sense.

    Thanks a LOT for any help!!!!
     
  2. macrumors 68000

    Joined:
    Nov 3, 2007
    #2
    You can't write iPhone apps in Javascript. You can write them in Objective-C. For a simple minesweeper game it would take about 2-3 weeks depending how fancy you'd want for it to be. For someone of your experience level (a.k.a., n Obj-C) it'd probably take 1-2 months to get a hold of the language + another month of coding the app.
     
  3. thread starter macrumors newbie

    Joined:
    Feb 28, 2009
    #3
    would it be possible to just ignore Obj-C and make the app in C++? And I'm surprised it would take 1 month for the app. I made it in Python in 1 day. Would it not be possible to make Minesweeper in maybe 1 week, then work on the UI for 3-4 weeks?

    Also, I don't know what level of experience you have, but how long would it take someone with prior experience making such apps to make Minesweeper from start to finish?
     
  4. jsw
    Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #4
    Someone with prior experience and no particular concern about the quality of the graphics could easily make a minesweeper iPhone game in a day. The key is the experience. Someone with fluency in Chinese could easily compose a thousand-word paper about their childhood. Someone without it, though, would take months.

    You can't just go with C++ because you need to access the GUI, which means Objective-C, which is sort of a Smalltalk C variant with bits of C++ and Java-like ideas thrown in. It's easy enough to learn the syntax, but, like Java, what takes the real time is learning the massive number of things available in the frameworks as well as the nuances. It's easy to modify an existing Objective-C program, but it's a lot harder to write one from scratch.
     
  5. thread starter macrumors newbie

    Joined:
    Feb 28, 2009
    #5
    I just watched a few of the Getting Started videos, and see what you guys mean. It will definitely take me a while to get used to the environment (and of course Obj C)

    Have you seen the reports of a 9-year-old kid making an application called "doodle kids"? I read that he made it in a language called Pascal, and then "ported it" to the iPhone. What exactly does that mean? He remade the program in Obj C/C++?
     
  6. macrumors 603

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #6
    Of course you can.

    You put a pretty large Javascript app inside one big UIWebView (Javascript, CSS and HTML) using HTML5 for local storage. You could probably load, initialize and start the UIWebView using less than one page of Obj-C copied from Apple's examples. The only slightly tricky part might be making sure that all the *.js files get copied into the app bundle.

    I've written several small personal utility apps for my iPhone doing exactly that.

    The Javascript in webkit is no slouch. I benchmarked it almost 10 megaflops, slow by todays standards, but faster than the supercomputers they used to design the Space Shuttle for instance. (But I've also written iPhone apps using, not only C/Obj-C, but even ARM assembly language to get VFP performance for a lot more number crunching performance.)

    imho
     
  7. macrumors 6502

    Joined:
    Nov 5, 2007
    #7
    Actually, he can write the game in C++ (almost). Doesn't the SDK support objective-c++
     
  8. thread starter macrumors newbie

    Joined:
    Feb 28, 2009
    #8
    It's happening again! lol
     
  9. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #9
    Objective-C++? What the heck is that? :confused:

    stingblah, you'll be using Objective-C. You can also use some C too, since Objective-C is just a superset of it.
     
  10. thread starter macrumors newbie

    Joined:
    Feb 28, 2009
    #10
    so from what I understand

    C++ is good.
    Some Objective-C knowledge is a must, but I don't necessarily need to have any sort of mastery over the language.
    And JavaScript is a viable option to create an app (which I was planning on learning anyways because I may decide to program for Android)

    Is it possible also to use python in the coding? like have a calculator app with the calculations powered by python...

    Thanks so much for all your help!
     
  11. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #11
    No, not really.

    Mastery may not be necessary but it wouldn't hurt. You will want to become very familiar with Objective-C if you want to do anything other than basic apps.

    No, JavaScript is not a viable option unless you are just building web-apps that run within Mobile Safari or perhaps a WebView. Not exactly the same thing as a native app.

    No, Python is not an option.

    Hope that helps.
     
  12. macrumors 603

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #12
    The iPhone SDK will allow you to mix Objective-C, ANSI C, C++ and ARM assembly language, all in one app. There's even a glue library somewhere that will allow you to make serious app using primarily Javascript.

    The UI framework API is almost all in Obj-C though. But a lot of the other APIs are in plain C, not "pure" Obj-C. Some popular games and music apps use Obj-C just to set up an OpenGL view and touch handlers, and from thence do everything in C.
     
  13. macrumors 68020

    jclardy

    Joined:
    Oct 6, 2008
    #13
    Just so you know, Android's native SDK uses Java, not Javascript.
     
  14. macrumors 65816

    dubhe

    Joined:
    May 1, 2007
    Location:
    Norwich, UK
    #14
    I wrote a basic widget to do a simple calculation I do a lot at work, it has about four numbers input, a couple of yes/no selectors and about 10 lines of calculation which results in a single number answer. This took me about six hours to write in javascript (which I had never used before) would it take about the same time to write for the iPhone?
     
  15. macrumors 6502

    Joined:
    Nov 5, 2007
    #15
    I'm not quite sure, other than that in the getting started videos for the iPhone sdk they say you can mix and match objective c and c++, and files generally end in a .mm extension. Look here for more info: http://en.wikipedia.org/wiki/Objective-C#Objective-C.2B.2B

    And I included the picture from the getting started video:
     

    Attached Files:

  16. thread starter macrumors newbie

    Joined:
    Feb 28, 2009
    #16
    okay...but

    what is the actually meat of the app made out of? Couldn't ut be C++? I thought that's what it said in the third Getting Started video...
     
  17. macrumors 68000

    Joined:
    Nov 3, 2007
    #17
    You'd have to do the interface in Obj-C.
     
  18. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #18
    If you wanna try to pursue development in C++, go right ahead. Just realize that pretty much everyone here is using Objective-C and you are going to get the most help and responses to any queries if you use that too. Kind of a "path of least resistance" thing. And a good programmer doesn't eschew another language just because they don't know it. They take it as an opportunity to learn something else.
     
  19. macrumors 6502

    Joined:
    Nov 5, 2007
    #19
    Agreed. If you want to make well-developed apps, you'll need to learn objective-c. Sure, you can use some of your C++ knowledge to help you out, e.g. use some C++ methods but for the UI, you'll need to know objective-c, and yes the "meat" of the app is objective-c, for example, the main.m is always in objective-c, as are the view controllers.
     

Share This Page