Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Quake for Native Client (based on the SDL Quake port)
C Assembly Shell C++ Other
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
data
docs
dxsdk/SDK
gas2masm
kit
scitech
3dfx.txt
COPYING
Makefile
Makefile.Solaris
Makefile.am
Makefile.in
Makefile.linuxi386
README.SDL
README.Solaris
README.nacl
SConstruct
WinQuake.dsp
WinQuake.dsw
WinQuake.mdp
WinQuake.ncb
WinQuake.opt
WinQuake.plg
a.out
acinclude.m4
aclocal.m4
adivtab.h
anorm_dots.h
anorms.h
app.yaml
asm_draw.h
asm_i386.h
block16.h
block8.h
bspfile.h
cd_audio.c
cd_linux.c
cd_nacl.c
cd_null.c
cd_sdl.c
cd_win.c
cdaudio.h
chase.c
cl_demo.c
cl_input.c
cl_main.c
cl_parse.c
cl_tent.c
clean.bat
client.h
cmd.c
cmd.h
common.c
common.h
common.mk
config.guess
config.sub
configure
configure.in
conproc.c
conproc.h
console.c
console.h
crc.c
crc.h
cvar.c
cvar.h
cwsdpmi.exe
d_copy.S
d_draw.S
d_draw16.S
d_edge.c
d_fill.c
d_iface.h
d_ifacea.h
d_init.c
d_local.h
d_modech.c
d_part.c
d_parta.S
d_polysa.S
d_polyse.c
d_scan.c
d_scana.S
d_sky.c
d_spr8.S
d_sprite.c
d_surf.c
d_vars.c
d_varsa.S
d_zpoint.c
default.cfg
dos_v2.c
dosasm.S
dosisms.h
draw.c
draw.h
end1.bin
file_handler.cc
file_handler.h
file_list.h
geturl_handler.cc
geturl_handler.h
gl_draw.c
gl_mesh.c
gl_model.c
gl_model.h
gl_refrag.c
gl_rlight.c
gl_rmain.c
gl_rmisc.c
gl_rsurf.c
gl_screen.c
gl_test.c
gl_vidlinux.c
gl_vidlinuxglx.c
gl_vidnt.c
gl_warp.c
gl_warp_sin.h
glqnotes.txt
glquake.h
glquake2.h
host.c
host_cmd.c
httpd.py
in_dos.c
in_null.c
in_sun.c
in_win.c
input.h
install-sh
keys.c
keys.h
makezip.bat
math.S
mathlib.c
mathlib.h
menu.c
menu.h
missing
mkinstalldirs
model.c
model.h
modelgen.h
mpdosock.h
mplib.c
mplpc.c
nacl_file.cc
nacl_file.h
net.h
net_bsd.c
net_bw.c
net_bw.h
net_comx.c
net_dgrm.c
net_dgrm.h
net_dos.c
net_ipx.c
net_ipx.h
net_loop.c
net_loop.h
net_main.c
net_mp.c
net_mp.h
net_none.c
net_ser.c
net_ser.h
net_udp.c
net_udp.h
net_vcr.c
net_vcr.h
net_win.c
net_wins.c
net_wins.h
net_wipx.c
net_wipx.h
net_wso.c
nonintel.c
pr_cmds.c
pr_comp.h
pr_edict.c
pr_exec.c
progdefs.h
progdefs.q1
progdefs.q2
progs.h
protocol.h
q.bat
qa.bat
qb.bat
qe3.ico
qt.bat
quake-data.spec.sh
quake-hipnotic.spec.sh
quake-rogue.spec.sh
quake-shareware.spec.sh
quake.css
quake.gif
quake.html
quake.ico
quake.nmf
quake.rc
quake.spec.sh
quake_instance.cc
quake_instance.h
quake_module.cc
quakeasm.h
quakedef.h
r_aclip.c
r_aclipa.S
r_alias.c
r_aliasa.S
r_bsp.c
r_draw.c
r_drawa.S
r_edge.c
r_edgea.S
r_efrag.c
r_light.c
r_local.h
r_main.c
r_misc.c
r_part.c
r_shared.h
r_sky.c
r_sprite.c
r_surf.c
r_vars.c
r_varsa.S
render.h
resource.h
sbar.c
sbar.h
screen.c
screen.h
server.h
snd_dma.c
snd_dos.c
snd_dummy.c
snd_gus.c
snd_linux.c
snd_mem.c
snd_mix.c
snd_mixa.S
snd_next.c
snd_null.c
snd_sdl.c
snd_sun.c
snd_win.c
sound.h
spritegn.h
stubs.c
surf16.S
surf8.S
sv_main.c
sv_move.c
sv_phys.c
sv_user.c
sys.h
sys_dos.c
sys_dosa.S
sys_linux.c
sys_nacl.c
sys_null.c
sys_sdl.c
sys_sun.c
sys_win.c
sys_wina.S
sys_wind.c
vgamodes.h
vid.h
vid_dos.c
vid_dos.h
vid_ext.c
vid_null.c
vid_sdl.c
vid_sunx.c
vid_sunxil.c
vid_svgalib.c
vid_vga.c
vid_win.c
vid_x.c
view.c
view.h
vregset.c
vregset.h
wad.c
wad.h
winquake.aps
winquake.h
winquake.rc
world.c
world.h
worlda.S
wq.bat
wqreadme.txt
zone.c
zone.h

README.nacl

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
------------------------
- max vertical resolution increased to 2048
- default resolution set to 1024x768
- heap size adjusted up from 8MB to 32MB
- cd_nacl.c mostly stubbed out
- net_udp.c mostly stubbed out
- net_dgrm.c entirely stubbed out
- SDL_Delay() stubbed in sys_nacl.c
- Sys_mkdir() stubbed out in sys_nacl.c
- remove Sys_MakeCodeWriteable()
- disabled setjmp/longjmp for demo loop
- snd_mixer fixed, uses larger paintbuffer
- snd_nacl tweaked to run with nacl audio interface
- uses ptheads to drive audio
- tweaked snd_nacl.c and snd_mixer.c to use 44.1k sample rate
- now uses 4096 paintbuffer
- nacl audio will only support stereo 44.1k and 48k
- support for mouse & keyboard, now playable to a limited degree
- (cannot grab mouse and warp mouse...)
- Makefile implemented using nacl tests make framework
- removed a couple of assembly files that contained unsupported x86 opcodes
- make possible to load pak file safely from browser (see nacl_file.c)
- initialize srpc library in main.c

Something went wrong with that request. Please try again.