C H A P T E R  19

Playing Games

Playing games in Ubuntu might be seen by some people as an awkward idea, and many more may think that you will be lucky if you find at most a Space Invaders-like game. It is not widely recognized as a mainstream gaming platform like PlayStation, Xbox or Wii, and it’s not as popular as Windows. But Ubuntu does, you might say, under-promise and over-deliver. You’ll be surprised by the sheer amount of possibilities that the casual gamer has at hand.

In this chapter we first examine what games Ubuntu has to offer by default and in its official repositories. Those are games developed specifically for Linux and that are at some level endorsed by Canonical, the company behind Ubuntu. There are also other sources of games for Ubuntu, not officially acknowledged, which can provide many hours of fun.

But the gaming world is changing rapidly, and many people find that web- and Adobe Flash-based games are all they need. And we’ll learn how to make those available under Ubuntu. Unleashing the power of Flash-based games will open you the door to an awesome source of free entertainment.

One cannot deny that Windows is a popular gaming platform, and that many games for Windows are available. So you might be in a position in which you want to switch to Ubuntu because you think it is a great OS, but are afraid that you will lose the possibility of playing with your favorite Windows games. What if we tell you that you can have your cake and eat it too? What if you can have the OS of choice (Ubuntu) and your games at the same time and computer? As you see in this chapter, such thing is possible.

So start warming up your thumbs, because at the end of this chapter there’ll be action!

Linux Games

As with any type of application, Ubuntu has a bunch of games installed by default and many other readily available at the Ubuntu Software Center. You will usually find games by selecting the Applications icon from the Unity Launcher. Next, select Games from the All Applications drop-down list.

Official Sources

The most basic game package is gnome-games, which is available at the Ubuntu Software Center. It includes 16 simple games, ranging from Chess to Mahjongg, and from Sudoku to Four-in-a-row. You can see the full list in Table 19-1; those are games designed to give you a rewarding break from work. In five minutes you can be relieved from your stress and go back to your tasks with your batteries renewed. But be careful, because those games are well known for their addictive power! They will certainly help you get through a lazy day. Who hasn’t spent hours at the office playing Minesweeper (Ubuntu’s version is called Mines)?

images Tip You will not find gnome-games if you look for it in the Games department in the Ubuntu Software Center. Being a metapackage, you’ll find it either in Get Software or in the Provided by Ubuntu folder.

images

images

There are plenty more games in the default repositories. Just open the Ubuntu Software Center and browse to the Games department, shown in Figure 19-1. There are close to 500 games to choose from!

images

Figure 19-1. Search through the Games department and you’ll find many jewels.

Some of the most popular Linux games find their home too in the Ubuntu repositories. Before ditching Ubuntu as a gaming platform, try out these games. You will be surprised!

  • Frozen Bubble: Frozen Bubble is a clone of the popular Puzzle Bobble game, in which you attempt to shoot bubbles into groups of the same color to cause them to pop. The game mainly consists of firing randomly chosen bubbles across the board. If the shoot ends up having a clump of at least three bubbles of the same color, they all pop. If some bubbles were stuck only on the popping clump, they fall. In one-player mode, the goal is to pop all the bubbles on the board as quickly as possible. In two-player or network mode, you have to get your opponent to “die” before you.
  • Pingus: Pingus is a free clone of the popular Lemmings game. Your goal is to guide a horde of penguins through a world full of obstacles and penguin traps to safety. Although penguins (unlike lemmings) are rather smart, they sometimes rely on you to save them.
  • Tremulous: Tremulous is a free, open source game that blends a team-based first-person shooter (FPS) game with elements of a real-time strategy (RTS) game. Players can choose from two unique races, aliens and humans. Players on both teams are able to build working structures in-game like an RTS game. These structures provide many functions, the most important being spawning. The designated builders must ensure there are spawn structures or other players will not be able to rejoin the game after death. Other structures provide automated base defense (to some degree), healing functions, and much more.
  • Alien Arena: Alien Arena is a standalone 3D first-person online deathmatch shooter crafted from the original source code of Quake II and Quake III, released by id Software under the GPL license.
  • Warzone 2100: Warzone 2100 is a 3D real-time strategy set on a future Earth.
  • Extreme Tux Racer: Racer is a racing game featuring Tux, the Linux mascot. The goal of the game is to slide down a snow- and ice-covered mountain as quickly as possible, avoiding the trees and rocks that will slow you down. Collect herrings and other goodies while sliding down the hill, but avoid fish bones.
  • SuperTux: Super Tux is a classic 2D jump and run sidescroller game in a style similar to the original Super Mario games. Super Tux features 9 enemies, 26 playable levels, software and OpenGL rendering modes, configurable joystick and keyboard input, new music, and completely redone graphics.
  • Frets on Fire: Frets on Fire is a game of musical skill and fast fingers. The aim of the game is to play guitar with the keyboard as accurately as possible.
  • FreeCiv: FreeCiv is a Civilizations-like game in which you are the leader of an entire civilization in the search of progress and world domination.
  • Pysol: Pysol is a collection of more than 1,000 solitaire games, ranging from Mahjong to Hanoi Puzzle.

