I ve tried to ask the same question on github at the official unity google play games plugin but i dont see any answers.So i hope i ll find more ideas here.
I use google play games plugin for unity from their official github page and i run the Tic Tac Toe sample.It is a turn based game for Android-Ios devices.
From what i see the gameplay is like:
player connects to google tries to hit the desired square with his ball and when the ball stops moving the turn is passed to the next player.The next player accept the challenge and the turn based game continues...
My Question is really simple. When the player tries to hit the desired square with his ball if he fails he can simply press the home button just before the google sends the turn to the other player,go to google play games and accept his turn again.Now he can make his move all over again until he hits the desired block.
Google play game services are live one and a half year now.How noone reported this?Am i doing something wrong?Is there anyone out there using this plugin or am i alone :P ?
Umm. let's call it a feature :) . Seriously, there is a lot of moving parts between accepting the invitation and taking a turn. It would be very tricky to do this consistently given network connections that come and go in the mobile environment and not lose a turn or end up with what you described.
I think there are a couple of options:
Allow a "mulligan". Sure, there maybe some players that just keep trying, but overall, the game will probably be more fun.
Save the game state using Saved Games to an "autosaved" file. Then always load it when starting. This way even if TakeTurn() is not called, they will come back to the game as they left it. Using Saved Games also has the advantage of working across devices, so they can't just switch devices and play again to bypass any local state.
One simple solution for this issue that you can try is to
Application.runinBackground = false"
Hope this Helps!!
Related
My app has been rejected by Google Play twice over this issue:
If your app uses Augmented Reality, you must include a safety warning upon launch of the app that contains the following:
An appropriate message about the importance of parental supervision.
A reminder to be aware of physical hazards in the real world (e.g., be aware of your surroundings).
I added a message which pops up when AR section is loaded "While using this app please be aware of your surroundings. It is recommended that younger children have supervision when using Augmented Reality." Apparently, it was insufficient. I downloaded a bunch of AR apps and none of them have a message like that. Any ideas what this message should be? Should it pop-up every time the app is loaded or just once when installed? I reached out to Google Policy's team and I'm waiting for their reply as well.
Whilst this is unusually a non-code based question, I was able to resolve the problem and get our app approved by Google with the following text.
Always ask a grown-up before using the DinoSaw app. Watch out out for
other people when using DinoSaw and be aware of your surroundings.
Parents and guardians please note: whilst using Augmented Reality
there is a tendency for users to step backwards to view dinosaurs.
I think the trick is simply to consider your app in context of the appropriate environment and add more than just their token text. - Our app is for augmented reality dinosaurs designed specifically for kids. They will accidentally bump/back into other people whilst they are absorbed by the content.
Dinosaurs seem to have that affect on little people it seems.
I also added an amusing graphic to humour the situation - Looks like it worked :)
I got this message on an app update too.
In addition to making sure the message was crystal clear and including a warning icon/image as #Ghoul Fool suggested in another answer, I also make sure the message was triggered in the OnResume function for the AR activity.
My update was accepted wiht this change - it's not possible to know what exactly was the trigger for the acceptance but sharing here in case the 'OnResume' change makes the difference for others also.
override fun onResume() {
super.onResume()
//Do your other OnResume work here
//Display an AR warning for kids as required by Google Play store guidelines
warningARDialog()
}
I have written a Tic-Tac-Toe app and have also learned a good amount of Firebase in the last 2 weeks. However, I am thinking of adding Multiplayer Matchmaking and real-time turn-by-turn TicTacToe online using Firebase.
So here is what I am thinking:
There's a play button.
Click on it.
It will show a "Searching for opponents" TextView.
So I think I should do something to show it open state and then see another player that clicks and shows that open -- Two open then connect them. But what if there are more players? What if 5-6 players click at once when there's no one and it thinks it is empty?
I want that 2 players can be matched out of any number of players. As I am relatively intermediate in Firebase, can anyone help me a bit with the logic and also pretty good if with the workflow and a code snippet.
Thanks in advance,
Android Programmer :)
You can make 2 List
available Games
players available to join.
Then pick them up on First Come First Serve basis. Assign first player to first available game. Then Change the status of a player to busy (remove it from list) & also change the status of Game to ready (remove it from list)
It is the first time, that I'm working on a multiplayer mode to my game, so maybe this is reason why I so many questions have.
So, I have read all the existing tutorials(also YouTube videos), but have some questions.(Because libgdx has already changed a lot since tutorials have published.)
How should a project folder structure look like? Which packages should I add to my android folder in libGDX project?
My existing single player game has 2 different roles. One for player and one for computer, with different motivations. It is a graph based game, they all playing by signing its vertices with two different colours.(The game has a mathematic base, a graph algorithm.) So, in this way all the two players codebase should be the same?
Maybe I need a screen with some listeners for the multiplayer game, and that is all? Can you please tell me some basics, about building this screen?
libGDX's changed project structure make it hard and complicated to interpret older AppWarp tutorials.
You can follow our documentation for integration. I can suggest the steps that would help you in conversation of single to multiplayer Game.
Initialize AppWarp SDK at home screen.
Connect User when he open the application after the initialization
Once User will connected you can create/Join Room API and enter in the Game Scene once join Room succeeded.
In Game scene whenever you play your turn you can send turn data with sendMove API.
Whenever game data is received you can check the nextTurn User and update the respective UI on your Game screen
So these are the steps you can use for single Player to multi Player conversion.
Let me know if you need more helps in game integration.
I'm currently developing a real-time multiplayer game by using google play API. It's a 2-player Q&A where the player has to pick the right answer before the oponent(but with more than 4 alternatives). What I'm experiencing as a problem is that sometimes the two player pick the right choice almost at the same time and then they both send each other a message saying they got the right question and it usually bugs the game. I already make sending the message to the other player the first thing to do when you answer correctly, but I'm still getting the same error. How can I overcome this concurrency problem?
A Boolean variable set in a synchronized method.
answered = false;
I am looking to use one of the social networks in my Android program.
Most important for me is the ability to build a continuous leadership board in which players move up and down depending their wins/loses to others.
The idea is for players to challenge others head-to-head. The winner gains points and the loser loses points.
Equally important, I want this feature to include the possibility to "charge" the player game coins.
Scoreloop includes the possibility of challenges but they are there in order to win coins off other players. In other words, they are the means to the end.
In my case I need it to be the other way around. The "ends" is to be higher in the leadership board and the "means" are to play others with coins.
Scoreloop do have a continuos leadership board but it is not accessible from the program.
I tried looking at OpenFeint but their site is a real mess. It is impossible to understand from there exactly what is and isn't available.
I signed up and tried to add my program. I ended up adding it four times and cannot delete it!
Check out Swarm, which provides a similar feature set to the others you mentioned (Scoreloop, OpenFeint), but also specifically includes a virtual goods system (coins), that you could use to have users purchase challenge attempts (which sounds like what you're looking for). The docs are extremely well written, integration is a snap :)
Create a leaderboard using either OpenFeint or Scoreloop (we started off with Openfeint but quickly moved on to scoreloop - If you want the details, I'll be happy to explain our reasons).
Once its up, make sure its a leadarboard that allows overriding scores with worse scores.
Implement an ELO rating calculator. see: http://en.wikipedia.org/wiki/Elo_rating_system
Each player starts with a certain score (I use 1500, so that ratings will resemble the chess ratings range).
On a match end, you re-calculate each user's new Elo rating, and post it to the leaderboard.
You end up with a leaderboard that ranks each user according to their skill. i.e. the more they win, the higher their score is.
EDIT: per user request - her are some of the reasons that made us move to Scoreloop:
OF documentation looks like it was ported from iOS, and very badly so. For example, the docs gives an example of initializing OF in your Application class. This will cause their "Join / Don't like fun" full screen dialog appear out of the blue, when users are busy using other applications, as android will kill and re-create your application in the background as memory availability change.
ScoreLoop automatically creates a "userId" for the user, without them having to register / login. This allowed us to post user's highscores and display their highscores without having to bother the user for logging in.
Scoreloop have an "offline" mode, which makes it much more robust, efficient, accurate and easy to use.
In flaky network situations, OF login process took a very long time, and affected the game performance. (see #3 above).
OF does not allow you to fetch a score rank. If you want to get your user's rank, you have to fetch the complete leaderboard, cycle through it until you find your user's entry. This "solution" pretty much makes this option not-available.
Scoreloop provided us with grate support. I've opened several tickets, they all got answered promptly and professionally. These guys rock.
I wrote this code a while back, so there might have been other reasons which I forget.