Whenever you think of chat in a spatial way, because you have MMORPGs like Second Life in your head, or have other reasons to operate in 3D virtual reality environments, the question arises, how can we model acoustic proximity electronically.

No matter if it's real acoustic, as in voice or telephony (using PSYC for signaling or even routing), or just virtual acoustic - letting you chat with people only when they are in the same room.

How would you go about that in PSYC, you ask? We used to have NORTH, WEST, SOUTH, EAST exits in places in early days. It's easy to put those back in, but that's probably not what you need. Even in MUDs we occasionally implemented rooms that would allow you to hear what's being said in adjacent rooms. Here are a couple of thoughts beyond 2D compass logic:

Spatial contexts

As you meander around your virtual space, your current shard keeps checking you in and out of adjacent contexts. Most of the contexts would be on the same shard, therefore it's just an operation of shuffling around data. Most shards already have a proximity detection mechanism, they can simply map a context naming scheme on top of that, and have persons enter the same context as soon as they are near to each other.

You could have a topology model where each person is in a current context and half in adjacent contexts, unless separated by a wall. Thus you could have a person stand between people in a way that it can hear both while they don't hear each other. You could also talk into a direction, by sending to that adjacent context.

Then again, if it never gets too crowded in a particular part of your universe, context modeling may actually be overkill. You may want to simply round-robin copies of a message to all recipients in proximity.

It gets interesting when you are on the borderline to a different server (I mean shard or grid or region or whatever your term of choice). You would simply use remote contexts at that point, with the person standing with one leg in your local context, with the other in a remote one. Of course you can simplify and have firm walls or oceans or outer space separate your servers, but isn't that boring?  ;D

P.S. Of course you can always transmit position coordinates in PSYC packets, if that's of any use to you.