Blender Multiplayer online Component

Easy multiplayer game setup for blender
Hi BlenderArtists!
I have now completed the most of the simple networking plugin, and am now adding features.

a MASSIVE speed increase will be felt if you download the latest version of the blend files and script

Patched Blender
Script (mirror1)
component demo_client.blend (348 KB)
component demo_server.blend (337 KB)

How to use:
Copy the script (2nd link) into this folder:
PATCHED BLENDER\2.57\scripts\bge_components
1)Start up the patched Blender.
Open the file: Component_Server.blend

2)Start up the patched Blender.
Open the file: Component_Client.blend

3)For more clients, repeat step 2

Do you want to be able to send object properties? (considering they have to be named already on the object)
How would you like to send your own variables?
Would you want to enable sending of these variables with a checkbox? or just automatic detect?

If you wish to edit any code, feel free!
Credit (some how it’s inspired by) OldJim

I vote for the component option, it sounds like the most straight forward one, though I may be wrong, which one of the three is your choice agoose77? :slight_smile:

i think a component is best solution!

I originally thought bout creating a new logic brick, but now i think the components option is better:
More user accesible, Doesn’t require logic bricks at all, and cleaner.

I voted for component, mainly because I couldn’t imagine how a single logic brick could handle networking (I guess a set of them could, but a Python component where I can see how it works would be a nice idea).

It seems like component wins!
No seriously, i am continuing in component!
A few snags here and there, but should go relatively smoothley

that is awesome! :RocknRoll:

Already ported the server code from my Dynamic networking. now client!

First version complete!
Check here for my script: Network (Moguri’s Component) (scroll down to find it)
and downloadthis patched version of Blender, then read instructions on my site (link above)

Second Version now complete:
new features:
more user control
timeout to remove clients
interval between data transmission

cant seem to get it working was a problem with arg[‘Ports’] which i think fixed then it seems to start working but then disconnects attempts reconnect and gives error that the player already exists

Found the problem, i had changed the name of a variable :@

Check that in this code:

def start(self, args):
self.serverport = args[‘Server Port’]
self.ports = args[‘Start Port’]

self.ports must = args[‘Start Port’]

Bump :stuck_out_tongue:
thanks guys

Now you can set and get object properties, (though they have to be set on the object (the name)) and clients who quit are disconnected.

An Addon is just plain stupid. The best solution is maybe a combination of components and logic bricks. The component can be used to define what informations we need to send and logic bricks should define when to send it.
There is no need to send all informations all the time.

Thanks Josip!
I realised that myself, and thus have chosen the component route.
The reason i’m updating this so frequently is as follows:
1)For those who wish to make a networked game, with simplicity, this system works well(usually, those who want simple systems, make simple [not bad] games)
2)For those who wish to make a networked game with ease, and have control over it, this system works well (as you can input variables, and soon there will be an api of sorts)

However, you’re point is valid. Sending all the data, all the time uses a lot of bandwidth, however with games such as FPS, you have to send the positioning all the time.

Does anyone have a suggestion on what they want the plugin to achieve (i’m planning on having a check box, something like: Unlock Python API, ore something to allow more advanced codes to get their teeth into the plugin)

If we had a community game project, maybe the developers could report their wishes and ideas how to improve. Other than that, its hard to predict what will anyone need. For noobs, maybe the simpler the better.

Yes, i agree, it would both provide resources and clean structure for networking.
Oh well, until then- i’m on my own !

I think a good approach would be to have a component for a network object, adding this component to an object would sync it over the network. In the start function of the component it would request a network entity id from the server, the server would pick a unique value and send it back to the client as well as telling the other clients to add that object with a given id. Something like that would be handy.