In App Purchasing for my platformer game

Hello everybody,

I’m trying to implement in app purchasing for my game, and i’m not sure if what i’m doing is a good practice or not. Essentially, in my game you collect coins by jumping around, and you cash them out for a different player model/skin in the store. Currently i have the coins stored in a player pref and i’m not sure if this is a good practice because people can delete the file/manipulate it freely. I plan on making it possible to purchase 1000 coins with real money and just adding to that player pref.

Any ideas?
Thanks!

Well, theres a couple of things you can do!

  1. You can connect to a database and store the purchases there so everything will be more secure
  2. You can encrypt the file locally, which means that the players cant have access on it easy!
  3. Create your own front end security, which means that when the file is removed, it automatically clears all the purchases and reset coins.

There is more you can do but those should give you a quick start!

Don’t use playerprefs straight up. I know there are some encryption assets for playerprefs, they may be better, but a plain old playerpref is easy to access for anybody wanting to look on a pc at least. Look into a backend service where a player has to login as well, that makes it easier to also keep track of their purchases and watch for odd behavior.