Motion Prediction for Online Gaming

Download Report

Transcript Motion Prediction for Online Gaming

Motion Prediction for Online Gaming
Rynson W.H. Lau
May 14, 2011
1. Network Latency

According to our earlier experiments, the oneway network latency values for different
network connections are shown as follows:
Network Connection
LAN (2 hosts within the university network)
Average Latency
0.64ms
Internet (local connection, 2 hosts within HK)
10ms
Internet (overseas connection, between US and HK)
0.16s
Internet (overseas connection, between UK and HK)
0.2s
May need to consider other overheads, such as I/O and CPU.
Problems of Network Latency in Online Gaming


Motion Synchronization Problems

Motion discrepancy of shared objects among clients.

In a collaborative game, it will be difficult to
synchronize interactions among remote players.
Object Distribution Problem

In a streaming environment, geometry of visible
objects may not be readily available locally at the time
when they are needed.
Solution to the Network Latency Problems

We accept that prediction is a
prediction. We can never have a
100% accuracy.

However, we do want a reliable
motion prediction method:

Given a specific time in the future,
the prediction method should
return the most likely position of
the target object.
2. Related Work
Roughly two types of motion prediction methods:

Short-term prediction


short prediction length (typically < 1s).
Long-term prediction

Long prediction length (typically >> 1s).
Short-term Prediction


General predictors:

Dead reckoning + polynormial predictor (Singhal & Zyda, 1999)

Modified EWMA scheme (Chim et al., 1998)
Specialized predictors:

Kalman filter for head motion prediction (Azuma & Bishop, 1995)

Gauss-Markov process model for head prediction (Liang et al., 1991)
and for human motion prediction (Capin et al., 1997)

Sequential Monte Carlo for motion tracking (Isard & Balke, 1998)
In general, specialized prediction methods are more accurate
but are only suitable for predicting motion of specific objects.
Long-term Prediction

Mobility modelling:
For mobile handovers 
Random process (Thomas et al., 1988; Xie & Goodman, 1993; Broch et al., 1998)

Discrete state conditional probability (Bar-Noy et al., 1995; Choi & Shin,
2002)
For bandwidth optimization 
Zone-based sampling statistics (Tabbane, 1995; Bhattacharya & Das, 2002)

Zone-based path retrieval (Liu & Maguire, 1996; Liu et al., 1998; Akyildiz &
Wang, 2004)

Path planning:
To find an optimal path to move from one place to another
while satisfying some predefined constraints.

Collision avoidance using prior knowledge (Tado et al., 1995) or
statistics from samples (Tana, 1992)

Moving obstacle avoidance by considering obstacle motion
trajectories (Kruse et al., 1997)
Our Streaming-Based DVE

We have developed a DVE, which is based on
geometry streaming (Chim et al., 1998; Chim et al., 2003).
<demo video>


Objects formatted for progressive transmission.

Send initial packet as a user joins the game.

Send additional geometry packets as the user moves
around in the game.
This DVE was later extended into a game engine
prototype (Li et al., 2004) .
Problems:

Too late if we request objects from the server only
when the objects become visible.

Need to ask the server for objects before they
become visible.

Need a reliable motion prediction method.

Predict future visible objects based on the predicted
future position from the predictor.

Request server for the predicted visible objects.
3. Short-term Motion Prediction

We needed a reliable motion prediction method for 3D
navigation – to address the network latency problem.

As most desktop DVE systems still use the 2D mouse for
navigation input, we studied the mouse behavior during
such navigation.

We noted that a typical navigation step (from mouse
button down to release) contains a number of pulses.
Mouse-based Hybrid Motion Prediction

When plotting the mouse acceleration against velocity, we
noted that each pulse can be approximated by an ellipse:
30
20
10
0
-10 0
20
40
60
80
100
-20
-30
-40
velocity

Hence, we model it as:
v = K1(cos(K2t)-1)
where K1 and K2 are constants determined by the shape of the pulse.

We proposed an elliptic model to model the
mouse motion behavior (Chan et al., 2005).

Two predictors are needed, one for the motion in
x axis and the other for motion in y axis.

The predicted mouse velocity is then mapped to
the 3D game scene to obtain the player’s future
position.

<Video Demo>
Performance of the Predictor
Prediction Error (pixels)
1400
Psop
1200
Pgmm
1000
Phm
800
600
400
200
0
0.1
0.2
0.3
Prediction Length (s)
0.4
0.5
Hand Motion Prediction

We observed similar motion behavior in finger
motion.

We extended the elliptic model for hand motion
prediction, by considering constraints within and
between fingers (Chan et al., 2008).

Preformance comparison:

Rock-Paper-Scissor game: sop - <Video Demo> , ehm
- <Video Demo>
<Video Demo>
4. Long-term Motion Prediction

We need a reliable motion prediction method for
object prefetching and resource allocation (such
as multi-server load-balancing).

We are developing a statistical-based method.

The environment is divided into square zones.

We collect statistics as users go in and out of
each zone.

Given the boundary position that a user enters
the zone, we compute the conditional probability
that the user will leave the zone at a particular
boundary position.

We model such a distribution function f(y|x) as a
Gaussian mixture:
n
f ( y | x)   ai f i ( y; Ci , mi )
i 1
where n is the number of mixture,
fi(y; Ci, mi) is the ith Gaussian distribution function,
with covariance Ci and mean mi,
0 < ai < 1, and

n
i 1
ai  1
Performance of the Predictor
Absolute Error (m)
20
Psop
Pgmm
[Choi02]
Our Method
15
10
5
0
0
2
4
6
8
10
Prediction Length
[Choi02] computes the probability of the user moving to different
neighboring zones based on the user’s previous and current zones.

An interesting feature of this method is that we
may consider a zone as a basic block.

We may aggregate this probability values from
zone to zone to construct a path tree.
Current Work on Long-term Prediction


How should we measure prediction accuracy
with multiple predicted paths, each with a
different probability?
Does prediction at lower
spatial resolution help reduce
computational cost, given that
the prediction accuracy is
high enough?
5
6
1
7
2
8
0
70
69
18
17
71
72
3
4
19
20
5. Combined Motion Prediction
When applied to our streaming-based DVE, the
two types of prediction methods have different
behaviors:
 Short-term prediction

Precise predicted location

Very short prediction length

Prefetching performance can be significantly
affected by other factors, such as amount of
geometry to be streamed, available network
bandwidth, CPU processing delay, network latency
fluctuation, etc.

Long-term prediction

Imprecise predicted location

Generally lower prediction accuracy

Much longer prediction length

May start prefetching much earlier in time, but most
of the objects prefetched may not be needed at all,
due to the imprecise predicted location and the
lower prediction accuracy.
One approach that we are considering is to
combine the two types of predictors to optimize
the prefetching performance:

Long-term predictor helps prefetch objects in
low resolution, e.g., base meshes.

Short-term predictor helps prefetch refinement
information, e.g., progressive records, to bring
the visible objects to their optimal resolution.
6. Problems and Future Works

Can we improve the prediction accuracy by
incorporating user interests?

Can we improve the prediction accuracy of the
long-term predictor with results from the shortterm predictor (or vise versa)?

Investigation on prediction errors and bounding
of prediction errors. (Lau & Lee, 2010)
Q&A