Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ vs Java in Android

I'm interesting in start a game development. I currently did some openGL in C++, but now I'm looking for the options that offers Android, and I have found people who developes his games using Native code (C++) and others that use Java...

So I don't really know which is the main difference. I read that many people has experience using C++ and prefers this one to don't have to learn new things using java... but I don't think this is the main reason.

What are the main differences developing a game using C++ or Java? Perfomance? Scalability? Posibilities?

Also, do you recommend to start the game development using OpenGL?

like image 408
Frion3L Avatar asked Feb 16 '12 14:02

Frion3L


2 Answers

I would suggest using whichever language you are more comfortable with. A game is never a small project, and since you are new to the process (judging by this question) you will probably not be concerned with any performance differences or anything like that.

To answer your questions:

Performance

see C++ vs Java Performance, Android: Java, C or C++?, etc.

Possibilities

There is nothing inherit that C++ can do and Java can't, or vice versa when it comes to your goal.

Scalability

Not sure what you are asking with this one.

like image 130
ssell Avatar answered Sep 28 '22 02:09

ssell


C++ can perform better than Java (don't believe the naysayers, do your own benchmarks), but there is more support for Java on Android. In the end it depends on how intensive your app is going to be and how much battery it is going to drain. If it is extremely intensive, go with C++ because you can do more with less. If it doesn't matter, then go with Java.

like image 23
Byron Avatar answered Sep 28 '22 02:09

Byron