Sign in to follow this  

linux compatability

This topic is 4092 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

Now, that is a more interesting point. There are two questions here.

The first is, are you developing an AAA-level title? If that's the case, then you'll have enough work to do handling one platform without having to fight for another. Conversely, you'll have pretty much to handle consoles, so cross-platform development isn't necessary useless.

The second is, how many games does one play, usually? Some gamers change games every month, while others play the same game for years before moving on (WoW, anyone?) So, as long as there are enough games on Linux for the average gamer to play, Linux will not be a game-limited OS.

Of course, if by game-limited you mean that you cannot play Windows games on Linux, I'll point you to Dance Dance Revolution or Geometry Wars, which cannot be played on natively the PC at all. Is the PC a game-limited platform? Are consoles a game-limited platform? Or do Linux, Windows, Sony, Nintendo and XBox platforms each have their own set of games which does not necessarily intersect with that of other platforms?

Share this post


Link to post
Share on other sites
[quote]Original post by ToohrVyk

Of course, if by game-limited you mean that you cannot play Windows games on Linux, I'll point you to Dance Dance Revolution or Geometry Wars, which cannot be played on natively the PC at all. Is the PC a game-limited platform?/quote]

Well, Stepmania ( A Complete DDR Clone ) runs on PC, Mac, and Linux, and im sure theres a Geometry Wars like game out there somewhere.

Anyways, I believe that it is good programming practice to try to code games that are cross platform. Its really not that hard, you just can't use windows api stuff, and you can't use too much .NET stuff, and you have to use crossplatform libraries.

Other than that, the only problem is building the code for two/three platforms, and if you can't get cross-building working, there are places like sourceforge that have build servers of many different platforms, where you can upload your code and build.

Share this post


Link to post
Share on other sites
Quote:
Original post by DantarionX
Well, Stepmania ( A Complete DDR Clone ) runs on PC, Mac, and Linux, and im sure theres a Geometry Wars like game out there somewhere.


