[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 23-Aug-99 Ingo Ruhnke wrote:
>> Erik <br0ke@math.smsu.edu> writes:
 
> 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 :)

Thats what svgalib is good for, not more, not less. In the future, I
think, framebuffer will be used what svgalib was for in the past. But
I think using them directly isn't a good idea, if you haven't a good
reason for what you are doing.
 
> Most games should be full screen, some can get away with windowed (not all
> games are FPS games where framerate is the deciding factor)

Correct, strategic and card games can also work in a window, but for
most games windowed mode shouldn't be the only way.
 
>> 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...

Tux just uses Mesa, Glut and PLib, nothing special and not difficult
to build.

> 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 just had a look at the NEWS file, FlightGear started with plib in
version 0.6.0.

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

Why not open source the game? The only reason I see for that is that
you go comercial, but if not, if you release it as freeware, you can
opensource it also, it won't hurt you. If you want to create the game
your self, thats ok, but you can still release it as open source, if
you don't want patches from other people just don't use them.

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

Correct, but you could use a dynamic linked lgpled lib.

> 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 linux user base grows, there will be more and more users, which
have never compiled something themself and even don't know of to
install a package without YaST or something like gtar or krpm, but I
think all that install procedere isn't very difficult and a simple
note on the webpage could solve the problem for most users. If there
are still users which can't get the thing to work than maybe your
webpage should provide more infos, your source has errors or the user
is a troll. If the user is a troll, than you probably don't want him
to play your game.
 
>> 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.

Pingus prints AFAIK the download URL ;-) Don't know what the other
games do since I have ClanLib installed :-)
UClient (from the WorldForge project) for example also offers the
possibilty to download the missing libs with 'wget'. I think thats
very user friendly.
 
> Clanlib itself has all sorts of ansi colors in it's configure/make

I know, should they be removed? They look nice but cause some throuble
if you compile under emacs.

>> 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 :)

Just GPL your game ;-)

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

I think we should differ here between OpenSource and commercial games,
if your game is commercial, the stuff should run as smooth as
possible, else it would be the last time the user bought a game from
your company.  If you have an OpenSource game its also not such a big
problem, if the game compiles cleanly that ok, if it requires to much
librarys than that is probably not so good and some users won't play
the game, but hey, you will end up with a user base which is really
interessted in the game and the other users can still wait until the
game is on theire distribution. And an interessted small user base is
probably better than hundreds of trolls.
 
>> If somebody wants to write a game, he should really use an high level
>> lib, it will make live easier.
 
> 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...

You are correct, but plib and crystalspace are different! Plib is
AFAIK a wrapper around all that stuff which isn't portable (Joystick,
Sound, etc.) and has in addition some other stuff like a primitive
GUI, font renderer, etc. While Crystalspace is a game engine for
first/third person indoor games like Quake/Doom, etc. 
I do not mean that everybody should use Crystalspace for there games,
since CrystalSpace is worthless for stuff like flightsimulators or
similar stuff.
I think CrystalSpace would be a good choice if somebody has a more or
less finished story line for a first person game and wants to
implement the thing, than CrystalSpace can save him a lot of time and
he will probably get much better results with it than if he does all
the stuff himself.
Plib should be choosen for stuff which needs more flexibility. The
programmer then has to implement the GameEngine him self, while with
CS he would only have to change the things needed by his game.

And at last (most) games are drawn not programmed (have a look at
http://linuxtoday.com/stories/7398.html). It doesn't matter if you
wrote the super coolest and fastest 3D engine of the world, if your
games makes no fun. For example have a look at HalfLife, it uses
AFAIK the Quake engine, but looks totally different and has some more
features. So using an existing engine would save a lot of time and
your game can still have a unique look and feel, its really more a
matter of design than a matter of programming. If you want to do all
that low level stuff, you should probably join one of the engine
projects available.

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