I217;m a big fan of the Windows Subsystem for Linux. It217;s real Linux that runs real user-mode ELF binaries but it217;s all on Windows 10. It217;s not running in a Virtual Machine. I talk about it and some of the things you should be aware of when sharing files between files systems in this YouTube video.
WHAT IS ALL THIS LINUX ON WINDOWS STUFF? Here’s a FAQ on the Bash/Windows Subsystem for Linux/Ubuntu on Windows/Snowball in Hell and some detailed Release Notes. Yes, it’s real, and it’s spectacular. Can’t read that much text? Here’s a video I did on Ubuntu on Windows 10.
You can now install not only Ubuntu from the Windows Store (make sure you run this first from a Windows PowerShell admin prompt) – “Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux“
I have set up a very shiny Linux environment on Windows 10 with lovely things like tmux and Midnight Commander. The bash/Ubuntu/WSL shell shares the same “console host” (conhost) as PowerShell and CMD.exe, so as the type adds new support for fonts, colors, ANSI, etc, every terminal gets that new feature.
I wanted to see how far this went. How Linuxy is Linux on Windows? How good is the ANSI/ASCII support in the console on Windows 10? Clearly the only real way to check this out would be to try to build 0verkill. 0verkill is a client-server 2D deathmatch-like game in ASCII art. It has both client and server and lots of cool features. Plus building it would exercise the system pretty well. It’s also nearly 20 years old which is fun.
PRO TIP: Did you know that you can easily change your command prompt colors globally with the new free open source ColorTool? You can easily switch to solarized or even color-blind schemes for deuteranopia.
There’s a fork of the 0verkill code at https://github.com/hackndev/0verkill so I started there. I saw that there was a ./rebuild script that uses aclocal, autoconf, configure, and make, so I needed to apt in some stuff.
sudo apt-get install build-essential autotools-dev automake sudo apt-get install libx11-dev sudo apt-get install libxpm-dev
Then I built it with ./rebuild and got a TON of warnings. Looks like this rather old code does some (now, in the modern world) questionable things with fprintf. While I can ignore the warnings, I decided to add -Wno-format-security to the CFLAGS in Makefile.in in order to focus on any larger errors I might run into.
I then rebuild again, and get a few warnings, but nothing major. Nice.
I run the server locally with ./server. This allows you to connect multiple clients, although I’ll just be connecting locally, it’s nice that the networking works.
$ ./server 11. 1.2018 14:01:42 Running 0verkill server version 0.16 11. 1.2018 14:01:42 Initialization. 11. 1.2018 14:01:42 Loading sprites. 11. 1.2018 14:01:42 Loading level "level1".... 11. 1.2018 14:01:42 Loading level graphics. 11. 1.2018 14:01:42 Loading level map. 11. 1.2018 14:01:42 Loading level objects. 11. 1.2018 14:01:42 Initializing socket. 11. 1.2018 14:01:42 Installing signal handlers. 11. 1.2018 14:01:42 Game started. 11. 1.2018 14:01:42 Sleep
Next, run the client in another bash/Ubuntu console window (or a tmux pane) with ./0verkill.
Awesome. Works great, scales with the window size, ASCII and color looks great.
Now I just need to find someone to play with me…
Sponsor: Get the latest JetBrains Rider for debugging third-party .NET code, Smart Step Into, more debugger improvements, C# Interactive, new project wizard, and formatting code in columns.