S
S
SadManSad2016-04-01 19:34:09
PHP
SadManSad, 2016-04-01 19:34:09

Using your own server for Android games. Which one to use?

Good day.
At the moment I'm developing a simple game. The game is completely on the client, without online.
However, I came up with a couple of methods in order to complicate the hacking of the game (to complicate it, because whoever needs it will break it, I think that everyone knows :) ). And one of the methods is verification on the server of each set record.
Initially, the idea was to raise a regular PHP + SQL server, store records there and check in a couple of scripts. But I came across Google Play Services, read it and realized that they provide good features in this regard. I found achievements, quests, a table of records. However, I didn’t find where you can write your own verification logic, everywhere there is a regular submit immediately to the table from the client, which does not suit me.
Maybe I missed something? And there is still some way to write your own logic and add some information.
Or do I still need to raise my server, check everything there and then, through the API, submit to the Google top linked to the application?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2016-04-01
@xmoonlight

1. I don’t think that in a single game, someone will bother with this and try to wind up records for themselves. In Google, this should be checked based on the application's certificate and Google's user account.
2. If there is no trust in Google, it's easier to raise your server.
3. If you want, you can make a local verification through a file signed with your key based on the historical information of all games.
When you first launch the application, generate a KEY based on the UUID and write it to the application storage.
Open table of achievements in the application storage (date, level, number of points scored):
11/11/2016 Level5 20123
12/11/2016 Level6 11200
Then hash all achievements like this (1,2, etc. - record numbers, for additional control ):
KEY=hash(KEY.'11.11.2016 Level5 20123'.KEY.1);
KEY=hash(KEY.'11.11.2016 Level6 11200'.KEY.2);
That is, as a result, we have: an open table of achievements stored locally, a formula for generating an INITIAL key and a KEY key to check this table for data integrity and to protect it from third-party changes by adding/changing rows in it.
And check the FINAL key in the KEY application storage when placing a new result in the GOOGLE achievements table according to the open table:
The key matched - we change the key for ourselves, add a line, put a record in PlayServices.
Did not match - delete all rows from the open table up to the last correct one (matched with the current / last stored KEY), deleted rows can also (seem to be!) Remove from PlayServices (removing the necessary records).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question