BZoo .. Network gaming for Blender

i ment to ask if its ok to do any work on this

but becuase of lack of grammer ability when i type i forgot some words

basicly i was asking if its ok to use this and make your own world

and if its ok to do any modifacation on the bzoo python stuffs
givin the proper credits of course

hello,

I just seen this tread and tried this system…

I find the idea very cool and at least it seem to work well : I could connect and visit some places (street, and template at least)
No one was there so I could not see the tchat trick…

I find that the physic of the avatar is not right, it bounce too much and it need a “jump” feature I think.

I also tried to lauch the server in linux by launching the : python server.py but it made a socket error :

Main
nb_max_client = 10
Traceback (most recent call last):
File “Server.py”, line 7, in ?
bzServer = bzServer(‘’, 50000, 10)
File “zzzzzzzzzzzzzz/BZooServer/bzServer.py”, line 82, in init
for res in socket.getaddrinfo(self.hostname, self.port, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE):
socket.gaierror: (-2, ‘Name or service not known’)

I am part of a town wireless network, I found that it could be a cool feature to add a virtual world on each node with a specific content … but it have to work on linux … any clues ???

dont you need to start like one of the server.sh files not the .py itself ?
try that maybe that will work better

thast what i read atleast
the bat for windows the sh for linux

well, thanks but I was aware that

the bat for windows the sh for linux
but … there is no .sh in the zip file …

ok i coulda sworn ther was a .sh file in the server pack i downloaded

maybe thers a nother way to start it

i dont know though sorry

ok the .sh was in a nother pack i got but “maybe” can you rename the loop.bat to loop.sh and execute that way? possably

i left linux alone for like a year and forgot everything just just me thinking out loud there unles you konw this wont work its worth a shot

Olm-Z

The .bat is for windows indeed … I don’t have a Linux computer
The command to start the server should be the same:

python Server.py

could you please make the following test:
Open Server.py file … and change:

     bzServer = bzServer('', 50000, 10)

into:

     bzServer = bzServer('127.0.0.1', 50000, 10)

It should start a server available from your local machine only.

If you want to connect to your local server … change the hostname in the client.blend to ‘127.0.0.1’ as well … instead of ‘ascensionwars.com

just to see whether it is a problem of python or a network config issue

by the way … which python version do you use ? python 2.4 is recommanded.

Keep me posted …

PS: I had forgotten to ask email notification on this thread … so I didn’t notice that there were so many question asked … sorry for the delay

PS2: only 2 people have tested server side of BZoo

yep

with the IP adress specified like this, it’s perfect ! It works like a charm on my Ubuntu dapper laptop : server ok and client connected (I use python2.4)

Great Thanks :slight_smile:

I have one more question : is it possible to have the position of clients updated at higher rate that 3 Hz ? I plan to use this more on LAN or WAN setup than troegh internet and I would like to have a better sense of “presence” … is it easy to tweak ?

Olm-Z,

About the IP adress issue

I think the ip adress 127.0.0.1 will not allow people from the internet to connect to your server …
127.0.0.1 is the loopback adress meaning the network packet doesn’t go further than you ethernet card.
In my opinion, the server running on your PC is only reachable from your PC.
On windows plateform … the empty string means that the server will accept connection from any computer on the internet.
Apparently , it doesn’t work the same way on yout Linux PC…
Try to put your internet adress instead of 127.0.0.1
Sorry, I can’t help you more on this topic…

About the refresh frequency

Server side modification

at line 10, change the :

    time.sleep(0.35)

into

    time.sleep(<the_new_refresh_period_in sec>)

Client side modification

in the Client.blend file:

  • go to the Main scene, select the empty named Client located at (0,0,0)
  • go to Logic Panel (F4)
  • change the allways sensor frequency (which should be set at 20) accordingly to the value set in the server

The problem is that I can’t give you the exact relation between the 20 and the 0.35.
To do so … i should correlate the Game Tic with the real time.
In the new Gamelogic API … there are functions which allow to establish such a relation (between Game tic and real time)… but I didn’t take the time to explore this new feature.
So … the point is that the two value doesn’t neccessarly correspond on every PC.
I used an empirical method to ellaborate these values… I know for sure that these value would be different on an other computer …
The current approach leads to network jamming that the BZoo protocol is able to deal with … It is far from being perfect.

I proceeded the following way to find the correspondig value.

I wanted the frequency to be acceptable for people using dialup connection (56k)
so I decided that I wanted a refresh every 0.3 second …
I created an empty with an allways sensor on it bound to a Python controller.
In the python script I set up a counter which was incrementing at each activation …
Thus I was able to tune the frequency and measure the Game Tic (by measuring the counter progression on a 100 sec windows)
I made several measure until I reach the appropriate value. :frowning:

I know it sucks … because I realized later that the GameLogic API was offering a function allowing to be far more accurate and also computer-independant.
But as the Bzoo protocol was able to deal with packet jamming … I considered it was good enough.

I will probably use the appropriate function in the second generation BZoo world.

Hope it helps …

JiBe

Thanks for thoses info, I will try to tweak that refresh rate later… :slight_smile:

