So I have seen some totorials around that tell how to make a scoreboard using the Game Center API. Don't get me wrong I love the idea of Game Center, but I dont want my users to have to fuddle with logging in and I dont want to use their way of displaying scores because it does not match the style of the game.
Does anyone know of a better way to do this so I can decide how to display the scoreboard? All I want to do is tell the user his numerical rank like "rank: 1054", and then display the top 100 users (each user has their best score up). And then if I could just have an array with a string for their name, and numbers for their score. I am fine using the Game Center API as long as I dont have to use it for displaying it.
Also is their a way I could make like an "int" that is stored on Game Center that keeps track of how many times the play button has been pressed for all users? Thanks much!
Related
I am in the process of creating an iOS multiplayer game and I want each player's screen to look EXACTLY like their opponents. For example, lets say I have 9 squares on the screen each with a number inside of them. I want each square on both screens to have exactly the same number. How can I do this through GameCenter? I understand how to send and receive data from player from player but I need a mechanism that sends the same number to both players in the game without each player generating their own random number.
Any help would be greatly appreciated!
My best answer would be to pull the data from a source online etc.
Have one device as the designated 'randomness' maker, and have that device send that data to the other one to use. Hope that helps
I would suggest using a seeded random value.
I dont know if you have played the mobile-game Flappy Fall. Its a simple game whit "falling"(scrolling) birds in a certain pattern, you have to catch them in a nest before they hit the ground. I am currently trying to learn a thing or two about Sprite-Kit and i am curious what is the best way to achieve different patterns in scrolling sprite-nodes? Lets say they are scrolling down the screen from one side to another and randomly have small waves and big waves. Any tips will be appreciated !
I am not trying to copy the game, just learn technics!
I am using game centre for my game for the multiplayer. Player can join game in two ways
"Game creator" who put some puzzle and
"Challenge acceptor" who want to solve the puzzle.
"Game creator" will decide the winner.
But I am stuck on the issue that is can we use game centre like this
Like : I am putting my puzzle on and waiting for random players to join, but How come Game centre will decide that only "challenge acceptors" joins the game ?
If anybody knows please help me out. Thanks in Advance.
You can use player attributes. From the Game Center Programming Guide:
A player attribute allows a player to pick the role he or she wants to
play within a match. With player attributes, each player can choose a
specific role and Game Center finds a proper mix of players to ensure
that all of the roles are filled.
To use player attributes, set the playerAttributes property of the GKMatchRequest before matchmaking. The game creator could use playerAttributes 0xFFFF0000, and the challenge acceptor could use playerAttributes 0x0000FFFF. The key is that the bitwise OR of the two values be 0xFFFFFFFF:
If Game Center sees a nonzero player attribute in the match request,
it adds players to the match intelligently so that all of the players,
when combined using a logical [sic] OR operation, have a complete mask of
FFFFFFFFh.
i am developing a sport application in IOS using Game Center integration. I have already configured all Game Center functions in my app, the only thing that is driving me crazy is the fact that i cannot increase the achievement percentage.
I want to do something like this:
GKAchievement *ach1 = [[GKAchievement alloc] initWithIdentifier:
#"1"];
ach1.percentComplete=ach1.percentComplete+50;
Is there a way to increse the percentage like this? Because i have 2 achievements in Game Center that reward the player for everytime he plays the game. For instance:
Achievement one: Play 5 games
Achievement two: Play 10 games
So my main goal is to get the previous achievement percentage and increase it with a constant.
The fact is ach1.percentComplete always return 0. Is there a way to make it return the previous percentage? Thanks for answering.
Not exactly what you have asked for, but I think you need to go about this a different way.
The number of games the user has played, should be part of some user data structure that is saved on the device.. and then update the percentage complete using that data.
But to expand a bit more on getting the current progress of an achievement, you should check to see if ach1 is null or not before accessing anything off of it. If ach1 is valid, then maybe there is a problem with the writing of current progress.
If you load all achievements and iterate them using GKAchievement loadAchievementsWithCompletionHandler percentComplete will contain the current value. Check the question's code here: GameKit achievement questions
Apple makes it wonky ...
Never used Game Center before in my apps. So be nice if the question is naive. I'm not sure if this is the right place to ask either. :)
I'm currently thinking to make my app support Game Center, primarily for the purpose of promoting my app. My app actually is a puzzle like game, think of Crossword puzzles, so it's not a very much multi-player game. However, I think I can make it competitive: one makes puzzle and the other solves it; the second round, the players switch roles. Now, my question is if Game Center supports such format. For example, does Game Center allows user pass a string or other kind of objects to other player? If it does, then I can implement the puzzle (provided by one player) into a string and decode it at other players end.
This sounds like exactly what the turn based game APIs introduced in iOS 5 are for. Check the GsmeKit docs.