Jump to content
  • Advertisement
Sign in to follow this  
erpeo93

Can Android users touch the "stats" file?

This topic is 841 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, my first real commercial game is near to be published.

 

In the final game I will be implementing the classic concept of "gold coins" that the player can spend on the store. (and that can buy with real money)

Now, I am storing the file with the number of coins owned by the player in the private folder. (I think is the package folder which has name like "com.myGameName ecc right? )

 

Question is: can I live relaxed about it? or should I prevents the final users to modify the file? can root devices modify that file? If so, what is the best way to do it? I was thinking about encrypt the file in some way...

 

I am using SDL2, and of course I am aware that the smartest users will hack me and modify the file, I just want to be sure that the other 99% isn't able to get free coins.

Share this post


Link to post
Share on other sites
Advertisement

A user on a rooted device can do anything. Storing this file on the client's device is a mistake; you should be storing it server-side, which is the only way to ensure a client can never write to it. You can then modify it server-side whenever a player successfully completes a microtransaction... another advantage of doing this is that if the user accidentally deletes his stats file (perhaps by resetting to factory settings) you don't get a call from an angry customer asking you where the coins he bought with real money are :wink:

 

There should be frameworks that help you with doing this.

Share this post


Link to post
Share on other sites

A user on a rooted device can do anything. Storing this file on the client's device is a mistake; you should be storing it server-side, which is the only way to ensure a client can never write to it. You can then modify it server-side whenever a player successfully completes a microtransaction... another advantage of doing this is that if the user accidentally deletes his stats file (perhaps by resetting to factory settings) you don't get a call from an angry customer asking you where the coins he bought with real money are :wink:

 

There should be frameworks that help you with doing this.

Of course you are totally right, I was a stupid thinking that I could store that file on the user device.

So, I guess there are two problems now:

 

1)google offers the possibility to store this kind of data on their servers? and if not, where I can rent some servers that can do it? In the latter case, I will be totally free of doing it "my own way", right? (I am not forced to use some strange libraries ecc )

Of course, if I use the google servers I will surely have to use their libraries... and that is linked also to question number 2...

 

2) sooner or later, I will have to use google API's for in app-purchase, or for interact with servers to store data ecc ecc, the problem is that I am using SDL and I am writing my code in pure C++, so I have not direct access to the google API like in-app purchase ecc. Reading here and there I understood that I have to create a new java class with the right methods which I interface throghout the jni... is that right? can you point me to some references/articles about using those libraries with the NDK?

 

what are the frameworks that you were talking about?

Edited by erpeo93

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!