Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

DarkZoulz

Why make portable game code?

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

Why waste time and effort on making portable code, if you know that it won''t be used on any other platform? I mean, the market for linux games for instance is so small compared to windows.

Share this post


Link to post
Share on other sites
Advertisement
why not making portable code, when it''s so easy?
if everybody thought like you there wouldn''t be games for linux at all, so...

Share this post


Link to post
Share on other sites
quote:
Original post by DarkZoulz
Why waste time and effort on making portable code, if you know that it won''t be used on any other platform?
If you really, really know that it won''t be used on any other platform, then there''s no reason. But, not making portable code more or less guarantees that it won''t be used on any other platform...
quote:
Original post by DarkZoulz I mean, the market for linux games for instance is so small compared to windows.
True, but it''s still a market, and all sold copies are money. And if you easily can make the code portable, then maybe it''s worth it.

Share this post


Link to post
Share on other sites
quote:

True, but it''s still a market, and all sold copies are money. And if you easily can make the code portable, then maybe it''s worth it.



I doubt very much that a game producer would ever consider releasing a game for linux, because it is such a small market. They are only instrested in the money. Have you ever seen a copy of a linux game in a store? I haven''t.

Using standard functions that work on all platforms is ok, but actually laying down effort and time into making the game work on linux, i think is a waste of time that could have been spent more wisely. =) My oppinion. At least now, when windows is the dominant platform for games.

(ps. i''m not at all a linux-hater. I''m sure games run great on linux and it''s great for servers etc. I''m just looking at things from a market point of view.)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Actually I''ve seen both UT2003 and UT2004 on sale in shops for Linux. It''s just they''re on the same DVD as the windows version. Which means if you''ve brought either of these games you''ve also brought the Linux version :-)

Share this post


Link to post
Share on other sites
Its interesting this. For those commercial games I have been involved in that have been on more than one platform very little of the code has been shared. e.g. one game was on the PC and PS1 and so none of the graphics could be shared, none of the physics (no floating point unit on ps1 so fixed point maths instead). However modern consoles are more powerful and so I would expect you could share at least the game logic code between platforms.

If you think about a game generally it is in 3 levels. The top level is game specific code, the middle is game generic code and the bottom is hardware specific code. So in an ideal world a new game would just require the top level changing, the same game on a different platform would just require the bottom level changing. The middle is your generic game engine. You would hope that some of the top two layers could be portable.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
DarkZoulz its people like you that ensure the linux market stays so small

Share this post


Link to post
Share on other sites
Platform is such an arbitrary restriction. Writing portable code is not much more of an effort, its just another thing to consider when you are programming. Sure you may want to use a platform specific API, but it is still a good idea to abstract it. You may want to replace it with the successor to that API in the future, even on the same platform.

There are many more potential platforms than Windows and Linux, especially if you are working in games. And there will be more in the future. Writing API / platform specific code when a little care could make it more generic will often make life harder in the future, since portable & reusable are often the same thing.

Share this post


Link to post
Share on other sites
Indie/Shareware games tend to be a better market for cross-platform games. With a little extra effort you can reach a whole bunch of extra people. And while the linux market may be less willing to actually pay for software, Mac users are badly starved of good games.

Share this post


Link to post
Share on other sites
In my engine which by the time I stopped making it was around 5,000 lines, I bet I had less than 200 lines of platform specific code, including the #ifdef''s and everything else. So really the issue is, are you just too lazy to google for the right function on linux. Often times, you don''t have to make huge changes in your code: for example, in my dynamic library code, linux has the same set of stuff as windows (different data types, but the size of the data types were the same).

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!