quake 3 bsp renderer in c89 and opengl 1.x
dependencies: libGL, libGLU, SDL2
should be compatible at least with x86/x86_64 windows, linux, freebsd with gcc, clang, msvc
I might or might not add more features in the future, for now I have:
- rendering meshes and patches
- vertex lighting
- collision detection with brushes (no patches aka curved surfaces yet)
- cpm-like physics
- sliding against bushes (no patches though)
the current priority is getting patches collisions and implement steps so we can actually walk up stairs
just run ./build
. it's aware of CC
, CFLAGS
,
LDFLAGS
in case you need to override anything
windows build script is TODO
unzip the .pk3 files from your copy of quake 3. some of these will contain .bsp files for the maps. you can run q3playground on them like so:
q3playground /path/to/map.bsp
on *nix you might want to disable vsync by running it like
env vblank_mode=0 q3playground /path/to/map.bsp
controls are WASD, space, mouse, right click. toggle noclip with F
run q3playground
with no arguments for more info
this is free and unencumbered software released into the public domain. refer to the attached UNLICENSE or http://unlicense.org/
- unofficial bsp format spec: http://www.mralligator.com/q3/
- tessellation implementation: http://graphics.cs.brown.edu/games/quake/quake3.html
- collision detection: https://web.archive.org/web/20041206085743/http://www.nathanostgard.com:80/tutorials/quake3/collision/