Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make the move to c++ from java?

Tags:

java

c++

Ive been learning java for maybe 5 months, and for that whole time, i mostly tried making games. I made a halfway decent game with java2D, but I want to move on to bigger and better things... 3D. I began to learn LWJGL(which is basicly OpenGL). Before I get too deep into learning java, and going 3d with it, should I move to c++? Are pointers really that essential for large programs? Can I still make anything cross platform with c++? or am I stuck with windows. If I am stuck with windows, should I just go for c#?

Thanks.

When I said halfway decent, I meant that it was good, IMO. If you want to see it, to judge where i am in 2D experience, here you go: http://www.thenewboston.com/forum/viewtopic.php?f=119&t=13249

So Java is okay for game devolepment, on large scales?

like image 265
Jtvd78 Avatar asked Sep 16 '26 17:09

Jtvd78


1 Answers

Before I get too deep into learning java, and going 3d with it, should I move to c++?

Its worth considering knowing more than one language.

Are pointers really that essential for large programs?

This question is nonsensical, so "no".

However, C++ has some key advantages when it comes to games:

  1. Less memory overhead.
  2. Deterministic memory usage and timing.
  3. Deterministic runtime performance (with potentially better speed)

The first two of these are side-effects of Java's garbage collector and can be a problem with Java games (or any application). Whether or not they matter is completely up to you.

The third is a side-effect of the JIT. Java may not JIT all methods immediately (leading to a rough start), or at all (on a client VM). In addition, for true high end hardware usage, it may not make the best use (if at all) of extra hardware, such as vector instructions (SSE2,3,4,4.1,etc).

Can I still make anything cross platform with c++? or am I stuck with windows. If I am stuck with windows, should I just go for c#?

Yes, with effort. C++ is its self cross platform, but that is just a language. The rest is in libraries.

like image 68
Yann Ramin Avatar answered Sep 18 '26 06:09

Yann Ramin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!