|
Author Topic:   Networking Terrain
Sam K
Member
posted March 04, 2000 08:36 PM            
Seumas,

I've got a quick question about deformable terrains in network games:

How do you keep all players terrain heightmaps identical over time when they can be deformed?

Is it simply about making "damn" sure that deformations occur in the correct order on everyones machines?

How about each machine sends some kind of "deformation command" to the server which puts it in a "deformation queue" and broadcasts each deformation in order to everyones machines, making sure they arrived?

I'm not writing the networking for our game, Its just something that has been bothering me because I have several large "maps" most of which are modifyable, and all effect actual gameplay, thus have to be identical across the network..

Any ideas would be appreciated..

ta

sam

IP:

Bryan T
Member
posted March 05, 2000 11:57 PM            
Sam K,

It may not be as hard as you think. Take this example: Three players (A,B,C) all fire the main turret at the same time (T0). At T1, the "Fire" messages get to the server.
The server must naturaly recieve them in some order (A,B,C; B,C,A; etc..). For each message, it spawns a "shell" object that flys along a course until it hits the ground.

Then at T2, the server sends all these new objects to the clients. Since all of these objects will be spawned at the same place as on the server, and will impact the same as on the server, and are ordered as the server recieved them, they should deform the terrain correctly on all clients.

This is not a special algorithm, it is a required set of messages for any client-server network game. If you're not running Client-Server, or you're running a protocol with prediction, or clients with control of the game state (ie: server is not definitive) then you may need a different algorithm.

Hope that helps!
--Bryan

IP: