Regions: Difference between revisions
Line 45: | Line 45: | ||
==How viewers find out about adjacent regions== | ==How viewers find out about adjacent regions== | ||
In both Second Life and Open Simulator, viewers are told about the regions adjacent to regions to which they are already connected. This information is sent over the event poller channel in LLSD format. At some time in the past it was sent as a UDP message (Enable Simulator, Low/151), but that message is now "blacklisted" in the Second Life UDP message_template.msg file. | |||
The data sent in an EnableSimulator is rather basic: | |||
* "region_handle":(x, y) -- region origin in world coordinates, sent as a 64-bit region handle value., | |||
* "ip": -- IP address of simulator | |||
* "port" UDP port for simulator | |||
There is also an EstablishAgentCommunication message: | |||
* "sim-ip-and-port": -- IP address and UDP port, in string format: "87.101.7.128:15272" | |||
* "seed-capability" -- URL of the simulator's capability request server. | |||
* "agent-id" - UUID of agent involved | |||
These fields all have the same meanings as in a login reply. | |||
Unclear at this time where region size information is transmitted. | |||
==Region crossings== | ==Region crossings== | ||
TBD | TBD |
Revision as of 11:10, 24 August 2023
Introduction
Subjects related to regions.
Types of regions
Standard sized regions
The standard region size is a 256 meter square. This is the only size supported by Second Life.
Varregions
Open Simulator supports variable sized regions. These are usually (always?) multiples of 256 meters on a side.
Initial connection to a region
TBD
Login to the first region
The login process starts with an XMLRPC request to the login server. On a successful login, an XML set of key-value pairs is returned, which includes, at least:
- seed_capability -- the URL for the initial region used to query for more capability URLs.
- secure_session_id -- a unique UUID for the current session. Unclear what this is for.
- circuit_code: Self::get_key_i64(&login_reply, "circuit_code")?.try_into()?,
- sim_ip -- the IP address of the initial region server. This is currently IPv4 only.
- sim_port -- UDP port, to be used with sim_ip, for receiving and sending UDP messages.
- session_id -- UUID of the current session.
- agent_id -- UUID of the avatar logging in. This is the avatar's permanent identity.
- message -- Message to display to the user at login. Usually a message of the day or some such.
- first_name -- First name of user/avatar.
- last_name -- Last name of user/avatar.
- start_region [x, y] -- world coordinates of the southwest (0,0) corner of the initial region.
- look_at [x,y,z] -- unit vector indicating the initial direction of view.
Note that this information does not contain the initial location of the avatar. That reaches the viewer via an object update to an object with the same UUID as the agent_id. An implication of this is that the viewer doesn't know where the avatar is at startup, yet it will have to send an agent update before it knows that. This causes a race condition in interest list updates.
Open Simulator logins for grids with varregions provide some additional info:
- "region_size_x"
- "region_size_y"
If these are absent, 256 is the default value.
Teleports
TBD
Adjacent regions
TBD
How viewers find out about adjacent regions
In both Second Life and Open Simulator, viewers are told about the regions adjacent to regions to which they are already connected. This information is sent over the event poller channel in LLSD format. At some time in the past it was sent as a UDP message (Enable Simulator, Low/151), but that message is now "blacklisted" in the Second Life UDP message_template.msg file.
The data sent in an EnableSimulator is rather basic:
- "region_handle":(x, y) -- region origin in world coordinates, sent as a 64-bit region handle value.,
- "ip": -- IP address of simulator
- "port" UDP port for simulator
There is also an EstablishAgentCommunication message:
- "sim-ip-and-port": -- IP address and UDP port, in string format: "87.101.7.128:15272"
- "seed-capability" -- URL of the simulator's capability request server.
- "agent-id" - UUID of agent involved
These fields all have the same meanings as in a login reply.
Unclear at this time where region size information is transmitted.
Region crossings
TBD