FAQ
It is currently Mon May 29, 2017 3:08 pm


Author Message
mmatt9876
Post  Post subject: Java or C++ for Game Programming?  |  Posted: Thu Jun 23, 2016 12:19 am

Joined: Sun Sep 27, 2015 12:56 pm
Posts: 91
Location: New Jersey USA

Offline
Between Java and C++ which of these two languages is better for game development? I am a beginner hobbyist programmer who knows a little bit of Java and C++ so far. I want to make my own 2D games, to start off with, and then create my own 3D games after I have some experience making 2D games.

If you guys know of any better languages for game programming than Java or C++ please let me know. (I have heard of other computer languages like Python, Ruby, and JavaScript being used for game development but I do not know if they are better than Java or C++ for game development)


Top
marnixR
Post  Post subject: Re: Java or C++ for Game Programming?  |  Posted: Thu Jun 23, 2016 7:05 am
User avatar

Joined: Thu Aug 04, 2011 8:35 pm
Posts: 4780
Location: Cardiff, Wales

Offline
unfortunately I only have first-hand knowledge of Java, so not in a position to compare
I'd say the only way to find out is to try the same job using both tools, and see which seems to suit best (always bearing in mind that certain games may work better in C++, and some in Java)

_________________
"Reality is that which, when you stop believing in it, doesn't go away." (Philip K. Dick)
"Someone is WRONG on the internet" (xkcd)


Top
mmatt9876
Post  Post subject: Re: Java or C++ for Game Programming?  |  Posted: Thu Jun 23, 2016 2:54 pm

Joined: Sun Sep 27, 2015 12:56 pm
Posts: 91
Location: New Jersey USA

Offline
marnixR wrote:
unfortunately I only have first-hand knowledge of Java, so not in a position to compare
I'd say the only way to find out is to try the same job using both tools, and see which seems to suit best (always bearing in mind that certain games may work better in C++, and some in Java)


I like Java because of its portability but I have read that it can run slow for games sometimes. C++ is not as portable as Java but I believe it runs better when one codes with it properly.


Top
marnixR
Post  Post subject: Re: Java or C++ for Game Programming?  |  Posted: Thu Jun 23, 2016 6:06 pm
User avatar

Joined: Thu Aug 04, 2011 8:35 pm
Posts: 4780
Location: Cardiff, Wales

Offline
is that because of an inherent build property ofJava, or could also be faster if you knew how to write it in a more lightweight fashion ?

_________________
"Reality is that which, when you stop believing in it, doesn't go away." (Philip K. Dick)
"Someone is WRONG on the internet" (xkcd)


Top
mmatt9876
Post  Post subject: Re: Java or C++ for Game Programming?  |  Posted: Thu Jun 23, 2016 10:53 pm

Joined: Sun Sep 27, 2015 12:56 pm
Posts: 91
Location: New Jersey USA

Offline
marnixR wrote:
is that because of an inherent build property ofJava, or could also be faster if you knew how to write it in a more lightweight fashion ?


I think the speed issue with Java programs is mostly inherent. One thing I researched is that a Java program can use about twice as much memory as a C++ program, so that could be one reason Java can run slowly.


Top
scire
Post  Post subject: Re: Java or C++ for Game Programming?  |  Posted: Sun Jul 10, 2016 12:44 am

Joined: Sat May 14, 2016 8:09 pm
Posts: 28

Offline
mmatt9876 wrote:
C++ is not as portable as Java but I believe it runs better when one codes with it properly.

Scientists are hoping to one day confirm that hypothesis.


Top
iNow
Post  Post subject: Re: Java or C++ for Game Programming?  |  Posted: Sun Jul 10, 2016 12:56 am
User avatar
Original Member
Original Member

Joined: Thu Aug 04, 2011 11:40 pm
Posts: 5526
Location: Austin, Texas

Offline
:lol:

_________________
iNow

"[Time] is one of those concepts that is profoundly resistant to a simple definition." ~C. Sagan


Top
mmatt9876
Post  Post subject: Re: Java or C++ for Game Programming?  |  Posted: Fri Oct 28, 2016 11:16 am

Joined: Sun Sep 27, 2015 12:56 pm
Posts: 91
Location: New Jersey USA

Offline
scire wrote:
mmatt9876 wrote:
C++ is not as portable as Java but I believe it runs better when one codes with it properly.

