Page 1 of 1

game server...

Posted: Wed May 21, 2003 11:56 am
by verence
hi *,

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 :D ) ?

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.


Posted: Wed May 21, 2003 6:13 pm
by Saluk
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.

Posted: Wed May 21, 2003 6:21 pm
by verence
Saluk wrote: I would say go ahead with it:)
i will :D
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... 8)

ok, by

Posted: Wed May 21, 2003 10:35 pm
by Panther
Hi Verence... Great Idea !!!

Prehaps it's worth talking to Eskil about his 'Verse' project ( as it may be very useful to you )... ... pic&t=1501

Good luck :D

Posted: Thu May 22, 2003 2:29 am
by Blender_owl
Blender_owl is working on one in c++, writing the client side in python.
:oops: actually the server is in VB :oops:

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

Posted: Fri May 23, 2003 10:10 am
by verence
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.


Posted: Sun May 25, 2003 12:06 am
by Blender_owl
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[0], list[1]) 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 :)

Posted: Sun Jun 08, 2003 4:25 am
by Blender_owl
anyone gonna respond?

Posted: Mon Jun 09, 2003 11:35 am
by verence
Blender_owl wrote:anyone gonna respond?
yep. me 8)

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 8) .

greets, verence

Posted: Mon Jun 09, 2003 5:29 pm
by cmccad
I would guess they hang out at the python forum at elysiun :) .


Posted: Tue Jun 10, 2003 9:57 am
by verence
cmccad wrote:I would guess they hang out at the python forum at elysiun :) .

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... 8)


Posted: Fri Jun 13, 2003 6:47 am
by Sutabi
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 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...

Posted: Fri Jun 27, 2003 9:36 pm
by Blender_owl
well, i guess we should start??

Posted: Wed Jul 02, 2003 1:09 pm
by verence
Blender_owl wrote:well, i guess we should start??
right guess. 8)

just email me, so we can start the work:

martin (at) elektrolite (dot) com

(it's written that way cause of the damn spammers)