Linux Gaming Reading Guide

Discussion in 'General Computing' started by DevynCJohnson, Jun 11, 2014.

  1. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Messages:
    1,295
    Likes Received:
    1,033
    Trophy Points:
    113
    Last edited: Aug 3, 2014
    Mitt Green and Virneto like this.
  2. Virneto

    Virneto Member

    Messages:
    46
    Likes Received:
    21
    Trophy Points:
    8
    Boy, this is very useful information.
    I'll sure follow your links and try some with my younger brother always asking me for games on my Linux machines. ;)
  3. Murp

    Murp New Member

    Messages:
    24
    Likes Received:
    5
    Trophy Points:
    3
    Expectedly, there's no huge list of "awesome Linux-exclusive big-name developed games." :p

    Hopefully, if the Steam Machine takes off, more game developers will feel comfortable developing for Linux.
    DevynCJohnson likes this.
  4. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Messages:
    1,295
    Likes Received:
    1,033
    Trophy Points:
    113
    That would be great. However, programmers should learn how to make cross-platform applications or add some special C/C++ code with macros. Then, we would not need to worry so much about which operating systems a program will support.
  5. Murp

    Murp New Member

    Messages:
    24
    Likes Received:
    5
    Trophy Points:
    3
    I don't think it's that they need to "learn" how to do that. I feel pretty confident most major game programmers are capable of making their games platform-independent. There's just no financial incentive. Windows has like, 90% market share, Mac just under 10 and Linux a fraction of a percent. It just doesn't make good business sense to put any effort into cross-platform programming. I'm surprised most major PC games eventually get a Mac release, to be honest.
    DevynCJohnson likes this.
  6. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Messages:
    1,295
    Likes Received:
    1,033
    Trophy Points:
    113
    Now that I have strengthened my programming skill these past few months, I have learned that it is not that hard to make an application cross-platform. Just reduce dependencies, know about the various OSes, own cross-compilers, and use macros code with your preferred language.
  7. Murp

    Murp New Member

    Messages:
    24
    Likes Received:
    5
    Trophy Points:
    3
    *nods*
    Therein lies the incentive problem, though -- most companies don't stand to make much more money if their game is playable on Linux, and most of their coders don't know much about Linux. Coders would have to learn about Linux to be able to program platform-independent games, and since the financial payoff is miniscule, they won't bother.

    I'm just really getting into programming. I've messed around in Game Maker, Sphere, RPG Maker, Graal Online, Zelda Classic, Warcraft III and some other stuff, so I more or less know how programming works, but that's all light-weight scripting-type stuff. I hope to be able to make pretty much all my major projects down-the-line be platform-independent.
    DevynCJohnson likes this.
  8. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Messages:
    1,295
    Likes Received:
    1,033
    Trophy Points:
    113
    I do not know what kind of skills you have in programming or how much you love programming games, but your best choices are C/C++, Java, and Python. Here are some basic tips.

    Java works on any system that has a Java-class interpreter (like OpenJDK, Dalvik, etc.)

    Python is cross-platform. Just be sure to avoid OS-specific commands, or use some if-constructs that will use the correct command for a specific system.

    C/C++ is a powerful language that compiles to machine code. To make such code cross-platform, use macros, avoid system calls, and compile the code using many different cross-compilers.
    Murp likes this.
  9. Murp

    Murp New Member

    Messages:
    24
    Likes Received:
    5
    Trophy Points:
    3
    I've been looking at SFML, which is a game-creation library for C++ that boasts ease of use and cross-platform features. Its commands are very similar to the Sphere open-source game creation engine (it's like an open-source GameMaker), although Sphere is Javascript based. Which I very much like, actually -- js has marvelous string handling, which is very useful in games. And I also really like js's dot operator and general feel. Gonna be quite a change, getting used to C++.

    I'm pretty much just doing this for fun, so I'm starting low and slow and building up. I'm starting off by reading The Art of Assembly by Randal Hyde, maybe I'll mess around with some simple NES/SNES assembly hacks first. Then I'm gonna learn C, because I also wanna program like, neat little Raspberry Pi and Arduino gizmos, and C is great for stuff like that. Though I understand Python is very simple and works OOTB with Raspberry Pi's thingy for controlling robotics (saw some Youtube vids to that effect), so I'll probably pick that up, too.
    DevynCJohnson likes this.
  10. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Messages:
    1,295
    Likes Received:
    1,033
    Trophy Points:
    113
    C and C++ have a lot in common. Once you learn one, you just need to learn the differences (you could google "c vs c++". Python may seem simple, but once someone truly learns Python, than they can see that Python is very powerful. Python script can compile to bytecode or as a stand-alone executable. Tools are available to convert Python code to C or C++.

    You may find these links helpful

    http://learnxinyminutes.com/
    http://www.cprogramming.com/tutorial/c -tutorial.html
    http://www.learncpp.com/
    Murp likes this.
  11. Murp

    Murp New Member

    Messages:
    24
    Likes Received:
    5
    Trophy Points:
    3
    Ooh, those are nice links, thanks.

    I don't think I'd ever trust a black box to convert code from one language to another for me, though. Converting Python to C/++ I mean. I barely trust HLLs at all, heh. I love Assembly so much, it's just a very limited language now, with the direction computing has taken.
    DevynCJohnson likes this.

Share This Page