Jake2 a player for Quake2 pak files

Jake2 is out.

It’s a Java port of the Quake2 engine. The project is under construction but you can use demo and single player mode. We use jogl for rendering and a joal sound driver comes soon.

All you need is the current Jake2 version from http://www.bytonic.de
and the media files for Quake2.

  • unpack jake2-version.tar.gz or jake2-version.zip
  • copy the baseq2 directory from your full version of Quake2 or from the
    demo version to the Jake2 base directory
  • run the game with Jake2.sh or Jake2.bat

have fun :slight_smile:

bye
Carsten

sweet. Sound & fullscreen didn’t work, and I can’t give a fair fps comparison to the original…
(I was virus scanning in the background :P)
but it looks pretty damn good!

Hi Abuse,

It’s no virus.

do you know a way to get an jogl fullscreen under linux?

btw we have problems with joal and it’s native libs.
we want a cool factory method to initialize the best AL driver and not the null device on win32 :slight_smile:
We like Java as an platform independent language and no special code path hacks for various OSs.

Awesome! Looks and plays great. Great job!

-Chris

P.S. Now, how about a Q3 port? :slight_smile:

hehe,
No I wasn’t explicitly scanning Jake2.
After finding my sisters machine (on the same lan) filled with viruses, I made a precautionary scan of my own.

Found 1 as well!
Dedler.G, which is a little odd, since that wasn’t 1 of the 14 viruses I found on my sisters machine!
AVG rates it as a harmless worm though, so im not too worried (though I am a little curious as to how I got infected :S)

[quote]Awesome! Looks and plays great. Great job!

-Chris

P.S. Now, how about a Q3 port? :slight_smile:
[/quote]
Thanks. Expect more to come. If the sources were available we would have started straight with Q3.

Holger
http://www.bytonic.de

Cool stuff! Very smooth! Congrats!

Very nice 8)

[quote] and I can’t give a fair fps comparison to the original…
[/quote]
The cebit slides shows that the framerate is about half that of the original c version. I was surprised the java version was so far behind. Have you done any tests that show what is holding it back?

I’ve had a quick look at the q2 c source, but I can not find much rendering code. What did you use when you ported the code in jake2\render\jogl?

[quote]Very nice 8)

The cebit slides shows that the framerate is about half that of the original c version. I was surprised the java version was so far behind. Have you done any tests that show what is holding it back?

I’ve had a quick look at the q2 c source, but I can not find much rendering code. What did you use when you ported the code in jake2\render\jogl?
[/quote]
The original rendering code is in quake2-3.21/ref_gl in q2source-3.21.zip.

We have not done much profiling/optimazation yet. Firts we want to have a feature complete Java Quake2. But don’t expect to get close to the framerates of the original. They use some performance hacks that You can’t do in Java.
i.e. They sort dynamically allocated structures after the absolute memory address to get better cache hit rates.
Another point is the lack of stack variables in Java. Alllocating/freeing a structure or an array on the stack is just an increment/decrement of the stack pointer in C. In Java You always need new().

Holger

[quote]Another point is the lack of stack variables in Java. Alllocating/freeing a structure or an array on the stack is just an increment/decrement of the stack pointer in C. In Java You always need new().
[/quote]
But a new() in Java can be pretty close to a increment of a pointer, so allocations on the heap in Java are cheaper than heap allocations in C.

It would be interesting to analyze the performance differences. It could provide some cases for various RFEs like ‘structs’ and such.

Were the benchmarks performed on the client VM or server VM?

new() in Java (even when it’s allocated locally in the new space) followed by a subsequent GC is still a lot damned slower than performing escape analysis and knowing for sure when something’s stack allocated.

And it’s still not a patch on Structs in ByteBuffers <— which is what you need for high performance OO programming :stuck_out_tongue:

Go add all 3 of your votes now!

Cas :slight_smile:

[quote]Were the benchmarks performed on the client VM or server VM?
[/quote]
on the client VM

  • linux
  • gl_vertex_arrays 1 (see config.cfg)
  • 800x600x24 window mode
  • s_initsound 0

Quake2 and Jake2 were tested with the same config.cfg.

hot stuff!
now Q2 is not only ported to .njet :slight_smile:

here is my wishlist:

  • mousewheel support
  • changing brightness has no effect (gamma?)
  • jnlp support (could help here)

Starting Quake2 via webstart would be extremely kewl. I think a small setup application to let the user point to the quake2 dir.

Again: Nice work!

[quote]- changing brightness has no effect (gamma?)
[/quote]
I think they have limited themselfes to using pure java. Currently there is no way of changing the brightness, contrast and gamma using pure java. They would either have to write their own native libs, or use LWJGL :wink:

Network!! Quake is a multiplayer game!

WebStart and sound second.

go to console with #

vid_gamma 0.9
intensity 2
gl_modulate 2 (or 1)
vid_restart

bye
Carsten

[quote]Network!! Quake is a multiplayer game!

WebStart and sound second.
[/quote]
I think web start is easy to do. A little setup in an ant script and youre done.
I always prefer WebStart, you don’t have these many dead jar files in different versions on your PC and youre always up to date :-).

[quote]Network!! Quake is a multiplayer game!

WebStart and sound second.
[/quote]
We have partially working network games and sound in our cvs. Just be patient for a while.

Holger

We already thought about Webstart. The only problem are the Q2 level files. We are not allowed to redistribute them or bundle them with Jake2. Not even the demo levels.

Anybody knows some Q2 levels which are competele under a free license (not depend on id software textures, sounds, models)?

Holger