Thursday, 24 March 2011

What is the Status of NPCs in Opensim as of today?

In Opensimulator and it's various incarnations (e.g. RealXtend, OpenSim vanilla, Aurora Sim and the various others) there are theoretically various ways to do NPCs (or Non Player Characters).


I say in theory because of the two main classes of NPCs (client side and server side) it seems that the two major flavors of Opensim - "Vanilla" and "Aurora", both had more or less functional NPCs up to the 0.6.9 release. I can't say much about RealXtend (the originator of the rexbot server side NPCs) and I know nothing about the various other small-scale flavors.

So I'm going to cover the two major incarnations: Vanilla and Aurora.
The Vanilla 0.6.9 release had both server side and client side. Although client side bots work in all flavors, I'm not really interested in client side bots because I don't want to have to leave a dedicated client hanging around running what are effectively cut down clients like libomv or radegast (good though those tools are), instead I want server-side, scriptable bots that can rezz and take action or be de-rezzed without the need for a dedicated client.

The server side worked on vanilla 0.6.9, after a fashion and if you have access to a binary of the 0.6.9 release you can still get a feeling for them by following Kenneth Rougeau's excellent tutorial at


http://kennethrougeau.com/geekery/opensim-server-side-npc-experiments-day-one



Unfortunately they didn't work completely as it stood in the 0.6.9 vanilla release. Specifically, unlike client-side bots, the server side NPCs in 0.6.9 vanilla were unable to walk around. They just sat still, although they could talk, rezz, de-rezz or play animations.
This code is based on the IClientAPI and is found in NPCAvatar.cs and NPCModule.cs which are optional modules in the World subsection of the Region class. Although it can be controlled by script in theory, it does so through the os command subsection and is anything but intuitive on how to set up. That said, Kenneth Rougeau's tutorial takes you through it pretty nicely if you have patience!

To date, however, a small team of individuals including Ken Rougeau, bodzette Coignet, Haplo Voss and I (x8ball) worked behind the scenes to try to get these bots to move. As of December, the last I heard they had succeeded, but the code was never released into the wild because 0.6.9 was already several releases behind and they wanted to work on 0.7.2. I believe they are still working on it but the status seems to be that the bots do not rezz and remain as a cloud and so we are still waiting.

On the other major flavor of Opensim, "Aurora" they were significantly more advanced in their efforts than those working on the vanilla side, with people such as Revolution Smythe and Christy Lock putting together a much more sophisticated bot into the 0.6.9 codebase of Aurora. This code while also partly based on the ClientAPI is in a separate section of Aurora specific code called botmanager and is additionally based on a much better factored piece of code derived from Real-Xtend's rexbot and is fully scriptable easily from chat.

Unfortunately the codebase in Aurora has broken the Rexbot implementation and it no longer works. Skidz on the aurora team took a brief look at it a few days ago but it's no further ahead. On the very positive side, both Rev Smythe and Christy Lock have been extremely helpful in answering questions. Christy's client side implementation of NPCs is stunning and quite simply something to be seen to be believed.

The rest of the posts will detail the journey to understand why NPCs are not working on both vanilla opensim 0.7.2 as well as current aurora sim code, with the initial focus being on the vanilla opensim code since that's the code I'm most familiar with up till now. That said, any findings on vanilla opensim *should* transfer across to Aurora because the bots are instantiated in more or less the same way and both implement IClientAPI.

No comments:

Post a Comment