States w/ Object Array Problem

Hi Team,

I am trying to put together an Area of Interest controller that takes care of entities moving around, but also buildings that may be placed during the game. For this I am splitting up the world into tiles; and assigning a TileManager entity to each to track npc entities and building prefab placement. The TileManager has an array of entities for the moving 'npc's and an array of building objects that contains the information on where and what building to place.


The log structure is basically: Server or Client (SVR/CLT), the prefabIndex, its local position (x,y,z) and its rotation () - these values are taken directly from the Bolt State when placed into the log. In the example you see several values (X,Y, Rotation) that have not made it to the client. The Client is reacting to a state callback on the "Buildings[]" property.

I've noticed that, as I increase the number of (continuously) moving entities; the accuracy of the building placement suffers, as values are "dropped" (and become 0). I guessed this had to do with priority; so I increased the priority of the building information to 10; keeping entity information as 1.

The problem still persists however, and Im not sure where else to look. I suspect any sort of values stored in object arrays would suffer the same problems down the line.

Comments

  • Can you send us a repro project with this issue? Also check the issue tracker, it may already be there.
  • Thanks Stanchion, I've sent it through.

    As I was retesting, I was noticed that I wasnt just getting 0's (though that seemed predominant) but that also sometimes incorrect values would also come through. These should be reproducible in the project sent through.
  • Was just looking through them...

    I suppose its similiar to #53, however,
    - I'm seeing the Integer used for the PrefabIndex also being affected (so not just floats)
    - I'm not using interpolation on these values (at least; the Bolt Editor does not let me select an interpolation method for floats on an object, nor would I want any interpolation applied anyway)
    - And I'm getting non-0 (but non-equivalent) values in some cases
  • I took a quick look at the project. It looks like the issue is that you are creating the "buildings" before all the state for the building arrives and not updating when it fully arrives.
  • Much obliged, looks like your right - getting those partial values threw me off the scent of this, but i guess under the covers byte level updates are being sent for the properties.

    Is there some sort of event that I can bind to that triggers when a full update has been received? Aside from that; all I can think of is to manually implement a checksum to wait until all the values have been received.
  • There's many ways you can check to see if the full state is received, for example when you can add a "hash" property based off the other properties that you can check to see if your state or object is complete, or never send a "zero" value and if the building has a zero value you know it isn't complete yet.
  • Appreciate the help, thanks :)
Sign In or Register to comment.