HOME       >>       Programming

Java Or C++


PCessna

Many having tell me to make my MMORPG in java leads me to agree, But I'm not sure truly is it not yet easier, but yet the outcome of programming an MMORPG in java will make it fail or succeed more then one in C+=I've learned a lot of variables in javascript, and I don't think that java would be too bad either. My true question is, is those who use these languages, which seems to give better outcome, and which seems to be more in ease. Regards-PCessna


pandu

C++ is generally agreed upon as being harder than Java. If you want to make an mmorpg, then you need to pick what type. If you want a stand alone game, then you probably want to use C++. If you want a web-based game (like RuneScape) then make a Java applet. Either way, it's easier to make a game in Java, especially with the huge standard library and available documentation and great support for things like sockets.


Sica-GURU

If you're thinking to build mobile phones games..java is No.1 if not...i guess C++ is better.. but depends on the type of application, so for some applications dealing with C++ will be much harder than with Java.


moutonoir

At my school, they teach us Java first, then C++. And it makes sense...I've yet to find a significant project that was much easier to do in C++ than in Java. C++ has its perks in that it often produces faster programs and can be more powerful, but Java has the advantage of a huge standard library which helps immensely in your coding. Often you'll find that what you want to do has already been done for you, so you can concentrate on other aspects of your code. It's also easier to make your program web-accessible with applets in Java.


xico

C++ increases speed, while Java gives you more productivity. But c++ is more complex, then to create a Web application, for example, it is recommended that you use Java.


seba1killer

Hi, i dont know why are you chosing between this two object oriented languages.In my opinion a game should be done in C or C++, i would not have in mind java because it is some slow for 3D graphics and it is executed on a jvirtual machines, so the server will be slow and will need a faster machine than a server done in C/C++.My other point is that C or C++ can be compiled in Linux, Mac or Windows if you are planning to use OpenGL Apii. This way your client will have compatibility in all these famous platforms.Also if you are making the server in C with Unix sockets, it will also be compatible with all the massive operating systems.Well, to finish my recomendation is that you do the game in C++ language as it is not very complicated. If you know how to program you will find it very easy but some tedious to write the graphics engine.I expect you got millions for the project and share it with us .Good luck, Seba.


moodsey211

For me it really depends on you. Java and C++ as its own pros and cons, it really depends on you which language you would prefer. provided that you are willing to sacrifice based on the language you choose. for example if your going to develop the game using java, you will have to sacrifice its speed and hardware requirements. In the other hand if your going to develop it in C++ then be prepared to do complex programming. The choice really would be yours to make.


gogoily

C++ run faster than Java. But Java can run on lots of operation system without changing any source codes.


lucachaco

yeah am agree


Blood

its all depending on your knowledge but java look at this mmorpg that i play its called runescape i dont know if some of you heard of it buts its been upgraded alot and now its has better graphics and more hours of plays. it can be found here http://www.runescape.com/ the game entire game is coded of java and you don't have to downloaded which is a browser game


ramonchiara

IMHO, you should really go for Java... Why?1. Multiplatform: it will just really easy to port your game to Windows, Linux, etc.2, 3 and 4. Easy for programming network, threads and graphics.5. Garbage Collector: it will facilitate your life. If you go witgh C/C++ you will *probably* take long nights trying to follow some dangling pointer, etc. :-)6. There are some examples of good games made with Java in net. Someone pointed out Runescape. There are others. Don't get caught in the "Java is slow" myth.Well... That's it... Of course you should weight yourself your constraints to see if Java is a good choice. But probably you will take more time focus in the game if you choose Java.[]s


snowisawsome

I personally recommend Java because that is what I use and it is very easy to learn. Although I have never tried C++ I would like to as I have heard that it is more powerful and versatile so long as you are using a Microsoft operating system. Java's major advantage is that it is entirely compatible with all operating systems.


niklophiliac

I agree with the previous reply - java is platform independent and provides a huge amount of features which are more secure(you might disagree) and i absolutely love the memory management system and C++ definitely provides more speed - that is its best feature compared to java. Java is a high level language where as c++ is low levelThose being the general features you have to decide on the following questionsHow much easier would one be than the other? Both are very similar and it is a personal preference of the programmer. Try both and see which one you like best.How long would they take to make? How long would it take to learn everything necessary to make a mmorpg?How many more people would play the game writing in Java? This is purely based on how good your game is. Language itself isn't going to be a huge factor in determining if someone plays your game. Being online may expose the game to more people, so you could see a quicker response to the game... but the goal will be to get them to stay with the game and like it. That is all left up to your game design.I would recommed you to go first with C++ and use any library like SDL (Simple Direct Media Layer) which is freeand it's a good way to start with games, start by creating some easy and realistic, what i mean is create something that you can achieve. and finished it! then start developing mroe complex Applications and games..-C++-OpenGL-Win32


