Quake 2 Java

Someone, a while back, mentioned that a Quake 2 Java conversion was tried and id Software stopped it. Anyway I don’t see why since they released the code under the GPL so I thought I’d have a go at doing a port anyway I set up the project yesterday at http://sourceforge.net/projects/quake2java/. It’s quite a lot of code to port, and along with the mismatch which is C to Java (ah, if only they had used C++), I was hoping for some help.

Gary

The code might be free, but what about the graphics?

Anyway, I remember a Java-Quake running in a browser (although very low res, 320x200?) that could even be played over the net! But it vanished quickly for ID didn’t like the idea…

I fell that today there should be better ways to create a FPS in favor of porting Quake? But it still would be cool…

[quote]The code might be free, but what about the graphics?
[/quote]
You are indeed correct about the graphics, a person, to use the source, needs to own the original Quake 2 CD.

I figured it is of interest, because we would be showing a port of a game which did very well (I’d love to port Quake 3 instead if they open sourced that), hopefully running well under Java. It would also provide a GPL engine to use (with a total conversion as Mr Carmack pointed out). It would also be interesting to see if we can get it to work with the original servers, and the original game to work with Java servers.

[quote]You are indeed correct about the graphics, a person, to use the source, needs to own the original Quake 2 CD.
[/quote]
You could make it a webstart app that requires the original CD.

You could make it a webstart app that requires the original CD.

u could simply use the pak files :stuck_out_tongue:

this way they have to own the game… otherwise they doesnt have the graphics.

eg the different quakeworld clients are all without any original media.

[quote]u could simply use the pak files
[/quote]
Yeah well, which ever way you choose to load the copyrighted material without distributing them. :stuck_out_tongue:

In java, you can’t check if the user has the original CD anyway.

It doesn’t really matter anyway I can’t remember what version they disabled CD checking but they disabled it in one of them and we are obviously porting the most recent version.

Basically in the end, it should be the case of just pointing the jar to the pak file location and away you go, thats the hope anway ;D.

One may also have a look if nobody made a good mod using other paks.

I downloaded the source. Will have a look if its worth the effort.

Go on, you might as well do it. All the icky glue code is already written for you in LWJGL too - all you’ve got to port is the game itself.

BTW, the CD check in Q2 is this:


/*
================
Sys_ScanForCD

================
*/
char *Sys_ScanForCD (void)
{
      static char      cddir[MAX_OSPATH];
      static qboolean      done;
#ifndef DEMO
      char            drive[4];
      FILE            *f;
      char            test[MAX_QPATH];

      if (done)            // don't re-check
            return cddir;

      // no abort/retry/fail errors
      SetErrorMode (SEM_FAILCRITICALERRORS);

      drive[0] = 'c';
      drive[1] = ':';
      drive[2] = '\\';
      drive[3] = 0;

      done = true;

      // scan the drives
      for (drive[0] = 'c' ; drive[0] <= 'z' ; drive[0]++)
      {
            // where activision put the stuff...
            sprintf (cddir, "%sinstall\\data", drive);
            sprintf (test, "%sinstall\\data\\quake2.exe", drive);
            f = fopen(test, "r");
            if (f)
            {
                  fclose (f);
                  if (GetDriveType (drive) == DRIVE_CDROM)
                        return cddir;
            }
      }
#endif

      cddir[0] = 0;
      
      return NULL;
}

/*
================
Sys_CopyProtect

================
*/
void      Sys_CopyProtect (void)
{
#ifndef DEMO
      char      *cddir;

      cddir = Sys_ScanForCD();
      if (!cddir[0])
            Com_Error (ERR_FATAL, "You must have the Quake2 CD in the drive to play.");
#endif
}

GPL code

i.e. it’s not a very clever check at all is it :slight_smile: Besides I think we might add a CD API to LWJGL at some point.

Cas :slight_smile:

[quote]Go on, you might as well do it. All the icky glue code is already written for you in LWJGL too - all you’ve got to port is the game itself.

i.e. it’s not a very clever check at all is it :slight_smile: Besides I think we might add a CD API to LWJGL at some point.

Cas :slight_smile:
[/quote]
Thanks for that. Keith (another member of the project) proposed that we convert it to C++ first, and there already is a project that has partially done this. That way in an extreme programming like style we can convert parts of it and still have it work with the rest. I’ve done a bit of work, though I’m still behind schedule, but I want to complete a package or two before I cvs it.

no quake 2, not playable, but here is a quake 1 demo.
Of course, you’ll need to dowload a (free) pak file to make it work.
http://www.realityinteractive.com/software/index.html

Thanks pepe for the plug.

I should mention that the reason that we have not made our playable version of the Quake clone available is that you would need to have a registered copy of Quake to play it. We feel that this is a significant barrier of entry.

I will also say that a significant chunk of our technology preview is Quake 2. This was done as a proof of concept to show that our framework could support disparate components working in a common manner.

the graphics are only copywritten. you should be able to have an artist produce an interpretation of them, as long as he/she does not copy or use parts of the original.

Check this.

Jake2 a Java port of the Quake2 engine.

Try the playable version from http://www.bytonic.de

The current version supports demo and single player mode.

bye
Carsten