Iams have limited "hearing range"?

Iams have limited "hearing range"?

Postby Cale Vinson » Sun May 30, 2010 2:03 am

Apart from the stability issue that we've discussed in great detail in other threads, my Iam Jabber-bridge project seems to be pretty much working. But I did notice one odd thing.

Normally I'm standing next to the Iam when I say things that the Iam picks up and passes to Jabber. A couple of nights ago I had wandered away from the Iam to check something else out, and I noticed that if I said anything it was no longer being picked up by the Iam and passed to Jabber. I tried this again this morning, and it seems repeatable - stand close to Iam and everything works, move away it doesn't, move back close again and it does.

So, my current wild-guess is that the "receiveSayAction" event handler is only being passed "say" events that occur within a certain distance of the Iam. I don't think *I'm* doing this filtering - here's my "receiveSayAction" code:

Code: Select all
   public void receiveSayAction(String entityName, String text)
   {
      String message;
      Entity entity;
      
      if ( !text.startsWith(JABBERPREFIX) )
         return;
      
      text = text.replaceFirst(JABBERPREFIX, "");
      text = text.trim();
      
      entity = findEntity(entityName);      
      message = String.format("(BM: %s %s) %s", entity.getFirstName(),
                                      entity.getLastName(),
                                      text);
      
      try
      {
         jabber.sendMessage(message);
      }
      catch (XMPPException exception)
      {
         System.out.println("Failed message attempt. Msg = " + message);         
      }
   }



Am I barking up the wrong tree?

If not, this is a bit of an issue for the Jabber-project - we really want anyone anywhere in the BM city to be able to use it, not to have to "huddle" around the Iam.

- Cale
Cale Vinson
 
Posts: 25
Joined: Sun Mar 21, 2010 5:21 am

Re: Iams have limited "hearing range"?

Postby admin » Tue Jun 01, 2010 7:05 pm

If not, this is a bit of an issue for the Jabber-project - we really want anyone anywhere in the BM city to be able to use it, not to have to "huddle" around the Iam.


Unfortunately this is a feature, not a bug. And nothing to do with Iams per se.

The Blue Mars server limits the messages. I'm not entirely sure what the limits are but it's roughly as follows (don't pin me down on the exact numbers):

- You see and hear anyone within 25 meter.
- You see and hear a maximum of 50 avatars within 50 meter. The server tries its best to calculate which ones are the 50 closest.
- You'll not see or hear anyone beyond 50 meters.

The reasons for this are fairly obvious. One is bandwidth, the other information overload. Consider seeing conversations of a thousand people logged in at the same time. The text would scroll up so fast you wouldn't be able to read any of them. And it would mean 1000 people would have to receive messages of the 999 others. Traffic would go up square to the number of people online. By limiting it to 50, the most messages it needs to send is 50,000 opposed to a million for 1000 players. And BM wants to support up to 10,000 CCU.

At some point we had it set up that outposts and villages would receive everything from anybody, no matter the distance. I don't know what the current thinking on the policy is within AR. But it seems very doubtful AR would let you have a major city without these restrictions in place.

Mark Boon

P.S. One little tip:

Code: Select all
text = text.replaceFirst(JABBERPREFIX, "");

is much more efficient if replaced with

Code: Select all
text = text.substring(JABBERPREFIX.length());
admin
Site Admin
 
Posts: 69
Joined: Thu Feb 18, 2010 9:54 pm

Re: Iams have limited "hearing range"?

Postby Cale Vinson » Thu Jun 03, 2010 3:15 am

(Quickly, before I forget - many thanks for the Java-tip! :) )

Thanks for the information about communication ranges.

