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.
- Ensure XMING is running on the Windows host OS
- Ensure Quake is installed on the Windows host OS from either of the sources listed under “Ingredients”
- Run: wget aka.ms/quakeinstaller.sh
- Run: chmod 755 quakeinstaller.sh
- Run: sudo ./quakeinstaller.sh
- Run: export DISPLAY=localhost:0.0
- Run: cd ./tyrquake-0.61
- Run: quake –engine ./tyr-quake -mem 16
10. HUNT SOME DEMONS!
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.
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.