View Full Version : What language did you code in?
yourofl10
02-03-2009, 09:04 AM
Hi, I'm wondering what type of language you used to code your game. Whether it me C++,C,Xcode,etc......
I'm a future wanna be iphone and ipod touch developer soo I'm just wondering which code you used.
Little White Bear Studios
02-03-2009, 09:15 AM
Objective C, which is what you'll find most people using. And you have to use XCode, as it's the only environment you can create the app and interact with the iPhone with.
Diablohead
02-03-2009, 09:27 AM
If you use a pre-made engine like Unity you can use some other languages like javascript but it's limited to that game engine so it will never be as pure as direct code.
It's a easier way to start at least.
wastedyuthe
02-03-2009, 09:41 AM
Whether it me C++,C,Xcode,etc......
I have just started learning Objective C without any knowledge of C, and am doing just fine. Just so you are aware, Xcode is not a language. As mentioned above, it is the app/environment that you use to create your iPhone or Mac apps. There is also another app that comes with it called Interface Builder. Xcode is used for all the coding, such as what buttons do, and what the app actually does. Interface Builder is used to create your views/screens such as menus etc.
yourofl10
02-03-2009, 09:45 AM
I have just started learning Objective C without any knowledge of C, and am doing just fine. Just so you are aware, Xcode is not a language. As mentioned above, it is the app/environment that you use to create your iPhone or Mac apps. There is also another app that comes with it called Interface Builder. Xcode is used for all the coding, such as what buttons do, and what the app actually does. Interface Builder is used to create your views/screens such as menus etc.
Ohh thanks!!!
(I'm new to this) Sorry
wastedyuthe
02-03-2009, 09:48 AM
(I'm new to this) Sorry
Don't apologize. I had to learn all this too only a couple of weeks ago.
Hippieman
02-03-2009, 11:00 AM
We use a mixture of Obj-C, C++ and XML to power our games.
wastedyuthe
02-03-2009, 11:08 AM
We use a mixture of Obj-C, C++ and XML to power our games.
Out of interest, is speed affected when applying different languages- for example, could a function, depending on what it does of course, run faster with Objective C than with C++?
bovinedragon
02-03-2009, 02:38 PM
Out of interest, is speed affected when applying different languages- for example, could a function, depending on what it does of course, run faster with Objective C than with C++?
I guess I'm one of the only people that uses only C++( apart from a few unavoidable objective-c functions to interface with the OS ). They will both run at the same speed, as they are both compiled to machine code.
wastedyuthe
02-03-2009, 02:40 PM
I guess I'm one of the only people that uses only C++( apart from a few unavoidable objective-c functions to interface with the OS ). They will both run at the same speed, as they are both compiled to machine code.
Thanks for the confirmation. So it boils down to personal preference then, yes?
jonaswills
02-03-2009, 02:54 PM
I guess I'm one of the only people that uses only C++( apart from a few unavoidable objective-c functions to interface with the OS ). They will both run at the same speed, as they are both compiled to machine code.
Most of our code base is in c++ so your not the only one :D
bovinedragon
02-03-2009, 02:58 PM
Thanks for the confirmation. So it boils down to personal preference then, yes?
You can get both work just as good, but be aware that all of the OS functions are in Objective-C, which gives you a little more work to get your C++ code to talk to the system.
If you are using Interface Builder or any of the Objective-C API's like Quarts a lot, it may be easier to just work in Objective-C to keep the language consistent. I just use OpenGL, which is a just plain C, so C++ works fine for me.
Manta Research
02-03-2009, 03:50 PM
Well very generally speaking Obj-C with its message passing mechanism will typically be slower than C++, which in turn will typically be slower than C, and this will in turn be slower than writing in asm directly.
For the most part it really doesn't make much of a difference, because so many of the bottlenecks are outside of your control. Usually, making smarter choices in choosing/designing your algorithms tend to give much larger gains than the decision of which language to use.
I personally write all my code in C and use Obj-C where necessary.
wastedyuthe
02-03-2009, 04:02 PM
Interesting. Thanks guys!
I'll stick to just learning Objective C for the moment. It's nice to know where it stands in the speed department though.
Anders
02-03-2009, 05:07 PM
Mostly C/C++/OpenGL/OpenAL and as little ObjC/Cocoa as possible.
MetaNick
02-03-2009, 05:26 PM
I use Objective-C for just about everything.
Objective-C is a true superset of C, so it's pretty unlikely that you won't be using both in your app/game. The OpenGL ES API is made in C. And even if you are just doing apps and things, most of the Core Graphics types are just C structs like CGPoint, CGRect, and so on.
daniglue
02-03-2009, 06:37 PM
in Korean.
currymutton
02-03-2009, 07:29 PM
I use mostly Java and VB, well, in the past, so Obj-C is a whole new species to me. Still struggling with the "strange" syntax and the "delegate" model.
Another newbie, just out of curiosity. Can you just put C++ or C into your project and XCode will compile them just fine?
bovinedragon
02-03-2009, 07:55 PM
Another newbie, just out of curiosity. Can you just put C++ or C into your project and XCode will compile them just fine?
Yes it can compile plain ".cpp" files. Or you want to mix C++ and Objective-C together, change the file type to ".mm".
InsertWittyName
02-04-2009, 04:05 AM
Bugz was coded with about 5% Obj-C, 95% C++.
I personally prefer C and Obj-C over C++.
I use Subjective-D and Hyperbole-F++.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.