Are your engines getting ready for gaming now? Would you have believed there were so many great games available for free, just clicks away? Well, buckle up, because this ride is just starting!

Additional Sources

Ubuntu being part of a community, it is only natural that the official source of games is not the only one. As explored in Chapter 20, you can add new, unofficial repositories to your list and download programs from them. Games are no exception. If you browse the web and the Ubuntu Forums you will find plenty of information about additional sources for installing games. In this section we examine one of those sources, so you become familiar with the idea.

The site we will be accessing is http://www.PlayDeb.net, shown in Figure 19-2.

images

Figure 19-2. PlayDeb.net is one of many sources of additional games.

You can click Games and browse the list of games available. But when you see one that you like and click “Install this now” and follow the instructions on screen, you might soon get an error message. Why?

In order to be able to install games from PlayDeb.net, you should add the repository to your software sources. Repositories, covered with greater detail in Chapter 20, are storage locations from which software packages can be downloaded and installed. Let’s follow the steps of adding PlayDeb.net as a source. This training will help you when adding any other source of Ubuntu games.

  1. Try to install a game from PlayDeb.net and verify if you get an error message.
  2. Open Ubuntu Software Center. Select Edit -> Software Sources from the menu.
  3. Open the Other Software tab and click Add… and in the apt line text box copy the following line :
  4. deb http://archive.getdeb.net/ubuntu natty-getdeb games
  5. Click Add Source. Don’t close the Software Sources dialog box.
  6. Open a web browser and copy the following line in the address bar:
    http://archive.getdeb.net/getdeb-archive.key
  7. You will be prompted to open or save the key file. It will be stored in your Downloads folder.
  8. Go back to the Software Sources dialog box and click the Authentication tab.
  9. Click Import Key File… and browse to your Downloads folder. Double-click the downloaded key.
  10. Click Close. You will be prompted to update the catalog on your computer. Accept.
  11. Try to install the game once again. You should be successful this time!

Although PlayDeb.net is just one of many additional sources of games for Ubuntu, this demo is useful because adding software sources is almost always the same two-step process: adding the repository in the Other Software tab, and importing the key in the Authentication tab.

The next time you open the Ubuntu Software Center after reloading the catalog, you should see under Get Software a new entry, GetDeb, along with Provided by Ubuntu and Canonical Partners. If you select GetDeb, the list of available games will be displayed in the main pane. To install a new game, just select it and click Install, as you would for any application.

Congratulations ! You now have access to more than 200 additional games!

Adobe Flash and Web-based Gaming

Many things have been said about the cloud and cloud-based applications—especially about how you will no longer need to install applications locally on your hard drive to use it, because they will always be available online.

In no area is this trend is more obvious and mainstream than in the world of gaming. And when you talk of online gaming, you more often than not come to rely on Adobe Flash. Flash is an animation file format pioneered by Macromedia which continues to be supported by its successor company, Adobe. Flash has been extended to include audio and video content, and programs written in many scripting languages. Despite the advance of other web gaming technologies and of the recent Steve Jobs’ attack on Flash, more and more games based on this technology are created each day and made available online entirely for free. Search for “free flash game” in Google or Yahoo, and a seemingly interminable list of sites will be displayed. It’s hard to avoid them if you like to play.

