Best way to handle Items?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

MMOI_James
Posts: 4
Joined: 03 Oct 2020, 17:55

Best way to handle Items?

Postby MMOI_James » 09 Oct 2020, 14:34

I am working on the inventory system at the moment. I've got a basic system implemented with a basic UI but I am trying to figure out the best way to handle them. At the moment the items are created on the server and then Icon path, name, ect. are sent down to the Client in Inventory updates. Part of me says I should be using a combination of Scriptable Objects on the client with all the static item details and all the important numbers on the server so I reduce the amount having to be sent over the network. This however would require a Client Update every time I wanted to add some items which is less then ideal. So I was just wondering how others handle items and inventories and what the best method is.
User avatar
Lapo
Site Admin
Posts: 21723
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Best way to handle Items?

Postby Lapo » 11 Oct 2020, 16:54

Hi,
Part of me says I should be using a combination of Scriptable Objects on the client with all the static item details and all the important numbers on the server so I reduce the amount having to be sent over the network

It mostly depends on how often these items must be updated and how much data describes each item.
Generally speaking I'd recommend keeping all the Item properties on server side while the graphics that represents them should probably be on the client, but there are exceptions (e.g. items that are created dynamically from the server)

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 23 guests