I’m creating a Role Playing Game in VF and looking for a solution that tracks what in-game items the player has found and collected. Has anyone tackled this logic yet or does anyone have thoughts about authoring this. I’m wondering if I need to break into Code.
I went with Google Sheets, it was easy thanks to the docs.
I think I’ll keep the user’s current weapon in a VF variable and store the other collected items in Google Sheets. Then pass those items in and out of VF into variables when the user does something with them.
Each item should have it’s own corresponding variable in VF? IE wood_shield, silver_helmet. To manage the user finding the item in gameplay. Then write that item in a slot in Sheets for them to keep them. I will have to limit the number of slots in Sheets or it will get out of hand.
I’m thinking I have an IF that checks Sheets for each column labeled Slot 1, Slot 2, Slot 3, for a value of 0. If it finds one it writes the item name there. If it finds none it it speaks “You have no more room in your sack”.
I’m not sure about your use-case, but IMO, google sheets is easy but not flexible. maybe you want some more in future. In that point, airtable is more like relational database and firebase is NoSQL and more flexible.
Speaking about data, you will want to use code block and arrays or objects. This link might not be directly what you want to do, but useful maybe.