Scientists are hoping to one day confirm that hypothesis.


Actually, I think Java was created from C or C++, if I am correct, so C++ could actually be as portable as Java, if one was to create a Java-like language or architecture in C++.

I got the idea that if one programs correctly in C++ the code can run better than a similar program written in Java because I had read 3D applications and games in Java can run slow or choppy as compared to 3D applications or games written in C++.


Top
marnixR
Post  Post subject: Re: Java or C++ for Game Programming?  |  Posted: Fri Oct 28, 2016 2:51 pm
User avatar

Joined: Thu Aug 04, 2011 8:35 pm
Posts: 4780
Location: Cardiff, Wales

Offline
yes, Java was indeed based on C++, but it left out a number of awkward bits like pointers, although it probably created some awkward bits of its own making

_________________
"Reality is that which, when you stop believing in it, doesn't go away." (Philip K. Dick)
"Someone is WRONG on the internet" (xkcd)


Top
scire
Post  Post subject: Re: Java or C++ for Game Programming?  |  Posted: Sat Oct 29, 2016 1:54 am

Joined: Sat May 14, 2016 8:09 pm
Posts: 28

Offline
mmatt9876 wrote:
Actually, I think Java was created from C or C++, if I am correct, so C++ could actually be as portable as Java, if one was to create a Java-like language or architecture in C++.

I got the idea that if one programs correctly in C++ the code can run better than a similar program written in Java because I had read 3D applications and games in Java can run slow or choppy as compared to 3D applications or games written in C++.

Bjarne Stroustrup wrote:
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg.


Top
mmatt9876
Post  Post subject: Re: Java or C++ for Game Programming?  |  Posted: Fri Dec 09, 2016 12:24 am

Joined: Sun Sep 27, 2015 12:56 pm
Posts: 91
Location: New Jersey USA

Offline
scire wrote:
mmatt9876 wrote:
Actually, I think Java was created from C or C++, if I am correct, so C++ could actually be as portable as Java, if one was to create a Java-like language or architecture in C++.

I got the idea that if one programs correctly in C++ the code can run better than a similar program written in Java because I had read 3D applications and games in Java can run slow or choppy as compared to 3D applications or games written in C++.

Bjarne Stroustrup wrote:
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg.


It sounds like programming in C may be smarter than programming in C++ because you will probably make many small mistakes when coding in C but when you discover you have made a mistake when coding in C++ you have to go back to the drawing board, if I am right.


Top
Tanpire
Post  Post subject: Re: Java or C++ for Game Programming?  |  Posted: Fri Feb 17, 2017 5:22 am
User avatar

Joined: Fri Feb 17, 2017 4:57 am
Posts: 6

Offline
I've worked a little bit with C++, but not enough to form a really solid opinion. My experience is, if something in C++ goes wrong, it goes REALLY wrong. I've never had a small, easily fixable error in C++. I unfortunately have not had the opportunity to work with Java, so I can't say if it is better than C++ for games. I know that a lot of games use C++, so maybe that's worth something.

_________________
-Tanpire


Top
mmatt9876
Post  Post subject: Re: Java or C++ for Game Programming?  |  Posted: Tue Feb 21, 2017 12:11 am

Joined: Sun Sep 27, 2015 12:56 pm
Posts: 91
Location: New Jersey USA

Offline
When choosing between C++ and Java for game programming you should consider the difficulty of the language you are coding in and the power of the language. Java is easier and less time consuming to program a game in than C++. C++ is a more powerful language to code in than Java but it is more difficult.


Last edited by iNow on Tue Feb 21, 2017 4:48 pm, edited 1 time in total.
Edited by request from poster


Top
mmatt9876
Post  Post subject: Re: Java or C++ for Game Programming?  |  Posted: Wed Mar 08, 2017 3:03 pm

Joined: Sun Sep 27, 2015 12:56 pm
Posts: 91
Location: New Jersey USA

Offline
Does anybody know if you can code a 3D game in Java? Would it work good? I believe you can code good 3D games in C, C++, or C#.


Top
Display posts from previous:  Sort by  
Print view

Who is online
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
Jump to:   


Delete all board cookies | The team | All times are UTC


This free forum is proudly hosted by ProphpBB | phpBB software | Report Abuse | Privacy