Choosing a language for my game engine
Members - Reputation: 102
Posted 12 January 2012 - 04:32 PM
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.
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++
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.
No... just no.
Should I write it in ObjC for now and worry about porting later or be on the safe side with C++?
Members - Reputation: 600
Posted 13 January 2012 - 12:13 AM
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!
Senior Staff - Reputation: 17289
Posted 13 January 2012 - 01:00 AM
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.
- Jason Astle-Adams.
Members - Reputation: 191
Posted 13 January 2012 - 08:27 AM
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.