Author Topic: Everything is 6.50 MB?  (Read 4134 times)

Offline Melssj5

  • double
  • *****
  • Posts: 715
    • View Profile
Everything is 6.50 MB?
« on: September 30, 2008, 02:30:11 am »
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

Offline Melssj5

  • double
  • *****
  • Posts: 715
    • View Profile
Re: Everything is 6.50 MB?
« Reply #1 on: September 30, 2008, 04:16:31 pm »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Everything is 6.50 MB?
« Reply #2 on: September 30, 2008, 07:16:51 pm »
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.

Offline Melssj5

  • double
  • *****
  • Posts: 715
    • View Profile
Re: Everything is 6.50 MB?
« Reply #3 on: September 30, 2008, 07:52:12 pm »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Everything is 6.50 MB?
« Reply #4 on: September 30, 2008, 10:25:36 pm »
Either that or don't transfer the object itself but just a data model describing the new object's type and state.

Offline Melssj5

  • double
  • *****
  • Posts: 715
    • View Profile
Re: Everything is 6.50 MB?
« Reply #5 on: October 01, 2008, 12:07:40 am »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Everything is 6.50 MB?
« Reply #6 on: October 01, 2008, 08:51:13 am »
Ok...then you have to transfer them, of course... ;D

Offline Melssj5

  • double
  • *****
  • Posts: 715
    • View Profile
Re: Everything is 6.50 MB?
« Reply #7 on: October 01, 2008, 05:08:04 pm »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Everything is 6.50 MB?
« Reply #8 on: October 01, 2008, 08:17:07 pm »
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.

Offline Melssj5

  • double
  • *****
  • Posts: 715
    • View Profile
Re: Everything is 6.50 MB?
« Reply #9 on: October 01, 2008, 09:43:28 pm »
mmmmm yes, I guess its a better idea.
Nada por ahora