PDA

View Full Version : How long would it take (with some experience)




stingblah
Feb 28, 2009, 02:33 PM
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!!!!



Jeremy1026
Feb 28, 2009, 02:45 PM
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.

stingblah
Feb 28, 2009, 04:14 PM
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?

jsw
Feb 28, 2009, 04:18 PM
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.

stingblah
Feb 28, 2009, 04:28 PM
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++?

firewood
Feb 28, 2009, 05:33 PM
You can't write iPhone apps in Javascript.

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

I'm a Mac
Feb 28, 2009, 05:50 PM
Actually, he can write the game in C++ (almost). Doesn't the SDK support objective-c++

stingblah
Feb 28, 2009, 06:48 PM
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.

It's happening again! lol

dejo
Feb 28, 2009, 07:04 PM
Doesn't the SDK support objective-c++
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.

stingblah
Feb 28, 2009, 07:42 PM
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!

dejo
Feb 28, 2009, 09:31 PM
C++ is good.
No, not really.

Some Objective-C knowledge is a must, but I don't necessarily need to have any sort of mastery over the language
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.

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)
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.

Is it possible also to use python in the coding?
No, Python is not an option.

Hope that helps.

firewood
Mar 1, 2009, 03:02 AM
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.

jclardy
Mar 1, 2009, 06:20 AM
C++ is good.
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)


Just so you know, Android's native SDK uses Java, not Javascript.

dubhe
Mar 1, 2009, 06:26 AM
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?

I'm a Mac
Mar 1, 2009, 12:56 PM
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.

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:

stingblah
Mar 2, 2009, 10:59 AM
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...

Jeremy1026
Mar 2, 2009, 11:30 AM
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...

You'd have to do the interface in Obj-C.

dejo
Mar 2, 2009, 11:30 AM
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.

I'm a Mac
Mar 2, 2009, 12:15 PM
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.

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.