Game Development Reference
In-Depth Information
The
NetworkedPlayerControl
class is an abstract class, and doesn't do much on its
own. You might recognize the implementation of
ServerPlayerControl
from
GameCharacterControl
, and they function similarly, but rather than receiving the
input directly from the user,
ServerPlayerControl
gets it via a networked message
instead.
Both the client and server implementation of
NetworkedPlayerControl
use the
tempRotation
and
tempLocation
fields to which they apply any incoming
changes. This is so we don't modify the actual spatial transforms outside the main loop.
We shouldn't be fooled by the relative simplicity of this recipe. It merely shows the basics
of a real-time networked environment. Making a full game creates much more complex-
ity.