Högni and Amy's game project

Thought in deed

Archive for the ‘Unity3D’ Category

Behave your trees

leave a comment »

I had already started using the good ol’ switch/case statement method to start implementing the AI for spacewars, when I bumped into Behave for Unity3D. This library implements Behavior tree logic in Unity with a nice visual editor. After a few minor niggles, finding workarounds for a couple of bugs and a lot of wrapping my head around how B-Trees really work, I love it.

The concept is so simple and intuitive, once you get past the initial (low) barrier you can be pushing out complex algorithms in no time. When you have your logic mapped out, all you have to do is implement the individual action and decorator code snippets. This fits so well into the Unity style scripting – where there are lots of short scripts – the workflow does just that.

Behaviour trees also integrate fairly well with FSMs, so you don’t have to instantly throw them out. You can have the tree actions change states or alter parameters if needed, maintaining interoperability.

There are other tools out there to create B-trees, but this one for Unity is very much sufficient.

Written by Högni Gylfason

20.07.10 at 19:16

Unity3D vs. UDK

with one comment

We tried to use UDK.

The GUI editor is pretty good. Graphics are nice. The material editor is great. Asset browser, definate plus.

Scripting engine. Bad. Really outdated bad. Script prefab instantiation non-existent. Bye bye.

We are now using Unity3D

Asset browser is primitive but usable.

Low level integration with asset tools. Native 3dmax conversions. Very nice! Assets even open directly from the asset browser in the art tools or visual studio (for scripts).

Game object component stack. Fucking brilliant. Dragging scripts onto a game object and setting its properties directly. So god damn good.

Shame there is no node based material editor or GUI editor. There is an excellent 3rd party GUI editor available though, so that’s not a problem.

UDK hereby kicked to the curb. Welcome Unity!

Written by Högni Gylfason

20.07.10 at 11:19