How should inventory items be saved?

Started by
8 comments, last by jsaade 7 years, 9 months ago

Hi guys,

Items will be purchasable. How should I store them on a mobile cross-platform iOS/Android game? I might want to expand into other platforms in future.

Should I use Google Play Game Services on Android and Game Center on iOS? Then if e.g. user migrates from Android to iOS, he will lose his items and be upset.

Or should I make users register and store items on a custom server-side? This will probably get messy real quick and will require more hassle from the user to type two fields of data(so much, right?).

Just want to know your thoughts and ideas.

Game I'm making - GANGFORT, Google Play, iTunes

Advertisement

If you have items that cost real world money the info should be server side and independent of platform and purchase systems for the different platform. Only way to ensure no hacked, duped items etc. Also if they uninstall and re-install later they still have all their items etc

This type of decision is fairly fundamental to your game design.

The vast majority of games have local games with local save files. They may use a store such as the Google Play, Apple's App Store, Amazon's store, or something else, in which case the transactions should be verified using that system's supported forms of receipts.

Some games, a tiny subset of all games, are run and manipulated on the server and the game clients are only a view. The game client could be a web page, a mobile app, or a desktop program.

If you are designing your game so the game is run and managed on the server then having all your game object information and account information on the server is the only way to go. As you are talking about the mobile space, however, you need to go through some extra hurdles to jump through if you want to provide mobile apps on the main stores.

Apple and Google both have strict terms in their store agreements and they need to be navigated carefully. For Apple:

11.1 Apps that unlock or enable additional features or functionality with mechanisms other than the App Store will be rejected
11.2 Apps utilizing a system other than the In-App Purchase API (IAP) to purchase content, functionality, or services in an App will be rejected
11.3 Apps using IAP to purchase physical goods or goods and services used outside of the application will be rejected
11.4 Apps that use IAP to purchase credits or other currencies must consume those credits within the application
... etc ...


For Android:

* Developers offering products within a game downloaded on Google Play or providing access to game content must use Google Play In-app Billing as the method of payment.
* Developers offering products within another category of app downloaded on Google Play must use Google Play In-app Billing as the method of payment, except for the following cases:
> Payment is solely for physical products
> Payment is for digital content that may be consumed outside of the app itself (e.g. songs that can be played on other music players).
* In-app virtual currencies must only be used within the app where they were first purchased.
... etc ...

Navigating the requirements requires a mix of designers, programmers, and someone comfortable with contracts and legal dealings working together to figure out the details.

It is a path seldom taken in part because the store gatekeepers want to collect money.

Like all procedures and processes, the companies will always be willing to make special exemptions if you pay enough money. Although since you are asking here about it you probably are not in that situation. In the realm of business the alternative Golden Rule applies ("Those with the gold make the rules") and the standard corporate policies can by readily bypassed with a six-figure or seven-figure check.

Well, I was planning to use official payment processor(Google Play IAB for Android and Apple's IAP for iOS).

I'm a little worried about 11.4. Does it mean, that user would not be able to use items on other platform?

Is this flow allowed?

1. user registers/logins

2. user purchases item using official payment processor

3. I send HTTP request to my server and verify it

4. If it's not fake, I give user an item(save it on my custom server and database)

What could I do to avoid problems if e.g. server crashes or somehow all data gets lost? Should I also save it on Game Center/Google Play user's inventory?

Game I'm making - GANGFORT, Google Play, iTunes

Generally no. The different systems provide a mechanism to verify that the account actually purchased a thing. It is generally rare for third-party servers to be involved at all. Those transferring from one ecosystem to another are generally required to purchase a thing on each environment, just like buying XBox DLC does not give you the same DLC on PlayStation or PC for most games and systems.

A small number of huge-budget systems will have that type of functionality but they are quite rare.

Those transferring from one ecosystem to another are generally required to purchase a thing on each environment

But I don't want to do what is considered general, I want to do what is better for customers. Making them purchase everything on each platform will most likely be a straight path to negative reviews.

Game I'm making - GANGFORT, Google Play, iTunes

Making them purchase everything on each platform will most likely be a straight path to negative reviews.

Evidence?

The current marketplace silos are well-entrenched, and people switching between device ecosystems know they generally need to purchase items anew on the other platform.

You're also moving from a technical discussion of HOW they should be handled over to a business decision of IF or WHY it should be done. The mobile industry as a whole is currently implemented as distinct silos. Exceptions to that rule where you can move between ecosystems freely are terribly rare to the point of being virtually nonexistent. The only ones I know of are apps that are little more than web client wrappers and the financial stuff takes place on the web site, not the app.

Well, consider some kid purchases tons of items for 50$ and then later realises he is going to lose everything.

How about e.g. Clash of Clans game? It seems that it lets you transfer account by Google Plus login or something, not quite sure yet.

Game I'm making - GANGFORT, Google Play, iTunes

Another approach when coming at this issue from a different angle is to ask yourself: Do you need to worry about that now?

The core of your application is the game, and you need something that works and is fun before you actually need the feature of transferring IAP content between devices, let alone transferring them between complete OSs. So can you work your "Item" system into its own section? A little walled off secure module of functions that handles what the player has access to, which in turn informs the game module of what exists and can be used.

You could even have this system handle things in a two way function, allowing the game itself to say "Hey, the player did this/earned this in game", and the "Item" module can say "Hey, yep, that checks out as an in game thing that can be done, I'll add it to the list. By the way, here is the current updated list of things/items the player has".

This approach means that your game can be completed and put on the stores for users to download without actually needing to worry about how you would possibly handle transfers between systems down the road, but all functionality related to the items is blocked up into its own little section that would be easy to update when/if you decide to tackle that issue at a later point in time.

Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.

You are trying to solve a very rare case:

- If the user moves from iOS to Android (or vice versa) will he lose his purchas-ables

The short answer: Yes, check top ranking games (Clash royale, ...)

They save all user items and score locally.

If you sign in with Google Play/Game Center you can save them in case you need to change device (same device type).

The purchasable are re-verified from apple or google side (in case they are non-consumables) and will let you know if you need to give the user these purchases.

So I would say ignore this very rare case.

This topic is closed to new replies.

Advertisement