Hi there, I am slowly developing a multi-player game. For this I need each player to have their own inventory, which I store on the server (to prevent cheating).
The problem is, it looks like there’s considerable lag when updating the inventory, so much so that swapping items in a client connected inventory takes a movement and is very noticeable to the player. Also this is causing synchronisation issues with other elements of the code, as when they run they still see the older non-updated inventory for a moment.
What is the best way to code a multi-player inventory ?
Would it be an replicated array of actors (which themselves replicate - is this the cause of the lag ?)
Or an array of Uobjects (which don’t replicate), but which is only read / written on the server ?
- in which case how do return values from the server to the client (in order to show the inv on their screen) when the only way to run a trigger a function from the client to run on the server is an event, and events don’t return values.
How have other people done this ?