Networking Add-on

Hello, i’m agoose77 and i’m looking for some help in creating a plugin for Blender.
Since the plugin manager has been added, world of new features have become available to those who previously knew little of add-ons for Blender.
Currently, Blender lacks features (in the BGE) to match those of Unity 3D, another free Game Engine, because of a)render and logic, but also b)extensions.
Unity 3D has one plugin in particular which i feel ought to be brought to the GE.
When playing a game, it can be fun yes, for a while. But after some time, one may think; ‘this would be so much better, if i could only play against someone else!’.
Now, some of us here on Blender artists have posted our successes in creating Games which run over a network, but many have requested (and not received) help.
The reason for this is that a majority of those who are pulled to the Game Engine do not have skills in Python, and are confined to Logic Bricks. Now, many a good game can be made in logic bricks, but Networking isn’t part of the system.
What i propose is to create a plugin which provides both access on an api level (calling modules and global variables, but also provides logic brick functionality.
Now, to do this, i need to be able to create an add-on which provides all these features-AND is accessible to both Python savvy and Logic Happy users.
I have already made a few network demonstrations, but i have no experience in Add-on development in Blender.
Another user here on the forums sent me a link which enabled Logic bricks to be made from a more interpretable xml file (psuedo code) and that was parsed to generate logic bricks.
Unfortunately it could not link the logic bricks, and thus at the moment has very limited functionality.

Let’s cut to the chase!
So, what am i asking for?

  • someone who can aid me in creating a GUI,
  • someone who can help me make logic bricks via python (no user assistance)
  • someone who can help me implement this into callable modules

Is this you?
If so, please leave a comment below.
Any questions?

i’m wondering, how easy is it to create a ‘new’ type of logic brick?
At the moment i have three options:
1)make an add-on
2)make a component using Moguri’s system
3)make a new ‘network’ logic brick.
Any thoughts?
I think i’ll make a poll

I’m not sure this can be done at the add-on level, I’ve seen a question about adding more Logic bricks and it was said to be only possible by modifing Blender itself. Also, I don’t think you could edit the standard callable modules (bge, GameLogic, etc.) that being said, you could probably use add-ons to add more callable modules (similar to the register function on Blender text blocks).

yes indeed, although i have seen examples such as the BRIK add-on which appears to generate logic bricks.
If it is not possible, could there be a work-around - such as linking an blend and copying logic from objects in the scene in the linked blend?

There may well be, certainly a module that simplifies the application of the whole socket module thing could be possible (though only really useful to those already somewhat python savvy).

I had a look at the API and it looks like the addition of a new Actuator Logic Brick (for example) would require changes to the bge.types module in the form of adding a new Actuator class, then adding references to it in the bge.logic module, plus the addition of another value to the enum on the bpy.types.Actuator. Presumably with the code which I don’t know how to do relating to how it functions and it’s GUI would also have to be added to the modules (bpy.types for the GUI I’m guessing (maybe it would be added to the window manager?) and bge.types for how it works in game).
I’m afraid I don’t have the faintest idea how to do any of this though, sorry.

EDIT: Unless you mean generate logic bricks as in rather than adding new types of logic bricks, just a script the lays out the existing ones for you. That could well be possible.

Indeed, i need a script which generates existing Logic Bricks, then links them together.

Oh well, I shall look at the API shortly, stay tuned.

Okay all of the properties of a Sensor/Actuator/Controller can be edited here using these parts of an API (Also can link them together):


New Logic Bricks can be generated using the:



bpy.ops.logic.actuator_add(type="EDIT OBJECT")

Commands. Leaving the type argument empty causes the Logic brick to default to Always, And or Motion, respectively.

i also think i need,actuator=actuatorob)

Duo, are you willing to help in this respect?
I would appreciate any help that there is to offer.

I guess I can write your logic brick generator, what exactly needs doing?

Ok, thank you for showing your interest!

I’m making a networking plugin.
It will have two interfaces - 1 Python, and 2 Logic bricks.
The main idea is that you click in the toolbar for Networking - will make panel GUI for add-on.
This will set up code, and create a variety of predefined sensor,actuators and controllers that will make up the basic system.
Also, can object properties be CREATED upon an object?

thanks guys!

Do you mean object BGE properties?

Well, it now seems that the best route forward is to use the Components system created by moguri.
I am working on that at the moment, but i feel that i should also make an add-on which creates the logic bricks as well, for those who don’t like python.

I haven’t heard of that addon 0_o Just tell me when something needs doing =P