Advertisement

How to start game programming in Linux?

Started by July 14, 2005 12:10 PM
11 comments, last by NamelessTwo 19 years, 3 months ago
I'm interested in game/graphics programming in Linux? I have already compiled my first OpenGL/SDL/freetype2 program. Next step will be to include XML support (evtl. TinyXML). For now I'm using a simple makefile and gedit. What I'm actually intersted in? Do you have any suggestions what tools to use? How to debug graphic programs in Linux? (is there any GUI debugger?) I also have Anjuta but it does not support structuring sources in subdirectories, that's why I'd prefer not to use it. BTW: I use GNOME. I don't want any extra KDE/QT stuff if possible! I also want to know: How to do unicode in Linux? The standart lib functions: fprint(), etc. do not support non-ASCII characters. If you have any other recommendations or you want to share your experiences in writing graphic stuff for Linux (actually crossplatform one), please, do it here! Thank you very much!
Another nameless person in the virtual space...
for a gdb graphic frontend I recomend DDD.
You may want to look into autotools, but I am sure plenty of people hereupon will tell you how horrible it is, how much they hate it, etc, in reallity, thought, once you understand how it works, its pretty good.
Advertisement
Go GNOME! I used to like KDE, but GNOME was my first favorite (way back when RedHat was still around). KDE is too resource-hoggy, even for my super-fast (by yesterday's standards) machine.

For large projects, autotools is certainly a good tool. However, for small projects it really is more trouble than it's worth. Since it's designed to run on EVERY SINGLE UNIX/LINUX VARIANT THERE IS (including Solaris, HP-UX and other such miscellaneous Unices), it's a huge, monstrous, sprawling distribution. A simple Makefile system should work on 90% of Unix computers out there (and anyone who's compiling programs themselves should know enough to make Makefile tweaks to suit their machine). Yes, I am telling you that autotools is very hacked-up. For large projects though, there's nothing like this (yet) that manages your projects for you. A side note - autotools runs horribly slow on Windows, so if you want Windows users with Cygwin/MSYS to compile your applications, don't use it...

I prefer Kdevelop to Anjuta for an IDE, but if you ask me both are underdeveloped and, out of character as it may seem, I must say that Microsoft's Visual C++ is far superior. I hope the OSS developers take the hint.

If you ask me programming Linux is actually much easier than Windows (especially in the area of like, learning the API, networking, etc.). The functions are all ANSI C and there's no need to learn something like the Win32 API (which scares many beginners).

Unicode in Linux requires some other libraries. You could use the GTK+ libraries (which of course are included with GNOME) - atk (the accessibility toolkit, which I think provides intl text but I'm not sure), and pango (int'l text rendering). GTK+ programs automatically work with Unicode I think because of this. For console output... you can't do it I think. I don't think Windows has Unicode console output either. For like GUI in-game, I think you might be able to take advantage of atk and pango.

Hope it helps!
- fyhuang [ site ]
I hate the autotools. I also hate Anjuta as well as KDevelop.

I happen to love Eclipse, though, which works great as a C/C++ IDE if you get the plugin for that.
As far as Unicode is concerned, your best bet is probably to use UTF-8 throughout your program, and ensure that all libraries etc, are set up to do the same. This means that you can still use (most of) the standard C string functions as necessary.

Mark
The latest release of KDE is quite speedy. Kate is my favorite text editor as well, supports any language under the sun :)

I find linux ideal for game programming because it forces you to use x-platform code which is then easily transferrable to windows.

Do you want to know about linux specific features? This book is a great start, Beginning Linux Programming

Seems like you are advanced enough to learn SDL/OpenGL on your own. If you can teach yourself OpenGL and SDL with your language of choice (reading docs on the internet) then you should be all set.
Advertisement
Quote: Original post by Kwizatz
for a gdb graphic frontend I recomend DDD.


Whoa, finally some quality-looking GNU software.

I eat heart attacks
Quote: Original post by clayasaurus


Seems like you are advanced enough to learn SDL/OpenGL on your own. If you can teach yourself OpenGL and SDL with your language of choice (reading docs on the internet) then you should be all set.


Well, I'm "downgrading" from C#. I've actually used SDL a few years ago (before C#) but never completed anything.
Back then I tried to make a crossplatform 2D game but I had no working Linux, which I'd like to use not just for free time fun and I'm a kind of disgusted by MS, although I prefer using Windows :)
Another nameless person in the virtual space...
what about python/pygame/pyOpenGL you can create quite impressive things with python, because you allready have the important libraries at your hand. I finished a quake-like pak-system within one day and 100 lines of code (loading from tarballs and directories transparently).

well, you can write cross platform games in C# if you want.

there are several .NET ports to linux, but the most complete is the mono project.
it includes the tao framework, an opengl and sdl port to .net.

just check mono-project.com out.
yet, another stupid signature..

This topic is closed to new replies.

Advertisement