[svlug] Any X11 Game developers on this list?

Bevan Schroeder bevan at foo.net
Thu Nov 19 11:48:05 PST 1998


On Thu, 19 Nov 1998, D. Dante Lorenso wrote:

> I'm working on a game idea i've had for quite a while
> now, but I though I would try to design it for X11.  I've
> started to do some coding but I'm having some confusion
> as to which libraries I should be using...so...I started
> to write some of my own.  Before I go too far trying
> to re-invent the wheel, does anyone else have some 
> experience with this already?

I have a game-friendly, fast API for xlib included in my game "Roids" at
http://maxx.foo.net/~bevan/roids.html
It's called blib.  It's pretty much end-of-life'd, as I'm using gtk now,
and when I next go to game programming it will probably be back to OpenGL.
Nevertheless, it supports shared-memory ximages, and it's very easy to use.
I would recommend it for simple games or real-time simple apps like
fractal browsers or raytracers (both of which I've written in it), but for
apps that are heavy on the user interface or require 3-D support, it's the
wrong choice.  There are a number of other linux game programming pages
linked from the web ring at the bottom of the above URL.  I've seen at
least five "THE __ONLY__ SOURCE YOU'LL EVER NEED FOR PROGRAMMING LINUX
GAMES!!" web pages, most of them are in the ring.  :)
If you plan on incorporating sound, I recommend MikMod for music, or the
sound library in my game for just sound effects.  I couldn't get MikMod to
play wav files like it's supposed to.  The sound library I used is an
improved version of the library used by xgalaga and xkoules.  In the act
of improving it, though, I broke all the other-unix support.  It should be
easy to put back in, but nobody's sent me any patches yet.
My thoughts after writing my own xlib toolkit:  it wasn't that bad.  A lot
of games (and screensavers) are written in xlib itself.

> I'm also fighting between developing in C or C++.  I think
> the OO model would help to simplify the devel process, but
> I've heard that C++ is a bit buggier and not as easily
> portable.  I'm tendign toward C++ regardless, but I've 
> seen many other games written in C only.  Why is this?

For a game, C++ is a very bad choice.  I would argue this in the general
case as well, but I don't want to start a silly flamewar (plus, I just had
that argument last night).  In gcc 2.7, C++ basically cannot offer
performance improvements over C, almost guaranteeing the C++ app will be
slower.  It will also be less stable, because C++'s implementation on
linux seems to be constantly changing.  Speed is more important in a game
than elsewhere, although I am annoyed by the slow apps people are
releasing under the excuse that processors are overpowered these days
anyway.  Somebody, somewhere (e.g. schools) is using a low-end machine
that will not be able to run the lazily-designed apps.
Linux, OpenGL, Gtk, Quake are all written in C.  As are many, many more
examples of excellent and large projects.  Noteworthy WRT your comment
about OO design is that Gtk is OO, and even garbage collects, so OO is
feasible in C.  Whether it's appropriate for a game is another issue.
And the biggest reason for not developing in C++ on linux is my success
rate (which is admittedly just personal experience):
		Built ok		Failed to build
C		95%			5%
C++		15%			85%

I don't know why this is, maybe it just means the less capable programmers
are the ones who choose C++ (and it's not the language's fault at all),
but even that is saying something. :)

> Ok, so...this is probably more or a general usage list
> for linux gurus, so...anyone got the address for a well
> traffic-ed mailing list for game developers under X11?
> ...or does anyone want to talk on this a bit more off
> this list?

I think (hope) this has proven relevant for a decent amount of the
readers, who may be interested in xlib or C/C++ issues.  There are
certainly a number of game programming lists out there - I believe I even
saw one on /. recently.

-bevan


--
echo "unsubscribe svlug" | mail majordomo at svlug.org
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ to unsubscribe
see http://www.svlug.org/mdstuff/lists.shtml for posting guidelines.



More information about the svlug mailing list