BinaryImporter failed for j3o model and DirectionalLight

I mean… If it were me I wouldn’t be serializing and sending objects over the network. I would tell the client to attach the things it already has when it recieves a command from the server. That’s how it’s usually done.

I see, common mutiplayer game does so.
but my project is just for special purpose, I select jme to do it well except two bugs.
i know 3D engines has no used for this case. as you suggest, I can deal j3o models and light first, but i must fix after.
if you can help me,i upload my code (16M)
i delete jme lib, zip file is small

If this were a bug in JME then all j3o loading would be broken.

Also just because you save a spatial doesn’t mean that it will automatically include every dependent asset like textures. You will also need to send the textures. My strong guess is that Jaime ends up all white because you didn’t transfer the texture to the client.

When using a game engine for non-game stuff, sometimes you will have to do extra work to get things to work right.

Thank you for your reply.
how many codes should be modified in jme to do my work ? I can try it.
jme can do as Distributed System else?

JME does not need any modification at all.

You just need to fix YOUR code.

JME loads and saves j3o files all the time without any of the issues that you mention… it’s the same JME code that you are using. JME works fine. Your code is not working fine.

1 Like

j3o savable can not be fixed ?
Light savable can fixed else ?
So it is very hard to modify?
anyway I think jme can do my work, I think we can try.
my project is just special game. I can do it by other ways.
There is always a solution to the problem

You can always build the engine and modify it for your use.

Asking for the official engine to be tailored to your own personal goals would have to be good for everyone and adhere to some certain known standard to even be considered I would wager.

THE ENGINE CODE ALREADY WORKS FINE.
THE ENGINE CODE ALREADY WORKS FINE.
THE ENGINE CODE ALREADY WORKS FINE.
THE ENGINE CODE ALREADY WORKS FINE.

There is nothing to fix.

THE BUGS YOU SEE ARE IN YOUR OWN CODE.
THE BUGS YOU SEE ARE IN YOUR OWN CODE.
THE BUGS YOU SEE ARE IN YOUR OWN CODE.

Else, prove it with examples that actually show the problem… so we can show you what YOU did wrong.

Edit: but you know what, go ahead and download the engine source code and try to fix the problem. Given the communication barrier, that may be the easiest way for you to find the problem in your own code.

1 Like

OK, I see.
I just give a suggest to improve jme
if it doesn’t mean anything, I do by other way.
thanks very much

By the way, in case it helps, there are also UrlLocator and HttpZipLocator for remote asset loading.

thank you for your suggest.
Client just monitor scene of server, Client should playback the scene any time.
Client want simulate AI task, so spatials sync must be simple.
I found jme savable is fine, so used jme, but found two difficults.
well, I think again.

Please provide an example that fails.

  1. Client reload light received from server, scene color are changed continue, I think DirectionalLight serialize lose some data ? but Client load local light, it is fine.

2.Client reload j3o model received from server, skin changed continue, I think j3o serialize lose some data ? aimcontrol should be send too.

I knew reserialized Object is a new Object, simpleupdate() just reload is simple, when Client playback is fine.

can you help me ? thank you

There is something wrong with your code. We can’t debug it from here.

The examples you already provided had obvious bugs you wrote into them. So please provide failing examples without the bugs you wrote.

It is the same loading. Loading is loading. Reading a j3o is the same as serializing.

Color is written and read correctly in JME:

You must have changed the color yourself somehow… either by combining two lights or some other way.

AnimControl is sent. You have to retrieve it from the model you received instead of calling the old one from the model you removed.

When you send an object that references textures, you have to SEPARATELY send the textures FIRST.

OK, I try again.
if error in my code, it is simple.
thank you very much.

Colors, vectors, etc. are not immutable in jME - if two parts of your code share a reference to a single ColorRGBA (or Vector3f, Quaternion, etc) and one changes it, you’ll see the color change in both places. Use clone() to avoid this.

1 Like

thanks everyone
I found old light are not be removed, I think node.detachAllChildren() removed ligths also.
I should read jme code carefully.

j3o skin error because old light not be removed.
I made stupid mistakes.

but j3o animchannel should be reset ? not be send too ?
well, I used monkey head, aim will be solute in future

1 Like