C ++ vs Java on Android

I’m interested in starting the development of the game. I am currently doing some openGL in C ++, but now I am looking for options that offer Android, and I have found people who develop their games using Native code (C ++) and others that use Java ...

So I really don’t know what the main difference is. I read that many people have experience using C ++ and prefer that it does not need to learn new things with java ... but I do not think this is the main reason.

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

In addition, do you recommend starting development of the game using OpenGL?

+6
source share
3 answers

I would advise using the language with which you are more comfortable. The game is never a small project, and since you are new to the process (judging by this question), you probably will not worry about any differences in performance or anything like that.

To answer your questions:

Performance

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

Opportunities

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

Scalability

Not sure what you are asking with this.

+7
source

C ++ may work better than Java (don't believe naysayers, do your own tests), but there is more Java support on Android. In the end, it depends on how intense your application is and how much battery it will drain. If this is extremely intense, go with C ++ because you can do more with less. If that doesn't matter then go to Java.

+5
source

in the end it doesn't matter if you use C ++, you will need to study all those frameworks that are used for Android development, if you use java, you will find out that java and openGL are the same in all languages, so just go to C + + if you are a C ++ developer

In addition, do you recommend starting development of the game using OpenGL?

you should not start with OpenGL, and not with the fact that you cannot, but I would do something like SFML that will teach you a lot about graphical programming, then you can switch to OpenGL

0
source

Source: https://habr.com/ru/post/908624/


All Articles