Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Quake for Native Client (based on the SDL Quake port)
C Assembly Shell C++ Other
branch: master
Failed to load latest commit information.
data first commit
docs first commit
dxsdk/SDK first commit
gas2masm first commit
kit first commit
scitech first commit
3dfx.txt first commit
COPYING first commit
Makefile Attempt at using local file storage API to save/load games. This is v…
Makefile.Solaris first commit
Makefile.am first commit
Makefile.in first commit
Makefile.linuxi386 first commit
README.SDL first commit
README.Solaris first commit
README.nacl first commit
SConstruct update paths for nacl 1.0
WinQuake.dsp first commit
WinQuake.dsw first commit
WinQuake.mdp first commit
WinQuake.ncb first commit
WinQuake.opt first commit
WinQuake.plg first commit
a.out first commit
acinclude.m4 first commit
aclocal.m4 first commit
adivtab.h first commit
anorm_dots.h first commit
anorms.h first commit
app.yaml Attempt at using local file storage API to save/load games. This is v…
asm_draw.h first commit
asm_i386.h first commit
block16.h first commit
block8.h first commit
bspfile.h first commit
cd_audio.c first commit
cd_linux.c first commit
cd_nacl.c first commit
cd_null.c first commit
cd_sdl.c first commit
cd_win.c first commit
cdaudio.h first commit
chase.c first commit
cl_demo.c first commit
cl_input.c first commit
cl_main.c Make caching not really cache in order to avoid rare timing-related s…
cl_parse.c first commit
cl_tent.c first commit
clean.bat first commit
client.h first commit
cmd.c first commit
cmd.h first commit
common.c first commit
common.h first commit
common.mk first commit
config.guess first commit
config.sub first commit
configure first commit
configure.in first commit
conproc.c first commit
conproc.h first commit
console.c first commit
console.h first commit
crc.c first commit
crc.h first commit
cvar.c first commit
cvar.h first commit
cwsdpmi.exe first commit
d_copy.S first commit
d_draw.S first commit
d_draw16.S first commit
d_edge.c first commit
d_fill.c first commit
d_iface.h first commit
d_ifacea.h first commit
d_init.c first commit
d_local.h first commit
d_modech.c first commit
d_part.c first commit
d_parta.S first commit
d_polysa.S first commit
d_polyse.c first commit
d_scan.c first commit
d_scana.S first commit
d_sky.c first commit
d_spr8.S first commit
d_sprite.c first commit
d_surf.c first commit
d_vars.c first commit
d_varsa.S first commit
d_zpoint.c first commit
default.cfg first commit
dos_v2.c first commit
dosasm.S first commit
dosisms.h first commit
draw.c first commit
draw.h first commit
end1.bin first commit
file_handler.cc Work around FileIO::SetLength problem for now. Save games may get cor…
file_handler.h Attempt at using local file storage API to save/load games. This is v…
file_list.h Work around FileIO::SetLength problem for now. Save games may get cor…
geturl_handler.cc Make file stuff thread-safe with lazy loading.
geturl_handler.h Starting to polish things up. Progress bar, attempt at prefetching, etc.
gl_draw.c first commit
gl_mesh.c first commit
gl_model.c first commit
gl_model.h first commit
gl_refrag.c first commit
gl_rlight.c first commit
gl_rmain.c first commit
gl_rmisc.c first commit
gl_rsurf.c first commit
gl_screen.c first commit
gl_test.c first commit
gl_vidlinux.c first commit
gl_vidlinuxglx.c first commit
gl_vidnt.c first commit
gl_warp.c first commit
gl_warp_sin.h first commit
glqnotes.txt first commit
glquake.h first commit
glquake2.h first commit
host.c first commit
host_cmd.c a hack to print debug output for fprintf
httpd.py first commit
in_dos.c first commit
in_null.c first commit
in_sun.c first commit
in_win.c first commit
input.h first commit
install-sh first commit
keys.c first commit
keys.h first commit
makezip.bat first commit
math.S first commit
mathlib.c first commit
mathlib.h first commit
menu.c first commit
menu.h first commit
missing first commit
mkinstalldirs first commit
model.c first commit
model.h first commit
modelgen.h first commit
mpdosock.h first commit
mplib.c first commit
mplpc.c first commit
nacl_file.cc Attempt at using local file storage API to save/load games. This is v…
nacl_file.h Attempt at using local file storage API to save/load games. This is v…
net.h first commit
net_bsd.c first commit
net_bw.c first commit
net_bw.h first commit
net_comx.c first commit
net_dgrm.c first commit
net_dgrm.h first commit
net_dos.c first commit
net_ipx.c first commit
net_ipx.h first commit
net_loop.c first commit
net_loop.h first commit
net_main.c first commit
net_mp.c first commit
net_mp.h first commit
net_none.c first commit
net_ser.c first commit
net_ser.h first commit
net_udp.c first commit
net_udp.h first commit
net_vcr.c first commit
net_vcr.h first commit
net_win.c first commit
net_wins.c first commit
net_wins.h first commit
net_wipx.c first commit
net_wipx.h first commit
net_wso.c first commit
nonintel.c first commit
pr_cmds.c first commit
pr_comp.h first commit
pr_edict.c first commit
pr_exec.c first commit
progdefs.h first commit
progdefs.q1 first commit
progdefs.q2 first commit
progs.h first commit
protocol.h first commit
q.bat first commit
qa.bat first commit
qb.bat first commit
qe3.ico first commit
qt.bat first commit
quake-data.spec.sh first commit
quake-hipnotic.spec.sh first commit
quake-rogue.spec.sh first commit
quake-shareware.spec.sh first commit
quake.css Make file stuff thread-safe with lazy loading.
quake.gif first commit
quake.html Attempt at using local file storage API to save/load games. This is v…
quake.ico first commit
quake.nmf Update to NaCl SDK 0.5:
quake.rc first commit
quake.spec.sh first commit
quake_instance.cc Attempt at using local file storage API to save/load games. This is v…
quake_instance.h Attempt at using local file storage API to save/load games. This is v…
quake_module.cc first commit
quakeasm.h first commit
quakedef.h Make file writes work, so you can save games in memory. They go away …
r_aclip.c first commit
r_aclipa.S first commit
r_alias.c first commit
r_aliasa.S first commit
r_bsp.c first commit
r_draw.c first commit
r_drawa.S first commit
r_edge.c first commit
r_edgea.S first commit
r_efrag.c first commit
r_light.c first commit
r_local.h first commit
r_main.c first commit
r_misc.c first commit
r_part.c first commit
r_shared.h first commit
r_sky.c first commit
r_sprite.c first commit
r_surf.c first commit
r_vars.c first commit
r_varsa.S first commit
render.h first commit
resource.h first commit
sbar.c first commit
sbar.h first commit
screen.c first commit
screen.h first commit
server.h first commit
snd_dma.c Fix audio (oops, had dummied it up before)
snd_dos.c first commit
snd_dummy.c first commit
snd_gus.c first commit
snd_linux.c first commit
snd_mem.c first commit
snd_mix.c first commit
snd_mixa.S first commit
snd_next.c first commit
snd_null.c first commit
snd_sdl.c first commit
snd_sun.c first commit
snd_win.c first commit
sound.h first commit
spritegn.h first commit
stubs.c Update to NaCl SDK 0.5:
surf16.S first commit
surf8.S first commit
sv_main.c first commit
sv_move.c first commit
sv_phys.c first commit
sv_user.c first commit
sys.h first commit
sys_dos.c first commit
sys_dosa.S first commit
sys_linux.c first commit
sys_nacl.c Update to NaCl SDK 0.5:
sys_null.c first commit
sys_sdl.c first commit
sys_sun.c first commit
sys_win.c first commit
sys_wina.S first commit
sys_wind.c first commit
vgamodes.h first commit
vid.h first commit
vid_dos.c first commit
vid_dos.h first commit
vid_ext.c first commit
vid_null.c first commit
vid_sdl.c first commit
vid_sunx.c first commit
vid_sunxil.c first commit
vid_svgalib.c first commit
vid_vga.c first commit
vid_win.c first commit
vid_x.c first commit
view.c first commit
view.h first commit
vregset.c first commit
vregset.h first commit
wad.c first commit
wad.h first commit
winquake.aps first commit
winquake.h first commit
winquake.rc first commit
world.c first commit
world.h first commit
worlda.S first commit
wq.bat first commit
wqreadme.txt first commit
zone.c Make caching not really cache in order to avoid rare timing-related s…
zone.h Make caching not really cache in order to avoid rare timing-related s…

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.