0

I am developing a real-time multiplayer game with Google play game services. In order to avoid situations where two players with different app versions try to play with each other I would like, on every app start, the app to check if there is an update on Google play and not let the user continue until he updates the app to the latest version.

mnDev
  • 1
  • 1
  • 2
  • There's no built-in way of achieving this, so you should implement it yourself by communicating to a server that holds the value of the last version. – Egor Jan 04 '15 at 11:40
  • Thanks @JawadZeb, that looks what I was looking for. The post is from 2011 and I'm wondering if still to this day google has not put in his libraries some kind of version update check? – mnDev Jan 04 '15 at 11:48
  • @mnDev you can use a free hosting server for this. e.g you add the newest version detail on the hosting server instead of checking it from google on every startup. – Jawad Zeb Jan 04 '15 at 12:01
  • This an option, but not that easy to achieve with my knowledge right now. I think the easiest and faster method is the one @Ed George suggested. – mnDev Jan 04 '15 at 12:08

1 Answers1

0

You should trust Google Play in updating your app, and you should not duplicate it work.

What you should do - you must develop your game to allow normal playing with "minus 1" or even "minus 2" versions.

Andrey Kopeyko
  • 1,556
  • 15
  • 14
  • Thank you for the suggestion. But it would be easier for me to only allow games between two players with the same app version, since I am a beginner in multiplayer programming. Is checking for new versions on app start in a multiplayer game such uncommon? – mnDev Jan 04 '15 at 11:57
  • If you are creating a multi player feature, why not just add code that checks the version number of the player youre trying to play against? In that case you can prompt a user to update if one of them has a lower version number than the other – Ed Holloway-George Jan 04 '15 at 11:59
  • Hm...but this way two users with same app version but not the last one could play a game and I wouldn't like this to be allowed. – mnDev Jan 04 '15 at 12:14
  • Dear mnDev, your idea to "not allowing lower versions to play" is wrong, because in real world you'll never get the situation "all players are updated to newest version". In case you will force not allowing non-fresh players to get in - they will quit and will share their negative emotions via social networks. This can kill all your game, easily. – Andrey Kopeyko Jan 04 '15 at 15:27