Getting Quake II Working in WebKit Mac

April 2, 2010

Google has released some code that runs the Quake II demo in a browser with no plugins, using HTML5 and WebGL. You can run it in a WebKit nightly build, but I found that it takes a few more steps than in their instructions. Here’s what I did:

  1. Install MacPorts and then run sudo port install vorbis-tools and sudo port install lame
  2. Install Mercurial version control client
  3. Check out the code by running hg clone https://quake2-gwt-port.googlecode.com/hg/ quake2-gwt-port
  4. Change into the project directory (cd quake2-gwt-port)
  5. ./build-dedicated-server (will build the tools and the client and server code).
  6. ./install-resources (will download, unpack, and convert the original Quake II demo resources). Due to a glitch in our maven build files, you currently also need cp -r maven-build/server/target/gwtquake/war/gwtquake war. We are fixing this.
  7. ./run-dedicated-server [port] (will run the local Quake II server).
  8. Install the latest WebKit nightly build: http://nightly.webkit.org/
  9. To enable WebGL, type this into a terminal: defaults write com.apple.Safari WebKitWebGLEnabled -bool YES
  10. Run WebKit and navigate to http://localhost:8080/GwtQuake.html (or whatever port you specified to the server). You should see a console.
  11. The menus were a bit messed up for me, but you have to hit enter a few times. Then you’ll see a number of files being requested, and then the game will start.

It took a while for the textures to load for me, but then again my MacBook is from ’06 =] If you have any problems, I can’t help you, so check the comments on these pages:


Motivation

July 23, 2008

Found in a Google Ad: “Learn to dance for your wedding! Swing, Salsa, Ballroom & more”

Google Ads: smart enough to know I want dance lessons, not smart enough to know I’m single ;-)


Follow

Get every new post delivered to your Inbox.

Join 525 other followers