[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Not a HOWTO but a guide of some sort...
Paul Tiseo <ptiseo@mediaone.net> wrote:
>
>
> ...is what is needed! I would like to begin coding a game but I
don't know
> where to start. I have recently installed Linux and have begun to
look at
> what is out there to use for putting pretty pictures on the screen.
>
> GNOME? KDE? GTK? PenguinPlay? GGI? SVGALib? Mesa? OpenGL?
CrystalSphere?
I'll tackle this one. It's a question that I've
faced myself, and since linuxgames.org hasn't answered
it yet, I went and did the research on my own. It's
actually a mostly straightforward answer, because
several of the libraries you mentioned are intended
for different purposes.
Let's start out...
At the lowest level, you've got a choice of X11,
SVGALib, and GGI.
X11, as I'm sure you know, is the window system. It's
a pretty common way to do graphical programs under
linux.
SVGALib is an alternative which lets you do graphics
directly in the console, without needing the windowing
system. Unfortunately, it has some significant
shortcomings, notably requiring programs to run as
root, lack of portability, and limited to certain graphics cards.
Fortunately it's for the most part
obsoleted by...
GGI. GGI is a low level library to interface graphics
targets, like the libraries mentioned above. Unlike
the libraries above, though, it is multi-targetted.
Without recompiling the game, it can run under X11,
SVGALib, Glide, and whatever other targets you happen
to have.
Since the GGI API is stable now, I'd choose it if
I was making a choice between the three. It's a
basically a superset of the other two, with a simpler
API than X. However, if you want to do transparent
blits (ie for sprites), then either you do it yourself,
wait for libggi2d, or move on to a higher level
library.
Which brings us to the next level: SDL, ClanLib, and
PTC. PenguinPlay would also go at this level, but
I'm yet to be aware of anything that they've declared
ready for use (plus my poor gcc 2.7.x chokes on some
of the C++ from the new standard).
SDL is a simple, straightforward game library, which
is straightforward, lightweight fast. It gives you
basically what you'd expect - blitting etc. It is
intended for source-level cross platform compatibility.
It also includes sound code and thread code, but I
haven't looked at that closely.
ClanLib is a little more complex. It additionally
provides networking and 3D support (not sure via
what API). Also note that it's a C++ API, not a C
one. The style of the API is intended for people
who are accustomed to programming under windows.
PTC is also a C++ lib, but a much simpler one. It
is only a 2D graphics lib (no sound, net, 3d, etc).
It is best suited for people that do mostly direct-to-
framebuffer graphics, mixed in with the occasional
blit. They get bonus points for supporting GGI, and
for being portable to Java.
PenguinPlay, ... well? Christian, you want to say
something here? As far as the rest of us know, we're
still waiting for a working release of some kind.
Moving on, to 3D. Worth mentioning here is OpenGL,
Mesa, and Glide.
First of all, if you're doing anything 3D, OpenGL is
*the* 3D API to use. It's standard, it's been around
for years, and I expect it to be around even after
microsofts D3D dies.
Next, to clear things up, Mesa is OpenGL. Basically.
OpenGL is the API, while Mesa is an implementation of
it. To be precise, Mesa is almost 100% conformant to
the standard. It wont deviate in any way that you'll
ever see.
Glide is a library released by 3Dfx to interface their
line of 3D accelerator chips, notably the Voodoos. I
haven't looked at it, so I'm not going to comment on
it specifically, but Mesa will run on top of it.
I'll also point out that the GGI team is working on
something called libggi3d. This library (only in the
formative stages, as far as I can tell) is intended
to let you use the hardware accels on any 3D card you
have. I'm not sure if this library will be OpenGL, or
run below OpenGL, but when/if it happens count on it
being simply a way for Mesa to access your 3D video
card.
While we're talking 3D, I'll also mention CrystalSpace
(note the spelling:). CrystalSpace is a very special
purpose, high level library (and a pretty cool one at
that) that is intended for 3D worlds. While OpenGL
works at the level of drawing textured polygons,
points, etc, CrystalSpace deals with drawing rooms,
objects, fog, dynamic lights, hidden surface removal,
etc. C.S. is a C++ library. It is also very
cross-platform, and I believe that it can use OpenGL,
Glide, D3D, or software for the low-level 3D rendering.
You also mentioned GNOME, KDE, and GTK. First of all,
GTK is a windowing toolkit. It contains things like
menus, buttons, scrollbars, etc. GTK is the windowing
toolkit used by the GNOME project (which intends to
extend X11 by letting you drag object to/from the
desktop, etc.). Usually, you hear GTK and GNOME in
the same sentance.
The KDE project does much of the same things and GNOME.
They've got an equivalent to the GTK, called the QT
library. The choice between GNOME and KDE is largely
personal preference, you're bound to see religious
wars on the subject, and I won't go into it here.
By the way, GNOME is C and KDE is C++. Also, if you
use either of these, then AFAIK you're limiting
yourself to X11. I'm not sure how applicable these
two are to games programming.
Finally, I'll mention some special purpose libraries.
There's GAMES. GAMES is a tiny library
which handles sprite animation. Although it is
not a very general library (completely tied to X, and
not particularly extensible) it does its job, which
you can see from a couple of nifty games written for
it.
There's also AAlib, which is a library that converts
pictures into text (if you've seen ttyquake, you'll
know what I'm talking about). GGI programs will be
capable of using AAlib as a target, by the way.
If anyone can comment on SciTech MGL (last I heard
no linux port, but one was planned), or XWinAllegro,
please do so here. Of course, a good rule of thumb
is, until you can find someone that can comment, it's
not a serious option. :)
I think this should help. You're still need to ask
someone else if you want info on sound or networking,
but I think this pretty much covers the options for
graphics under linux.
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com