Hi, I tried to save the whole world as a file to read it without having to load everything again, and I noticed that the outputfile was 6.50 MB, as that is too expensive to download I better tried to save just a small Object3D to see if works. but I found that the new outputfile was 6.50 MB again. Then I tried to save a smaller Object3D and I notices that the file was again 6.50 MB???
Why does this happens?
Well, this happened becausse the object3D was added to the world before saving it as a file. This means that the whole world is being saved with the object on somehow. If I save the object3d before adding it to the world then it will much lighter.
Yes, because each object knows its world. That's a kind of design flaw of jPCT, but there wasn't a proper way around it.
On FLier Match I used to transfer the map and each new player to each client. On a LAN is not a problem but I should transfer them before adding to the world or something to make it more lighweigth for internet purposes.
Either that or don't transfer the object itself but just a data model describing the new object's type and state.
The idea is that each client can make their own models and play with them just by copying them on a scpeficied folder.
Ok...then you have to transfer them, of course... ;D
I should do something like in Unreal Tournament. If the client doesnt have the model then transfer it, if it does have it then just use it. The model should also be saved on the client and enable it to use it. But maybe Later I will code that.
But wouldn't it be better to transfer the model in its original file format instead of a serialized form? That way, not only the model has to be present, it has to be serialized with the same class version. Or in other words: If there's a program update on the clients, the server has to retransmit all models. That wouldn't be the case with normal 3ds or obj files.
mmmmm yes, I guess its a better idea.