I do think that filtering of data might come in to play here. SL has a concurrency of order 50-70 K, and in SL every Caledon community member can chat with any other Caledon community member (irrespective of where they actually are in-world), via the Caledon Chat group (which of course filters that 50,000 down to, I don't know, a hundred or something).

My hunch is that AR will have to implement some sort of group-chat feature in BM at some point - it seems to me its simply too standard/vital a feature of VWs not to have it in there. Am I correct in assuming that the plan is to update Iams, so that as new features (like group-chat) are added to the player-client, the Iams are also able to access them? If so, it may be that my most sensible strategy is to put the JabberBridge on hold for a bit, and just wait. Unless you had some other wonderfully tangential suggestion to get around these limitations (which I understand completely are nothing to do with Iams directly)?

- Cale
Cale Vinson
 
Posts: 25
Joined: Sun Mar 21, 2010 5:21 am

Re: Iams have limited "hearing range"?

Postby admin » Thu Jun 03, 2010 7:29 pm

There's a new feature in BM that allows you to send private messages. I must confess I haven't actually used it myself yet, so I don't know what it can or can't do. But I suppose it allows you to make groups and send group-messages. If not now, then that may be a feature added in the future. That chat-feature is actually something that works completely independently from BM. Think Skype Chat or MSN Messenger. But in a box displayed in the BM client instead of a separate application.

The Iams don't support these private messages yet. I was told it should be easy to do , but I just haven't gotten around to it yet. I did have some foresight by having 'sayTo()' in the API, but currently all it does is make the chat-bubble the same color of the person it is talking to.

At this point in time it's hard for me to give a time-line when I'll add this functionality to the Iam framework. It could be a couple of weeks or a couple of months. It all comes down to priorities set by the boss, as I'm also involved in another project. I hope to know more in a week or two.

In the meantime, I would suggest you continue with what you're doing. When private messaging comes available, all you'll need to do is replace a few 'say()' calls into 'sayTo()' calls as I'll be making sure the private-messaging communication gets taken care of behind the scene. For the time being it does mean you'll have to 'huddle' around the JabberBridge Iam. If that's a deal-breaker you may decide to wait of course, that's your call to make. I do not have a way around this limitation at this very moment.

Mark
admin
Site Admin
 
Posts: 69
Joined: Thu Feb 18, 2010 9:54 pm

Re: Iams have limited "hearing range"?

Postby admin » Tue Jun 08, 2010 9:17 pm

I just got a little more information on the private chat. AR uses XMPP and an Openfire server for it. So it's the same as your SL jabber. I'll probably also have to use the smack.jar to add in this functionality to the IamFramework. So you're ahead of me on this.

At the moment the BM client only allows sending private messages to people on your friends list. Groups are supported on the server side, but not yet by the BM client. No decision has been made when 'groups' will become an integral part.

I'll see if I can start working on adding the private chat. But I can't promise any timeline. With regards to groups, for your application the best solution might be to have people make a request to be added to the Jabber Iam's friend-list. And then whatever it receives from SL can be sent to everybody on the list.

Mark
admin
Site Admin
 
Posts: 69
Joined: Thu Feb 18, 2010 9:54 pm

Re: Iams have limited "hearing range"?

Postby Cale Vinson » Wed Jun 09, 2010 1:48 pm

Many thanks for the update Mark!

Sounds promising, though I did read (and completely understand) the "no timelime" bit too. :)

It goes without saying that if you think my Jabber-connection code could be of any assistance to you, its yours.

- Cale
Cale Vinson
 
Posts: 25
Joined: Sun Mar 21, 2010 5:21 am

Re: Iams have limited "hearing range"?

Postby admin » Mon Jun 14, 2010 7:58 pm

It goes without saying that if you think my Jabber-connection code could be of any assistance to you, its yours.


Thank you for the generous offer, but it's already done. There's still a piece of the puzzle missing and that is the friends-list. I hadn't really seen any need for an Iam to keep a friends-list, so it doesn't have functionality to deal with it. I don't think it would be much work to get it in if it weren't for the fact that I don't have access to that information at the moment. And the person that needs to do that for me is extremely busy. Hence the 'no timeline' qualification. It's simply not in my hands.

