Jump to content

  • Log In with Google      Sign In   
  • Create Account


Choosing a language for my game engine


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Ansman   Members   -  Reputation: 102

Like
0Likes
Like

Posted 12 January 2012 - 04:32 PM

I'm writing a game for the iOS platform.

I'm just about to start writing the core game engine, the things that are specific to game logic and not so much the platform itself.
The question is which language do I choose.

Objective-C(++)
I like Objective-C very much and I think it's a beautiful language.

Pros is it's platform native meaning I can use built in types (which in turn means better integration with other components) and it's memory management is awesome.

Cons is it sort of locks me in on iOS/Mac and even though no ports are planned it might be in the future and that it can be slower than C++


C++
I have no trouble writing C++ albeit it is a bit ugly.

Pros are speed and portability seeing as almost every platform supports it.

Cons are the memory management (writing your own Objective-C style memory management isn't hard though) and messier code.

C
No... just no.

---

Any input/suggestions?
Should I write it in ObjC for now and worry about porting later or be on the safe side with C++?

Sponsor:

#2 DjMaSh   Members   -  Reputation: 198

Like
0Likes
Like

Posted 12 January 2012 - 08:50 PM

c++. objective-c isnt very useful outside ios

#3 daviangel   Members   -  Reputation: 600

Like
1Likes
Like

Posted 13 January 2012 - 12:13 AM

As I've probaby said hundreds of times and probably sound like a broken record by now:
Use the language you are most efficent and comfortable with.
Did John Carmack use Objective-C for his first iOS game? NO!
He used C since that's what he's used to and fastest programming in!
Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe

#4 jbadams   Senior Staff   -  Reputation: 17970

Like
0Likes
Like

Posted 13 January 2012 - 01:00 AM

It sounds like you're comfortable with Objective-C and you don't currently have any plans to port your game(s) to other platforms. Based on that, I would suggest you go with Objective-C.

Worry about porting if you get to it later on -- even with C++ you'd still have some work to do to port from iOS to another platform, and as you're not currently planning to port this may not be a concern anyway.

#5 Ansman   Members   -  Reputation: 102

Like
0Likes
Like

Posted 13 January 2012 - 08:08 AM

It's true that I'm more comfortable with Objective-C but I would not mind writing it in C++.

#6 agm_ultimatex   Members   -  Reputation: 191

Like
0Likes
Like

Posted 13 January 2012 - 08:27 AM

My advice is to go with objective-c. Not only are you more comfortable with it, but it's generally what a lot of the iOS community uses as well. So searching for information, asking questions on stackoverflow might be more relevant to use the language of choice for that platform.

The benefits for learning C++ would be if you want to use that language for other projects as well. Such as building a desktop 2d game. Though if you target Mac only, you can build desktop games using objective c as well.

#7 Ansman   Members   -  Reputation: 102

Like
1Likes
Like

Posted 15 January 2012 - 02:16 PM

Objective-C it is then!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS