It would help greatly if there was an option to extend what data is being sent to client when area of interest is updated.
Current Situation
Now on client side it contains fixed fields.
Code: Select all
_sfs.AddEventListener(SFSEvent.PROXIMITY_LIST_UPDATE, OnProximityListUpdate);Code: Select all
public MMORoom room;
public List<User> addedUsers;
public List<User> removedUsers;
public List<IMMOItem> addedItems;
public List<IMMOItem> removedItems;Suggestion
It would be great if on the side server you could subscribe to this server event just like any other and override or populate this data.
SFSEventType.PROXIMITY_LIST_UPDATE
In your custom extension you would subscribe to it as any other server event in your override init()
addEventHandler(SFSEventType.PROXIMITY_LIST_UPDATE, ServerEventHandlerProximityListUpdatec.class);
Note: Adding @Instantiation(SINGLE_INSTANCE) would be a good suggestion on this class
What is solves
- Sending one time data which is not required to store inside each user or mmoitem variable, for example current user movement speed received by udp - storing and updating this value in user variables create quite and overhead and calculations, even if user variable change event is not fired on client.
- Ability on not to rely on user or room variables to send one time data, just like entryPointPosition for each user.
- Ability to rely on custom serialization and custom protocols