Leaderboard based on location - android

I am working on an android game(which is created using Unity3d engine) and I was trying to use google game service features when I stumbled upon a question implementing leaderboards.
Is there any way to sort player scores based on their location?
I want players to know their rank in their country, continent, etc. Something like google's time based leaderboards(daily, weekly and monthly)
Do I have to implement this feature myself? If so leave your thoughts and ideas.

Creating your own leaderboard means you have to write a Server (i.e. a HTTP Server) that can store the players, the scores and the locations (preferably in a database).
Getting the location of your users depends on the final build (browser, app, windows exe, etc.)

Related

Saving additional data about player. Android

I am going to build a real time multiplayer game for android. I'm planning to use Google Play Games Service https://developers.google.com/games/services/android/realtimeMultiplayer
I understand, that I can use Leaderboard to save main player stat, for example Wins. But I need to be able to implement a way to store more information about the player. For example wins, losses, inventory and etc. So when two players join game room, before the start they could see each other's information.
I wonder where this information should be saved so that when two players connect to the same game room, they can see each others data. If it is saved on client's device, I guess it is a risk that a cheater can upgrade his own stats somehow, am I right?
What is the best practice? Thank you.

Data persistence with the Google Places Web Service on Android

I have run into a Problem.
Basically, google web services allows a maximum amount of 1000 requests per day unless you verify your credit card (which I as a student, don't have).
I am building an android application which will help you find food near you and give you tips and whatnot. But heres the problem. I have reached the daily cap multiple times just due to testing the app & debugging it... And that is a serious issue...
I know how SQLite databases & so on work, and how to use them, but is that the way one would go when using google places web services? Is that even allowed?
Here is the basic process of what is happening:
Open App & Get the users location
Search and Mark nearby food sources (restaurants & whatnot)
This is done via getting a HTTP request with "Place Search"
Place search itself deliveres little information, not enough, so I get a "Detail Search" for every place it finds.
All the results (Max. 60) are marked on the map and saved in a DataHolder class storing all the DataModel classes.
this works fine and as intended, also if I close and restart the app, it will "work". But it will redownload all the data and the details. As you can imagine, this busts my 1000 request limit pretty damm fast.
So is there a common practice/structure on how developers persist this "Google API" data? I feel the way im doing it very inefficient both for me and the user...
Thanks.
If you are developing a web based application that only needs to search for places, and does not submit new places, you should use the Places Library of the Google Maps Javascript API rather than the Google Places API Web Service. The Places library assigns a quota to each end user rather than to each key. This means that your available quota increases with your user base rather than being capped at a fixed amount.
You can use Places API for Javascript https://developers.google.com/maps/documentation/javascript/places
It has all features of server version. You could try to use it with invisible WebView, or better with Rhino.

Send SQL table to another Android device

Sorry if my question is asinine.
I'd like to send the data in SQL table format from one Android device to a second device, so the user in the second device can store and use the received data with my App. What are the best options to do this?
You don't want to go down the path of trying to move one sqlite file on a device into the same location on another (I assume that's where you were going with the Bluetooth tag). Without root access on the destination device, you won't be able to write the file. From an end (power) user perspective, Titanium Backup is a great solution for this, but of course requires root.
If you're looking for "stop on one device, resume on another" functionality for your app, check out Google Play Services Saved Games. It has exactly the functionality you're looking for baked in, and you have to do nothing along the lines of the support infrastructure.
Of course, this is dependent on Google Play Services, so if you're looking to publish on the Amazon App Store (or anything where you're not guaranteed to have the Google stuff available), you may be better off rolling your own web based synchronization infrastructure or subscribing to a service that offers something on par with what Google makes available.

how to get particepent profile info in android game using google play game services

i am developing a game in android i want to implement multilayer concept using Google play
game services
i wanted to know that how i get profile information of participant i mean name and profile
picture of player when user connected to game in android
and second question is
when i play game using random play it give the player5068 joined but i want exact name of
the
player how it possible please help me
thanks in advance
First of all you need to think what type of multiplayer game are you going to implement with gpgs. Either it will be a real time multiplayer or turn based multiplayer.
In real time multiplayer you have to implement real time event listener class abstract methods. from there you can get list of participants that have joined ur room. from the participant object you can get its name , id , picture url and other properties.
Secondly you have asked about random players name , you can get it by fetching participants list in room .

Google play game service ,determining a host or server

im trying to develop a multiplayer game using google play game service.
In my game i have some game logic that will run only one players set ,which i prefr to call host.
i would like to determine the host by player who created the room.
but i see room creator id can be different in different players set on a single game,and each returns as creator in auto match game.
so what should be the ideal way to find a host ,apart from sorting the player list and use the first participant as host ?
Google provided a video specifically on Google Play Games: Choosing a specific user which explains how to work around agreeing and assigning a specific user a special roll. In summary: sort the participantIds and have the first by sorted order randomly choose the host and broadcast that to the other players. This ensures that all users agree on the host and the host is randomly chosen each time.

Categories

Resources