But when you try to open those games after installing Ubuntu, you find that Firefox tells you that “Additional plug-ins are required to display all the media on this page,” and where the game should be, a broken link is all you get. Many people have thought that that was all for Linux, that they could never be able to play Flash games in Ubuntu. This isn’t so.

Being an open Operating System, it’s not strange that there are many ways to extend the capabilities of Ubuntu and open Flash applications. The most common are listed in Table 19-2.

images

If you intend to play online games, we recommend you install Adobe Flash Player. It is available at the Canonical Partners section of the Ubuntu Software Center. Follow these instructions to install the Flash Player:

  1. From the application dash, select Ubuntu Software Center
  2. Expand Get Software in the navigation pane and select the Canonical Partners folder.
  3. The application Adobe Flash Plugin 10 should be at the top of the list. Click Install.
  4. When it finishes, close the Ubuntu Software Center and open Firefox.
  5. Go to your favorite Flash gaming site. Now you shouldn’t have any problem.

images Tip You might find Java-based games at some web sites. Although Java’s use is less mainstream nowadays than Flash for these kinds of applications, Java is a very popular technology. To play online Java games, make sure you install the application sun-java6-plugin in the Ubuntu Software Center.

Installing Windows Games

One of the reasons you might be reluctant to make the switch to Ubuntu is you have made a large investment in Windows games and don’t want to throw all that money away, even when finding Ubuntu the superior OS.

This is a very understandable concern, but there is a workaround. Follow us.

Welcome to PlayOnLinux. In Chapter 20 we talk about Wine, a utility that allows you to run Windows applications under Linux. We also point out in that chapter that sometimes those applications are not so easy to install and configure. Many present a bunch of problems requiring expert knowledge and hours of investigation. They may work in the end, but the process can be lengthy and tedious. It’s not very encouraging when you only want to play a game.

PlayOnLinux is a frontend for Wine, specialized in making games work out-of-the-box. It takes away from the user the task of preparing the system for a certain application. It is a community-based solution in which different users upload configuration scripts for games to the repositories. When you need to install a game that someone else has installed before, the script is executed and the game is seamlessly installed.

It is worth noting that to install Windows games you will likely need the original CD or DVD and the license key. It is a drag sometimes, but that’s how Windows games work. Having a community tool for installing games doesn’t make games themselves sharable. Original licensing restrictions still applies.

You can install PlayOnLinux from the official repositories. Just look for it in the Ubuntu Software Center and click Install. Once installed, you can start it from the Unity Launcher.

The first time you launch PlayOnLinux it will try to download the game’s catalog from the Internet, which can take a few minutes. If a game you’re trying to install is not in the catalog, you can try updating it by clicking File images Refresh the repository.

Before you install any application, the main window of PlayOnLinux will be rather empty, as you can see in Figure 19-3. There’s where installed games are listed after you install them.

images

Figure 19-3. PlayOnLinux main window is empty until you install a game.

To install a game, click Install and select the Games category. You’ll see the list of compatible games, as shown in Figure 19-4.

images

Figure 19-4. The list of PlayOnLinux compatible games

Select the game you want to install and click Apply. The script for that game will begin to run, asking you for the installation media and keys if they apply. At some point the installation wizard for the application starts, the same wizard you can see in Windows. When it finishes, the game is installed.

You will see the game in the PlayOnLinux main window. Just click Run and enjoy!

images Tip As you can see in the Install dialog box, PlayOnLinux can install other types of applications in addition to games. What PlayOnLinux does is to run a script when installing the application. However, games are the main feature of PlayOnLinux.

Summary

In this chapter we opened you the door for a world of games and entertainment. Although many people consider Linux to be a platform for playing with the command-line, this chapter has shown that this is not true. You can find a lot of free games in the official repositories, and many more in the community pages.

You can also play mainstream Flash- and Java-based games online.

And if this is not enough, and you miss your Windows games, PlayOnLinux makes it easy to install them in your Ubuntu box, so you can have the OS of choice without losing your investment in games.

If all these methods fail to satisfy your gaming hunger, maybe it’s time to think about buying a console!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.152.194