A collection of articles, ideas, and rambling from a guy who wrote some software that one time.

Saturday, March 07, 2009

Doing Stuff at PyCon

As bloggers are often wont to observe, the best thing about PyCon is the "hallway track".  This is especially true for old hands like me who are already familiar with most of the projects and techniques being introduced and described in the scheduled talks.

Usually I just wander around in the hallways and let random encounters occur as they will.  That's worked out reasonably well in the past, but I think I can get more out of the conference with a little preparation.  In particular, I'd like to use the open-space rooms to do some of this discussion so that we can really come to some conclusions rather than standing awkwardly in hallways, seeming as if we're about to leave.  So, with your help, I'd like to plan things out a little more.  Here are the things that I'd really like to do.

I am going to dedicate the sprint to thinking and talking about development on Twisted itself.  Of course I'm up for having a few meals during the conference with the Twisted developers who I don't get to see in person too often, but I talk to you guys all the time — I'd rather spend the conference talking to people I wouldn't otherwise see.

During the conference, I'd like to try to talk to people who are working on other projects.  Of particular interest to me are PyGame and Django.  There are currently no good, well-documented answers to "how do you use Twisted to make a networked game with PyGame" or "how do you use Twisted to network non-HTTP protocols with an existing Django app".  Both of those seem to be increasingly common questions.  If you are a leader of either of those projects, or can help me schmooze with one of them, I'd appreciate it.  I am, of course, just as interested in hearing from other projects that I don't even know about their twisted-integration stories.

In general I'd like to encourage other projects unrelated to Twisted to do this kind of cross-project jam session if you can.  There's a great opportunity for cross-pollenation at PyCon.

I'd also like to hear from users of Twisted, Nevow, Mantissa, et cetera, especially those who have not been particularly vocal on the mailing lists or IRC.  The best kind of user is a prospective volunteer, of course (stay for the sprints!), but both praise and constructive criticism are also welcome.

Don't underestimate the value of cheerleading!  Open source projects thrive on donated labor, and the fuel for donated labor is enthusiasm.  I can say for myself that a few kind comments at prior PyCons have motivated lots of hacking.  I don't just mean for me, though: take the opportunity to thank your favorite open source Python hacker, whoever that may be.

I'll be raising funds for the Twisted project.  If you're considering sponsorship, I would like to talk to you about how it will make you and everyone in your organization healthier, smarter, and better-looking.  (Mind-control powers and teleportation are reserved for sponsors at the gold level and higher, and only while supplies last.)

Finally, I'd like to talk about some of Divmod's less well-known projects, like Imaginary and Vertex, especially with people who are interested in helping to work on such things.  I am thinking about maybe doing a lightning talk or open space session, if it seems like there is enough interest to justify the preparation effort.

If any of these things are interesting to you, please leave a comment or drop me a note.  I doubt that I'm popular enough, or organized enough, to really do this properly, but I'd like to have at least a vague calendar of pre-planned meetings and open space sessions on my phone so I can avoid wasting any time once I'm actually there.

5 comments:

Jack Diederich said...

The Readme.txt link for imaginary throws a 500.

http://divmod.org/trac/browser/trunk/Imaginary/README.txt%3Fformat%3Dtxt

I'd be interested in hearing how it differs from LPC.

MichaƂ Pasternak said...

PyGame is a very cool project.

Another one is Pyglet, which looks very impressive, especially when it comes to playing multimedia files.
http://pyglet.org/
http://aroberge.blogspot.com/2007/08/pyglet-and-pygame-which-one.html
http://leapon.net/en/making-games-with-python-which-library-to-use-pygame-or-pyglet

pyglet has some Twisted support already: http://code.google.com/p/pyglet-twisted/

From my recent tests it looks like pyglet works great on win32.

The Ubiquitous Mr. Lovegroove said...

Link to Vertex throws:


TracError: Unsupported version control system "svn". Check that the Python bindings for "svn" are correctly installed.

Almad said...

I cannot help with any mentioned discussion topics, but would be very grateful if I'd be able to hear them ;)

Especially twisted+django over non-http interests me.

illume said...

hi,

none of the pygame developers will be at pycon as far as I know.

there's this guide for using twisted with pygame:
http://ezide.com/games/writing-games.html

You might like to add that to your documentation in the pygame integration section.

pygame has a pygame.fastevent module which is more suited for networking - which can use more events than is typical for a non-networked game. It also allows more efficient event usage from multiple threads.

Recently there has been activity in making simple networking libraries for use with pygame. There's probably been five of them that have been used. However I think the design has been converging, and with each of them new things have been learnt. I'm not sure if twisted has anything as simple as these libraries yet.

Over the years many people have tried to use twisted with pygame... but I haven't seen one game come of it yet. I'm not sure why exactly. I could guess at the reasons, but the main one would be how events work are at the opposite ends. pygame does not use callbacks... you get event objects from a queue. Some people even don't use events, but poll at each frame ('is this key pressed?').

I wrote about a proof of concept idea for putting http events into the pygame event queue here:
http://renesd.blogspot.com/2009/01/pygame-pywebsite-website-with-joystick.html

That article should give an idea of how pygame intration with twisted could work... in the pygame style.

I guess maybe the best way to do it would be to create two games... one very simple with networking, and the other a very good, and popular game. That would probably allow many people to learn by example.

Otherwise, maybe a pygame based jabber/irc client... I'm sure that would be popular, and quite useful. Or maybe something to do with the new camera module.

Or just sending pygame events over the network, and having them reappear on a client as client native events. So you click the mouse on client 1, and it sends it to server 2.

Kamelia has done some integration with pygame, which could be useful for ideas: http://www.kamaelia.org/Home

Until there are some working examples, I don't think so many people will be using twisted with pygame successfully... and instead will be using other networking libraries that have working examples.

Anyway... just thought I'd spew forth a bunch of ideas like might happen in a brief one way coffee fueled conversation in a hallway in chicago.