xpress

I agree with the previous reply - java is platform independent and provides a huge amount of features which are more secure(you might disagree) and i absolutely love the memory management system and C++ definitely provides more speed - that is its best feature compared to java.

Yes, the main advantage of Java is its platform independence. And there is nothing to disagree in security of Java. Java is definitley secure than C++. Unfortunately, sometimes this security is its weakness. Yes, memory management is really good in Java because you don't need to explicitly manage the memory.

C++ is faster than java in some cases, but not always. There are some cases that java is faster than C++. So it depends. Most people believe that java is slow because java need to unzip all its libraries and some compiled classes to run. So, java startup is slow.

Java is a high level language where as c++ is low level

No...Both Java and C++ are high level languages. Low level languages are very very hard to program. They are machine dependent(Yes not just platform, but particular hardware). Example for low level language is Assembly language.

niklophiliac

Occasionally java gives better results with respcet to speed but i still feel based on JIT implementations and structure that JVM performs with, there is a reduction in speed to a certain extent.

People are tempted to believe that because of high organization java will give them more speed, i agree but java is slow not bacause of design but the JIT implementations. So as long as you use a single class computation java will be on par with c++ wrt speed.

I will provide you with an excellent article on this topic:
http://forums.xisto.com/no_longer_exists/

No...Both Java and C++ are high level languages. Low level languages are very very hard to program. They are machine dependent(Yes not just platform, but particular hardware). Example for low level language is Assembly language.

I would still say C++ is more of a mid level language.bah!! it is not really important:P
I have worked quite a lot with COBOL as well in mainframes, compared to that anything is low level:D

xpress

I will provide you with an excellent article on this topic:

http://forums.xisto.com/no_longer_exists/


I had read that article already. That is pretty old. Java has undergone some dramatical improvements these days. And java was improving in its performance with new release of every version. No, I am not sayint C++ is slow. I am standing to my previous opinion....it depends. Really it depends. The benchmarks are changing when the program changes. And different programmers are writing different opinions. Look at the forllowing articles...

 

The Java is Faster than C++ and C++ sucks Unbiased Benchmark

and look at this article. It is latest and based on Java6. Yet Another Java vs C++ shootout

 

But there are some other bench marks and analysis saying that C++ is faster. Basically they are using differnet algorithms so these different results. So, performance depends on the programmer, his code and the algorithm he used.....


niklophiliac

Java 6 has not done too much to improve the JIT implementations IMO, they have now completely removed the memory management from the user's hands. JVM handles everything now. And I think a few more features like navigable sets, maps have been introduced. I feel they are more concerned with what the new changes will do to the existing legacy code which is limiting them to quite a large extent.Coming back to your arguments I think we have summed up years worth of debate on the very topic...Ultimately the verdict should be - use the language you are more comfortable with and you will get better results. Programming skills count more than the programming skills and proper implementation of concepts is what is more important.


xpress

Yeah. We finally agreed at some point. The speed mainly depends on our programming skilss, and what inbuilt libraries we use. All others are secondary. So lets stop our argument here....


aloKNsh

hey java is d best in programming coz it doesnt need any complier as c++it only need a JDK which is for all os but in case of c++ we need a complier for every os.for further assistence contact me......rite2alok@gmail.comortestingpirakx@gmail.com


zakaluka

hey java is d best in programming coz it doesnt need any complier as c++it only need a JDK which is for all os but in case of c++ we need a complier for every os.


I'm sorry but that statement is utterly incorrect. Java does have a compiler. It is part of the JDK. The binary is called javac (stands for 'java compiler'). The difference is that it compiles Java source code to bytecode that is interpreted by a runtime.

Also, each platform requires its own version of the JDK to compile programs and the JRE to run them. There are many (dozens) of platforms that have no JDK / JRE support. In contrast, C / C++ (certain subsets) work on all those platforms. Obviously, this applies to many smaller platforms that most people are not aware of.

Still, please don't spread misinformation if you are not sure of how certain programming languages work.

Regards,

z.


VIEW DESKTOP VERSION REGISTERGET FREE HOSTING

Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.