🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

game dev for linux: overview

Started by
19 comments, last by cmdkeen 22 years, 10 months ago
hello linux-game-programming-gurus-and-other-people-that-would-help-me, I recently got a linux distribution. I''ve done some dos + windows(dx) programming so far, now I would like to do a little game in linux to see how it works. Im currently looking up the documentation for linux/kde programming. Where can I get additional game programming info (tuts, references, etc) ? Where can I get an overview of tools/libs that are useful for game programming ? What libs would you recommend ? I think I will use OpenGL for graphic but whats good for sound effects/midi/input ? any help appreciated Jan Rehders
Advertisement
Have a look at SDL. It can do sound and input and setup a window for you to draw in (OpenGL compatible) etc...
Unfortunately it doesn''t do ALSA sound, only OSS (at least the version I''ve looked at, perhaps they''ve implemented ALSA sound by now, check it out).
SDL is definetaly the way to go if you are used to using DirectX. As for sound, there is a free (for non-commercial use) sound library called FMOD available that supports ALSA, OSS, and other native sound API''s. Check it out, it works wonderfully in Windows and Linux.

-----------------------------
kevin@mayday-anime.com
http://dainteractive.mayday-anime.com
-----------------------------kevin@mayday-anime.comhttp://www.mayday-anime.com
Generally, when you''re writing games you don''t go through KDE, it''s somewhat slow. (Not as slow as the GDI, though ) SDL is good, but if it''s not your thing, there are alternatives, like using glut to set up your windows and graphics. It''s only graphics, so you''ll have to dig something else up for sount/input/etc.
For sound and midi, you should take a look at
http://wolfpack.twu.net/YIFF

YIFF is one of the most stable and time tested
sound servers for Linux games available.
Tara Milana - WP Entertainmenthttp://wolfpack.twu.net/Comp graphics artist and programmer.
Ahem... Allegro. It''s opensource, does graphics, sound, input, etc.. And, it can use OpenGL.
quote: Original post by Some Guy
Ahem... Allegro. It''s opensource, does graphics, sound, input, etc.. And, it can use OpenGL.


I''ll have to second that. Allegro is SOOO much better than SDL.

And AllegroGL just kicks ass.
Heh well... the Linux-people are always battling over which is better and which is worse. I personally prefer the SDL API (it''s just the way it''s laid out), but you are of course entitled to your own opinion. And now that I''m already using SDL, and SDL isn''t dieing, I''m sticking with it.

I have to add that while KDE is IMO the best desktop environment on Linux, it''s not exactly the fastest. Pure GDI programming is probably faster than the bulk of KDE/Qt/X. Of course, just like few people write programs for pure Xlib, few people write for pure GDI, and they most often use MFC which makes it slower again.
However, startup times of KDE programs are something that definitely needs work. Anyway... it''s improving all the time, that''s the good thing about Linux stuff (and they actually care about execution speed...)

cu,
Prefect

One line of sourcecode says more than a thousand words.
Widelands - laid back, free software strategy
Okay, here's how I see it. For libraries, there are basically three all-in-one choices: SDL, Allegro, and Clanlib (though i'm not sure how Clanlib deals with OpenGL). I myself am an SDL man, but I've heard very good things about Allegro and, especially recently, Clanlib. I suggest you take a look at all three and pick the one that suits you best. There are also individual libraries to help you such as glut, yiff, plib, and hundreds of others that each handle one aspect of your game.

As for additional game programming info, if you're using SDL, libsdl.org has a great number of open source demos. I know some people complain that there's not as much hand holding, but if you're willing to poke around the source, you'll find that there's not as much need for hand holding. For non-SDL things, i don't know. There are plenty of generic programming tutorials that are applicable to game development, and there really isn't anything fundamentally different about programming a game under Linux than any other OS, other than the libraries (or system calls) you're using. Refer to the library's page for liberary specific help, and when all else fails, try IRC and mailing lists. I've gotten better help at #sdl than from anywhere else.

Also, i might as well plug Programming Linux Games (not to be confused with Linux Game Programming), which really covers basically everything you're asking for. It's at http://www.nostarch.com/plg.htm I didn't write it, i've just heard good things.

There aren't too many overviews of tools since everyone has an oppinion. Some people love KDevelop. Some people love CodeWarrior. I myself, and a great number of others use the normal *nix tools. I write code in vim (though i could be using emacs or nedit, if that were my thing), compile with g++ (which is part of gcc), build using make (and autoconf), debug with ddd using gdb as a backend, and profile using gprof. CVS is also a life saver. It may seem like CVS is only for projects with many developers, but i use it for everything i do that's more than just a file or two. There's a free book on CVS on the web, that i highly suggest. There are a few other tools such as gperf for the occational odd job, in this case finding a perfect hash function, that i'll use occasionally, in addition to gold old homebrew tools. I use gimp for most of my 2D graphics work. 3D modeling is a bit tougher. If you're willing to put in the time to learn it, i hear Blender is great, but it's a bit on the impossible side for the newbie, even more so than most modelers. Maya is available for Linux if you're willing to blow a chunk of change on it. It doesn't really get much better or more professional than that.

Finally, as long as you're doing game programming, i wouldn't bother learning KDE specific stuff. Games shouldn't tie themselves to one window manager or desktop enviroment or another, in my oppinion. There's really no need to for most games, and even if you need some windowing, you can get it without using Qt or gtk.

Good luck!
ben.c

Edited by - shelrem on August 13, 2001 5:00:29 PM
thank you for your answers

this are really much more answers than I expected

I hope I will be able to start soon because I just mixed up my modules.conf when I tried to install DSL drivers

I asked for KDE progging because I like to make enhanced editors for my games. So it would be useful to know about it.
I recently heard Borland gives away a free version of Kylix, I''ll have a look at it.

And again a big thanks to you, this will give me some work for the next months

btw: which of these apis are cross-platform ? It would be nice to be able to release windows and linux versions.

[ad]
You might have a look at www.turtlegame.f2s.com to see my last game (win/dx)
[/ad]

Jan Rehders
http://www.turtlegame.f2s.com

This topic is closed to new replies.

Advertisement