We’ve been getting things organized at our site, and have finally gotten online a few Unity tutorials. The first one on behavior trees (using AngryAnt’s Behave) went up a couple days ago, and today I uploaded another one on proximity detection and flocking with triggers.
Thanks for your blogging! I am interested in Behavior Trees for my iphone games, so will definitely be reading your article and checking out Behave. I had not run into Behave until now. I was just building up parented GameObjects with scripts, as kind of a dumb yet dynamic behavior tree. But Behave looks really nice.
Behave is really nice so far, if a work in progress and still somewhat undocumented. I keep pestering AngryAnt with e-mails about how Behave implements a concept or other, hopefully the process of writing these articles will clear up its usage.
Oh, and you’re really going to like the next one. The sample will go up tonight, the article soon after.
Hi Thomas! What type of beginner task do you think is not well covered by the available tutorials? I hesitated about going into that area, particularly because of how well detailed the 2D and 3D platform tutorials were.
I am thinking more of “short” and quick tutorials. Little things that help us artists understand the need and use of code snippets/short scripts. For example:
• How do I make something rotate via script
• How do I scale something via script
• How do I make the color of light switch via script
etc…
By learning those little “things” I can be more productive and don’t have to ask a programmer all the time to do such “trivial” tasks.
Mindlube, before I forget: you may want to contact AngryAnt and ask him if he has profiled Behave, since the iPhone hardware is very limited. I haven’t done it myself, so I can’t speak to that. He’s usually quick to reply.
Yea I’m sorry about the lack of documentation. I’m really bad at that. Both projects are still WIP and I’m really just releasing builds (when I’m happy with stability and progress) and then going straight back to development. That’s why its so awesome that Ricardo is willing to spare some time to create these tutorials.
I did purchase some screen-casting software with the intend of launching some quick and dirty introductions to various parts of the projects, but I’m a bit pressed for time lately (I’ve only got what little spare time I have to do these projects in).
But please feel free to post questions / comments / suggestions to the forum threads tied with each project. If I get less feedback, I’m just gonna assume that either the projects are uninteresting / perfect (yea right!) and go ahead and implement what I find useful.
Really? Damn! I should be advertising or something. No wonder I’ve received so little feedback.
Regarding performance: Everything is compiled to optimised .net assemblies - you won’t hit a bottleneck in running the behaviour logic. That also means that the runtime works cross-platform (webplayer included).
Unfortunately I don’t have access to an iPhone license so I haven’t been able to test on iPhone yet. However it looks like assemblies currently aren’t AOT compiled on the Basic iPhone license. I’m hoping that this is only temporary as I find it a bit silly to have this barrier on the iPhone when its not there in the webplayer.
AOT compilation is always done when publishing to the iPhone - The iPhone kernel does not allow JITing code, so you either have to interpret the code (SLOOOW), or AOT-compile
Sure. I’m just wondering whether its not possible to AOT compile JIT compiled assemblies?
Basically I’m just looking for a way in - should I perhaps supply an already AOT compiled assembly and how would that work on the Basic license if at all?
There is one thing to keep in mind: Unity iPhone only supports .NET 1.1, so if you have a fully fledged Unity .Net 2.0 DLL it won’t work on the iPhone version at all.
Maybe this is the wrong place for this, but I was wondering if there was any way to implement AngryAnt’s Behave using Javascript, or if you have to use C# or Boo only for Agent Interfaces.
Basically, I don’t know either C# or Boo very well I’m a JavaScripter.
Not sure how you’d handle the enum comparison, since Unity’s quasi-Javascript doesn’t seem to support them, but you might be fine when simply comparing it against the predefined values.
As an aside I’m not very partial to Unity’s “Javascript”, and in general it seems to be there mostly to provide an easy point of entry. It might be worth to pick up one of the other languages if you’re getting into more complex code.