272 lines
11 KiB
HTML
272 lines
11 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!--NewPage-->
|
|
<HTML>
|
|
<HEAD>
|
|
<!-- Generated by javadoc (build 1.6.0_24) on Wed Apr 06 17:00:16 PDT 2011 -->
|
|
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<TITLE>
|
|
com.threerings.whirled.spot (vilya 1.3 API)
|
|
</TITLE>
|
|
|
|
<META NAME="date" CONTENT="2011-04-06">
|
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
|
|
|
|
<SCRIPT type="text/javascript">
|
|
function windowTitle()
|
|
{
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="com.threerings.whirled.spot (vilya 1.3 API)";
|
|
}
|
|
}
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
</NOSCRIPT>
|
|
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
<HR>
|
|
|
|
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<A NAME="navbar_top"><!-- --></A>
|
|
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_top_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../../com/threerings/whirled/server/persist/package-summary.html"><B>PREV PACKAGE</B></A>
|
|
<A HREF="../../../../com/threerings/whirled/spot/client/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../../index.html?com/threerings/whirled/spot/package-summary.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_top"></A>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
|
|
<HR>
|
|
<H2>
|
|
Package com.threerings.whirled.spot
|
|
</H2>
|
|
Extends the Whirled services with the notion of locations, clusters,
|
|
coordinates and orientation.
|
|
<P>
|
|
<B>See:</B>
|
|
<BR>
|
|
<A HREF="#package_description"><B>Description</B></A>
|
|
<P>
|
|
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Class Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD WIDTH="15%"><B><A HREF="../../../../com/threerings/whirled/spot/Log.html" title="class in com.threerings.whirled.spot">Log</A></B></TD>
|
|
<TD>Contains a reference to the log object used by the Whirled Spot services.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
|
|
<P>
|
|
<A NAME="package_description"><!-- --></A><H2>
|
|
Package com.threerings.whirled.spot Description
|
|
</H2>
|
|
|
|
<P>
|
|
Extends the Whirled services with the notion of locations, clusters,
|
|
coordinates and orientation.
|
|
|
|
<p> The basic Whirled services facilitate a game that provides a
|
|
connected set of scenes and the ability for the bodies to move from
|
|
a scene to its neighboring scenes. The Spot package extends those
|
|
services by providing the notion of locations within scenes which a
|
|
body can occupy and which, while occupied, cannot be occupied by
|
|
other bodies.
|
|
</p>
|
|
|
|
<p> The philosophy is that a game that uses these services wants to
|
|
create a constrained universe where a body cannot simply stand
|
|
anywhere on the screen, but can only stand in a set of predefined
|
|
locations. This is a simplified mechanism for providing finer
|
|
grained locality management, such that expensive distance monitoring
|
|
algorithms need not be used to determine who can interact (speak)
|
|
with others in a particular scene. For many games, the overhead of
|
|
tracking each users' position in near-realtime coupled with a
|
|
complex message broadcasting system that dispatches messages to
|
|
users in geometric proximity to one another is serious overkill and
|
|
does not add sufficient value to the game to merit inclusion.
|
|
</p>
|
|
|
|
<p><b>Locations and clusters</b><br>
|
|
|
|
The Spot package provides a functional approximation in the form of
|
|
clusters of locations, with predefined coordinates, that are
|
|
sufficiently proximal that bodies in that cluster of locations can
|
|
all speak to one another. The locations for a particular scene are
|
|
specified in advance which serves the additional purpose of putting
|
|
a limit on the number of bodies that can be standing (and
|
|
participating) in a particular scene. This puts a natural upper
|
|
bound on the amount of network traffic that will be generated by the
|
|
need to broadcast scene updates to all occupants of a scene.
|
|
</p>
|
|
|
|
<p> Locations also serve as entry and exit points for a scene,
|
|
providing a means both for the graphical user interface to identify
|
|
the location at which bodies enter and exit a scene as well as
|
|
providing a spatial context for the connections between scenes
|
|
(i.e. the exit to the scene to the north can be located in the
|
|
northward part of a scene display).
|
|
</p>
|
|
|
|
<p><b>Orientation</b><br>
|
|
|
|
Locations define a notion of orientation which is assigned a priori,
|
|
along with the coordinates of the location and which can be
|
|
interpreted by the graphical display as the direction that body
|
|
sprites should face when standing on that location. Clusters of
|
|
locations can be constructed such that all of the bodies standing in
|
|
that cluster appear to be facing one another which provides visible
|
|
reinforcement that members of the cluster can "hear" the
|
|
conversation, while members of other clusters cannot. The
|
|
orientation of entry and exit locations are also useful in
|
|
establishing an initial orientation for a body sprite that enters a
|
|
scene based on the visualization of the entrance mechanism (i.e. if
|
|
they appear to enter through the door, the body sprite should be
|
|
oriented as if it just walked in the proper direction through the
|
|
door).
|
|
</p>
|
|
|
|
<p> Because the Spot services redefine the scope at which speak
|
|
messages are normally distributed (the Crowd services would, by
|
|
default, have speak messages dispatched to everyone in the entire
|
|
scene because the scene is a place and the default chat mechanisms
|
|
dispatch speak messages to all occupants of a place), it defines an
|
|
additional communication mode known as shouting, which conveys the
|
|
message to everyone in the entire scene.
|
|
</p>
|
|
|
|
<p><b>Portals</b><br>
|
|
|
|
Portals are a combination of locations and the standard Whirled
|
|
notion of neighboring scenes. They contain the coordinates to which
|
|
a body sprite would traverse prior to exiting to a neighboring scene
|
|
(generally so that they appear to walk to whatever visual
|
|
representation of the portal is provided by the scene, like a door
|
|
or perhaps simply the edge of the scene). Conversely, they represent
|
|
the coordinates at which a body arriving from same neighboring scene
|
|
would appear in the displayed scene.
|
|
</p>
|
|
|
|
<p><b>Example display</b><br>
|
|
|
|
This is an example of how these concepts might look in a game
|
|
providing top-down 2D display of its scenes. <br>
|
|
</p>
|
|
|
|
<center>
|
|
<img align="center" src="images/scene.png" alt="Example scene image">
|
|
</center>
|
|
|
|
<p> The arrows would, of course, not be rendered but are shown to
|
|
indicate the presence of locations (and portals) and their
|
|
associated orientation information.
|
|
</p>
|
|
<P>
|
|
|
|
<P>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<A NAME="navbar_bottom"><!-- --></A>
|
|
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../../com/threerings/whirled/server/persist/package-summary.html"><B>PREV PACKAGE</B></A>
|
|
<A HREF="../../../../com/threerings/whirled/spot/client/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../../index.html?com/threerings/whirled/spot/package-summary.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_bottom"></A>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
|
|
<HR>
|
|
Copyright © 2011. All Rights Reserved.
|
|
</BODY>
|
|
</HTML>
|