- Version 0.90a2 has now been released
- Please install Spyder 3.2.2 along with it
- The post below has been rewritten
As you may know, the Hive system is a Python system for nodal logic, and the focus of one of this year's GSoC projects.
Here are some directions and updates for those who would like to follow its progress:
What you should know first
1. The hive system is still under development. The current version is 0.90a2, which is "beta-ish": The core functionality is done, but there is a lack of documentation, tutorials and missing parts of the standard node library.
Also, it will take additional months until Hive will be ready for full integration with Blender: HiveGUI currently runs externally under Qt, and Blender itself is not yet ready to have it running inside Blender.
2. The hive system is meant for two kinds of people:
- Non-programmers who use logic bricks. Nodal logic is similar to bricks, but more powerful. The hive system has a GUI editor for nodal logic, see Using the GUI below.
- Programmers who can code their own nodes in Python. See Learning more about the hive system below.
Installing the hive system
If you installed older versions of Hive and Spyder already, please uninstall them first.
This allows you to run the BGE examples (see below), but not the GUI
1. Get the hive system zip file and the Spyder zip file
2. Unzip them in your add-ons folder
This requires a separate installation of Python 2.6, 2.7, 3.2 or 3.3
1. You can download the hive system here (latest version: 0.90a)
2. If you use the Windows installer, 32 bit Python is recommended; installers seem to have problems with the registry for 64 bit Python.
3. It also requires Spyder to be installed (Hive 0.90a requires Spyder 3.2)
Learning more about the hive system
Programming in the hive system is a bit like Blender: hard and non-intuitive to learn, but consistent and very powerful once you have mastered it.
However, when it comes to mastering, the documentation that I wrote is not very gentle. Fortunately, Agoose is writing some easy-to-understand documentation for Python programmers. There is now also a tutorial on visual programming with HiveGUI and WorkerGUI. For more information, see this thread .
The hive tutorial
Version 0.90 of the Hive system will contain a visual programming tutorial, with examples that use little or no Python. In 0.90a, this is still a stub. However, the tutorial does already contain a finished visual implementation of Tetris (with .blend). Use HiveGUI to open the hivemaps (tetris.hivemap and hivemaps/*) , SpyderGUI to open spydermaps/*, and WorkerGUI to open workermaps/*. The Python code generated from the workers are in workers/*.
The manual and screencast
For the brave of heart, there is also the complete 63-page long manual, with extensive examples, which is now available as a zip archive. Most examples are non-visual and require Panda3D to run.
For all other people, I recorded a screencast demonstrating the final example of the manual. This example has also been ported to the BGE (see below). The screencast shows the older GUI, which has been superseded by the new HiveGUI (see below).
Using the GUI
You can now download a default empty HiveGUI project, including a .blend to run your hive inside the BGE.
The Hive GUI
There is now a hive system GUI to edit nodal logic. It has just reached beta, so there are bugs and very little GUI documentation. For now, you will mostly have to guess and try out what the nodes actually do (see Running the hive system in the BGE below), or browse their source code.
Please note the following points:
1. The GUI works outside Blender. Nodal logic is not yet editable from within Blender. Follow the instructions above in Installing the hive system: stand-alone install.
2. The GUI runs under Python 2.6, 2.7, 3.2 or 3.3.
3. You will need PySide or PyQt to run the GUI. Either of them will do, but PySide works best.
4. The GUI scripts (HiveGUI, WorkerGUI, SpyderGUI) are installed into the Python scripts folder (C:\PythonXX\Scripts, or their Linux/Mac equivalents).
In addition, under Windows, shortcuts are installed into your Start Menu under "Hive System", but this does not work for Python3.x (bug in Python).
5. Hive system versions <=0.81 have an older GUI, which you can see in the screencast.
WorkerGUI and SpyderGUI
Since version 0.83, there is also a WorkerGUI. With the Worker GUI, you can create your own custom worker nodes by visual programming. These workers can then be used in HiveGUI, together with the existing dragonfly workers, to build nodal logic. See Agoose's tutorial for more information.
SInce version 0.90a, there is a SpyderGUI to add custom data (Canvas slots, icons, animations) to the hive.
The points above also apply for WorkerGUI and SpyderGUI.
How to make the hive system run under the BGE
You will need Blender 2.64 or 2.65 for this. Blender 2.65 only works with Hive 0.90a or later.
There are two ways to get it working:
A. With the hive system installed as an add-on
This should work out of the box
B: With a stand-alone install of the hive system
This requires a stand-alone install of Python. Any version should do.
First, follow the instructions above in Installing the hive system: stand-alone install.
Then, you must create a PYTHONPATH environment variable with the value "C:\PythonXX\Lib\site-packages" (or the Linux/Mac equivalent). Else, Blender will not find the Hive system. Google "create windows environment variable" if you have never done this.
BGE examples of the hive system
- The best example of nodal logic is currently this blend. You can spawn monsters that are controlled by nodal logic. You can edit the .web files (hive maps) with the hive GUI to modify the logic.
This .blend is a port of the final example of the manual, and is also shown in the screencast. See Learning more about the hive system above.
- See also the Tutorial above, showing a full visual implementation of Tetris (with .blend)
- You can find two more .blends on my wiki to play with: a Tetris game (non-visual implementation) and an animated spider. They use low-level nodes, built and connected in Python, no fancy visual graphs. They can be run under the BGE inside Blender. (Blenderplayer also runs, but there are still some glitches in keyboard input.)
- You can now download a default empty HiveGUI project, including a .blend to run your hive inside the BGE.
Community input on node design
At some point, community input will be needed on the design of nodes. What nodes would you like? Should they work exactly like the current logic bricks, or do you want them to be different? I can give everyone their own customized version of the Motion Actuator if they like, coding them is no trouble at all. But some community standards might be helpful, just to make sure that people can come to this forum for help about nodes and talk about the same thing.
This will become more relevant once the Hive system has matured a little bit further.
But in the meantime, everyone is welcome to post or send me mockup node diagrams or individual node designs, and I will see if I can implement them already.