★ TouchArcade needs your help. Click here to support us on Patreon.

Developing in C++

07-21-2011, 03:34 AM
#1
Developing in C++

Hi guys,

Is there anybody here developping Iphone games in C++? Which framework do you use/recommend? What are you experience about them?

Currently I'm using OpenFrameworks which is just fine for prototyping:

http://www.openframeworks.cc/

Because it is a bit limited and the iPhone platform doesn't seem to be their first target, I'm considering moving to something else. I came accross Cocos2D-X this morning and it looks very promising:

http://www.cocos2d-x.org/

Cheers,
Joel.

PS: I already have most of the game logic written. I do not need any physics/math library. All I need is to draw sprites, text and play sounds.
07-21-2011, 04:01 AM
#2
Joined: May 2010
Location: Italy
Posts: 134
To develop for the iOS platform you should be familiar with Objective C, rather than C++. Of course a good grounding in any programing language will help you get to grips with Cocoa (Apples Objective C).

You could try the Corona SDK which uses Lua....

07-21-2011, 04:02 AM
#3
Joined: Sep 2010
Location: Morestel, France
Posts: 572
I'm using my own C++ cross lib (PC/MAC/iOS) written in C++ and Opengl. The nice thing about this is that I'm making 99% of the dev on my PC, witch is extremely fast to compile and run the game and add ressources.

JC
07-21-2011, 04:07 AM
#4
Joined: Sep 2010
Location: Morestel, France
Posts: 572
Quote:
Originally Posted by Lightworx View Post
To develop for the iOS platform you should be familiar with Objective C.
Luckily, this isn't exactly true. I have only few files in Objective C that handle the minimum low level system stuff (they never change from project to project). Everything else is 100% C++. I guess if you want to write Apps and not game, you might need to get more involved with the iOS API but otherwise, I always use cross platform libs before any tigh in specific libs.

JC
07-21-2011, 04:14 AM
#5
Joined: Jun 2009
Posts: 328
ask any coder, any real coder, it doesnt matter if you code with objective c or c++, codings coding!

minigore <3
07-21-2011, 04:38 AM
#6
Joined: Sep 2010
Location: Morestel, France
Posts: 572
Quote:
Originally Posted by naythan View Post
ask any coder, any real coder, it doesnt matter if you code with objective c or c++, codings coding!
May I ask what is a real coder

I've been coding for the last 26 years, I'm pretty sure I'm a real coder. You are right coding is coding, but releasing on multi-platform is crucial for indie dev. C++ will be easier to port your code than Objective C. Oh, and if you want to get a job in the AAA industry, you better learn C++ as it is the de facto language.

JC
07-21-2011, 04:57 AM
#7
Ovogame:
<like>
The only thing is that I'm more focused on mobile gaming so for me testing directly on the device (or at least simulator) is a must. Currently I'm developping on MacBook/Xcode and I have to say I'm quite pleased with the link/run speed. I can have my app running directly on my iPhone in like 10seconds! Of course compilation is a bit slow, but it doesn't look any slower than with VisualC++ (from my experience compiling Windows applications).

Can you simulate or run on a device from Windows? From what I know this is impossible.

Naythan:
So if it doesn't matter, I can choose whichever I want I do not get your point sorry...
07-21-2011, 04:58 AM
#8
Joined: Aug 2010
Location: Tokyo, Japan
Posts: 273
Quote:
Originally Posted by Ovogame View Post
May I ask what is a real coder

I've been coding for the last 26 years, I'm pretty sure I'm a real coder. You are right coding is coding, but releasing on multi-platform is crucial for indie dev. C++ will be easier to port your code than Objective C. Oh, and if you want to get a job in the AAA industry, you better learn C++ as it is the de facto language.

JC
Amen to that.
I'm also developing mostly on PC.. Visual Studio, Visual Assist X, VIEmu.
..nothing that I can find on Xcode. And of course multi-platform is a nice bonus.

If I had to do native-looking Apps with lots of UI, then that would be different. But for games, it makes more sense to rely on low level APIs.

Though I'll admit that if one has no experience, then the C++ + OpenGL learning curve can be quite steep.
07-21-2011, 05:15 AM
#9
Quote:
Originally Posted by naythan View Post
ask any coder, any real coder, it doesnt matter if you code with objective c or c++, codings coding!
We use mainly C++, and Arm Assembly when we can (for Matrix operations for example). It's why Perfect Cell runs at 30 FPS on the first iPhone with a lot of 3D meshes and real time lighting effects.

With Objective C you will never get good performance for a game. But it depends on the game I guess. Objective C is a high level programming language, it's better to do Apps only for now.

OpenFrameworks seems to be a good start. Oolong is a good framework too, but it's not for beginners: http://code.google.com/p/oolongengine/
07-21-2011, 05:15 AM
#10
Joined: Sep 2010
Location: Morestel, France
Posts: 572
Quote:
Originally Posted by jlauener View Post
Can you ... run on a device from Windows?
Off course not

Basically, when I need to test on the device, I copy all my src code on my mac and compile and test on the device. But I never use the simulator as my PC is simulating the same exact thing. I'm not use to XCODE so I'm 10x faster with visual and I find adding ressource faster than on the mac (anyway, all my tools are on my PC). Also, I can do a lot of things that you can't do on the simulator: like updating my ressource on my hard drive and just pressing a key inside the game to reload everything (like texture, text, snd... any data you like). Witch is very fast (no need to exit the game). Finally, I like to create editor for the game from inside the game itself and you need a mouse so having my game working on computer is crucial.

check this one from Jump Birdy Jump:
http://www.youtube.com/watch?v=v3mHYl_dWK8

I find having my game compatible with computer and iOS a huge plus: speed up production and easy to make computer version.

JC