Re: [AD] Proposed changes for Allegro 5 (6?)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, Nov 29, 2001 at 02:13:50PM +0100, Grzegorz Adam Hankiewicz wrote:
> On Wed, Nov 28, 2001 at 06:33:04PM -0500, Bob wrote:
> > >  - network: why not use something like libnet?
> >
> > Because libnet is not being updated :)
> 
> Surely George can say something about that :)

OK. :)  Firstly, I don't think any networking (Libnet or not)
should be merged into Allegro, unless it would benefit the
networking code, through dependence on Allegro routines (or
avoiding duplicating functionality Allegro already has).  AFAICS
that's not the case -- in fact some parts of Libnet would seem
to benefit (it has routines which need to know elapsed times,
currently using very granular OS timers on some platforms), but
the user can overload these routines anyway to provide more
accurate functions using Allegro's timers.  Other than that,
Libnet supports use of threads, again allowing the user to
provide the necessary functions (mostly for mutexes).  I tried
to not make it require anything else, especially Allegro,
because it's much nicer if you can build the networking library
without such an overhead (for one thing, it helps you in making
dedicated servers run on Unix machines without graphical
displays etc).

About Libnet itself, any Allegro developer is welcome to
contribute also to Libnet -- IIRC the license is pretty much the
same, but if anyone has any objections on those grounds then
please let me know.  I'm perfectly willing to add new people to
the SourceForce CVS access list, and if anyone is dedicated
enough to make major changes, especially in the area of
documentation, they'd be more than welcome to.  I'm no longer
able to give much time to much in the amateur area, and the time
I do have to give inevitably goes to whatever I enjoy doing most
at the time.  Currently that's not Libnet (it's pretty much
AllegroGL, though I don't spend much time on that either), but
that doesn't mean I don't care about it -- I'd love to see more
people fixing bugs, making new releases, and making games using
it.

Gillius has made another networking engine, which people may
prefer over Libnet (I think what prompted him to do that was
that he didn't like Libnet's API, so others may agree).  If
more people are going to get into contributing to networking
libraries, they should check out his library too, to see if
they'd prefer it.  The two libraries have completely different
models. :)

Looking back at Libnet, yes, there are obviously some design
mistakes in it, which I'd love to see people fix -- and missing
features, like not all the protocols working on all the
platforms, cross-talk between platforms not working for IPX (I
think), IP conns should perhaps be implemented using TCP,
NET_STREAM would be nice, etc.  I didn't know a great deal about
networking when I started working on it; I know a lot more now,
and I've implemented the network support into our game at work,
but I'd still stand by most of the code I wrote.  Overall, I
still like the general API structure (heavily derived from
Allegro's driver concepts) and I think it's extendable enough to
fill all the gaps it's missing at the moment, if people develop
it some more.  I still really like the idea of a network library
which gives the same API on different platforms and network
types -- yes, sockets do this too, but they're pretty clunky
sometimes, and I prefer Libnet's API.  The build process is kind
of weird, but it works; fixup scripts could help here, and even
give a menu of available platform targets or something.  Shared
library support would be cool.

At the end of the day, I think Libnet is pretty good -- it works
well, especially over IP links, so I'd say it's ready for use in
games now if you want to use it, and I'd kind of like the API
not to change because there are people using it already.  Unless
there are major API problems, anyway.

In a nutshell:  I don't think networking belongs in Allegro, I'd
like to see Libnet better maintained and used, but I don't have
time to maintain it properly myself, and you won't hurt my
feelings if you adopt something else instead, 

George



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/