I know, I was playing StepMania and Grid Wars hours ago (and that's the reason why I cited them). But they are re-made from scratch. If you allow existing games to be rebuilt from scratch, then potentially any game can be run on Linux.

Share this post


Link to post
Share on other sites
Well, I can't tell if a game is going to be AAA until it's released. And making a AAA game doesn't necessarily mean you have to make it cross platform. I'm only focusing on PC development. Look at it this way, what do you imagine the commercial game ratio is between windows and linux? I don't really know, but it has to something quite radical. I don't remember ever seeing a PC game at a retail store that requires or even supports linux.

Share this post


Link to post
Share on other sites
If you code using SDL/OpenGL then your code can be ported to Linux easily. If you use DirectX, good luck. The reason I would suggest writing Linux code is that the APIs are generally open-source and can be ported to anywhere from there. Even to backwater computers like the latest PowerPC-based incarnations of the Amiga.

Windows stuff is generally closed to outside eyes and can only be run on Linux using API cloners like Wine. Sure DirectX has some bells and whistles but if you are developing in OpenGL you can run it on a Mac and Linux and others so why limit yourself?

Share this post


Link to post
Share on other sites
I'm writing it using the OGRE engine so I'm not even dealing directly with the API's but it can run on either directx or opengl, I don't know what else is required for it to run on linux since I never programmed anything for linux, but can I use the same executable and just check what OS the user is running and then code what ever is necessary for each OS. If it's just the main app entry point then I wouldn't mind making it compatable with linux. The only windows code I have in my prog right now is just the basic stuff that's required to run a windows app.

Share this post


Link to post
Share on other sites
Quote:
Original post by etsuja
Well, I can't tell if a game is going to be AAA until it's released.


You can tell if you're aiming for it, or if you're going to a more lower-budget approach, or even a freeware or open source no-budget approach (GridWars, StepMania, Wesnoth, Dungeon Crawl, Nethack, Kraland, SuperKobo, Imperishable Nigh, Perfect Cherry Blossom, Urban Uprising, Warning Forever, Every Extend, ...)

Quote:
I don't remember ever seeing a PC game at a retail store that requires or even supports linux.


You seem to equate game with commercial game. That's a ridiculously close-minded definition. If your question is, "Can I create a moderately successful Linux commercial game", then the answer is probably no. If you're only looking to develop a game, you'll find plenty of Linux-only gamers ready to play it.

Share this post


Link to post
Share on other sites
Quote:
You seem to equate game with commercial game. That's a ridiculously close-minded definition.


I don't want to start a flame war so all I'll say is that's unecessary.

No, I do not equate game with commercial game but since a commercial game is what I'm developing that's what I'm using as a reference. I beleive it's possible to "create" a AAA game with a tiny budget. It doesn't require anything but time. It may not be possible to sell in retail stores with a tiny budget but if it can be distributed online, then once enough money is made it can be mass produced/advertised/put on store shelves.

Quote:
If your question is, "Can I create a moderately successful Linux commercial game", then the answer is probably no.


I've no intention of making a linux only commercial game, all I want to know is if there will be a worhtwhile sales increase if it's made to be compatable with linux.

Share this post


Link to post
Share on other sites
do what i do, use a platform independant lib like sdl
my game runs on linux no probs + i bet i could get it running on macos within 10minutes,
hopefully sdl will be out on the ps3

Share this post


Link to post
Share on other sites
Well, I'm using the OGRE engine which is supposed to be already compatible on linux so I'm guessing all I need to do is change the application creation to get it running on linux. Although I will be using some other pre-made libraries which I'm not sure of their compatability with linux yet.

Share this post


Link to post
Share on other sites
If you choose your libraries carefully, cross-platform support is trivial. I think in the 15,000 lines of code i have on my little pet project, only 10 lines are platform specific. And the only reason i have that many is because i was trying to squeeze a bit more performance out of the system clock on Windows.

Share this post


Link to post
Share on other sites
Building a game with portability in mind can be quite useful for training purpose and doable on small projects.

But working on a big title, I really don't think you would want to do that, you will rather like to find the most suitable solution for your target platform to archieve good performance and quick developing times.

If you still want to make the game cross platform it would be better to dedicate a whole team just for porting it over to the other system(s).

Developing a game for console + windows at same time is pretty difficult I think and needs a whole new idea of organisation, but I don't think this should worry you (or me) since only real developer studios actually get to work on console titles anyways.

Share this post


Link to post
Share on other sites
I only had access to my iBook on my road trip awhile back.

While cross platform availability isn't going to be the main deciding factor on a buy-or-not decision, having multiple platforms available for one purchace *will* be a perk in favor of the former - wheither it's for a road trip or just a game suitable to lounging around while playing.

To the degree I've developed multi-platform software, just having totally different runtime environments can help uncover bugs you never knew you had (i.e. your SC++L implementation didn't make them apparent (yet) or the different allocation strategy prevented segfaulting near the problem).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
but can I use the same executable and just check what OS the user is running and then code what ever is necessary for each OS.

linux does not even know what an ".exe" is its all about permissions, so to answer you question, without an emulator no.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
linux does not even know what an ".exe" is its all about permissions

Well, permissions are a trivial matter.
1) The Linux/Unix binary format (ELF) is completely different than the Windows one (PE).
2) A Linux binary needs to be linked to glibc, which makes system calls to the Linux kernel. A Windows EXE needs to be linked to system libraries which make calls to the Windows kernel.

So, yes, obviously you need to recompile.

If you only use cross-platform libraries (OGRE, OpenAL, ODE or Newton, etc.), and you don't make any direct Windows API calls, you're 99% of the way to Linux compatibility.

Share this post


Link to post
Share on other sites
All of Id software's games are available for Linux, right? I suppose Unreal engine games can be ported to Linux too (and some are). These are commercial titles, and there are others.

If you're using cross-platform APIs and libraries then it's pretty straightforward to make a Linux version. Really the only "problem" is you'll need to set up a computer with Linux to develop and (at least) test your game, and you may or may not be interested in learning a new OS or using up hard drive space for it.

It's entirely possible that you could get extra sales if you released on Linux (perhaps more so in Europe than US). People use Linux, and some of those people want to play games other than Nethack without rebooting to Windows (even if they have it). As long as the "cost" of porting your game to Linux is minimal then even just a few extra copies sold would be profitable. If you manage to "advertise" on Slashdot.org due to your support for Linux it'll help too. :)

