254 lines
10 KiB
HTML
254 lines
10 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (1.8.0_31) on Sat Mar 14 10:07:12 PDT 2015 -->
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title>com.threerings.whirled.spot (Vilya Core 1.6 API)</title>
|
|
<meta name="date" content="2015-03-14">
|
|
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
|
<script type="text/javascript" src="../../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="com.threerings.whirled.spot (Vilya Core 1.6 API)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li class="navBarCell1Rev">Package</li>
|
|
<li>Class</li>
|
|
<li><a href="package-use.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../com/threerings/whirled/server/persist/package-summary.html">Prev Package</a></li>
|
|
<li><a href="../../../../com/threerings/whirled/spot/client/package-summary.html">Next Package</a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/threerings/whirled/spot/package-summary.html" target="_top">Frames</a></li>
|
|
<li><a href="package-summary.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<div class="header">
|
|
<h1 title="Package" class="title">Package com.threerings.whirled.spot</h1>
|
|
<div class="docSummary">
|
|
<div class="block">Extends the Whirled services with the notion of locations, clusters,
|
|
coordinates and orientation.</div>
|
|
</div>
|
|
<p>See: <a href="#package.description">Description</a></p>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation">
|
|
<caption><span>Class Summary</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Class</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tbody>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><a href="../../../../com/threerings/whirled/spot/Log.html" title="class in com.threerings.whirled.spot">Log</a></td>
|
|
<td class="colLast">
|
|
<div class="block">Contains a reference to the log object used by the Whirled Spot services.</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<a name="package.description">
|
|
<!-- -->
|
|
</a>
|
|
<h2 title="Package com.threerings.whirled.spot Description">Package com.threerings.whirled.spot Description</h2>
|
|
<div class="block">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></div>
|
|
</div>
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li class="navBarCell1Rev">Package</li>
|
|
<li>Class</li>
|
|
<li><a href="package-use.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../com/threerings/whirled/server/persist/package-summary.html">Prev Package</a></li>
|
|
<li><a href="../../../../com/threerings/whirled/spot/client/package-summary.html">Next Package</a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/threerings/whirled/spot/package-summary.html" target="_top">Frames</a></li>
|
|
<li><a href="package-summary.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
<p class="legalCopy"><small>Copyright © 2015. All rights reserved.</small></p>
|
|
</body>
|
|
</html>
|