Creating a gamified in-app store/inventory

Hey all. Wondering if anyone has a solution:

I want to create a shop that would display items that users could purchase with in-app currency. Once purchased, they would show up in the player’s inventory…when using an item, the item would disappear.

So far, I’ve managed to:
1.) Allow players to purchase items
2.) Display purchased items for each sign in user
3.) Deduct item cost from current balance for each user
4.) Allow users to “use” an item (which then gets removed from inventory)

The lone issue is preventing the user from purchasing (or even seeing) an item if they don’t have enough funds to purchase it. Right now, I can make the logic work in the spreadsheet, but it doesn’t seem like Glide can handle the logic (as it would have to compare multiple data points).

Any thoughts? Here’s the app (crude) so far: https://itemstore.glideapp.io

As you can see, you can purchase an item and it will show up in inventory, but users can purchase items they can’t afford and their balance hits negatives.

Any ideas welcome!

4 Likes

Robert I’ve done something similar based on https://concepts.glideapp.io/
What I didn’t do was not allow the item to be seen in case the user doesn’t have money.

Hi Sandro,

How do you prevent users from going into the negatives, then?

@Jeff_Hager Check out your concepts app …did a transfer and it went into negatives…can you prevent?

I reset the purchases and made a small change to hide the transfer and items list when the user has a negative balance. It doesn’t solve the problem of going into negative. I’ll have to think about that one. Glide doesn’t have any field editing to show a message if a value doesn’t fit within tolerances. Glide also doesn’t have any current features to access global values, such as a users current balance when applying a filter for visibility. If I think of something, I’ll update the app and let you know.

1 Like

Thanks @Jeff_Hager! Global values/variables would certainly take glideapps to a whole new level.

1 Like

Well…I finally figured it out. Took me forever to find the right formulas, and it’s a bit heavy on the row usage, but check out the functionality:

https://itemstore.glideapp.io

The app can
1.) Allow players to purchase in-app items using in-app points/currency
2.) Display purchased items for each signed in user within their “inventory”
3.) Deduct item cost from current balance for each user
4.) Allow users to “use” an item (which then gets removed from inventory)
:new: 5.) Allow users to “drop” an item (which then gets removed from inventory)
:new: 6.) Set a max inventory capacity (so users would have to drop/use items in order to buy new ones
:new: 7.) Prevent users from purchasing items if they don’t have enough funds (also to prevent users from going to negative balance)
:new: 8.) Display whether a user already owns an item
:new: 9.) Display users that also own this item

:soon: *Allow users to earn in-app currency by watching videos, making comments, etc.
:soon: *Develop a leaderboard
:soon: *Develop a ranking system

I’ll post a video tomorrow to explain! Stay tuned!

1 Like

Oh. My. Glideness.

3 Likes

As promised:

2 Likes

Just an idea instead of a using a pivot table.

  1. Place the formula you have to get the list of users/items/affordable in a new sheet called InventoryAffordable
  2. Create a template column in the Inventory sheet that joins the Inventory item to the word TRUE (ex. “Pencil - TRUE”)
  3. Create a template column in the InventoryAffordable sheet that joins the inventory item to the affordable column.
  4. Create a relation column in the Inventory sheet to link the template column in the inventory sheet to the template column in the InventoryAffordable sheet.
  5. Create a lookup column to get your list of emails.
1 Like

I will try this and let you know!

1 Like

Tried this today…I’m getting stuck at step 2.

This is what I’m picturing for the template column:

Thanks. I’ll keep workin’!

1 Like

Here’s the latest version with the latest features:
1.) Restricts items from being bought if no inventory slots are available
2.) Displays Rank and XP for user
3.) Displays all ranks available
4.) Displays “public profile” for each user of a given rank

1 Like

:partying_face:Yeaaaaaah buddy!

:facepunch:Über props to @Jeff_Hager…just spent 2 hours making glide app columns replace my vlookup columns in Sheets and now I have INSTANT conditional data :raised_hands: for the following features of the app:

  • Enough funds to purchase? INSTANT CHECK
  • Enough inventory slots to purchase? INSTANT CHECK
  • Making a purchase? Current balance is INSTANTLY CALCULATED
  • Dropping/Using an item? Inventory slots are INSTANTLY CALCULATED

Play around with it here and let me know if you experience any glitches!
itemstore.glideapp.io

1 Like

The audio is a bit soft, my apologies, but here’s the logic behind the ZERO LAG!

2 Likes

:wink::+1:t2:

@Robert_Petitto You inspired me to modernize my currency transfer demo in the concepts app. The only thing I’m missing is the prevention of purchase if users don’t have enough funds. The logic is in place to check if a user has enough funds, but since it’s public and I’m emulating fake signed in users, I can’t actually apply the visibility to check if the signed in user is in the list of affordable emails. I also have no way of restricting transfers. At least it functions very much like yours. Thanks for the videos!

Right on! :metal: Glad you were able to benefit from my one of my Glide projects! You’ve been instrumental in helping me see the benefits of doing things “in house” rather than solely in the Google Sheet. Let’s keep it goin’!

1 Like