Sign in to follow this  

Linux Gaming System

This topic is 2831 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I was wondering if it would be easy to create a game system based on linux. I have linux(Ubuntu 8.04 and 9.04). I use it once in awile. Does anyone know why games are never released for linux? Does it have anything to do with how linux is licensed as open-source? What is the meat of linux? What would I need to run linux executables compiled in C/C++? The kernel? I wouldn't want any GUI stuff. I would simply want whatever ran compiled programs/games. I would wright an interface in C++. If anyone can answer anything, please do...Thanks!

Share this post


Link to post
Share on other sites
Games are not released for linux because linux isn't profitable. It has terrible desktop market share.

If you want to program a game on linux, that's very doable. In fact, i learned to program C++ on a linux system and it is very easy to get all the tools you need for free (you already have them, just type "sudo apt-get install build-essential").

How to use those tools is a far greater topic than i could possibly answer in this post. You'll want to read up on "GCC" and "make" and "autotools" to do it the traditional way. Otherwise, you'll have to find a linux IDE that you like.

You can also browse around here for linux games.

Share this post


Link to post
Share on other sites
Games are rarely released on Linux because it's a small market place. The cost (extra development time devoted to another SKU) is probably higher than the benefit (extra sales). The Linux-demographic aren't known for their love of proprietary software after all.

Share this post


Link to post
Share on other sites
Whether or not if developing games or not on Linux is "easy" depends on what you need. As far as 3D games, if you're reliant on technologies like DirectX, or for some other reason are prohibited from implementing other technologies like OpenGL, then you're going to have a relatively hard time making a game work out for you. There are, however, a number of cross-platform 3D engines that are nice enough to use in either environment, so as far as 3D gaming goes, it comes down to what you know/don't know/are willing to know in order to get all of the graphics going.

2D games usually aren't all that hard to get into. There are plenty of libraries out there to choose from. The same goes for audio as well. For the most part, if you're going into Linux, if C/C++ are your thing, the gcc and g++ compilers are available by default on most distro installs. The language is totally up to you though; a popular alternative is Python as it's widely available on many Linux machines right away. Personally, I find SDL/C++ is working out for me, as I really don't have to change any of the code when compiling on Linux or Windows. Also, there's plenty of production tools for music, sound and graphics. If you're using C++ to make executables, the gcc/g++ can spit out a runnable binary file. Depending on what libraries you compiled it with, it'll either need to be run from the commandline/script or merely clicking on it in a file browser. The latter has been my experience with GUI libraries, e.g. FLTK.

I would guess that there aren't many commercial offerings for Linux simply because of market share. Most developers wouldn't be getting a fair amount of money if they made something to specifically only run on Linux. As such, they're much more likely trying to bring a Windows or other OS based game into Linux, but like I said earlier, the technologies behind the game might not be cross-platform. The effort involved in porting the game might be less than the profit to be received. That said, one good Linux games publisher that springs to mind would be Linux Game Publishing. The name basically says what they do. Also, there are plenty of games that indie people develop just for fun or sometimes to boost their portfolios. Some games have even got some real polish to them; Neverball and Alien Arena are two. I don't think it has anything or much at all to do with the nature of Linux being open-sourced, Linux is just a kernel after all.

For me, I use Linux everyday, Kubuntu 8.04 at home and Slackware 13 at my university. Making games with cross-platform technologies virtually makes it the same as if I were doing all my work on Windows, sans the commandline compiling. Anyway, it's not hard at all if you get used to how Linux does things and if you're utilizing good tools.

