[Twisted-Python] "3D Game Using Twisted?", or: "Ach du lieber..."

Christopher Armstrong carmstro at twistedmatrix.com
Thu Mar 14 19:08:05 EST 2002

(note, this message is a bit stale. I composed it yesterday, but my
mail server (twistedmatrix.com) went down for a bit.)

On Thu, 2002-03-14 at 01:31, Derek Simkowiak wrote:
> -> well, the piece of Twisted that is immediately relvant for this type of
> -> application is twisted.spread - comprised of "pb", "jelly" and "banana".
> -> these provide a distributed object system with marshalling, serialization,
> -> networked observation and reference counting. All things that are useful for
> -> building on-line games!
> 	Very cool (although, I have to say it, I'm not really a fan of
> 'cute' API names.  I much prefer clarity and conciseness.)

>From the coding standard:
 Try to choose names which are both easy to remember and meaningful.
 Some silliness is OK at the module naming level (see twisted.spread...)
 but when choosing class names, be as precise as possible.  Write code
 with a dictionary and thesaurus open on the table next to you.

At least 'spread' and 'pb' are sane names -- spread is a toolkit for
spreadable computing (as opposed to distributed computing, which we make
the dinction with because spreadable is translucent as opposed to
transparent), and we have PerspectiveBroker which is.. a broker for
Perspectives (which were named with the rule of clarity and conciseness
in mind -- in fact, Glyph spent an obscene amount of time coming up with
this name). :-) I'm only saying all this because I think disliking the
name is pretty irrelevant when it comes to code ;-) Anyway, see below,
not *all* of this message is a troll ;-)

> 	Also, twisted.spread could easily be confused with the "Spread" C
> library, which is also designed for use in distributed systems.  It has a
> somewhat different purpose, but my first thought was that twisted.spread
> was a Python interface to the Spread library (which would be really useful
> for Twisted, by the way).  See http://www.spread.org/.

Well, there's not much we can do about this but try to make it clear
that it's not in the documentation/website (which we do).

> -> This technology is not optimized at the level of Quake or Tribes style
> -> protocols, but it is infinitely more flexible and provide a much higher
> -> level of functionality.
> 	Unfortunately, most people _HATE_ a laggy gaming experience (i.e.,
> see the "Damn Lag" T-Shirt at ThinkGeek.com).  For my application, the
> need for efficiency outweighs the other features of twisted.spread.

You might want to take a closer look at the banana protocol. It was
definitely implemented with efficiency and extensibility in mind. My
point is, a UDP alternative for it would be very cool, especially if we
could integrate it higher-level abstraction, like a subset of/something
similar to PB, for example (this would an interesting challenge to think
about). The biggest problem here is CPU-time that banana/jelly take up
-- but this problem is being targetted, especially with dash's work on
twisted.eco. :-)

                                Chris Armstrong
                         << radix at twistedmatrix.com >>

More information about the Twisted-Python mailing list