[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why code your own library?

Erik <br0ke@math.smsu.edu> writes:

> On 22-Aug-99 Steve Baker wrote:
>> Erik wrote:
>> PLIB is (I think) on SuSE 6.2 and will be on the next RedHat CD too.
> that's cool, but it's not on redhat right now, nor is it on debian, caldera,
> slackware, rock, ...

For example take another lib, ClanLib, its acctually is on SuSE and
debian(unstable), RPM's for redhat are also available, there are still
some distros which don't include it, but that mostly because its still
under development or the games using it are under develepment, same
for PLib.
>> Where do you draw the line?
> if it's a de facto library, then I'll use it. :) I use mesa, I use svgalib, I
> use kernel level stuff... everywhere you look, people use it.

de facto is relative! Use svgalib and you will have run it only on
x86 linux and nowhere else. Use kernel level stuff und you will also
get lots of portabily problems. Using a higher level libary and you
not discover the problems. Most games at the moment have serious
throuble, some using svgalib (which I hate and never use), some have
additional X11 support, which also sucks, real games must run
fullscreen, playing in a window, is usefull for debugging, but not for
I think lots of games at the moment make the mistake to use the wrong
lib, some use plain X, which gives them a lot of work, to get it
working, stuff like DGA require extra work, some have an extra svgalib
target, so it requires additional work, there should also be an fbdev
target, so again some more work. The game needs joystick
support, so write it at kernel level, you want to port the game later,
then you have to write additional stuff for the joystick. I think this
is just a waste of time, using a high level lib would solve that and
you would have more time programming the game.

> plib may be the greatest stuff in the world, but unless it's an
> extremely common api (like with all the big distros as a "normal"
> package, not an extra), then I'm not gonna work at making code that
> only uses plib

plib is common! tux_tqfh uses it, flightgear uses it, both games are
impressiv and are some of the best games for linux at the
moment. So for an 3D game I think using plib would be a good choice. 

> (I use makefile magic and have target compiles, so my source tree
> would have like sound.esd.c and sound.oss.c and sound.win32.c).

Nice to see, are you using autoconf/automake? But a high level lib
would cause much less work. You would only have sound.c and all os
specific stuff would be in the lib. 

> Most game players don't care about libraries and don't know how
> to install them without some kinda package management tool.

I think a lot of linux users aren't that stupid. A simple './configure
&& make && make install' isn't that difficult. And sooner or later all
the high level libs and the games using them will be packed and then
the install throuble would be solved.

> If I make a game using a library where most games will have to
> download and compile (or totally upgrade their whole system), it
> won't be as popular as a game that "just runs" out of the box.

I think making a game run "out of the box" is easier using a high
level api than using lower level tools. Since a lot build issues can
be solved in the lib, if the lib has good configure script, so it will
run out of the box, the work for your game is minimal, you have just
to check for that game libary. The user will still have to download
the lib, but that isn't to hard, you can also print a nice message
where to find that lib, if the config script can find it. 

> If ya look at common complaints against linux games, however they're
> released, a biggie is how well they run out of box...

I think focusing on the quality of the game is more important than
focusing on the out of the box issue. I high level lib will not hurt
much, but will give you much more time spending on game writing
instead of playing around with low level issues. And newer the less
you can still link your game statically against the lib and distribute
a binary, so it won't hurt at all.

If somebody wants to write a game, he should really use an high level
lib, it will make live easier.

                                  http://dark.x.dtu.dk/~grumbel/pingus/ | 
Ingo Ruhnke <grumbel@gmx.de>             http://home.pages.de/~grumbel/ |