<<  Lancope, Inc Laternenumzug  >>
Basic Architecture
Basic Architecture
Latency Compensating Methods in ClientServer In-game Protocol Design
Latency Compensating Methods in ClientServer In-game Protocol Design
Latency Compensating Methods in ClientServer In-game Protocol Design and Optimization

: Curtis Mirci. , . , Latency Compensating Methods in ClientServer In-game Protocol Design and Optimization.ppt zip- 56 .

Latency Compensating Methods in ClientServer In-game Protocol Design and Optimization

Latency Compensating Methods in ClientServer In-game Protocol Design and Optimization.ppt
1Latency Compensating Methods in 18You still need to have a feel for your
Client/Server In-game Protocol Design and latency to determine how to lead your
Optimization. Im Curtis. targets Quake3 made a sound when you hit
2Networked FPS games are difficult to someone to make it easier Jitter will make
make But not too interesting if theyre it very hard to get a good feel.
not networked Broadband is pretty nice But 19But enough about me . . . Now we need
we cant rely on it ? to worry about rendering the other players
3Basic Architecture. Client / Server correctly Two main methods Extrapolition
set up Server handles logic Clients and Interpolition.
(initially) just to get player input 20Extrapolation. Other players/objects
Simplified version below. simulated forward in time Works nicely for
4Client Frame Loop. Sample clock to people running in straight lines Bad news:
find start time Sample user input Package many players move like Mexican jumping
up and send movement command using beans with too much coffee Can clean this
simulation time Read any packages from the up a bit by putting a limit on the
server from the network system Use packets extrapolation time This can make it so
to determine visible objects and their there is less warping, which will hurt
state Render scene Sample clock to find gameplay and nullify the reason for
end time End time minus start time is the putting extra work in.
simulation time for the next frame What 21Interpolation. Always moving objects
about framerate jitter? in the past Slow render a bit to
5Server Loop. Sample clock to find compensate for some lag Missed a packet?
start time Read client user input messages Extrapolate the player position Or have
from network Execute client user input the player rest (and stutter the
messages Simulate server-controlled movement).
objects using simulation time from last 22Interpolation Algorithm. Each update
full pass For each connected client, contains the server time stamp for when it
package up visible objects/world state and was generated From the current client
send to client Sample clock to find end time, the client computes a target time by
time End time minus start time is subtracting the interpolition time delta
simulation time for the next frame. (100 ms) If the target time is between the
6Not the only way to do it. timestamp of the last update and the one
Suggestions? before that, then those timestamps
7Half-Life User Input. Most important determine what fraction of the time gap
fields in the struct are Interpolation has passed. This fraction is used to
time on client Duration in ms of command interpolate any values (e.g., position and
Command view angles angles.
Forward/Sideways/Upwards velocity Attack 23Its basically buffering an additional
buttons Other stuff Any comments? 100 ms of data on the client Any longer is
8So heres what happens. Client creates a trade off, since the smoother vision
and sends a user command to the server will make others harder to hit It requires
Server executes the command and sends a fixed time interval between server
updated positions of everything back updates Problems?
Client then renders the scene Simple, and 24Interpolation visual quality. For
doesnt do well in real situations. Why? example: if the player is jumping around
9Client is too stoopid. All it does is they spend the average of the time at the
react. If theres a certain amount of middle of their jump If we interpolate at
latency the client has no choice but to the last position they might just be seen
wait. So what does the client need to do? floating up and down without ever reaching
10Client Side Prediction. One option: the ground or the height of their jump.
perform it locally and assume the sever is 25Vision fix. Each server update creates
going to be cool with it. Client still not a new position history entry Search
in control Server will shove objects back backwards through the history looking for
where they should be Can look pretty a pair that straddles the target time What
crappy. if something was SUPPOSED to teleport? Set
11A better way. Client samples input a flag.
(same) Client sends off the commands 26Lag Compensation. Normalizing
(same) Client keeps a copy of each command server-side the state of the world for
and when it was generated (different!) each player as that players user commands
First perform the last acknowledged are executed. Algorithm on the next page.
movement from server Then performs any 27Before executing a players current
outstanding commands in a similar method user command, the server: Computes a
as the server would. fairly accurate latency for the player
12Algorithm for last slide. from state Searches the server history (for the
/*state after last command acknowledged by current player) for the world update that
server*/ command /*first command after was sent to the player and received by the
the from state*/ while (true){ run player just before the player would have
command on from state to generate to issued the movement command From that
state; if (this was the most up to date update (and the one following it based on
command) break; from state = to the exact target time being used), for
state; command = next command; }; each player in the update, move the other
13Client will run same commands over and players backwards in time to exactly where
over until acknowledged Sounds should not they were when the current players user
be re-created Server should not send info command was created. This moving backwards
predicted by the client. Client still has must account for both connection latency
to re-run the old commands Fix: client and the interpolation amount8 the client
marks those not yet predicted and only was using that frame. Allow the user
plays if its the first time. command to execute (including any weapon
14Client only state data. If none, just firing commands, etc., that will run ray
use last state from server as a starter casts against all of the other players in
and run prediction commands If any, you their old positions). Move all of the
need to store the intermediate results of moved/time-warped players back to their
prediction Store them in a sliding correct/current positions.
window Actuate them as they should be, 28Now a player can directly aim at other
using server acknowledgment So far, just players without wondering if theyre
using this for movement. actually there. Is this fair?
15Weapon firing. We can do the same as 29Well, someone with a lot of lag could
the last slide for weapon firing Need to shoot someone with less lag after that
know Which weapons are being held Which is person had taken cover . . . But does that
active How much ammo each has Can be happen very often? Who is right in those
complicated if client and server shooting cases? Half-Life gives the points to the
logic is difficult. shooter Probably because its more fun to
16Why stop there? This leads us to also shoot.
predict . . . Weapon switching Deployment 30So, its still inconsistent with a
Holstering Umm, This is a Lot of Work Do perfect view of the world But the benefits
they expect us to do this for MazeWar? still outweigh those inconsistencies
17 Benefits?
Latency Compensating Methods in ClientServer In-game Protocol Design and Optimization.ppt
http://900igr.net/kartinka/anglijskij-jazyk/latency-compensating-methods-in-clientserver-in-game-protocol-design-and-optimization-142371.html
c

Latency Compensating Methods in ClientServer In-game Protocol Design and Optimization

Latency Compensating Methods in ClientServer In-game Protocol Design and Optimization

- Look and read. . We begin our lesson. Look at the pictures. Task. Good morning, dear friends. . . . .

- : . THE UNITED KINGDOM OF GREAT BRITAIN AND NORTHERN IRELAND. 4 . . AUSTRALIA. : 9,4 . . . . : 263 . . THERE ARE 5 ENGLISH-SPEAKING COUNTRIES: ! : . .

Present Perfect - never. Just. I have known Tom since 1982. I have drawn a cat. . when what time. , . , , . You have washed your car. , .

- I have a grandmother. I have a brother. I have a father. I have an aunt. I have a grandfather. . I have a sister. I have a mother. I have an uncle. 2 . : This is my family.

Funny animals - Colo-the oldestlivinggorillain captivity.Itis considered the firstgorillaborn incaptivity.Wholives inColoColumbusZooinPowell, Ohio.Colo51 years old. Inthe sperm whaleis the longestintestine.Its length is160 m. The smallestcatisthe Himalayan-Tibetancat namedTinkerToy, who lived inthe United States.Heweighed only681grams, had a7 cmin height and19 cmin length.

- . Answer the questions. . . . . Complete the sentences. . . .

661

29
900igr.net > > > Latency Compensating Methods in ClientServer In-game Protocol Design and Optimization