Google Web Toolkit team used Jake2, Google Web Toolkit, WebGL and WebSocket to run Quake 2 on web browsers. The project has comprehensive instructions on how you can get started, but I found out that some instructions are missing so it was not possible to build and play Quake 2 immediately.
I hope this post will help you to clear obstacles and start playing Quake 2 on a web browser.
This post assumes that you are running Mac OS X (10.6.x). It might also work on older Mac OS X, but I do not have any way to verify this.
Prerequisite
- Xcode
- MacPorts
You need the following tools to get started. Your should already have Xcode on the Mac OS X installation DVD. If you cannot find it, you can also download it from Apple.
You can download MacPorts from MacPorts‘ web page. Be sure to download the correct version if you install from a disk image.
After installing Xcode and MacPorts, follow the rest of the instructions.
Rest of the Instructions
Launch Terminal and install mercurial, vorbis-tools and lame.
port install mercurial
port install vorbis-tools
port install lame
Clone the quake2-gwt-port repository
hg clone https://quake2-gwt-port.googlecode.com/hg/ quake2-gwt-port
Go to quake2-gwt-port directory.
cd quake2-gwt-port
You need to specify an additional parameter for maven. Otherwise, you may run out of memory during the build process.
export MAVEN_OPTS=-Xmx512m
Run build-dedicated-server.
./build-dedicated-server
Run install-resources.
./install-resources
According to Google, there is an issue with maven build files, so you need to copy some files into war directory. If you do not do this, the browser may display a blank (black) window when you connect to the server.
cp -r maven-build/server/target/gwtquake/r/gwtquake war
Start the server.
./run-dedicated-server
You need the latest nightly build of WebKit. Go to WebKit and download the latest nightly build.
Enable WebGL.
defaults write com.apple.Safari WebKitWebGLEnabled -bool YES
Launch WebKit. Navigate to your server: http://localhost:8080/GwtQuake.html
Have a blast!

Comments on this entry are closed.