How would I do the networking for an RPG's Inventory System?
3 replies, posted
Just for practice, I'm looking to make an inventory system for an MMORPG-type game and was wondering how I should work out the networking side of things. The language I'm using really shouldn't matter, but it's Lua.
I'm looking to make something like RuneScape has.
Obviously the server should have complete versions of all the inventories for each client/player, but what should the client have?
Should I send every change to the server? For instance, if I drag an item from one spot in my inventory GUI to another spot, that doesn't really harm gameplay or affect other users. But it does need to be saved so that if I log in again, my items are how I left them. Should that be networked immediately?
Thanks in advance.
Stuff like dragging items from slot to slot can be done in either way. You can either update on each drag and send a little bit of info or update rarely but send bigger pieces. GW2 updates on each drag from what I know because when you lose connection you can't drag items any more.
Overall client should only know his inventory as there is no point in knowing what someone else has except for visible stuff like what they're wearing.
I would think it would be more efficient to network it after you close your inventory rather than on each move
[QUOTE=Exho;47860147]I would think it would be more efficient to network it after you close your inventory rather than on each move[/QUOTE]
And to think of database/server :v:...
Sorry, you need to Log In to post a reply to this thread.