EntityId serialization

#1
So I am having problem with sending EntityId over network. I am using RMIs for that, and I am quite familiar with Cryengine's networking system, I am also aware of the compression policies. I have no problems sending strings, ints, bools etc, but for now I have to use int to send EntityId. I am using

Code: Select all

EntityId entityId;
ser.Value("entityId", entityId, 'eid');


as long as I use 'eid' compression policy, it always sends 0 to server.
CompressionPolicy.xml is unchanged and it has 'eid' there.
Cryengine tutorial videos on my Youtube channel! Check it out !
https://www.youtube.com/user/MusicForLifePL20

Re: EntityId serialization

#4
That's no good. Ive noticed, that in most of cases 'eid' will cause entity id to point to 0 on the other side, however in a very few cases when sending from server to client 'eid' has to be used, otherwise entity is not found. For now the solution I use is to send both :

Code: Select all

ser.Value ("id", id);
ser.Value ("idCompressed", idCompressed, 'eid');


And then I do simple check which one will return a valid entity.
But this is just workaround.
As I said it works in some cases, but I haven't found any rule for it. It's pretty random.
I would still like some of the crytek staff member to answer this
Cryengine tutorial videos on my Youtube channel! Check it out !
https://www.youtube.com/user/MusicForLifePL20

Re: EntityId serialization

#7
Of course I bound it to network right after physicalization. Everything works well but as I said I have to do this stupid check. I don't want to use entity names. This topic is specifically about entityId and compression policy. I know alternatives that I can use to find entity i am looking for. But the question is about compression policy 'eid'.

So as previously said. All entities are bound to network before any player can request their ids (for example for picking up) . My check does the job, i am just trying to understand why this problem occurs. I remember back in the day when I used game sdk and 3.8.6, i always used this compression policy and it was fine. Here in 5.4 it causes thise issues.
Cryengine tutorial videos on my Youtube channel! Check it out !
https://www.youtube.com/user/MusicForLifePL20

Who is online

Users browsing this forum: No registered users and 2 guests