Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1075929 Posts in 44152 Topics- by 36119 Members - Latest Member: Royalhandstudios

December 29, 2014, 04:01:07 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)How to share coordinates between the server and the client. (Redefined)
Pages: [1]
Print
Author Topic: How to share coordinates between the server and the client. (Redefined)  (Read 377 times)
driftwood
Level 0
***



View Profile WWW
« on: September 05, 2011, 01:19:15 AM »

In minecraft, there is a dat file which contains a 3d array of location for every brick on the map.

When a client changes a brick, the action updates the dat file on the server, I presume.
Then, is the whole dat file, or just the action, propagated to the clients?


I am wondering how it would affect ping, if for every brick, coordinates are being constantly updated across all clients (whether or not an action has been performed on them). Or whether a client should have a cached copy of the array, actions update the client dat file, then the server dat file.  This is followed by a scheduled (every minute for example) server initiated sync - where the whole dat files is reuploaded to all clients (to cover for the eventuality of lost instructions/packets).   Lips Sealed  

Does this make sense? if so how should I design my client updates?

« Last Edit: September 05, 2011, 02:52:42 AM by driftwood » Logged

Working on my multiplayer game based in the sky
mokesmoe
Level 10
*****



View Profile WWW Email
« Reply #1 on: September 05, 2011, 03:31:25 AM »

Remember that minecraft level files are already divided up into chunks . I don't anything about how the multiplayer works but I'm sure that makes a difference.
Logged
driftwood
Level 0
***



View Profile WWW
« Reply #2 on: September 05, 2011, 03:35:10 AM »

head hurts WTF
Logged

Working on my multiplayer game based in the sky
Geeze
Level 5
*****


Totally.


View Profile
« Reply #3 on: September 05, 2011, 06:35:41 AM »

When you travel to unloaded chunks, server sends whole chunk. And server sends block updates but only in current area. Of course server has to follow what chunks are loaded for what players (well not necessarily but usually you want to minimize internet traffic)

I hope this clears it up.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic