Categories
Community

Gaming On Linux: All You Need To Know

“`

This blog is originally published on it’s  FOSS by Abhishek Prakash

“`

Can I play games on Linux? What are the games available for Linux? Where to find Linux games? This comprehensive article answers all your questions on Linux gaming.

Can I play games on Linux?

This is one of the most frequently asked questions by users who are thinking about switching to Linux. After all, gaming on Linux is often termed as a distant possibility. At least, by some hardcore gamers using another platform to play games.

In fact, some people even wonder if they can listen to music or watch movies on Linux. Considering that, the question about playing games on Linux seem genuine.

In this article, I am going to answer most of the Linux gaming questions that a beginner may have. Some of the potential questions that I’m going to address here are:

  • Is it possible to play games on Linux?
  • What are the Linux games available?
  • Where can you download Linux games?
  • How do you get more information about gaming on Linux?

But before I do that, let me make a confession. I am not a PC gamer or rather I should say, I am not a desktop Linux gamer. I prefer to play games on my PS4 and I haven’t dived into the PC games available or even mobile games (no candy crush request sent to anyone in my friend list). This is the reason you only see a few articles in the Linux games section of It’s FOSS.

So why am I covering this topic then?

Because I have been asked questions about playing games on Linux several times and I wanted to come up with a Linux gaming guide that could answer all those questions. And remember, it’s not just gaming on Ubuntu I am talking about here. I am talking about Linux in general.

linux

Can you play games on Linux?

Yes and no!

Yes, you can play games on Linux and no, you cannot play ‘all the games’ in Linux.

Confused? Don’t be. What I meant here is that you can get plenty of popular games on Linux such as Counter Strike, Shadow Of Mordor , etc.

However, you should not expect a native Linux support for the latest and greatest games – which are typically available for Windows.

The reason, in my opinion, is that Linux has less than 2% of desktop market share and the numbers are demotivating enough for most game developers to avoid working on the Linux version of their games.

Not just limited to the userbase, but not all games work perfectly on Linux. But, there are workarounds (ways) to play a huge list of games and I’ll be mentioning how to do that.

If I have to categorize, I’ll divide the games on Linux into four categories:

  1. Native Linux Games (games officially available for Linux)
  2. Windows games in Linux (Windows games played in Linux with Wine or other software)
  3. Browser Games (games that you can play online using your web browse)
  4. Terminal Games (games you can play in the Linux terminal)

Let’s start with the most important one, native Linux games, first.

1. Where to find native Linux games?

Native Linux games refer to those games which are officially supported on Linux. You just have to download it and hit it to play it without any potential troubleshooting.

Of course, there are a lot of games that officially support Linux – but where do you find them?

Hence, I will list some of the resources that you can utilize to download Linux games.

Steam

steam

Steam is a very popular digital video game store that offers incredible deals on games for Linux (including free games as well). So, it is an obvious source of PC games.

You can explore it to find tons of games ranging from AAA titles to Indie games.

Usually, you can easily find Steam listed in your app center or package manager. But, if you have no clue how to install and use it, refer to my guide below on installing and using Steam on Ubuntu Linux to get an idea.

Install Steam

GOG.com

cyberpunk

GOG.com is yet another platform similar to Steam. Like Steam, you can browse and find hundreds of native Linux games on GOG.com, purchase the games and install them. If the games support several platforms, you can download and use them across various operating systems. Your purchased games are available for you all the time in your account. You can download them anytime you wish.

One main difference between the two is that GOG.com offers only DRM free games. Also, GOG.com is entirely web-based. Unlike Steam, you don’t get a native desktop client on Linux for GOG.com.

GOG.com

Portable Linux Games

portable linux games

Portable Linux Games is a website that offers a good collection of Linux games for 32-bit systems. You can’t run the games on a purely 64-bit system by default – however, you can try following a troubleshooting guide to make it happen.

The downloaded files have all the dependencies (at times Wine and Perl installation) and these are also platform-independent. All you need to do is to download the files and double click to install them.

It’s a great source for gamers who aren’t into the games made by big studios but just want to have a good time playing some games on Linux.

Portable Linux Games

Itch.io

itch.io