[Edited by - Shonumi on March 14, 2010 12:17:36 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Hodgman
The Linux-demographic aren't known for their love of proprietary software after all.


Tribal Trouble had 11% of their web sales to Linux users,
World of Goo broke their previous daily sale record by 40% on the day the linux version was released
Mystic Mine had 34% of their sales from the Linux version.

There are probably other examples, but it seems as if indie games are the ones that benefit the most from a Linux release, I'd guess its partially because they just drown in the competition on Windows and Linux related websites tend to make huge headlines whenever a commercial game is released, no matter how small it is.

However whats also interesting is that Conversion rates were higher for Linux than for Windows for both Tribal Trouble and Mystic Mine (havn't seen any detailed stats for World of Goo). So i definitly believe that alot of Linux users are willing to pay for software, probably a larger percentage of them than on Windows. (Piracy on Windows is fairly insane)

Share this post


Link to post
Share on other sites
Quote:
Original post by leiavoia
Games are not released for linux because linux isn't profitable. It has terrible desktop market share.
Quote:
Original post by Hodgman
Games are rarely released on Linux because it's a small market place. The cost (extra development time devoted to another SKU) is probably higher than the benefit (extra sales). The Linux-demographic aren't known for their love of proprietary software after all.

Obviously and unfortunately, this is an all too common misconception. Once again I have to point to 2DBoy's birthday pay-what-you-want sale results. In case you want to be lazy, the point is this:

Linux accounted for 17% of sales, which isn't high but it is higher than the marketshare. More importantly, Linux users paid on average a third more than Mac users and nearly twice as much as Windows users. So in terms of revenue, Linux had a much higher percentage. As shown in the previous post, several other indies have similar surprising results for developing Linux games.

AAA Commercial games do not have similar results because they simply do not try. Or it is some half-assed try where they give it to someone else to port and it's more expensive and much harder to find than the Windows version. You only need to look at the popularity of Wine (and Crossover and Cedega to a lesser extent) to see that there is demand. Yes, some Linux gamers deliberately buy Windows games to run through Wine. Some games like Doom 3 and Neverwinter Nights have native Linux binaries, but you have to buy the Windows versions. So Linux gamers look just like Windows customers as far as they're concerned.

Of course, the best results are by developers who deliberately set out to make their game cross-platform. The popularity of DirectX, however, limits the majority of games to Windows (at least natively, as Wine can do earlier DirectX stuff pretty well).

-----------------------------------

Whew, okay, I got carried away. This wasn't even the original question!

OP, I encourage you to check out OpenPandora, as well as its cousin, the GP2X Wiz. Also see their predecessors, the GP2X and GP32. As for the setup, I'm probably not the best one to answer, but I'll give it a shot.

The kernel takes care of interfacing with the hardware, but you'll really need the other parts of the operating system to do anything useful. The Pandora, for example is using a full graphical (albeit lightweight) Linux distribution. Doing something similar would simplify your task a great deal. You could easily use one without a graphical interface, but you'd either have to develop your own windowing system, or more likely you'd just have the X Window System installed anyway. A basic GUI isn't going to cost you too much, and it'll make the device much more useful outside of gaming. Remember, the more like regular Linux distributions it is, the easier it will be to develop and port games for your system.

Share this post


Link to post
Share on other sites
One of the easiest ways to write games for Linux while still supporting Windows (or even Mac) is to use Java. Tribal Trouble used it and they were able to take advantage of Linux in their sales. Java supports OpenGL if you need 3D graphics.

Share this post


Link to post
Share on other sites
Quote:
Original post by Momoko_Fan
One of the easiest ways to write games for Linux while still supporting Windows (or even Mac) is to use Java. Tribal Trouble used it and they were able to take advantage of Linux in their sales. Java supports OpenGL if you need 3D graphics.


I would say it is better to choose cross platform libraries, such as Ogre3d, ODE and SDL. Most of these libraries are made for C/C++ but bindings are often found to the most common languages java/python etc. This leaves you with greater choice of implementation language while making it easy to maintain platform independence.

Share this post


Link to post
Share on other sites
Quote:
Original post by flodihn
I would say it is better to choose cross platform libraries, such as Ogre3d, ODE and SDL.


Java is very much cross-platform. LWJGL (OpenGL + input + OpenAL) is also cross-platform (Mac, Linux, Windows, Solaris). The engines that build on top of these (Slick, jME, Aviatrix, Ardor) are cross-platform by extension. For physics we also have jBullet, a Java implementation of the Bullet library - which means it can run anywhere Java SE can run. Anyone aspiring to build an MMO is well served by Project Darkstar. So one could do worse than Java if one was looking to start a cross-platform game project.

Quote:
Original post by flodihn
This leaves you with greater choice of implementation language while making it easy to maintain platform independence.

Well, assuming you don't make the mistake of making the game in C/C++, you are left with few good choices. C# is a possibility, but you'll have to rely on Project Mono while Java people get to use the official JVM. Python is another popular choice. Apart from that there doesn't seem to be much else.

Share this post


Link to post
Share on other sites
Quote:
Original post by lmelior
AAA Commercial games do not have similar results because they simply do not try.
Yeah there's plenty of games that get huge percentages of their sales on niche platforms, like Linux, but AAA games are a bit different.
The crappy port jobs you mention, and proper support for a platform throughout development both have a cost that scales with the size of a game. Selling these games *is* just business (you're moving "units" not "games" at this point), and business people will take any option that will make more money.
I wouldn't blame ignorance for the lack of Linux support from AAA games, as a lot of people get paid a lot of money to figure out how to make money from a title.
My guess is that when a game is that expensive to make, the Linux sales (which may still be a large number) will still be dwarfed by the 360 sales, which makes the fixed-percent increase in production costs not able to cover the small increase in sales. So maybe it's true that they could have similar results if they tried, but it's still more profitable not to try.

But this is way off the OP's topic I think... so... Linux is perfectly fine for games and game-dev ;) The lack of games is apparently just not enough interest from big publishers.

Share this post


Link to post
Share on other sites
Quote:
Original post by flodihn
Quote:
Original post by Momoko_Fan
One of the easiest ways to write games for Linux while still supporting Windows (or even Mac) is to use Java. Tribal Trouble used it and they were able to take advantage of Linux in their sales. Java supports OpenGL if you need 3D graphics.


I would say it is better to choose cross platform libraries, such as Ogre3d, ODE and SDL. Most of these libraries are made for C/C++ but bindings are often found to the most common languages java/python etc. This leaves you with greater choice of implementation language while making it easy to maintain platform independence.


Ogre3D uses OpenGL (or DirectX), it's perfectly cross-platform to use OpenGL.

I never grasped why indie devs use DirectX at all. It limits your project unnecessarily. It's not like OpenGL is less advanced, certainly not for what indie devs use it for. Windows only gets less and less market share, I think you can get a great community when building it for many platforms (Windows, Mac, Linux, Amiga).

Share this post


Link to post
Share on other sites
Overall desktop market shares are not necessarily the same as the market share under the gamers you try to reach. The cost to reach this extra market share also depends on various factors, so you can't give a single answer there as well. For example, if you build a game around a render engine like OGRE, costs for cross platform building are much less then when you are building your own rendering engine.

Share this post


Link to post
Share on other sites
Quote:
Original post by MichaBen
Overall desktop market shares are not necessarily the same as the market share under the gamers you try to reach. The cost to reach this extra market share also depends on various factors, so you can't give a single answer there as well. For example, if you build a game around a render engine like OGRE, costs for cross platform building are much less then when you are building your own rendering engine.


What do people put in their rendering engines that makes them hard to port? This is an honest question. I write non-game software for a living, and I don't have any trouble keeping my code easy to port (most of it just works without any changes).

Share this post


Link to post
Share on other sites
Quote:
Original post by alvaro
What do people put in their rendering engines that makes them hard to port?


DirectX code mostly. Especially if the engine is never meant to be used for OpenGL. Adding a layer of abstraction might be laudable but is a lot of extra work.

Share this post


Link to post
Share on other sites
Thanks for all the replies! I know C++, but don't know any graphic libraryies. What would you guys recommend? Open GL? I have been making games in basic, but want to move up to C++. I need to be able to do 3D graphics, and cross-platform compatable. I want to get a simple game working on Windows and Linux with little/no changes. I have used visual studio on windows and sometimes dev c++. I found Code::Blocks IDE, and will try that out, as it runs on Mac, Linux, and Windows(it's written in C++).
So if you can recommend a book or article, that would be great!

If a company released a game console, do you think companies would release games for it? I read a gamedev article (http://www.gamedev.net/reference/programming/features/linuxprogramming2/default.asp), and the guy said one reason companies don't want to release games on linux is because there are so many libraryies you can use to develop the game, and most usuers don't have them installed. If there was a game console that had then all installed, that would make it a lot easier. I think it would be cool to have a linux-based console that a lot of companies (and Indie-developers) develped games for, and when you connected the cosole to the internet, you could view all games released for the console, and buy them. And then the console would have a dvd writer and you could burn one copy of the game. And you could copy games to the console. And a really cool feature would be the option to create a bootable version of the game which would include the bare linux stuff required to run the game, and the game itself. Then you could pop it in a computer and boot the game.
I know I am going on and on...sorry

Does anyone know what I would need to create a console interface, as a project? Instead of showing Ubuntu as the system loads(I have Ubuntu), it would run a dashboard(like xbox and wii when you turn them on). When it shows the ubuntu loading screen, what is it loading? All of the stuff required for the whole interface? I have the Gnome desktop installed by the way...
Thanks for reading and replying!

Share this post


Link to post
Share on other sites
Quote:
I never grasped why indie devs use DirectX at all. It limits your project unnecessarily.
It might have something to do with differing levels of support for Direct3D and OpenGL on the Windows platform. Also, with DirectX you've got a lot of useful tools available that kind of have to be cobbled together if you're using OpenGL (math, model loading, shader management and effects frameworks, comprehensive documentation, etc.), which I imagine makes Direct3D/DirectX a more attractive option for some developers.

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
What format did 2D Boy and the other success stories release their Linux versions in? RPM? DEB? TGZ?


2D Boy did all 3 formats, i assume the others did the same, its pretty much a requirement if you wish to cover most of the Linux market. 8% of their downloads was .deb , 6% tar.gz and 3% rpm (total was 17% for Linux).

The only format that works painlessly on all distributions is statically linked tar.gz archives so its a good thing to have even if most popular distributions use either rpm or deb these days. (statically linked archives also don't require installation so you don't need root access for them which is good for users of shared systems who just want to put the software on a usb key or in their home folder)

You can ofcourse also do a dynamically linked tar.gz archive, but then you would need an installation script or program to handle dependencies which is a bit of a pain.

Quote:
Original post by jyk
Quote:
I never grasped why indie devs use DirectX at all. It limits your project unnecessarily.
It might have something to do with differing levels of support for Direct3D and OpenGL on the Windows platform. Also, with DirectX you've got a lot of useful tools available that kind of have to be cobbled together if you're using OpenGL (math, model loading, shader management and effects frameworks, comprehensive documentation, etc.), which I imagine makes Direct3D/DirectX a more attractive option for some developers.


There is also the fact that OpenGL was stuck at version 2.x for ages and that pretty much all modern features was available only as extensions which ATI and Intel pretty much ignored.

This meant that you could only get for example geometry support with nvidia hardware if you used OpenGL, while with DX you could get it for any capable hardware as long as the user ran Vista or later (Which most users of such hardware did).

These days the OpenGL specification seem to be moving faster though so it should be easier to target a specific version of the API rather than having to worry about what extensions a given card actually supports.
OpenGL 4.0 is the most recent version now and seems to match D3D11.

[Edited by - SimonForsman on March 14, 2010 8:50:01 PM]

Share this post


Link to post
Share on other sites
2D Boy had deb, rpm and .tar.gz, judging by he pay-what-you-want sales data linked above. Deb was 8% of their sales, rpm 3% and tar.gz 6%.

Share this post


Link to post
Share on other sites
Quote:
Original post by SimonForsman
You can ofcourse also do a dynamically linked tar.gz archive, but then you would need an installation script or program to handle dependencies which is a bit of a pain.

Actually no, you don't. You can distribute a binary with dynamically linked libs in a tgz just fine, just like in Windows. It doesn't require installation beyond uncompressing the archive and running the executable.

Share this post


Link to post
Share on other sites
Quote:
Original post by Yann L
Quote:
Original post by SimonForsman
You can ofcourse also do a dynamically linked tar.gz archive, but then you would need an installation script or program to handle dependencies which is a bit of a pain.

Actually no, you don't. You can distribute a binary with dynamically linked libs in a tgz just fine, just like in Windows. It doesn't require installation beyond uncompressing the archive and running the executable.


Oh, thats good to know, it would try the local directory before the library path just like on Windows aswell then ?

Edit: i just checked, the current directory is not included by default on some distributions (Ubuntu for example)

There are ways around it such as passing -rpath ./ or ./lib or similar to the linker or by loading the library yourself using the dlopen function after the program has launched, but its not quite as straightforward as on Windows.

[Edited by - SimonForsman on March 14, 2010 9:31:05 PM]

Share this post


Link to post
Share on other sites
OP, did you have a look at the Pandora that I linked in the post above? Also, look up the EVO Smart Console. The point is, it's been tried (and is still being tried) without a significant user base, no AAA developers and even very few indies will be interested. And without AAA games, you won't grow a significant user base. Fun little chicken-and-egg problem, isn't it? I think a Linux-based open console would find mild success as a niche produce as long as the price compares favorably with the big consoles. That'll severely limit your hardware choices though, since they enjoy economies of scale you could only dream of.

As I said above, the more like a normal Linux distribution it is, the easier it will be for you and the more developers will port to your system. Also, requiring the games to be packaged with their libraries is fine as long as you either choose your libraries wisely or develop your own. Otherwise it could cause some major licensing issues that are avoided by the current system. It could also cause trouble for some FOSS projects wanting to port their game, since they'd have to make sure to only use libraries that are legal to distribute with their game.

As for the interface, unfortunately I'm not experienced enough to know exactly what you'd need. I'd recommend you look into the Linux From Scratch book to learn more about the inner workings of Linux. Ubuntu is great for ease of use, but it hides a great deal from you and does some things a little differently from the UNIX tradition.

Share this post


Link to post
Share on other sites
Quote:
Original post by SimonForsman
Oh, thats good to know, it would try the local directory before the library path just like on Windows aswell then ?

Yes, if you specify this when linking your app (it's the rpath $ORIGIN switch, btw). The feature is not widely used, but it works very well.

Share this post


Link to post
Share on other sites
Quote:
Original post by Yann L
Quote:
Original post by SimonForsman
Oh, thats good to know, it would try the local directory before the library path just like on Windows aswell then ?

Yes, if you specify this when linking your app (it's the rpath $ORIGIN switch, btw). The feature is not widely used, but it works very well.


Bah, i just did a search while editing my post to find out the exact same thing ;D
There is also dlopen ofcourse, not quite as easy as on Windows but for the end user it doesn't matter.

Share this post


Link to post
Share on other sites
Quote:
I was wondering if it would be easy to create a game system based on linux.

No, but it is certainly possible. The big chunks of the problem are creating a game-specific linux distribution, manufacturing hardware, and writing the middleware.

Quote:
Does anyone know why games are never released for linux?

The market share of desktop linux is too low to be economically feasible for many studios. Some may find profit to be made, others not. That being said, my phone runs a full linux stack. There are hundreds of games for it. Other phones models run linux and have thousands of games available.

Quote:
Does it have anything to do with how linux is licensed as open-source
No.

Quote:
What is the meat of linux?

The kernel, libraries, executables. Try http://www.linuxfromscratch.org/ to get an idea about what goes into a linux distribution.

Quote:
What would I need to run linux executables compiled in C/C++? The kernel? I wouldn't want any GUI stuff.
Again look at linux from scratch. You're going to at least need a bootloader, a kernel, X, a package manager, the libraries needed to run all of these, and all sorts of little odds and ends.


Share this post


Link to post
Share on other sites

This topic is 2831 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this