I am working on a multiplayer game using stackless python and Pyro4 and i have run into a wall.
It has all been working great and has been a blast to code with and i have learned a lot however i am having problems with figuring out a way to send commands or data back to the client from the server.
I can use the client to run a command on the server that spawns a new stackless tasklet and does things but i need the commands to be able to return things from the server you see. I have an object that can take a username from a client and adds that to the list of players as well as giving that username a unique ID so that all subsequent commands can be issued with that ID for that specific player however i cannot return that ID number back to the client from the server without doing 1 of 2 things which i really do not want to do:
1: i could make a pyro daemon on the client so the server might be able to remotely call functions on the client and pass data to them just like the server does but the lesser reason i do not want to do this is i believe it would be hard and messy to make every client register as an open daemon for pyro to connect with and would probably require the end user do some port forwarding. but the major reason is that the end user would have to have python installed and also have pyro4 installed so that they can run their own nameserver and this is just too messy for the average player to do.
2: i could ditch the stackless part and make it just use pyro and although this might be fine for a server running a few people on it that would rarely issue a command at the same time, the game is intended to do the exact opposite, that is its meant to have hundreds of people on it all issuing commands at the same time and this is the main reason i have chosen to use stackless!
i can provide specific code examples of the issue if necessary i just don't know where to go from here... this is my first multiplayer game though so i might be missing something very obvious but i am really rather set on using stackless and pyro and i do not see a way to send back commands or data to the client. also i understand that because this not only uses, what i believe to be, an obscure/unused library and version of python (being stackless and all (not much documentation on stackless)) makes asking for help very hard and limits the amount of people qualified to respond i will take any good ideas at this point.
so yeah sorry for being long winded and all but i would appreciate the help and ideas of my fellow DIC heads with this.
This post has been edited by Nekroze: 27 September 2011 - 02:44 AM