Quake2 Ported to Java, Play Via the Web 326
casemon writes "Quake2 fans unite! Thanks to German software developer ByTonic software, you can now play Quake2 via the web with Jake2 a java port of ID Softwares seminal Quake2. ByTonic claims performance is similar to original C version. From the Jake2 website;
"Jake2 is a Java 3D game engine. It is a port of the GPL'd Quake2 game engine from idSoftware. To use the Jake2 engine you need either the data files from the original game or from the demo version available for download from ftp://ftp.idsoftware.com."
You actually don't need to get the data files, they've set it up to automatically download the 38Mb demo assets using WebStart. Just click the Play Now button and away you go. Most features supported, even multiplayer server!"
If I was Sun CEO... (Score:5, Insightful)
Re:Erm, link: (Score:3, Insightful)
Java programs don't get interpreted on modern VMs, they get JITed. In some cases, this can result in more effecient code than a precompiled binary such as one created by a C compiler.
Quake 2 seminal? (Score:3, Insightful)
I've played Quake 2 than all the rest put together, but that doesn't make it seminal.
Re:If I was Sun CEO... (Score:5, Insightful)
Re:Quake 2 seminal? (Score:5, Insightful)
Re:Erm, link: (Score:5, Insightful)
No it assumes that the compiler cannot know the most common runtime code paths (which is true). A JIT engine can of course.
Even with compilers that read seperately collected profiler data (such as recent gcc which can take gprof output) can only work on that one profiler measurement. Lots of software is highly dependent on usage patterns and so different paths will be run depending on how the user uses the software. Only runtime optimisation can take this into account.
Re:Quake 2 seminal? (Score:1, Insightful)
s/Quake2/Marathon
T,FTFY
The Slowness Of Java (Score:4, Insightful)
Maybe there are reasons for this that aren't directly related to Java. Maybe Azureus just isn't very well-written, or maybe it's just feature-bloated. Maybe the Windows JVM just stinks.
But in any case, the common perception of Java applications as being slow and ponderous is one that Java applications have earned - there are actual reasons, based on real-world experiences, that cause people to feel this way. That has nothing to do with some pig-headed resistance to change.
Rather than railing against the Java-haters, why not point out some useful, slick, fast Java-based applications? I'd love to see some. Every one that I've tried so far has been a disaster in one way or another. I honestly want to like Java. I like the language, I love the concept - it's the real-world experience with it that I have a problem with.
Nice to see a full port, not just the game logic (Score:3, Insightful)
Re:The Slowness Of Java (Score:5, Insightful)
Um, you did see what the article is about didn't you? Perhaps you should try it out.
I have used quite a few Java programs and most perform well.
Re:The Slowness Of Java (Score:2, Insightful)
One word. Bollocks. I have Azureus running right now. As well as NetBeans, OC4J, VMWare and whole host of other things. Either you don't know one end of a computer from another or you're deliberately spreading FUD.
Bob
top - 14:51:58 up 5:33, 6 users, load average: 0.18, 0.17, 0.51
Tasks: 116 total, 2 running, 114 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.7% us, 1.0% sy, 0.0% ni, 91.3% id, 4.0% wa, 0.7% hi, 0.3% si
Mem: 2076528k total, 1662764k used, 413764k free, 67972k buffers
Swap: 4088500k total, 463460k used, 3625040k free, 1072344k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
8540 mparker -51 0 30176 15m 14m S 3.0 0.8 3:32.12 artsd
7774 mparker 16 0 38724 1032 512 S 0.3 0.0 0:00.92 ocssd.bin
14289 mparker 16 0 2056 992 752 R 0.3 0.0 0:00.04 top
1 root 16 0 680 60 36 S 0.0 0.0 0:01.00 init
2 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
3 root 10 -5 0 0 0 S 0.0 0.0 0:00.18 events/0
4 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khelper
9 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
19 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid
142 root 10 -5 0 0 0 S 0.0 0.0 0:00.76 kblockd/0
185 root 12 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0
184 root 15 0 0 0 0 S 0.0 0.0 0:07.55 kswapd0
778 root 15 0 0 0 0 S 0.0 0.0 0:00.00 kseriod
1014 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 ata/0
1020 root 20 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_0
1021 root 21 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_1
1248 root 10 -5 0 0 0 S 0.0 0.0 0:00.57 reiserfs/0
mparker 8616 7989 0 09:51 ? 00:00:00
mparker 8635 8616 0 09:51 ? 00:01:31
mparker 11799 7989 0 12:44 ? 00:00:05
mparker 11810 11799 0 12:44 ? 00:01:16
mparker 11868 7989 0 12:55 ? 00:00:00
mparker 11873 11868 1 12:55 ? 00:01:38
mparker 13824 10435 1 14:31 pts/2 00:00:19 java -jar oc4j.jar
ps output abridged to avoid lameness filter.
Re:The Slowness Of Java (Score:4, Insightful)
Re:Erm, link: (Score:4, Insightful)
Java's benefit is its age and portability. Its fairly mature and very fast when running under the server vm for some time. Quick command line apps are best served with C code. Compile C code with g++ instead of gcc sometime. Not only will your code run slower, but it will be larger as well. Likewise time a Visual C++ app vs a
If your vision of java is applets think again. No one uses java for applets anymore. If you do, you missed DHTML and its recent variants. Client side code is ignorant anyway. Browsers aren't standarized enough for that yet. Java is good for server side code and if written properly, desktop gui applications.
Re:The Slowness Of Java (Score:2, Insightful)
Or he might be a normal non-evangelical java junkie that runs it out of the box. Like me. It runs like shit on my sytems too, and everyone else I know that runs it.. runs like shit. Of course they're not going to tweak the VM, the applications or run around in a handful of config files or whatever else you've done to manage to get it to perform reasonably. Fact of the matter is that it works file for you, and doesn't for him (or me et al)
It doesn't mean he's unable to determine the linear end points on his computer any more than it determines you're able to recognize the difference between your posterior and a pitch fork.
notice, I was able to state my opinion without backing it up with a bunch of useless output from a console. (which mind you is dubious in that I'm sure you can use vi. You're the kind of person that loves vi right?)
Re:"...performance is similar to original C versio (Score:1, Insightful)
How is it bigotry? (Score:3, Insightful)
This is really the conflation of two orthogonal arguments, though, and we should take care to avoid treating languages and their compilation/execution mechanisms as locked behaviors.
When the Cell takes over, we'll all be stuck writing for SPEs in straight C.
Re:The Slowness Of Java (Score:1, Insightful)
It does not seem unreasonable to expect them to further close the gap or surpass the original code in terms of performance in the future.
Re:How fair is this Java vs C comparison? (Score:2, Insightful)
Re:The Slowness Of Java (Score:3, Insightful)
John Carmack is not the greatest programmer, but he is a damn fine programmer. He has shipped tons of games, and shipping games is an incredibly difficult thing. You also have to keep in mind that until quake2 included, he handled almost all major programming tasks (rendering, networking, architecture). Doom is one of the first games I've seen to cleverly use the same client/server architecture whether you are playing a single player or multiplayer game. Carmack is an extremely focused and fast programmer that ships games.
It is just soooo easy to look at code and call out its flaws. Would you like to release some of your code online for all of us to scrutinize?
Java Swing application developer for 5 years now (Score:1, Insightful)
MS Windows Messenger takes up without you using it? About this much idle but if you click on the icon in the status bar it jumps as high as 8MB doing nothing.
There are ways to cache a JVM so if the JVM has already been loaded the needed system files to bind with the native windowing system you can't tell if it is a Java application or a native application.
This should come standard with 1.6 Mustang but it is pretty easy to do. I had code that did this with 1.3 and xMotif folks were shocked when my Swing applications loaded just as fast.
I've been doing GUI applications since VB 2.0 and have used lots of GUI builder tools on various platforms.
The part that really gets me is when people are shocked to see a Java application like this. Why is it that everyone thinks Java is still slow when it used to be embedded in a browser as an applet?
Doesn't everyone know that the JVM/JRE is written in C? If you run 'javah' from the command line you can easily create a C style header to load your system library into the JVM.
So JOGL which is the JNI version of Open GL has bindings for the different platforms.
If I told you I could write a system in C with garbage collection, threading and networking built in that was almost as fast as standard ANSI C wouldn't you believe it?
The reason Java is slower is because it is DOING MORE. It isn't THAT much slower either. I'm sure everyone out there could write a generic IP stack and garbage collector that will run all CPU platforms and scales well.
Gosling had a quote that I really love. "C has small problems, like what is an int?"
Not to mention always having to memset your heap data or run into a very big chance of ghosting values or worse yet not null terminating a string and it just run off into the kernal looking for a
The HTTP loader and ability to auto load and install your application across a hetrogenous network (WebStart) is a pretty nice feature. I'm sure a lot of developers out there will miss having to use REGEDIT to figure out why their application didn't install correctly.
I don't know anything else that comes close to Java Applications. C# is the next coolest language and the author is a genious. The problem is MS has chosen to poor cement from this very cool language into the kernal. Since it makes native calls to the OS and it is a closed system. I can run a java application on Windows 98 with no problems. Can't do that with C# because it needs system dll calls that MS doesn't want to make virtual or share with anyone else. You will need to buy yet another OS upgrade from MS.
For the Mono folks out there has it shipped yet? Is anyone using it to develope anything with? I've been shipping Java appications professionally since 2000.
The JIT is the cool part that makes the JVM almost seem like magic. It dynamically profiles the code at run time. Translates the java bytecode that is used the most into native assembler on the fly. There is some overhead for this but it is a one time charge once optimized.
For those out there that say Swing doesn't do multiple threading they should google on 'Swing worker thread'. I've been using that for 5 years as well.
For those out there that have only cooked with the mirco-wave oven Java is gourmet style cooking. If popcorn is all you need then by all means stick with VB, C# or some other tool. If you want to be able to write a very cool looking GUI that will run on any platform then learn Java Swing.
Swing is the real deal. SWT is another option popular by the IBM/Eclipse community. This is a native peer JNI type call which works a lot like C#. It requires some knowledge of the native widget set