Domain: bytonic.de
Stories and comments across the archive that link to bytonic.de.
Comments · 56
-
Re:If I had a dime for everytime I heard that....
On that note I'd like to mention the following:
Jake 2.
Undead Arena.Both of which were discussed right here.
And there's an interesting commercial game called Tribal Trouble (with a demo available).
-
Re:An uneducated guess...
People need to get rid of this "Java is slow" attitude. As an example, I cite the two following 3D games. If I installed these on your computer and you ran them, I guarantee you would not know they were full Java. http://www.chromethegame.com/ http://www.bytonic.de/html/jake2.html
-
Re:Article Summary:Unfortuately things can happen like a GC cycle at a bad time that can cause annoying slowdowns at the worst moment.
Indeed a problem for garbage collectors, luckily Java ships with several different algorithms. The one used by default (full halt for a step in generational GC) has the best throughput.
If you are more worried about short pauses you have two other alternatives however. The concurrent low pause pause collector will halt the application threads only in some phases of the collection, it is activated with the -XX:+UseConcMarkSweepGC flag (or system property). It does work in a different thread, so it is a good bet if you have multiple processors especially. The other option is the incremenetal collector, -Xincgc, which will do minor collections in parts with application threads getting to run between the steps (causing the pause to be spread out).
Another notable option in these multicore days is -XX:+UseParallelGC, which will launch several GC threads and do some of the work in parallel.
Overall there is a lot of opportunity to tune the Java garbage collector, google about on it a bit, it has been shown quite feasible to make nice interactive experience with Java (Jake2 anyone?). If even better guarantees are needed however it is probably best to look at one of the realtime JVM's. There are a variety available.
-
Re:what about writing for Games/OpenGL etc etc...Is Java really that bad for 3D?
No. YHBT. HAND.
:) -
Re:Actually...
There is a port of the Quake2 Engine for Java. It's almost up to the speed of the C original.
http://www.bytonic.de/html/benchmarks.html
Java nowadays generally beats C++ though it is easy to write slow Java programs if you're too inexperienced with Java. C is generelly still faster but not always. There are some surprising places where Java even beats out C.
The future is even more bright thanks to the absence of pointers. The compiler and VM always know where a reference points to and what is to be found there. More optimizations are possible.
Swing may not be the best, it has some huge startup time, but if that's unsuitable, what's stopping you from using SWT that accesses native widgets?
Anyone citing performance problems and Java hasn't seen current VMs perform in server mode.
And who cares about that remaining factor less than 3 difference to C when it is safe, has no buffer overflow and PCs double their speed all N months anyway.
-
Quake2, Alien Flux, Tribal Trouble
Sure, there's java port of Quake 2, there's Alien Flux, Tribal Trouble. But, as others already mentioned Java is mostly used for programming game logic. It's performance is constantly improving and only recently it gained enough speed to be seriously considered for writing entire game engines.