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

Re: Why code your own library?




On 23-Aug-99 Ingo Ruhnke wrote:
> 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

I used svgalib happily a few years ago, now I just use it to demo principles,
cuz it's so disgustingly simple for what it does :)

> additional X11 support, which also sucks, real games must run
> fullscreen, playing in a window, is usefull for debugging, but not for
> playing. 

Most games should be full screen, some can get away with windowed (not all
games are FPS games where framerate is the deciding factor)

> 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 haven't tried tux because in addition to the game itself, it required a meg
of d/l to install some library system all over... Last I checked on flight
gear, it did not require the plib libraries externally. It may very well have
plib imbedded into its source tree, but it's still a single source tree. When I
tried it, I just downloaded the game itself and went from there.

>> (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. 
> 

For most apps I use gnu auto*, but for my game, I use handbuilt makefiles. I
still don't know if I'm going to be open source on it, but I definitly know I
want to have a "drop in" binary that just goes without needing any library
hunting for most users. If I understand correctly, neither the gpl nor lgpl
would allow me to use someone elses code inside of mine if I'm not releasing
source freely to those who get the binary (shame on me for closing my source)

>> 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.
> 

a year ago I woulda agreed. Now I see a lot of linux users who can't figure out
how to type "rpm -i blah.rpm" and need gtar or something to unpack an archive.
Maybe I'm just seeing the bad side of it, but it sure feels like linux is
getting dumbed down for the average winiot to have a turn :(



>> 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. 
> 

I beleive clanlib games typically have that kinda message. Clanlib itself has
all sorts of ansi colors in it's configure/make

>> 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.
> 

static linking can lead to licensing problems :) Quality is definitly
important, but if your game requires that lib and this api and that and this
and something else before they even get to see it, a lot are gonna quit before
they get to see your hot high quality awesome game. 

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

s/he/they/
s/an /a /
easy is for wimps :) If every game is written using plib, they'll all have a
plib l&f. If every game is writting in crystal space, it'll have a cs l&f.
Games need a level of novelty and uniqueness to 'em...

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

        -Erik <br0ke@math.smsu.edu> [http://shells.clipboard.com/~br0ke]

The opinions expressed by me are not necessarily opinions. In all
probability, they are random rambling, and to be ignored. Failure to ignore
may result in severe boredom or confusion. Shake well before opening. Keep
Refrigerated.