Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Lummet

Java Game ?

This topic is 6254 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, Just wondering why there is not game(s) made with Java? or is it not so good for that, to write a game ? ie, like quake / black&white game´s on JAVA?. it seem´s that all the games are made on C/C++ & openGL, that are on the market now. is there any games yet that has been made on JAVA? (not applet´s on www) standalone game i meen.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Try running this game and you will know why.
The game looks sweet, and is really done well.
But it is in java, and so it is SLOOOOOOOW.

http://www.babeloueb.com/arkanae/

Share this post


Link to post
Share on other sites
Java doesn't make your program slow, programmers make your program slow. Any critical section can be set as native, so you can program it in a language which is percieved as being faster. Besides, any java program can be run on a virtual machine with a just in time compiler, or it can be compiled the same as c++ can to an executable. Java is just a language, languages are not fast or slow. GCC can compile java to an executable just like c, c++, etc.

Edited by - Dog_Food on September 5, 2001 3:16:24 PM

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I disagree with Dog_Food. You could write your native methods in assembly and then claim Java is as fast as hand-coded assembly, but this clearly defeats the purpose of a higher-level language.

Java can be considered a slow language because
a) it checks for invalid indexes when using arrays
b) casts are checked at runtime
c) all methods are virtual
d) all objects are created using new (no objects on stack)
e) because of flaws in the language you have to program inefficiently
f) garbage collection
g) synchronization happens per-class, not per-object
h) and so on

Share this post


Link to post
Share on other sites
For the most part, a well-written Java app is going to be marginally slower than a well written C/C++ app. C++ code runs directly on the processor of the machine, while Java runs inside the virtual machine, which in turn runs on the processor. This makes Java not so good for the intensive number-crunching involved in rendering 3D scenes like Q3 & Black & White.
Java has a 3D api, but it isn''t ready for prime-time.
Java does have advantages outside the realtime 3D scene. For instance: with the new version 1.4 coming out, Java will be able to suspend the OS and go into full-screen mode at the desired resolution, as well as store image data on the machines video card with the new VolitileImage class. I''ll bet we see some lightning-fast 2D games with Java soon.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
i don''t know why they aren''t written in java. You can naitive compile java code on one OS. It loses it''s portability but then having a game like black and white compiled normally would run to slow to my knowledge. But i did find a game compiled normally using java and opengl. here''s the link if anyone is interested
http://www.babeloueb.com/arkanae/en/index.html
it looks really nice. Haven''t downloaded it yet.
phesto

Share this post


Link to post
Share on other sites
Unfortunatly some of the people responding to the question don''t have a clue.


lets start with

Java can be considered a slow language because
a) it checks for invalid indexes when using arrays
- 1.4 has added very aggressive array optimizations to
remove most of the problems here
b) casts are checked at runtime
- dynamic casts are checked at runtime with almost 0 overhead
c) all methods are virtual
- with hot spot this has almost 0 overhead
d) all objects are created using new (no objects on stack)
- Generational garbage collection means this is signifigantly faster now
e) because of flaws in the language you have to program inefficiently
--- WTF --- Programming in propre OO is inefficient?
f) garbage collection
- See d)
g) synchronization happens per-class, not per-object
- syncronization happens at whatever level you want it to, so this statment is just wrong
h) and so on


WafarerX has a clue and is up to date on some of the new advances in java. With the final release of 1.4 we should start to see some interesting things out of the java camp. Unfortunatly sun has really not had games in mind when they were designing java ( before 1.4 ) graphics really suffered, you could do it, but it wasn''t easy. Sound and timing is where the system really lacks currently and we will see how 1.4 helps there.

Many people associate applets with "java". This type of ignorance is hurting the whole platform because m$''s version of java is going on 4 years old without an API update. Unless you are using Java Web Start or the Java Plug-In you are missing out on the real power of java.

I know that I could get faster code writing it in straight C or C++, but the advantages to writing code that is OO clean and efficient ( even in java ) that can run on any Java2 capable platform with minimal additional testing is a huge benifit. What you loose in raw spped you easly make up for in debugging and platform porting. With both the VM''s and processors getting faster every day the slight spped loss is becoming less and less of an issue daily.

Why are there no games in java then...

Commercial games take 2 years to produce. Java is just now starting to hit a real stride. There are a bunch of 99% pure ( some native code ) games already out there including roboforge, red storm''s tom clancy game, and several that used the VM within their game for engine control. I would expect to start seeing more commercial game exploration of java over the next 2 years or so. Expect to find out after the fact they were written in java as most commercial games will probably try and hide that fact from the consumer.

For those in the know the Java Gaming Profile is around the corner, it will specify a set of API''s that when included with a JRE will make it compliant. The set of API''s will be talored to game writers and the standard will be targered for release on console systems ASAP. This will allow you to develop on windows and deploy your game on consoles. If that doesn''t give you some reasons to think about java nothing will.

If you want to engage in a discussion with java gaming enthusiasts I recommend heading over to ...

http://www.javagaming.org/

It''s run by a couple of sun people that are interested in gaming.

Good luck

Share this post


Link to post
Share on other sites
Check out www.runescape.com its a online MMORPG made in Java I believe. Its a decently fast online game with 3 servers and around 1k players on each server. Check it out, its free to play, and a good example of workmanship.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!