game server...

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

verence
Posts: 34
Joined: Thu Nov 07, 2002 12:42 pm

game server...

Postby verence » Wed May 21, 2003 11:56 am

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.

thanks

Saluk
Posts: 166
Joined: Wed Oct 16, 2002 6:52 am

Postby Saluk » Wed May 21, 2003 6:13 pm

I worked on one a long time ago, but gave up.

http://spinheaddev.com/
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.

verence
Posts: 34
Joined: Thu Nov 07, 2002 12:42 pm

Postby verence » Wed May 21, 2003 6:21 pm

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

Panther
Posts: 86
Joined: Tue Mar 04, 2003 7:55 pm

Postby Panther » Wed May 21, 2003 10:35 pm

Hi Verence... Great Idea !!!

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

http://www.quelsolaar.com/technology/verse.html

http://www.blender.org/modules.php?op=m ... pic&t=1501

Good luck :D

Blender_owl
Posts: 18
Joined: Tue Oct 22, 2002 10:35 pm

Postby Blender_owl » Thu May 22, 2003 2:29 am

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

verence
Posts: 34
Joined: Thu Nov 07, 2002 12:42 pm

Postby verence » Fri May 23, 2003 10:10 am

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.

greets,
verence

Blender_owl
Posts: 18
Joined: Tue Oct 22, 2002 10:35 pm

Postby Blender_owl » Sun May 25, 2003 12:06 am

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



Authentication

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

Blender_owl
Posts: 18
Joined: Tue Oct 22, 2002 10:35 pm

Postby Blender_owl » Sun Jun 08, 2003 4:25 am

anyone gonna respond?

verence
Posts: 34
Joined: Thu Nov 07, 2002 12:42 pm

Postby verence » Mon Jun 09, 2003 11:35 am

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

cmccad
Posts: 48
Joined: Mon Apr 07, 2003 11:58 pm

Postby cmccad » Mon Jun 09, 2003 5:29 pm

I would guess they hang out at the python forum at elysiun :) .

Casey

verence
Posts: 34
Joined: Thu Nov 07, 2002 12:42 pm

Postby verence » Tue Jun 10, 2003 9:57 am

cmccad wrote:I would guess they hang out at the python forum at elysiun :) .

Casey


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)

greets

Sutabi
Posts: 129
Joined: Fri Oct 18, 2002 1:35 am
Location: Oceanside, California
Contact:

Postby Sutabi » Fri Jun 13, 2003 6:47 am

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

Blender_owl
Posts: 18
Joined: Tue Oct 22, 2002 10:35 pm

Postby Blender_owl » Fri Jun 27, 2003 9:36 pm

well, i guess we should start??

verence
Posts: 34
Joined: Thu Nov 07, 2002 12:42 pm

Postby verence » Wed Jul 02, 2003 1:09 pm

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)

cu


Return to “Python”

Who is online

Users browsing this forum: No registered users and 1 guest