There's another release planned for July 1st. I'll make sure the private-messaging will work with that one. But without friends-list functionality it's of limited use to you and I doubt that will make it into the July 1st release. Anyway we don't have 'groups' yet. So you'd have to send a separate message to everyone on your friends-list currently online.

Mark
admin
Site Admin
 
Posts: 69
Joined: Thu Feb 18, 2010 9:54 pm

Re: Iams have limited "hearing range"?

Postby Cale Vinson » Tue Jun 15, 2010 6:40 am

admin wrote:
Thank you for the generous offer, but it's already done. There's still a piece of the puzzle missing and that is the friends-list. I hadn't really seen any need for an Iam to keep a friends-list, so it doesn't have functionality to deal with it. I don't think it would be much work to get it in if it weren't for the fact that I don't have access to that information at the moment. And the person that needs to do that for me is extremely busy. Hence the 'no timeline' qualification. It's simply not in my hands.

There's another release planned for July 1st. I'll make sure the private-messaging will work with that one. But without friends-list functionality it's of limited use to you and I doubt that will make it into the July 1st release. Anyway we don't have 'groups' yet. So you'd have to send a separate message to everyone on your friends-list currently online.

Mark


Thanks once more for the update Mark, now lets see if I fully understand it. :D

a) I'll be able to send a private-message (PM) from my Jabber-Iam to an arbitrarily named BM-avatar, and that will show up in the associated client.
b) There'll be an event-handler to handle incoming PMs for an Iam, similar in structure to "receiveSayAction".
c) PMs have no spatial range limitation.

I could be missing something, but I don't see it as a big deal for my Jabber-Iam to have to keep its own list of BM-avatars who want to be part of this "chat-bridge". Even a flat-text file of avatar-names would probably work, given the current and expected-short-term concurrency in BM. People could add/remove themselves from the list by saying something to the Iam in-world. I guess what I need to check in the docs is whether Iams can grab a list of all avatars *currently* in that city, so that they don't just send a PM to everyone in the flat-text file, whether they're logged in or not.

- Cale
Cale Vinson
 
Posts: 25
Joined: Sun Mar 21, 2010 5:21 am

Re: Iams have limited "hearing range"?

Postby admin » Tue Jun 15, 2010 9:20 pm

a) I'll be able to send a private-message (PM) from my Jabber-Iam to an arbitrarily named BM-avatar, and that will show up in the associated client.

Yes.
b) There'll be an event-handler to handle incoming PMs for an Iam, similar in structure to "receiveSayAction".

Yes.
c) PMs have no spatial range limitation.

And yes.

I could be missing something, but I don't see it as a big deal for my Jabber-Iam to have to keep its own list of BM-avatars who want to be part of this "chat-bridge". Even a flat-text file of avatar-names would probably work, given the current and expected-short-term concurrency in BM. People could add/remove themselves from the list by saying something to the Iam in-world. I guess what I need to check in the docs is whether Iams can grab a list of all avatars *currently* in that city, so that they don't just send a PM to everyone in the flat-text file, whether they're logged in or not.


It's possible. It depends on the number of people on the list. I was expecting you're going to have hundreds and I don't think there's a way to get everyone currently in a city. To send hundreds of PMs might cause some heavy traffic in your Iam, but it's your server...

There's another catch though. BM clients can only send PMs to avatars in their friends-list. So someone wanting to receive the jabber conversation needs to be friends with the jabber Iam. Currently, if you ask to be friends with an Iam, and the Iam accepts, it plays the hand-shake animation but doesn't really do anything. I still need someone to add that to the protocol. But it does work the other way around, the Iam can ask a player to be friends and then when the player accepts the friends-lists are updated. I've added a 'requestFriendship' method to the Iam API for that. And a 'getFriendsList' method that half works. It gets the friends-list but it doesn't have the status information yet. Again, I need an addition to the protocol for that to work. At least you won't have to store a list in a local file or so.

If you'd like to have early access to this new functionality, I can consider posting another unofficial update.

Mark
admin
Site Admin
 
Posts: 69
Joined: Thu Feb 18, 2010 9:54 pm


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron