Sign in to follow this  
YoungOne

Is Java the best??

Recommended Posts

Is Java really the best choice for multiplayer programming? What other languages are out there that can create multiplayer games?

Share this post


Link to post
Share on other sites
You can write multiplayer games in most languages, including but not limited to:
Java
C#
C++
C
SML
Pascal/Delphi
Basic (most dialects)
PHP (it works even though its a bit of a pain to setup for standalone applications)
Python

Java is one of my personal favourites though. (It isn't always the best choice, but neither is any other language)

Share this post


Link to post
Share on other sites
Quote:
Original post by YoungOne
Is Java really the best choice for multiplayer programming? What other languages are out there that can create multiplayer games?


I like Java, and program in Java, and it's a good choice for network programming (although using it just for network programming and doing the rest in C++ would seem like an overly complicated solution with extensive JNI overhead), but why would you say that? Seeing as how you wrote "really", did you read this opinion somewhere?

Share this post


Link to post
Share on other sites
Honestly I prefer flash AS3 over java. But hey that's just me. Client side anyway. For larger games I'd definitely say anyone language which can be used to create both the server and the client. Then just use preprocessor commands to build the server and client using the same source. Works the best. One reason why I use C++ for my larger engine.

Share this post


Link to post
Share on other sites
Sockets in C++ (available on Windows and Unix/Linux) do have a learning curve, but work well.

Share this post


Link to post
Share on other sites
There is no "best" language, and I don't like threads that can turn into language wars.

If your chosen language has libraries and runtime that let you do what you need to do, and can be easily deployed to your customers/users, then your chosen language is good for what you want to do. It's that simple.

Btw: when I grew up in Sweden, the computer club people always moaned about maybe having to work for Ericsson (one of the bigger CS/EE employees there) and having to learn that non-standard "Erlang" language. That was 20+ years ago!

Share this post


Link to post
Share on other sites
Quote:
Original post by CoffeeMug
Why not try a language designed specifically for network programming by smart people *for* smart people - Erlang?

Despite Erlang scaring the living crap out of me, I'll throw in another vote for it. Not only does it provide a very error-tolerant medium for writing a server with, it is possibly one of the best scaling systems ever considered. That said, reading the manual made me want to kill myself because it seemed to backward compared to the languages I'm used to dealing with.

"Erlang".

Share this post


Link to post
Share on other sites
Quote:
There is no "best" language, and I don't like threads that can turn into language wars.


I'm surprised this wasn't said earlier.

I don't know why or where you got the impression Java is the best for making servers, or that there even is a "best" language for making a server. It really depends on what kind of server you are trying to make. First, the language has to be able to accomplish all the tasks you want the server to do. If you want a massive server, you will probably need a language that also supports making some threads, since a properly handled multi-threaded server is going to perform better than a single-threaded one (though don't expect magic to happen just by throwing in a few threads).

Besides that, it is mostly about how you like the language. If you know Java and want to make a server, go ahead and use Java. If you know a BASIC variant, use that. No point in forcing yourself to learn a new language since you think the language might be make something better, unless you actually want to learn the language.

Finally, a better design in any language is more important than the language used itself. Research. Experiment. Rewrite and try again.

Share this post


Link to post
Share on other sites
Kinda off-topic, but Java 6 has a lot to offer, if you need scalability (and understand difference between speed/performance and scalability).

Doug Lea's work on concurrency primitives is now not only part of Sun's standard platform, entire lower level of IO uses just about state-of-the-art asynchronous or no-copy design, as well as the full spectrum of concurrency primitives, going from full set of inherently portable atomic operations, to various forms of barriers, right up to lock-free and spin-free containers (the whole set of them, not just the trivial ones).

This alone gives you more immediately available resources for scalable application development than just about any general purpose platform out there. C# might be close, but it lacks portability (yes, I know there's Mono).

Java's ultimate bane is memory allocation. While flawless, and optimized through JIT, raw performance bottleneck becomes those 5% of allocations which you cannot avoid. And those give you the potential for greatest gains.

But outside of that, Java 6 is one of more up-to-date platforms out there, possibly followed by Python. C# with its unsafe and non-managed dependencies loses a lot in terms of productivity and reliability. Erlang has the downside of being pretty exotic, both in terms of language, as well as platform, so the cultural shock makes it unpopular.

Once again - this is about scalability, not raw performance.

Share this post


Link to post
Share on other sites
I don't know where the myth that "Java is better than X for network programming" started, but I've filed it in the same drawer as "Macs are better for graphics".

That said, if you're relying on nothing but the language's standard library, then Java might be more usable than C++ etc... But if you've got a comparable networking library for each language, then it doesn't matter which language you choose.
It's a choice of library, not language.

[EDIT]Also, I can't think of any professional "on store shelves" games that use Java at all (especially not networking).

Share this post


Link to post
Share on other sites
Quote:
Original post by Hodgman
[EDIT]Also, I can't think of any professional "on store shelves" games that use Java at all (especially not networking).


I can think of at least one professional "shelf" game that I've played before, namely Vampire: The Masquerade - Redemption which used Java as a scripting language. There's even some info on it in the game's postmortem on Gamasutra.

Share this post


Link to post
Share on other sites
Quote:
Original post by YoungOne
But is Java really the best for profitable multiplayer game making?


That would depend on your business model...

Share this post


Link to post
Share on other sites
The absolute truth regarding the question "Is java the best?"... Wait... is this a yes/no question?

I think you'd be better off exploring the advantages/disadvantages of this language compared to the many others.
Besides being a matter of personal preferences, different languages suit different needs in terms of speed of execution, speed of development, flexibility, reusability...

I personally think HTML is the best!
It is by far the simplest language out there and it will allow you to create tons of content in no time and it compensates the inexistence of functions and variables with copy and paste [assuming your notepad editor comes with these features]...

Streteched the example a bit to the extremes...
Hope that helps.

Share this post


Link to post
Share on other sites
YoungOne,

Please read all the replies in this thread. Your question does not have a simple yes/no answer. And the use of the word "really" is confusing, because nobody here has suggested that laguage X is the best.
This thread seems to be going nowhere, so I'll go ahead and close it.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this