WinCoder Blog

How to run Quake in Bash on Ubuntu on Windows

In my previous posts we walked through installing and configuring Bash on Ubuntu on Windows as an integrated terminal in Visual Studio Code.  Next, we looked at setting up an X11 server using XMING to display X11 graphical applications from BoUoW.  Today we are going to build on those concepts to see if we can run one of the godfathers of the first-person shooter genre, Quake, within BoUoW.

This particular experiment is interesting as we will be using X11 alongside OpenGL to compile a non-trivial graphical application on top of WSL.  There are some caveats, as sound does not currently work and there may be other bugs.  That said, the game is actually playable and a testament to the effort and potential baked into BoUoW.

Ingredients:

  1. XMING X11 Server
  2. Install of Quake for Windows – Shareware or Full Game
  3. This script

Instructions:

  1. Ensure XMING is running on the Windows host OS
  2. Ensure Quake is installed on the Windows host OS from either of the sources listed under “Ingredients”
  3. Run: wget aka.ms/quakeinstaller.sh
  4. Run: chmod 755 quakeinstaller.sh
  5. Run: sudo ./quakeinstaller.sh
  6. Wait…
  7. Run: export DISPLAY=localhost:0.0
  8. Run: cd ./tyrquake-0.61
  9. Run: quake –engine ./tyr-quake -mem 16

10. HUNT SOME DEMONS!

Quake on Bash on Ubuntu on Windows

 

Putting it all together:

The XMING X11 Server gives us a display to visualize the game.  We use the Windows install of Quake because the game data contained in the included .pak files s not freely distributable.  These files give us access to the required assets for the game itself.  The script installs the prerequisites necessary to build the TyrQuake engine which allows us to render the game.

Conclusion:

I am continually amazed at the potential for BoUoW as it becomes more mature in each Windows Insider Preview Release.  It feels both surreal and awesome to be able to launch an OpenGL based game running entirely in the Windows Subsystem for Linux user space.   While this demonstration may seem trivial, consider that we successfully compiled a game engine in C, intended for a completely different operating system, and it more or less works.  While full parity is still a ways off, I am hopeful that with successive iterations of BoUoW, Windows 10 will become a one stop OS for many developer scenarios previously considered out of reach or impossible.

Happy Hacking!

 

 

 


Leave a Reply

Your email address will not be published. Required fields are marked *