Linux

All posts tagged Linux

This past week, I came across the Flixel enginefor Flash game development. I have been looking for something to kelp me speed up development on our game and this looked to be the most promising of the engines I had found.

However, according to the download page, they did not have a IDE based solution to getting Flixel to work in my set up of Ubuntu Linux, Eclipse Helios and AXDT. So I decided to take a stab at getting it up and running myself.

The solution turned out to be easier than I thought it would be, but I need to start from the beginning.

First I am running Ubuntu 11.04 64bit. This version of Linux only has Eclipse 3.5 Galileo in its repositories. So I had to download 3.6 myself. Now when you download Eclipse 3.6, (as of this article, Eclipse is on 3.7. I have not tested this with 3.7 so take caution if you go that route. 3.6 should still be available.) make sure you do not get the Classic version because it doesn’t have the Eclipse Marketplace. Without that, you can’t get AXDT.

Once you download and install Eclipse, follow the installation instructions on the AXDT website to install it. Very simple.

You can actually start programming flash games now. However, we aren’t done yet.

Ubuntu 11.04 now has Firefox version 4 in its repositories and for some reason this conflicts with the built in browser in Eclipse. Because of this conflict, compiling a SWF with AXDT causes a file browser window to open in the hopes of loading the SWF in an external browser. To get the internal browser working, follow the steps on Harold Wellmann’s blog. That will get the internal Eclipse browser working.

Interestingly enough, we still aren’t done yet.

In order to get Flixel to properly work with AXDT, we need to manually update the flex-config.xml file in the AXDT plugin. There is a setting in that file called “static-link-runtime-shared-libraries” That is set to false by default. Wit hthe default setting you get the following error when trying to run a Flixel based SWF:

An ActionScript error has occurred:
VerifyError: Error #1014: Class mx.core::SpriteAsset could not be found.

at flash.display::MovieClip/nextFrame()
at org.flixel.system::FlxPreloader/onEnterFrame()

My flex-config.xml file was located in the following place. Yours should be in a similar place.

/home/myname/eclipse/plugins/org.axdt.flex4.sdk_4.0.0.14159_mpl/flexsdk/frameworks/flex-config.xml

So set that to true. What this does is let AXDT properly Embed bitmap images. Why that is turned off by default, I don’t know.

Now we can start working. Go ahead and download the latest master version of Flixel. Once you have that, we can get started.

Open Eclipse. Select File->New->Project. Select AXDT Project from the prompt and click Next. Give your project a name and click Finish. You will now have a new project in your Explorer window. This project will have a “src” folder with an “Application.as” file. You can delete that as you don’t need it.

Now take the org folder from the downloaded Flixel folder and put it in the “src” folder. Follow the instructions for the Hello World! Example on the Flash Game Dojo site. Just ignore all the MXMLC stuff. You only need the source code.

Compile and run. Hopefully, it should work.

Now, I also went a step further and downloaded the Flash Projector Content Debugger. This will help you debug your games as AXDT debugging doesn’t work as well as I would like.

So there you have it. All the steps needed to get programming Flash games using Flixel, on Linux in an actual IDE.

There are a lot of claims that a certain year is the year of something. The year of the PS3, the year of the mobile, etc. Many people make these claims long before anything truly remarkable happens and pretty much all of them fail to live up to their expectations. So rather than look forward and make predictions about whether a certain year will be the year of the Linux game, I am rather going to look back at the last few months and proclaim that 2012 is the Year of the Linux Game.

It seriously took a long time and a lot of trouble to get to this point. Game developers have dismissed Linux as a viable platform and have ignored the pleas of gamers for Linux support. For many years, Linux gamers have resorted to rolling their own solutions for gaining Linux compatibility in the form of emulators and compatibility wrappers. Some companies have sprung up in the past in the hopes of expanding the availability of Linux games, but have failed due to poorly thought out business strategies. So what makes 2012 so different from all the previous years?

The first step in making this year the year of the Linux game was the introduction of the Humble Indie Bundle. Originally the brainchild of Lugaru developer Wolfire Games, it made it a requirement for inclusion in the bundle to have native Linux support. This bundle has gone through five primary incarnations and numerous brand specific bundles. All of them included Linux support for the games. As a response for this inclusion, Linux gamers have paid on average far more than Windows and Mac gamers and have made up anywhere between 15 and 25% of all payments to the bundle.

Humble Indie Bundle #1 Stats
The final sales stats for the original Humble Indie Bundle.

The next major shift towards developer support for Linux gaming was Kickstarter. While Kickstarter was a lot slower on the draw for its influence on Linux gaming, it has really shown its power to shift trends in that direction. Recent high profile games such as the Double Fine Adventure, Wasteland 2 and Shadowrun Returns have revitalized the desire to not just  add Linux support as a reward for exceeding funding goals but also as a primary selling point for funding. The number of game projects on Kickstarter supporting Linux has done nothing but grow. A recent Ubuntu Forums post highlights dozens of game projects that support Linux.

Because of these successful Kickstarter campaigns promising Linux support, we have also seen a major shift in middleware providers as well. With the success of the Wasteland 2 project, Unity3d will be adding support for exporting games to Linux with version 4. This was something that developers have been requesting for several years. It is now happening because of this shift in the market. Another high profile Kickstarter game, Double Fine Adventure, has also resulted in the addition of Linux support for the growing 2D engine, Moai.

