QUESTION:
What is the best way for a client to see updates in their inventory?
CLIENT INVENTORY SETUP:
The current client inventory system I have sends a remote function to the server with which inventory slot is selected. The server then returns the appropriate data back to the client for display purposes.
EXAMPLE:
Is this an appropriate way to handle updating client inventory information? I also have backpack & hotbar systems that work identical to the client inventory setup. There is a tooltip function (seen in the video) that could potentially invoke the server quite often. Would making two copies of the inventory with one being accessible by the client with server checks be a better way to handle client-side inventories?
The only thing I could see that could get annoying is the ping delay each time I want to view an item in my inventory. (I assume you have it so each time I click on a slot in my inventory it sends a get request to the server to return render info to display on the sidebar to the right of the inventory.)
If that is the case, I might suggest sending the client their entire inventory as a table that the client can use to render stuff and what-not. You can send the client their inventory each time a noticeable change occurs, such as if the player is attempting to move an item to a different slot, or equip an item, or if they collect a new item as well.
That’s only if what I said is true though.
All in all, it looks great. Keep up the good work.
Yes, each time a slot is selected it sends a request to the server. Would sending that much data to the client be efficient? In this game, players will receive new items frequently. Ideally I would want these systems to feel very responsive (minimal ping delay). Would firing remote functions that often be a good practice?