pygame is
Simple DirectMedia Layer is
Site Swing
Astral Networking

Astral Networking - 0.0

patrick mullen (saluk)



"Wow, this is a pretty fun little game I just built. Gosh, it would be great if I could add multiplayer. Let's see, how do I write a multiplayer game?"

*Goes and looks up some stuff.*

"Sockets? Ehhhhh"

*Reads more, maybe finds something like Raknet*

"Ok, ok, I get how to send messages. Doesn't sound too hard."

*Starts trying to add multiplayer to game.*

"Wow. On second thought, I think this game is just fine in single player. Just shoot me if I suggest multiplayer ever again. Unless it's a turn based game."

There exist many low-level networking tools. From sockets to twisted, to more recent pygame related projects like PodSixNet and Mastermind, to pyraknet or pyenet that I can't seem to build on windows, there is a type of low level networking for almost any purpose.

But there does not exist for python a sound library to aid in the creation of multiplayer games. There is a huge step from being able to send messages across the wire, to knowing what messages to send and which to keep a game in sync, with a minimum of lag or jerkiness.

Astral networking is meant to bridge the gap between sending messages and actual game logic. It uses PodSixNet for message passing, and later may be able to use some of the other options. It has a ways to go, but it has been implemented with many of the key algorithms used for this problem. Dead reckoning, interpolation, client prediction, and client prediction correction, clock sync, and others are needed for realtime games. Astral contains these algorithms in one form or another, and makes it pretty easy to use in an actual game.

It also has a chat log, because almost every networked game is going to need that! But where most networking projects start with the chat log, astral started with object positions and synchronization. I hope that this approach can eventually produce a really solid path for developers who decide to take their games online.

Only available as an hg repo at google code for the time being. When documentation is finished I'll put up a release. It currently comes with a test game that demonstrates all of the features currently available. I am open to any suggestions or comments you can make, or if anyone wants to help hack on it, that would be great too!


Home Page:


click to view original size


Astral Networking - 0.0 - Aug 8, 2010 account Comments

If you wish to leave a comment with your account, please sign in first.

August 8, 2011 12:28am - patrick mullen - nickname: (saluk)
queequeg: Eval should almost never be used so you are OK. For the most part, sticking to basic well understood code features is better than trying to use advanced things. Unfortunately, multiplayer requires sockets, which are an advanced thing :) You can email me at gmail, my google account name is saluk64007. That's the most reliable way to get a hold of me.
August 8, 2011 12:14am - patrick mullen - nickname: (saluk)
Kytriya: It's probably still not good enough for a fight type game, although my intention was if I can make it good enough for fighting, it will already be good enough for RPG :) I actually have 2 fairly simple online rpg type ideas I want to make, but I've been busy with other stuff lately.
June 19, 2011 1:27am - David Gustafson - nickname: (queequeg)
I'm starting a game using your framework. Thanks for all your hard work. I was wondering if you hang out in any irc channels that I might be able to chat you up in? The biggest change I need to add is teams and team owned objects. I'm still learning how the code works and I'm not a very advanced programmer. For example I have never used "eval()." Anyway if there is a way I can get a hold of you and you wouldn't mind me asking some questions please let me know. Thanks.
March 14, 2011 10:09am - Kytriya - nickname: (tpgames) - 5/5
And thanks for thinnking of this project! :D Here's more kudo's for you! My project is Jade University but is too newbieish to be considered yet. Besides, most people want fight games, which mine isn't. My game is more a RPG/Sims.
March 14, 2011 10:07am - Kytriya - nickname: (tpgames) - 5/5
I hope you keep this going and that the final project will work on Linux servers, and most OS (ubuntu, PC, Mac) that potential players maybe using (if possible). I understand the issues with supporting pre-intel chips macs (I'm still on the 10.04 OS X). I'm just a newbie Python programmer, but do hope to eventually be able to port my game to an online game in 2 years, and hope to get a new computer thats modern and not used. LOL
January 26, 2011 1:28pm - patrick mullen - nickname: (saluk)
Yeah I kind of semi abandoned this for a while, but I'm going to be polishing it up some more and maybe come out with a new version. Once I actually use it for a real game I will be more confident about it, but I really think something like this is missing. I didn't know anybody had even found it :) needs notifications!
September 7, 2010 4:45pm - Koen Lefever - nickname: (koenlefever)
Ok, I've found the documentation in and I've got it working. Good job.
September 4, 2010 10:41pm - Dave Sci - nickname: (scidave) - 5/5
Can't wait to see this library get finished! I've been using PodSixNet with the Construct engine and Python, but this sounds like an awesome layer on top of that. Really excited to see updates.
August 28, 2010 5:58am - Koen Lefever - nickname: (koenlefever)
Hi, I'm looking for a network library for my Arcade Tonk Tanks game. I however want to use UDP, so I'm working on my own since I did not find anything suitable. Since your library seems to be more advanced, I may drop my own attempt and start using Astral Networking when you implement UDP.

I downloaded the Mercurial repo, but I cannot get it to work. When I start the in the top directory I get this error:

IDLE 2.6.4 ==== No Subprocess ====
Traceback (most recent call last):
File "C:\Documents and Settings\Koen\Desktop\py\astralnetworking\", line 14, in <module>
from import Actor
ImportError: No module named actor

I also tried the examples in other dirs, but these also give errors, for example simple/ gives:

IDLE 2.6.4 ==== No Subprocess ====
Traceback (most recent call last):
File "C:\Documents and Settings\Koen\Desktop\py\astralnetworking\simple\", line 20, in <module>,conf.PORT,conf.LIBRARY)
File "../astral\server\", line 49, in host
self.transport = PodSixTCPAdapter(self,host,port)
File "../astral\server\", line 66, in __init__
File "../astral\PodSixNet\", line 19, in __init__
File "C:\Program Files\Python\2.6.4\lib\", line 325, in bind
return self.socket.bind(addr)
File "<string>", line 1, in bind
error: [Errno 10049] The requested address is not valid in its context

I'm probably doing something stupid, so how do I start the demo?
August 18, 2010 5:23pm - Gummbum - nickname: (gummbum)
I can dig it. Looking forward to docs and packaged release, Patrick.

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
Jan 31, 2017

Jan 24, 2017

Jan 19, 2017

Jan 18, 2017

Jan 7, 2017

Dec 30, 2016

Dec 8, 2016

Nov 28, 2016

Nov 27, 2016

... more!
for pygame related questions, comments, and suggestions, please see help (lists, irc)