- Home /
Best way(s) to handle Custom Item Databases
I've been watching many tutorials, but not coming up with any answers. I want to be able to create a master list of items for an RPG, have a base item class, weapons, armors, consumables, etc. The big problem is that not only do these need to inherit from the base class, but also from, the other classes. I've tried [System.Serializable]in all the other classes, but it still will not show up as expected without redefining the variables somewhere else. The other issue is when this goes into an inventory system, it will need to attach to a 2d(inventory) or possibly 3d game object(item appearing in game), and in the case of mobs, prefabs so I need monodevelop inheritance. Do I need to use an interface, something else or just give up and use json, or xml. Please let me know the problems and benefits of each. Still early in development and can change lanes. Thanks for the help and ideas.
Answer by toddisarockstar · May 07, 2015 at 01:09 AM
I use javascript here with unity. ive been using unity for quite a while. a lot of people here refer to it as "UnityScript". because a lot about the scripting is very different than how you might have used javascript elsewhere. im not sure if you are javascript or C# but im sure C# is a bit different here too.
in javascript, with Unity, it is common practice to store data using Arrays. arrays do about everything you would ever need to "database" in game development. and they can be very fast.