Looking for native Linux Indie games? if that’s the case, Itch.io is a fantastic source to find interesting games.

You can find a lot of Indie games for free and can also opt to choose a paid game.

Interestingly, you do not need to create an account to download free games. You can simply head to its page and download the file meant for Linux.

Itch.io

Software Repositories

You can also look into the software repositories of your own Linux distribution. There will always be some games on it.

If you are using Ubuntu, the Software Center itself has an entire section for games. The same is true for other Linux distributions such as Linux Mint etc.

2. How to play Windows games on Linux?

How to play Windows games on Linux?

There’s a bunch of native Linux games out there. However, most of the popular games available aren’t available on Linux directly. In other words, the latest and greatest games do not support Linux (for the most) and are available for Windows only.

In that case, do we have a workaround to play those games on Linux? Yes, we do!

With the help of tools like Wine, Phoenicis (formerly known as PlayOnLinux), Lutris, CrossOver, and GameHub, you can play a number of popular Windows games on Linux.

Steam Play

steam

If you’re fond of using Steam as your only source of games on Linux, you can easily try the Windows-only games using Steam Play.

Steam utilizes a compatibility layer to directly run a Windows-specific game on Linux. We do have a detailed guide on using Steam Play on Linux – I’d recommend you to explore that to get started with it.

Wine

Wine is a compatibility layer that is capable of running Windows applications in systems like Linux, BSD and OS X. With the help of Wine, you can install and use a number of Windows applications in Linux.
Installing Wine in Ubuntu or any other Linux is easy as it is available in most Linux distributions’ repository. There is a huge database of applications and games supported by Wine that you can browse.

CrossOver

CrossOver is an improved version of Wine that brings professional and technical support to Wine. But unlike Wine, CrossOver is not free. You’ll have to purchase the yearly license for it.

The good thing about CrossOver is that every purchase contributes to Wine developers and that in fact boosts the development of Wine to support more Windows games and applications. If you can afford about $20 a year, you should buy CrossOver for the support they provide.

GameHub

gamehub

We already have a separate article on how to use GameHub on Linux.

But, to give you a heads up, GameHub lets you manage and play games from multiple sources that include Steam, GOG, and Humble Bundle.

Lutris Gaming

Lutris is something similar to GameHub but supports a wide range of sources that include Origin, Uplay, Epic Games Launcher, and several others.

It makes it easy for you to play Windows-only games on Linux. And, it is a quite popular tool used by many users. You can also check the official list of games it potentially supports before trying it out.

Phoenicis PlayOnLinux

Phoenicis PlayOnLinux

PlayOnLinux too is based on Wine but implemented differently. It has a different interface and slightly easier to use than Wine. Like Wine, PlayOnLinux too is free to use.

It may not be the best choice among the others mentioned but you can browse the applications and games supported by PlayOnLinux on its database to decide for yourself.

3. Browser Games

Browser Games

Needless to say that there are tons of browser-based games that are available to play in any operating system, be it Windows or Linux or Mac OS X. Most of the addictive mobile games, such as GoodGame Empire, also have their web browser counterparts.

Apart from that, thanks to Google Chrome Web Store, you can play some more games in Linux. These Chrome games are installed like a standalone app and they can be accessed from the application menu of your Linux OS. Some of these Chrome games are playable offline as well.

4. Terminal Games

Terminal Games

The added advantage of using Linux is that you can use the command line terminal to play games as well.

I know that it’s not the best way to play games but at times, it’s fun to play games like Snake or 2048 in the terminal.

To help you out, we have two separate lists of top command-line games and best ASCII games which are pretty easy to install.

How to stay updated about Linux games?

Now that you know where to find the games and how to use them on Linux, the next question is – how to stay updated about new games on Linux?

Of course, we will try to cover major game releases for Linux – however, we at It’s FOSS aren’t completely focused on gaming (as of yet).

And for that, I advise you to follow these blogs that provide you with the latest happenings of the Linux gaming world:

  • Gaming on Linux: I won’t be wrong if I call it the best Linux gaming news portal. You get all the latest rumblings and news about Linux games. Frequently updated, Gaming on Linux has dedicated fan following which makes it a nice community of Linux game lovers.
  • Free Gamer: A blog focusing on free and open source games.

