Transfering completes Nodes to a client

Hi, would it be possible to transfer a Node to a server or a client without any losts…

I mean I'd like that when a client connects he recieves the terrain on where we are playing and in exchange he sends his player (a DynamicPhysicNode). the problem is that theses files may be very heavy but must not low down the game… so it should be cutted in many smaller packages and sended separatedly… it doesn't matter if the new client has to wait 5 minutes before entering the game but what matter is that he must not shut down the server while attempting to connect…



that would be very nice of you if you could give me somes clues on how I should programm it or even better if you already thought about it tell me what you did.



Thanks, Thomas

Save it out as a .JME binary file (which will be smaller than trying to serialize a Node and pass it) then use compression (which JGN happens to provide built-in BTW) to stream the file across and limit the bandwidth of the connection sending the file to only send so many bytes per second (to leave room for other more important network communication).

.jme is gzipped by default (configurable as to speed vs size)…  how much more compressed does jgn get things?

Oh, didn't realize it was already gzipped. :o



Hmmm…if you put maximum compression on I bet JGN could make it smaller…although your game would probably suffer severely from all the CPU power drained to do it. 

What informations do you need to exchange exactly?



For the terrain: do you need to pass the whole terrain informations (vertices, triangles, UW ecc…) or do you need to pass only modifications to the client?



For the player character: do you need to pass only character root node translation and rotation (and may be some other little info) or do you need to pass the whole character info?

if you want to see how i have done it - www.forthestars.com - make sure you go to the planet surface and dont think there is just a town to walk around



It abstracts out the data only to create the scene ( array of heightpoints, weathering, special resources and vegatation ), then the client just knows how to put it all together again - if you take a planet to design, it takes less than a second to save it to the server, then it takes about 6 seconds for the client to recreate it teh first time ( depending on comp ) . Most of the time is disk access as the client saves it mixed with a version checking between client and server. There are many improovements to be done on it so this time could easily be halved


theprism said:
Most of the time is disk access as the client saves it mixed with a version checking between client and server.


I have a real time mmo project in mind (MD5 Reader 2 is just a piece of the puzzle), and I thought many times to a solution for fast update of World modifications.

In my case I need to update also terrain height map modifications, buildings modifications, vegetable modifications... ecc... becouse characters could do virtually anything they want. Also, for example, creating canals for irrigation, taking water from a river.
My idea is a CVS like system, with some "little" exceptions to consider real time modifications (a bomb explosion that modify terrain near the players, for example). Server should store initial state and should store any modification with precise references to what have been modified, so it can pass only data of what have been really modified; saving this way network resources.

This is not easy to do, I know, there are also a lot of other things and unpredictable events to take in consideration, but this is my idea.

In my opinion you should never be sending Nodes over the network as it can be very heavy.  Rather, if you explain how to get the same results then you’ll be much better off.  For example, if you were to generate a random height-map for your terrain simply save that height-map to a file and send that over the pipe instead along with any texture files telling it to create a terrain with that info.  That minimizes what has to be transferred across.



NOTE: Shameless advertising follows, if you do not want to be blinded by advertising hype stop reading now.



…and if you haven’t given JGN a try it may help many of your game networking woes. :wink:

http://forum.captiveimagination.com/index.php/board,4.0.html

Hi, thanks for your replies.



What I have in mind is that a player may have created his own character… an aircraft or a car for example. and then when he connects to the server the others could see his new aircraft.

The thing is that I can't only give some light information about the aircraft… the player can design his own 3D mesh with his own texture. So I must send a complete file!



What would be great would be to cut this large file into parts and they could be send when there is some time spare. It doesn't matter if the others have to wait several minutes to see the great new aircraft, while waiting they could only see a generic aircraft that could be replaced when the real one is downloaded.



For the terrain I thing I'm going to only send an ID to the new comer and if they don't have it they'll have to download it on a website.



Thanks for your interest and happy new year!! 

i doubt that re compressing a gzip stream would help. you'll win at most a few bytes, and use a lot of CPU.

but i have another question: how much content will a user have to download? i suppose you will cache most of the models sent over the network, but if everybody is allowed to create absolutely new content, the client might have to constantly download content.

I have a similar problem - distributing meshes over a network.

I story my meshes on a web server and only send the URLs over the network. This way users will be able to contribute their own content to the world. This is a nice thing about the milkshape texture-path-in-binary problem: the loader will load the textures from the same URL, I don't have to send multiple URLs.

sfera said:

i doubt that re compressing a gzip stream would help. you'll win at most a few bytes, and use a lot of CPU.
but i have another question: how much content will a user have to download? i suppose you will cache most of the models sent over the network, but if everybody is allowed to create absolutely new content, the client might have to constantly download content.



Yes but the network may only have few clients around 10 I think and a client may have his own database with many Objects so first i just send a description of the object and if the client don't have it in his database it will be send.

The thing is that as I told before it doesn't matter if the message takes a while to be send. but what I really want is that it is being received. The problem is how could I just slow one message and not the whole reliableMessageClient and more important if another reliablemessage has to be send quickly while I am passing the previous message can I give it a priority for it to be send immediatly? is it this the non blocking system that I read about on another topic?

Actually, that's something we're about to start working in JGN is the ability to throttle a MessageClient so it will only use a certain amount of bandwidth.