Hi i have a question on item malls,basically i want to have one for my game as a source of income where players buy points and use them to buy outfits,items etc .
I was wondering how they work behind it all in relation to how the game checks the player has the points etc to pay and how the brought item gets added in game automatically.
hmm, not 100% sure if I understand you correctly.
But you would have a back end database on your server, such as MySQL.
Then you have a web page that connects to this database, and allows a user to purchase goods/items for money.
Then you have a Unity app that talks to this same database and determines what to show on the character once they are logged in.
Make sense?
think so so i basicly need to link the game,users data and shop data so once the item is brought it gets added to there data so they can use it
Yes, so in a simple three-tier architecure approach to looking at it…
You have…
DATA LAYER
BUSINESS LOGIC LAYER
UNITY APP WEB PAGE FOR PURCHASES
You have your Unity App that talks to your business logic code, which contains the classes that get data from the database, such as who paid for what items, and what appears on their characters inventory.
Then you have a web page where people can purchase goods/credits. Once the credit card transaction returns a successful result, it goes back to your web page, and your web page talks to the same set of classes, indicating a purchase, and these classes update the database.
This is a simple n-tier architecture way of doing it. There are lots of articles on the web about it. End of the day your Unity app and web page call the same set of classes/code. With Unity though ultimately your Business Logic code would site behind a web service layer, which would call your Business Log Layer.
But do a bit of reading, will make some sense.
But this is how I would do it ![]()