Network Programming

Hi, all… I would like to learn some network programming in blender. I would like it so that I can just get the computers in my own house to interact with eachother.

  1. Where would I learn this?

  2. Is this possible to do without opening up a port?

The files are on

WSAG Project can help you to learn network programming with blender.
They have good tutorials too! :smiley:

Now, doing this, I can open a port but not be vulnerable to any outside forces if I am sharing info over my personal home network with another computer in the house.

I think you would need to do port forwarding in order to allow outside access to anything within the LAN.

So, by default, the router should only pass internal traffic to internal servers/clients.

…Unless you explicitly make a connection with the outside.

Although, I’m not completely sure about that - networking is ultimate spaghetti, so anything is possible. :smiley:

hehe :smiley:

So I don’t have to open a port… I just have to use LAN…

I tried OldJim’s tutorials, but they just weren’t clear enough…

EDited first post to better suit my situation

Could someone explain to me how I could use OldJim’s example file between two computers? He doesn’t really tell you how to… Unless I missed something, of course…

Assuming that you’re using the WSAG-BasicNetwork blend:

You chose one computer to be the server, and one to be the client.

On the client, you have to set the GameLogic.IP string to the internal LAN IP of the server (as instructed in the script).

The server doesn’t require any configuration, so you can just start it right away by pressing P, and then hitting F1.

Then start the client game, and hit F2 (on the client).

Move around with the arrow keys, and watch the changes on the second machine.

Really, the instructions in the .blend are crystal-clear, and I tested the setup on my network -> it works fine, so there should be no problems.

If both computers are in the same LAN, and there is nothing else blocking communication, this should just work.

Thanks! I will try it out…

There are other options besides WSAG?

Are you talking about things like Twisted?

I never mentioned Twisted, but that is certainly an option.

Although, the ability to write sockets is more general, and lower level, which allows you to have more precise control over what happens - and you don’t have an additional dependency.

If you’re looking to learn network programming, use sockets. If you just want something that you can set up quickly, and use to communicate over a network, use Twisted.

I would actually like to learn… :D:rolleyes:

Is there a tutorial on how to properly implement this? I would like it so that both cubes can meet at a certain blend file that is on both computers. You know, like a meeting place. Then, I will turn the cubes into the characters I have… Although, I bet that it is A lot more complicated than that…

Look for bzoo. Finally it is uses the same function.

I think you shoulod find a lot tutorials when you google for Python Socket. This is not limited to BGE.

Hey. I figured out that I was looking at the wrong tutorials. I looked at the pumkin run one and it acually made sense. I’m going to learn a little more and screw around with it a bit, and then I’ll post if I have any other questions.

Thanks, guys!