Finally, we have also seen the largest digital distribution service for games making the shift toward supporting Linux. Yes, I am talking about Steam. Valve had recently released a Mac client for the Steam platform and with it came many rumors that Linux support was in the pipeline. Earlier this year, Valve finally came clean with the news that, yes, a Linux version of not just Steam but also its Source Engine was coming. The largest digital distribution platform in gaming history is making its way to the smallest PC market. If that is not validation of Linux as a viable platform for gaming, I don’t know what else could convince you.

So with all these events in the last few months, I am confident to say that, yes, 2012 is The Year of the Linux Game.

After my review of game development on the PC, I came to realize that there is very little if any support for Linux as a viable platform from the creators of game engines for the PC. Even those that advertise that they are cross platform engines only go so far as to be cross platform for Windows and Mac.

As a gamer that has decided to use Linux as my primary OS for me and my family, I find this disheartening.

I am well aware of the small market share that Linux has world wide. (around 1%) It is not that small when compared to the Mac market. (around 5%). (source) So why is Linux’s 1% valued so little compared to the Mac’s 5%. Both are relatively small compared to Windows’ astounding 92%.

Before we dive into that question, let’s look at the commercial engine market again and their cross platform support in both player and development view points:

  • Flash – Has native player support for Linux. This allows any game developed using Flash technology to run on a Linux computer. Unfortunately, Adobe has no viable SDK or IDE for development on Linux. It is possible to develop Flash games on Linux, but that requires numerous workarounds. Adobe’s Flex SDK has a beta for Linux development that has been in beta for a number of years.
  • Silverlight – Silverlight has both player and development support for Linux through the Mono Project and its corresponding Moonlight player. Microsoft itself does not support Linux in any way other than to release the core functionality of Silverlight to the open source community. They do hold some functionality back unfortunately. This is seen in the Netflix Watch Instantly Player. Because Microsoft holds back the underlying code for the Silverlight DRM, viewing of Netflix movies on Linux is impossible.
  • Unity – Unity support only Mac and Windows in game play and development. There is no Linux support for their Web Player or development. Although a feature request has been open for 10 months, there has been no word from Unity Developers on the matter. (source) Yet, they have responded to a forum topic on the subject in which they stated they have no reason to support Linux due to the small market size (source)There is one quote in there from the Unity CCO that I will discuss later in this article.
  • Torque – Torque only has support for Windows and Mac. There was at one point a community maintained version of their Torque engine, but that was abandoned several years ago. It would seem that the core trunk of Torque took a direction that was incompatible with Linux.
  • Unreal and XNA – Only Windows support with nothing to indicate that these will be coming even to Mac.

So what are the major arguments against developing for Linux? For the first of the common arguments let’s take a look at that quote from the Unity CCO I mentioned earlier:

So yes, the market just isn’t big enough. We don’t have the resources to cure the miniscule of the Linux-buying games community… If the linux community suddenly starts buying up huge amounts of games, then there is a case for us. So far, sadly, that is not the case.

The core of the argument is that not enough Linux users are buying games so they don’t feel the need to support the platform. Isn’t this the very definition of a Catch 22? So how are Linux users supposed to buy games if there are no games for them to buy?Does anyplatform have fans before the games start rolling in?

As a bit of a contrast to that viewpoint, I would like to make a case of 2d Boy’s World of Goo. According to their blog announcement of the Linux version of the game Linux versions account for 4.6% of the full downloads from their site. (source) During their Birthday Pay What You Want Sale, Linux downloads accounted for 17% of all downloads. (source)

The next argument against Linux comes from the discussion of Linux support for the Unity Player. This comes from someone in the discussion as they have no relation with the Unity company.

The question is, does it make sense right now, in the real world of tradeoffs, limited resources and unintended consequences, and given the fact that most linux geeks are constitutionally unwilling to pay for stuff? It does not. (source)

The key take away from this point is the myth that Linux users are unwilling to pay for software. This is patently false. Yes the core idea behind Linux is the use of free and open source software. That does not mean that Linux users are unwilling to pay for quality games and software.

Again, we will look at 2d Boy for an example. During their Pay What You Want Sale, Linux users held the highest average price paid for World of Goo out of the three supported platforms. (source) So clearly Linux users were willing to pay for this game, why not others?

Personally I think these arguments have no merit. I think the games industry is looking at the Linux gamer in the wrong way. You really shouldn’t be looking at Linux users in their willingness to purchase the games, but in their willingness to game period.

For this example, I point you towards the Wine project. (Wine HQ) Here is a community that is dedicated to trying to get the games that you make to work on the OS they choose. They want to play your games and they have to jump through some pretty amazing hoops to get there. Why would you not want such enthusiastic gamers buying your games?

Other things to consider as well is that many PC manufacturers are looking to Linux as an alternative OS to Windows. This is especially true for Netbooks. By ignoring this OS you are also ignoring the potential customers that choose those computers over their Windows based brothers.

In the end, I don’t think the problem is with Linux or the users of Linux that brings about the shortage of games. It is the developers of the games whose unwillingness to support this emerging market that is failing here. If game developers took the initiative to support Linux as well as other platforms from the beginning, the impact would be negligible. It is easier to do it at the start of a project than to try to shoehorn it in at the end.

As an independent game developer, I have made the decision to only use technologies that will allow Linux, Mac and Windows gamers to enjoy my products. That is why I have decided on Flash for my first project and will be looking to the Open Source Community for the technologies I will be using to make PC games further down the road.