In fact, here are more websites Linux gamers should follow : https://itsfoss.com/best-linux-gaming-websites/

Wrapping Up

I think that’s pretty much what you need to know to get started with gaming on Linux. There are plenty of free Linux games that you can try at the moment.

There’s also a very useful migration guide by the subreddit r/linux_gaming that can help you kickstart your gaming journey on Linux.

It’s time for you to add your input. Do you play games on your Linux desktop? What are your favorites? What blogs do you follow to stay updated on the latest Linux games? Feel free to share your thoughts in the comments below.

Categories
Platforms

Using Bash in Windows – today

bash_windows
using bash in windows today

“… However, when we talked with web developers, they still struggled with using Windows as their primary devbox.”

The above quote is from Kevin Gallo, the VP of Windows Dev platform, and was delivered around mark 0:38 of his presentation in Microsoft’s Build 2016 keynote. He then continued with the observation that “… many of them have workflows which rely on open source command line tools, scripts and frameworks”, and finished with a slide that his audience was – at first – slightly unsure on how excited to get about: Bash is coming to Windows.

Screenshot #1: Kevin Gallo’s slide from Build 2016 announcing Bash coming to Windows
Screenshot #1: Kevin Gallo’s slide from Build 2016 announcing Bash coming to Windows

If you let the video play for another 7 seconds, you’ll also catch a glimpse of Gallo’s audience. You can see the emotions depicted on their faces form a picture that explains perfectly the complex (and sometimes tumultuous) relationship of Microsoft with Linux and the Open Source world. Three persons are smiling excitedly and beginning to slow clap (the ones that suddenly realise how much easier managing their OS stack or scripting their Windows environment will become). You then have the classic cautious indifference of the majority of developers that wait to see whether this is “worth getting excited about”. Finally, you can also detect some unguarded annoyance from the fanboy crowd (“Seriously? I have to sit and hear about Bash? What’s wrong with PowerShell?”).

Personally, I belong to the first group. Despite working with open source technologies since the beginning of my professional career back in 2003, I’ve never managed to move away from Windows. To this effect, when I saw Rich Turner and Russ Alexander casually doing a apt-get install git on Windows to install git, I was excited. A lot.

But until the functionality showcased in the video above is mature and stable enough to be rolled out, I’ll continue using my current workflow which has served me faithfully since 2011: And that is bash on Windows (To be precise: A more “cut down” version of Bash. Read on for details).

The challenge: Production-strength command line workflow in Windows.

One might argue that Windows was never meant to be “driven” from the command line.

Microsoft tried to mitigate this back in 2006 by rolling out PowerShell, a shell and scripting language that gives users full access to their whole Windows environment. For Windows devs this was a great extra tool but for all other developers it was still not enough to lure them away from the power and versatility they found on the Linux command line.

Add to this the strongly opinionated naming conventions and approaches that PowerShell inherited from the .NET Framework (did you know that cd is but an alias to the “proper” command which is Get-ChildItem? That’s camelcase _and_ a dash that autocompletes with tab even if you type it in lowercase. Strange stuff) and you can see why it’s really hard for e.g. a PHP developer to consider it for his dev workflow.

When every single blogpost or article or tutorial written about a subject, e.g. “how to rebase branches in git”, includes instructions and screenshots that clearly demonstrate the flow in a Linux shell, it’s only natural for the developer to assume that this is the correct way of doing things.

Towards a solution: Install Git for Windows

For my frontend-with-a-bit-of-PHP-but-from-a-Windows-OS workflow I always relied on certain “battle proven” tools. WinSCP was the weapon of choice when files needed to be moved from one place to another (either via FTP, SFTP, SCP or even rSync). Putty allowed me to connect via SSH to all my dev boxes. TortoiseGIt ensured that I could use git directly from my Windows explorer interface.

The first “lightbulb / aha” moment for me occurred when I installed Git for Windows after being prompted to “try it out on the command line” by a colleague.
One of the steps of the install wizard prompts you to choose “How would you like to use Git from the command line?”:

