I would like to start learning about game development and I would like to do it using Linux. My main experience has been with Java and a bit of C++, but that was for applications and not games.

Now that I want to try with gaming, I'm wondering which IDE/language should I use in Linux, whether I should go with C++ and compiling files manually at the beginning, or maybe continue with Java/Eclipse, also I think I can use Eclipse with C++, I have also started reading about Python...

I was thinking in starting with the typical "Tetris" just to understand how a game works internally, and I think I can achieve that with all the previous options, but what do you recommend me or how have you started game developming under Linux?

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
If this question can be reworded to fit the rules in the help center, please edit the question.

1

I wouldn't start out with Tetris, it is a bit more complicated than you think. I would start with a simple game of pong. Add scoring, AI, and slowly make it more complicated. Then maybe start a Tetris like game.
–
AttackingHoboNov 18 '10 at 23:30

I don't think there's a great deal of difference in Linux and any other development platform. You miss C# and .NET if you don't use Mono, but thia also happens on Mac.
–
The Communist DuckNov 20 '10 at 16:28

Mono is basically what allows you to use C# and other .NET languages on Linux and Mac?
–
Kaitlyn McmordieDec 31 '11 at 7:41

8 Answers
8

If you've never done game programming before, you should probably start with 2D. SDL is a pretty straightforward library with nice bindings for C++. You can use whatever editor / IDE you like, but I'm a big fan of code::blocks.

There are finally some nice game engines for Java, (Java Monkey Engine) but Java kind of gets in the way sometimes. I like Java (I've taught it for years) but it always seems kind of clunky to me as a game development environment.

I'm a huge fan of Python and pyGame. (PyGame is simply SDL with bindings for Python.) You can build a really nice 2D game quite quickly. Python is quite easy to learn, and it tends to let you focus more on the game programming rather than memory and pointer issues. It's true that Python code isn't quite as fast as natively compiled C++ code, but it's more than fast enough, and the easier coding and debugging will often make up for the difference. If you find a critical section that Python simply cannot handle, you can write that section in C/C++ and use it as a module.

I teach a game development class, and I've switched languages several times. I'm very happy with Python as a language to teach game development with.

If you want to create high-performance real time games, or you want to get into professional game development, then only C or C++ are practical language choices currently.

This is because
a) They can create fast, efficient code using small amounts of memory (many high level languages do not give you the ability to explicitly control memory allocation, which makes it difficult to optimise cache usage or fit data in the limited memory used by many systems).
b) They are the industry standards that are used by the vast majority of AAA games. Particularly C++, though the languages are reasonably similar (when it comes to the ways they are used in Game Development anyway).

For a framework, I would advise learning OpenGL. It might be a little bit more complicated than some systems, but it's very powerful and widely used, and your knowledge can scale up from Pong all the way up to Unreal. There are plenty of good tutorials, just google for 'OpenGL tutorial'.

To make things slightly easier, you can use an OpenGL wrapper framework (I recommend GLFW - http://www.glfw.org/ - though GLUT is also popular).

As much as possible, try to write the code yourself rather than relying on pre-built frameworks. This will teach you the basics of game update loops, input processing, rendering, etc. That will stand you in great stead for building more detailed projects later.

I consider Linux in itself a pretty neat development environment. Most distributions have everything you need to develop c/c++ apps, just invest some time learning gcc, gdb, vim and a decent build system like Make, CMake or Scons.

If you are using c/c++ then SDL would be a good starting point, library wise - because you will find a huge amount of tutorials for it.
For python I found pyglet to be an excellent library, although i haven't used it for 2 years. Just keep in mind that deployment of a python app is not "that" easy..

I use vim and highly recommend it - it's a very powerful text editor designed to help you write code quickly. It has a pretty steep learning curve, though (after installing it, run 'vimtutor' to get a quick walk through). I've been using it for 8 years now and couldn't imagine using anything else.

I'd also suggest not jumping into an IDE immediately. In my experience, IDEs are clunky and get in the way (especially while you are configuring a new project). I've kept Eclipse/CDT around as it is indispensable as a debugger, though.

If you've got C++ experience, I'd stick with that. As others have mentioned, SDL is a great way to get started -- you can't go wrong there.

Tetris was the first game I made and probably isn't a bad way to go, but you might also consider something like a 2d platformer or a 2d top-down adventure game.

I'm confused... do you know why people seem to often use Linux often as their choice for game development?
–
Kaitlyn McmordieDec 31 '11 at 9:03

1

The way I see it, Linux is designed by programmers for programmers. Windows is designed by non-programmers for newbies. Linux is teeming with tools to make programmers more productive. However, in my experience, Linux is used only very rarely by game developers.
–
stepheltonDec 31 '11 at 21:30

Hmmm why is it not really used by game developers then?
–
Kaitlyn McmordieJan 5 '12 at 15:05