i would like to start a small project, a game server for blenders game engine. it should be in python and splitted into 2 parts: the server and a module for the game engine to use the server's functionality. it also should be platform independend, pure python (both). i think i know how to implement this, so now my questions:
1) is there an active project out there with the same aims (no need to reeinvent the weel
if not, 2) any features this game server should have?
i have now the time to code on my own, so (surprise!) i want to.
I worked on one a long time ago, but gave up.
go to projects, then multiplayer
Blender_owl is working on one in c++, writing the client side in python.
I would say go ahead with it:) Maybe talk to owl first though.
|Saluk wrote: |
I would say go ahead with it:)
|Saluk wrote: |
Maybe talk to owl first though.
i started this thread to collect some opions or feature requests or anything, so i hope he/she will join the thread...
Hi Verence... Great Idea !!!
Prehaps it's worth talking to Eskil about his 'Verse' project ( as it may be very useful to you )...
|Blender_owl is working on one in c++, writing the client side in python. |
actually the server is in VB
But i would be more than happy to help out. I have spent at least 2 days just designing the server authentication functions on paper. I am willing to put in alot of time
i had some thoughts about this game server thingy, here's a short draft:
1 it should be simple. tcp/ip as underlying protocol should be ok.
2 clients (games) should have different possibilities:
2.1 make short, stateless connections to request information (good old http-like method)
2.2 can ask for establishing a stateful connection which enables them to receive and send events
3 on the blender side, there should be a module (simple .py file) to copy on the python path, and a script that starts when the game starts. this script could be connected to a message sender and a message receiver, so that any part of the game (enemy, player) can be network-enabled by sending messages to this one script which is an interface to the module.
as you can see, the missing point is security. in my eyes this problems are two: at first, the protocol must be made safe so that only blender games are accepted as clients (ok, that is basic authentication). but the second one is: a blender game is not a static client like a browser, it is also a runtime environment for python. so, i would like to share the ideas Blender_owl made on paper, this could be very helpfull. it is as it always is: to design and implement the networking functions may not be the problem, it is the security.
security is an issue, for my authentication it checks the sent login info against a database. But someone can still send the same packets that are used to login from outside blender if they know what they are.
I have a database on the server that stores information on players. The user name and password are stored in the same feild, and are seperated by a comma. They cant be in seperate feilds cause there is no way u can check if the user and pass belong together or not. So i jsut split them to at the comma to check user and pass individually against what the server recieved from the user (which is concatenated and must also be split)
Here is some of the stuff i have on paper. I am to lazy to type out the rest right now. Sorry
1. Server gets a connection request and accepts
2. Server sends a header to the client requesting a username and password. (e.g. of header sent. “Request_Login”
3. Client receives the header and passes it to a string splitter.
4. The string is split at the “_” character and stored in a string list.
5. The list items are passed to the ReadHeader(command, content) function. We would pass them like this: ReadHeader(list, list) The ReadHeader(command, content) function takes 2 arguments. It uses a series of if statements to find the correct function to pass the content to. (e.g. if command == “Request”: request(content) )
6. The ReadHeader function passes the content to the corresponding function. In this case it passes it to the function request.
7. The Request(content) function works in the same way as the ReadHeader function. It uses a series of if statements to find the right function to call.
There is more but i will type it up later
|Blender_owl wrote: |
|anyone gonna respond? |
at the moment i do not have time to do so, but when i'm home, i'll write some of my concepts here.
btw.: why is this forum so ...quiet ? event the thread that asked that question died after 2 responses... is there any hidden place the python developers hang out (i do not mean the developers that integrate python in blender, i mean the developers that use python in blender)?
btw2.: i spend some work on the game server the last time, i did the base work for an admin interface (http). i did not want to reeinvent the wheel, so i used apache & mod_python for it. looks kool .
I would guess they hang out at the python forum
i know that, but i think at elysiun it is more about using blender (also via python). hm... na, that's how it is, no need to care...
Ahh man hehe I just looked at Saluks example and fill like kicking my damn self! becuase in 2.25 you can't import sockets with python 2.2 plus everytime I ran my sockets script in blender it would freeze till it finished send the data....so I just sat and thought and thought some more...then I see how saluk did it arrgg damn you!
I wonder though, if verse does come though and the python mod is finished how many people will flock to blender becuase it ould now be easier to do multi player games...
well, i guess we should start??
|Blender_owl wrote: |
|well, i guess we should start?? |
just email me, so we can start the work:
martin (at) elektrolite (dot) com
(it's written that way cause of the damn spammers)