Torque Master Server in Python
by Andy Rollins · in Torque Game Engine · 04/22/2008 (10:55 am) · 8 replies
I'm sure I'd seen a resource or forum for a master server written in Python but can't for the life of me find it, the searches I've done have found the perl version by Thomas Lund, Ben Garneys pushbutton version in C and a built in one to the engine.
Am I going mad here or does anyone know of a Python version? If not I'll code it and release as a resource.
Ta, Andy
Am I going mad here or does anyone know of a Python version? If not I'll code it and release as a resource.
Ta, Andy
#2
04/22/2008 (11:41 am)
Are you thinking of TGEPython? That was a resource Josh Ritter made years ago when he started messing with plugging Python into Torque. I don't think it had any master server stuff in it though.
#3
Ian
04/22/2008 (11:58 am)
I've never seen that resource, but the Determinance master server is written in Python and works very well.Ian
#5
Thanks
04/22/2008 (5:35 pm)
Thanks for the replies guys, I knew about tgepython so it isn't that, must just be my memory failing me with all the resources and details to take in on here. Heh it'll give me the chance to learn python and I'll release it as a resource in case anyone else could use or suggest improvements.Thanks
#6
04/25/2008 (10:25 am)
I didn't think that TGEPython included a Master Server.
#7
Currently on day 3 of learning Python and have a working master server up and running with it, the heartbeats come through great and are held in memory. When the client requests the lists of servers, I've processed the request and have most of the values worked out correctly.... the bit I'm a little stuck on at the moment is the response packets back to the client I have most parts correct but the port number is proving troublesome as it's a 2 byte element, I appear to have fudged around it by doing the following as chr() only takes a single byte but I've no idea if this is the correct approach?
If any Python or network people could comment/advise that would be great.
Once I have the basic server finished and done I'll post the code on here
04/26/2008 (4:19 am)
David - indeed TGEPython doesn't include a master server.Currently on day 3 of learning Python and have a working master server up and running with it, the heartbeats come through great and are held in memory. When the client requests the lists of servers, I've processed the request and have most of the values worked out correctly.... the bit I'm a little stuck on at the moment is the response packets back to the client I have most parts correct but the port number is proving troublesome as it's a 2 byte element, I appear to have fudged around it by doing the following as chr() only takes a single byte but I've no idea if this is the correct approach?
port = 28000
n, b = divmod(port, 256)
n, b1 = divmod(n, 256)
porty = chr(b) + chr(b1)If any Python or network people could comment/advise that would be great.
Once I have the basic server finished and done I'll post the code on here
Employee David Montgomery-Blake
David MontgomeryBlake