by the way, about the IP adress, It seems to work like a netmask … I tried with 0.0.0.0 on the server and so I can connect from another computer client (on my home LAN) by telling the server IP adress (like 192.168.x.x ) in the client.blend

:smiley:

thank you Olm-Z for these info …

I’m pleased that it works …

Are you running the server onto the linux computer ?

If so … you’re the first one I heard about …

If never you put a server in place … please let me know … I’d like to add a link to your website in the user list …

Yes, the server is running on a linux (ubuntu dapper desktop) …
I’m building a virtual area to test, I’ll put the link somewhere when it’s up for public access, I pm you the adress to test if you want.

Congratulation, your the first one to host a BZoo server on a Linux computer… :smiley:

I’m very happy to hear that.

For sure I want to be warned when it’s up …

Keep me posted …:wink:

hmmm … It seems I got some issues with my firewall … what are the port that needs to be open/redirected on the server side ? I opened the 50000 but clients seem to connect on other … ???

i have a few questions to ask about this

1 With the server is ther a way to tell how many people this can handle at once?
i just got a newer pc and im just wondering

2 is there a way to make stuff work throu everyones client
like 4 users are on
user 2 opens a door
it opens on everybodys

and avatars
is it possable to make everyone have diffrent avatars?
i seeen in the demo vids ther were a few on with diffrent models how is this done
unless im thinking of the wrong thing here

Thank you
Wayne

Olm-Z

Humm … weird … clients from first generation world connect on port 50000

TCP protocol not UDP

You managed to connect with client on your local network … so I presume that you’re attempting to make client connect from outside from your local network.

From outside your local network, your server is not reachable through “192.168.x.x” adress … you must use your real IP Adress … (the one your provider gives you at connection time) … the best would be to use a DynDNS adress …
But I presume you’re aware about that…

Can you see any connection attempt on you firewall when client attempt to connect?

What if the client try a telnet your_ip_adress 50000 ?

Did you configure both software and hardware firewall (most connection boxes include a firewall)?

WaynFox3

in Server.py file, in the line

bzServer = bzServer('', 50000, 10)

the 10 means “not more than 10 simultaneously connected people”

To make things work in every client … try to make a dynamic stuff parented to the avatar so that avatars can trigger sensor like collision or near or …
The second generation world should implement network controlled objects to solve such issue …

Yes it is possible to make everyone have different avartars …
go to Main scene at (0,0,-20), select all part constituting the avatar , Shift-D them … replace the mesh with the avatar.
Look at the demo files to find inspiration …
http://www.ascensionwars.com/bzoo/index.php?c=bzoo&a=users

I must admit, it really miss a documentation … :frowning:
For now avatar are choosen randomly (in the order people enter the world)… in next generation world (in dev) … there’s a screen for user to select the avatar

WIP : (not already online … but soon )
http://www.outthere.be/rc/Capture-1.jpghttp://www.outthere.be/rc/Capture-2.jpg
http://www.outthere.be/rc/Capture-3.jpg

notes :
1- the lines in the sky are actualy “rings” comming from/to the roofs, the screenshot takes them “in parts” while moving so no more looking like “rings” …
2-I used radiosity texture backed for the ground and simple radiosity for the houses, I look nice and keep small number of vertices.
3- some stuff will be diseminated trough the level, like a map (from the real world) and maybe some “football” like game (when replication of moving objets will be possible among clients )
4- my intend for this is to intall it on a node of our citizen wireless network here in brussels (reseaucitoyen.be)

Waou … looks good Olm-Z
Baked texture really is stunning.

May I advice you to have a look at:
http://download.blender.org/projects/bzoo/daily-checkouts/

It is the CVS area that blender.org setted up for BZoo project…
you’ll find there the current state of development of Second Generation World.
It is not yet finished but it gives a bunch of the way it’s gonna be architectured as well as how the new protocol works.

Can you tell me what you mean by “replication of moving objets” ?

Cause I wonder if it really belongs to the current RoadMap of the project…
And if it is not … how I can plan it …

ok I’ll take a look at the CVS from time to time…

by “replication of moving objets” I mean… hem … just what you can imagine with the idea of a football game : the ball must be at the same place on each clients, so it can be played … I think it’s quite different that for “bullets” or “nade” like you added, because it’s slow and precisely moving and we cannot approximate it by just taking it’s first impulse as trajectory … I think it must be used like a non-player character … but as I’m far from network specialist, I cannot tell the best way to handel it (server side, client side copy, etc … ? )

I don’t realy expect it soon, so take it easy with it … I think it’s best to fix/upgrade the tchat part (wich I saw you start reworking already).

hi,
have some time to get back to this stuff …I had my server on, and made some test with first version (I checked the cvs but as there is no doc, i couldn’t take the time to dive into all the files), but I realise one anoying thing : when disconnecting, the avatar is still in place, and if you reconnect, you’ll find you old avatar still there … and counting for a “connected client” … I checked some code and uncommented some lines that seem to have a relation with “deleting client when error of connection”, but still no result…

Is this a known bug ? is there some way to correct it ?

Hi all,

A new generation of BZoo template has just been released.

Lots of new features are included in it.

Read more in the announcement thread