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

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