davemichael / NaCl-Quake

Quake for Native Client (based on the SDL Quake port)
GNU General Public License v2.0
21 stars 2 forks source link

Experimental Native Client Quake Demo Linux, Mac, and Cygwin on Windows Requires GNU make utility Requires diff patch utilities

This is an experimental version of Quake for Native Client. Quake is now open-source. Quake was originally produced by ID Software, but is no longer supported by them.

http://www.idsoftware.com

To build and run, you first need to download SDL Quake from http://www.libsdl.org/projects/quake and extract the src and data files into this directory. You can do this using the bash command line.

Downloading

To download Quake and apply the patches, run the download make target. Windows users must run this script from a Cygwin shell.

make download nacl

This invokes a download script, which performs the following steps:

First, it uses wget (or curl) to fetch the Quake tarballs, one for the source code and one for the level data. wget http://www.libsdl.org/projects/quake/src/sdlquake-1.0.9.tar.gz wget http://www.libsdl.org/projects/quake/data/quakesw-1.0.6.tar.gz

Then it untars the contents using: tar -x --strip-components=1 -f sdlquake-1.0.9.tar.gz tar -x -f quakesw-1.0.6.tar.gz

Note: Depending on your version of tar, you may need to replace --strip-components with --strip_path.

Finally, after extraction, the download script will appy the patches required to build under Native Client: patch -p1 <nacl_quake.patch

Building

Do NOT run ./configure -- a Native Client Makefile is already provided. If the configuration script is run, it might overwrite the provided Makefile.

Next, build the Native Client version of Quake with the GNU make utility: (Note: The nacl target is required.)

make clean nacl make debug nacl

To build & run:

make debug nacl run

To build and run release:

make release nacl run

Once you have built a .nexe it should run -- via sel_ldr launcher under the makefile's run target -- on any Native Client platform without the need for recompilation. See the included Makefile for more build and run options.

Quake in the browser

When a nacl build target is specified, the makefile, as a post build process, will copy the nexe to 'nacl_quake', which is referenced by 'quake.html' Assuming the Native Client plugin has been installed, pointing the browser to quake.html should bring up quake in the browser.

The browser version of Quake loads the pak file and the Quake Native Client executable relative to the location of the quake.html file. If the quake.html and nacl_quake files are here: .../nacl/googleclient/native_client/tests/quake/quake.html .../nacl/googleclient/native_client/tests/quake/nacl_quake Then quake expects to find the pak0.pak file here: .../nacl/googleclient/native_client/tests/quake/id1/pak0.pak

There are also a couple stress test html pages demonstrating multiple instances of Quake running on a single page: .../nacl/googleclient/native_client/tests/quake/quake3.html .../nacl/googleclient/native_client/tests/quake/quake9.html

Linux, Windows: 32-bit Firefox recommended Mac: Firefox 3 recommended (Firefox 2 unsupported on Mac at this time)

Changes made to sdlquake