Everything is 6.50 MB?

Started by Melssj5, September 30, 2008, 02:30:11 AM

Previous topic - Next topic

Melssj5

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?
Nada por ahora

Melssj5

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.
Nada por ahora

EgonOlsen

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.

Melssj5

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.
Nada por ahora

EgonOlsen

Either that or don't transfer the object itself but just a data model describing the new object's type and state.

Melssj5

The idea is that each client can make their own models and play with them just by copying them on a scpeficied folder.
Nada por ahora

EgonOlsen

Ok...then you have to transfer them, of course... ;D

Melssj5

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.
Nada por ahora

EgonOlsen

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.

Melssj5

mmmmm yes, I guess its a better idea.
Nada por ahora