FacesOfMu
Member
Hi there,
I'm working on a sandbox game and trying to figure out some simple ways of handling chest/container type objects that store a bunch of other item objects persistently. I'd like some ideas on how people go about this.
Typically these objects that will be contained have multiple variables. When an item goes in a container, I could transfer all the item's variables to a table and destroy the object. However, that becomes really, really clunky when it comes to managing the table and trying to parse all the variables that objects might get.
Alternatively I could turn off all the things that make the item interactive (invisible, non-collideable, etc), and even push them to a different layer, but I'm just not sure if that's the most efficient and "normal" way of going about this.
I especially want to be thinking of players that may hoard lots of containers with lots of contents in the long run.
I'm working on a sandbox game and trying to figure out some simple ways of handling chest/container type objects that store a bunch of other item objects persistently. I'd like some ideas on how people go about this.
Typically these objects that will be contained have multiple variables. When an item goes in a container, I could transfer all the item's variables to a table and destroy the object. However, that becomes really, really clunky when it comes to managing the table and trying to parse all the variables that objects might get.
Alternatively I could turn off all the things that make the item interactive (invisible, non-collideable, etc), and even push them to a different layer, but I'm just not sure if that's the most efficient and "normal" way of going about this.
I especially want to be thinking of players that may hoard lots of containers with lots of contents in the long run.