Java Games?

Started by
11 comments, last by GameDev.net 17 years, 11 months ago
Well I will not go into the whole MMORPG issue of the post. But yes Java is suitable for game programming, even a MMORPG (the game logic of Star Wars Galaxies is written in Java for instance). If later on you need to (for performance reasons) you can implement the graphic subsytem in C or C++, but start with Java and see how it fits you. If you need pointers on the litterature let me recommend "Killer Game Programming in Java".

Good luck - and keep us updated on your MMORPG [smile]
"We confess our little faults to persuade people that we have no large ones." -Francois de La Rochefoucauld (1613 - 1680). | My blog
Advertisement
Quote:Original post by Vegettex
Disadvantages, well java is definitely slower then languages like c++ or c# and I think that the support for making a MMORPG with java is less then when you are going to use c++ (or something familiar).


What makes you think Java is slower than C#? The 'C' in the name?

Nowadays with the enhancements in the VM Java is close to C in performance. Don't even come with a "benchmark" that runs for 10s, that's not sufficient for the VM to start doing its work. In long running applications, such as a game, the performance will be better than C#.
Quote:Original post by Anonymous Poster
Quote:Original post by Vegettex
Disadvantages, well java is definitely slower then languages like c++ or c# and I think that the support for making a MMORPG with java is less then when you are going to use c++ (or something familiar).


What makes you think Java is slower than C#? The 'C' in the name?

Nowadays with the enhancements in the VM Java is close to C in performance. Don't even come with a "benchmark" that runs for 10s, that's not sufficient for the VM to start doing its work. In long running applications, such as a game, the performance will be better than C#.


java and C# are pretty equal, with JIT thrown in both will be fast enough for games. most AAA games today are limited by the GPU anyway.

C++ will probably always be a bit faster since it isn't compiled at runtime.
(thus the compiler can spend more time optimizing without annoying the user).

using a simple ./configure, make, make install approach you would get a program optimized for the users hardware just as you would with JIT compilation. (could be tricky to do on windows though, but its theoretically possible).

the speed difference isn't really big so even if you choose a "slower" language
(note, its not really the language that is slow, but a modern C++ compiler beats the current java server VMs JIT compiler) you'd probably won't notice any difference unless you benchmark it.

if you don't want to release the source and are using C++ you would have to choose a platform to optimize for, or release multiple binaries. (AMD64, IA32 etc). (ofcourse if the game isn't extremely demanding its better to simply optimize it for an older architecture so that it doesn't rely on new processor features).

as for java,C++ or C# i would definitly recomend java. (its been around longer than C# and is pretty mature these days). you get the nice extra advantage that your game will run perfectly on macOSX and linux aswell as windows without any extra work. for an independant MMO its always good to be avaliable to those audiences aswell. (They don't get that many games so the competition isn't as fierce).

the server and client doesn't necessarily have to be made using the same language. making the server in C++ can be a good idea to be able to squeeze every last drop out of your hardware, (and since you are in control of your server upgrades keeping the server binaries optimized for your current hardware isn't a problem).

most importantly however is to use a language you are familiar with. using an mmorpg to learn a new language isn't a good idea.

This topic is closed to new replies.

Advertisement