The Hive system: version 0.91 released


(Sinan) #21

What nodes would you like? Should they work exactly like the current logic bricks, or do you want them to be different?
Yes, the new nodes should contain at minimum the logic bricks as nodes. Ideally, being able to convert a “logic bricks tree” to the “new node tree”.

Or as others suggested: keep the logic bricks and add a actuator, sensor that adds a node tree.

EDIT: The best way is to keep both systems along side each other (logic bricks + logic nodes).


(Sjoerd) #22

Hi Agoose,

Just a little update: the hive system GUI is progressing nicely, I hope to move it out of pre-alpha within two weeks. After that, I will post it in the thread here.
Are you still interested in helping out? It would be appreciated!
Be sure to have some space in your PM Inbox :wink:

cheers

Sjoerd


(Molino) #23

looking forward to seeing this.
I don’t get much time to play with the bge these days, but I do hope that someone will post a video of this in action.
:slight_smile:
M


(Equal) #24

Just a question, if i understand this right, it is a visual-only change to somthing that is used in the UDK?


(Sjoerd) #25

@Molino: There is a screencast of the Hive system with the old GUI + Panda3D, you can find it here:
https://launchpadlibrarian.net/79794930/screencast.swf
I am currently porting the same example to the new GUI + Blender

@Equal: The Hive system is indeed a node system like UDK Kismet, Quartz, Microsoft VPL and others. There are some differences: a node in those systems can have only a single entry point (the Activate() event in UDK Kismet), while a Hive system worker can have multiple entry points.
The Hive system is not visual-only. You can use Python to extend it, just like you can use UnrealScript to extend Kismet.


(Molino) #26

Hi Sjoerd, I watched the .swf file, and it looks really interesting. I was wondering (maybe it’s been asked all ready), is this going to be put into Blender’s Node Editor? So there will be an icon for Materials, Textures, Compositing, and then Game Engine?
Seems like a logical place to put it.
Any hoooo, thanks for this. I look forward to seeing how this develops.
Thanks again,
M


(LordOdin) #27

hey im trying to install spyder and it says python 3.2 isn’t in the registry but i have it installed idk what to do :confused:


(Sjoerd) #28

I don’t know why it can’t find your Python… is it in C:\Python32 ?


(LordOdin) #29

yes :frowning: :spin: it said that last time i tried to install it on my other pc too

:edit: i googled it… its a bug in python it only happens to the 64 bit version of python so i installed 32bit and it works just fine… thought you should know :smiley:


(agoose77) #30

So, I finally got it to compile.
Firstly, using CMake, SCONS doesn’t like SWISS.
Secondly, the spider example needs the sound import removed.
Sjoerd - keep me posted.


(laser blaster) #31

Here’s the sort of functionality I would like to see the Hive system have:

.Support for float and string data types, where one node can output a float or string and another can receive it.
.Nodes can also be activated/deactivated by binary pulses, similar to logic bricks.
.A wide variety of mathematical expressions and functions.
.Nodes that can dynamically add and remove constraints, including parenting, slow parenting, delayed rotation copying, delayed location copying etc.
.The ability to easily move or rotate along or around any of another object’s axes.
.Access to more parameters in general(for instance, an object’s absolute position)

And here’s a quick mockup image I made. This node setup would add an acceleration factor to a "fighter"s Y velocity:



(mrn) #32

sorry to ask a noob question but what is the difference between this and the logic bricks?

Is there more that you can do with the nodel logic?


(SolarLune) #33

I believe the goal is to have nodal logic to be a kind of middle ground between logic bricks and Python. For example, if you wanted to save the color of an object and restore it on a key-press, that would need a script. With nodes, it might be possible to simply record the obj.color property to a game logic property, and then restore it later when you need to, or do vector math. At least, that’s my understanding of the kinds of advantages node logic has over logic bricks (not that those particular nodes / setups will be possible in the finished version).


(Sjoerd) #34

All of these points are in principle there, I think.
Not all possible rotation axes and parenting modes have yet been implemented, and there is no physics yet, but we are working on it (Benoit and Spencer and myself).
Mathematical expressions will take a bit longer; I want the Hive system to run some validation on the expression, and the GUI is not yet smart enough for that.

And here’s a quick mockup image I made. This node setup would add an acceleration factor to a "fighter"s Y velocity:
[ATTACH=CONFIG]192890[/ATTACH]
Here is the hive map. You can unzip the folder and edit the .web file in the GUI.
It won’t actually run under the BGE (for the reasons above; three of the nodes are still stubs), but it should run in a few months or so.

Attachments


fighter.zip (71.1 KB)


(mrn) #35

so how do i get this into blender and get it working?


(Sjoerd) #36

All instructions are in the first post.
If it doesn’t work for you, please post the step that went wrong, and I will try to help.


(Sjoerd) #37

I am back from holidays.
Today I added a little status bar to the GUI, showing the mode (push or pull) and type of the worker antenna. You can find it in trunk (https://launchpad.net/hivesystem).


(agoose77) #38

Here’s my idea of a networking noodle.


Theoretically the client noodle should be identical to the server noodle. I can’t wait to get working on this, once we sort the GUI


(Sjoerd) #39

Looks interesting! I will convert the node-noodle to a hivemap with mockup workers.

It also shouldn’t be too hard to do it for real, but then you have to explain me what the workers should do :slight_smile:
The “bitstruct node” worker should somehow pack the Boolean values? Into the bits of a single int? As a pickled dict?
And the “packet node”, should it also build a pickled dict? Or encode the data with some kind of network protocol?


(agoose77) #40

Well, as always, I intend to use Struct (Python standard library).

The packet node takes all nodes connected to it, and packages them using struct.
I am not sure if you are aware how struct works, but it’s a dumb packaging library. You define a format string, and pass arguments to pack into bytes.
In order to optimise the setup, it is best to use struct class instances rather than the pack and unpack methods. Thus, you have to determine the format string on runtime. It is important that the server and client (or sender and receiver) have the same format string. Thus, I’m going to base this off my existing system (which is equally as compatibile in theory, not in practice at present):

You get all the connected nodes to the packet nodes. You sort them in the following fashion: Sort by type (e.g node.class.name) that way bitstruct nodes are near the front. Then, within that sorted list, you sort each group by id.
Thus, assuming that both the sender and the receiver has the same noodle, both will realise the same format string.

However, in order to distinguish packets, you give them a header. This header contains the id of the packet itself (I did not include this in the diagram.). In order to unpack the bytes into each packet (if you send >1 packet to the network node, it just concats them to one bytestream) you need to know the size of each packet. At present, i do so like this:

  • Get the header id of the packet (always first byte). Now, look into the connected packet nodes and match the id. Now, look into the children of each packet node, and do the following:
  • Following the order specified in the calculated format string for that packet noodle:
  • Go down from first character to left.
  • If the character is not variable (any type but string or array) then just calculate the size of that character (struct.calcsize(character)). Increment a size counter by that returned value.
  • If it is variable, we do the following: slice the bytes at the index of header_size + current_count_size; the first byte will say how long the variable structure is. You know now that N bytes after that character is the variable structure. Add the value to the current count and also the size of the character (one byte) and continue down the string.

It’s very simple but effective.