Screenshot #2: Choosing how to use Git for Windows
Screenshot #2: Choosing how to use Git for Windows

… and it mentioned “Bash”!

Installation completes and suddenly I get a shell in Windows that looks suspiciously similar to what I’m used to in Linux or iOS installations:

Screenshot #3: MinTTY terminal emulator window
Screenshot #3: MinTTY terminal emulator window

Bash in Windows: How it works

Kudos? To the awesome devs that worked to bring Git to windows – https://git-for-windows.github.io/.
In essence the installer sets up a unix-like shell environment (MinGW – “Minimalist GNU for Windows”) which – very roughly speaking – creates the needed Unix layer that shells like Bash can run onto.
A terminal emulator called MinTTY is also installed (shown in screenshot #3 above) which is a Windows program that runs the Bash shell which in turn enables you to use quite a good subset of the Linux commands needed for an open source dev workflow.

Looks are important

… especially if you are an ex-designer-turned-frontend-developer. Going from the black and white severity of cmd.exe (where you could not even resize the window to the dimensions you wanted) to MinTTY definitely boosted my “developer happiness” feeling:

Screenshot #4: MinTTY terminal emulator window
Screenshot #4: MinTTY terminal emulator window

In the above example, I manually mapped the colours from the famous Solarized colour theme to the default 16 ANSI colours. For the font I chose the crystal clear Consolas font set at 12 point, although I’ve recently been experimenting with Adobe’s Source Code Pro as an alternative.

The MinTTY window can be resized to any dimension of your choosing. You can also use the same shortcuts as you use in the browser to resize the text on the fly (CTRL+plus, CTRL+minus or CTRL+mouse wheel). Finally you can launch as many instances of MinTTY as you want, enabling you to lay out a series of windows into your codebase and file structure, exactly as it suits you:

Bash in Windows Screenshot #5: Multiple instances running at the same time at different dimensions and font-size
Screenshot #5: Multiple instances running at the same time at different dimensions and font-size

I can now do {{thing}} from the command line

The list below demonstrates just a small subset of the stuff you can do with Bash in Windows that I found particularly useful and / or helpful.

  • Git
    No more “download and unzip”. Git clone any repo of your choosing in any directory in your filesystem. The handy “GIT Bash here…” shortcut that appears when you right click any folder is particularly useful here.
  • Linux command line
    MinGW supports a subset of the various commands and programs available in Linux, things like awk, sed, grep, find are all here, ready to be used. Shortcuts are also available (CTRL+U, CTRL+K for inline editing, CTRL+R to lookup on Bash history etc) as well as piping and redirection.
  • SSH
    OpenSSH works right out of the box. Set up your keys by using ssh-keygen (exactly the same way you would do in a Linux box) and then connect to any of your machines. You can also setup an ssh-agent (exactly the way Beanstalk or Github or Bitbucket explain in their online tutorials) to ensure you don’t retype your password all the time. Of course ftp and scp are available as well.
  • Vim
    No more notepad++ for me. After I went through the steep-as-mount-Everest learning curve I found out that vim was the best tool for quick text edits (I’ve strongly resisted the urge to play with emacs. We’ll see).
  • Bash scripting
    The very first bash script I experimented with (and use constantly nowadays) is z: https://github.com/rupa/z. I no longer rely on lengthy cd statements such as:
    cd /some_directory/nesting/nested/my_work
    But rather do a:
    z my_work
    … and I’m immediately taken to the directory I want.

“You should really switch to {{enter Linux distro name here}}”

Indeed. But even if I do so, there is still a vast number of devs out there who still need / have to work with Windows. One year ago, Isaac Schlueter (co-founder and CEO of the Node Package Manager – NPM) had this to say:

Bash in Windows: this matters
If you want devs using your code, this matters

Until WSL is out … Bash in Windows

The soon-to-be-released Windows Subsystem for Linux is a brilliant (and much-needed) step forward in making the Windows environment a first-class citizen for open source development workflows.Nevertheless, there is no need to wait for Microsoft to make WSL available to everyone.

I’ve been using Bash in Windows – in my daily workflow – for the last 5 years and it’s working like a charm.
If you want to do the same, simply install Git for Windows.