The fact that a platform currently has few games is an advantage as there's less competition and a good indie game can become popular. For example, I've got a game out for Windows and Mac OSX, and the sales of the Mac version are about the same as the Windows one despite the much smaller number of Mac users in the world. The porting was quite trivial since the game uses SDL, OpenGL and OpenAL instead of DirectX.

Share this post


Link to post
Share on other sites
Totally off-topic, but personally I'm more likely to buy a non-AAA title. AAA usually means excessive technical wankery at the cost of...well, everything else. I love games of all genres that I can play in a window and don't bring my computer to a grinding halt. There are a lot of people out there who don't buy new video cards every year, yet I'm continually stunned by the fact that nearly every new release runs like crap on any system more than a couple years old. Have they learned nothing from the success of Blizzard? Diablo 2 and WarCraft 3 looked merely average for their time, but they're still two of the most popular multiplayer games around. Same for WoW, except it manages to look great and run smoothly at the same time. Novel concept, huh?

And it's not just Blizzard, but also independent game makers that are producing successful 2D games and simple 3D games.

Share this post


Link to post
Share on other sites
I think it's silly to just not bother developing a game for Linux, there's plenty of Linux users out there who might not be hardcore gamers, but would like a game to play on their machine anyway. Same with Mac OS, you don't buy a Mac to game on, usually, but there's still nothing bad about playing a few games on it.

I'd try to write your code so it can work on Linux - Use SDL, OpenGL, etc. (as far as I know, Ogre is supposed to be cross-platform) There's plenty of open source libraries out there that work really good. On the other hand, if making your game cross-platform is going to be that much of a problem, just make your game so that it runs good on your choice OS. There's no point in sacrificing quality to make it cross-platform. (Though, again, it isn't hard at all to make a game cross-platform)

Share this post


Link to post
Share on other sites
I'd say that with careful coding it won't take much more time to get it working on linux although you will need a working linux system and it'll take time to familiarise yourself with the environment, build the libraries and create build scripts for your game executable. Then of course there's the added problems of supporting users on two platforms...

However if you manage it then your game is obviously going to reach a wider audience and would probably be linked to on a lot more sites *because* it supports linux as well.

Share this post


Link to post
Share on other sites
Quote:
Original post by MaulingMonkey
To the degree I've developed multi-platform software, just having totally different runtime environments can help uncover bugs you never knew you had (i.e. your SC++L implementation didn't make them apparent (yet) or the different allocation strategy prevented segfaulting near the problem).

The different compile-time environments help a little too - code like printf("%s", std::string("hello world")) is silently accepted by VC++ but outputs garbage when you run it, while GCC gives a handy warning.

(Actually VS2005 Expensive Edition (not Standard/Professional) has the rather useful /analyze flag which does warn about that case, and a version of the compiler with that feature is also available as part of the Windows SDK for Vista (like here) - so that particular example isn't as relevant now. But still there's other real bugs that can be easily found and fixed by using another compiler, instead of being first seen in bug reports from unhappy users. It's probably not enough to solely justify the effort of writing portable code and avoiding platform-specific compiler features and libraries, but it's a useful side effect of portable code.)

Share this post


Link to post
Share on other sites
Odyssey, my project, was developed from its inception to be cross-platform-aware. This means using c.p. libraries such as SDL, SDL_Image, OpenGL, OpenAL, FTGL, TinyXML, ENet, wxWidgets, libMySQL, zlib, and so on.

It isn't terribly difficult to accomplish this, and once you have a "compiles and runs on anything" skeleton-framework, staying within boundaries of cross-platform is relatively simple.

It also helps to use a c.p. IDE. Since I moved the majority of my development to Linux, I'd also switched to using Code::Blocks. It's great to be able to become accustomed to features and settings across different platforms, because your development applications stay the same.

I wish anyone embarking upon this journey the best of luck; the end-result might be a little more difficult to accomplish, but once you're there, you have a wider potential audience.

Share this post


Link to post
Share on other sites

This topic is 4092 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