Indicate the source for reprinting.
1.2 create a Game Center account
Problem
You know you need to do something before you can use the game's focus, but you are not sure what you need to do.
Solution
Use the built-in game center application of the IOS simulator to create your Game Center account.
Discussion
Each player is uniquely identified by an account in the game center. Each account is linked to an email address. The Game Center account runs on the product server or sandbox server. The product server is the host of the Game Center Application on the app store. Sandbox server is the host of a game center application before it becomes a product (for example, running on an iOS simulator so that developers can test whether it works well before it is submitted to the App Store. If the game center application you write runs well on the sandbox server, it can also work on the product server.
To test the game center application, you must create a Game Center account. Each account is associated with only one of the two servers that have just been discussed. Since we want to test the application before submitting it to the mall, we must create some sandbox players in the game center. This follows the steps below:
1. Navigate to Gmail and create some email addresses. I have created three email addresses, so I can have three players on the sandbox game center server. I suggest using similar names. Otherwise, managing and remembering them will be a difficult task. For example, we recommend that you use mysandboxgamecenteruser1, mysandboxgamecenteruser2, and mysandboxgamecenteruser3. The first person to read this book may have created these accounts.
2. Open the IOS simulator and Game Center application. If a player logs on to the game center in the IOS simulator, the player logs out. Now, on the simulator, you will stay on the main page of the game center shown in 1-1.
Figure 1-1 game center main interface on iOS Simulator
3. Click "create new account.
4. The "New Account" page is displayed, asking about your country. After selecting a country, click "Next" in the navigation bar.
5. Open a page to ask about your birthday. The game center will use it to determine if you are not a minor. More information will be provided later. After entering your birthday, click "Next.
6. There are some terms. Read them and click "agree. You will be asked ifIndeedAgree to these terms. Click "agree" to go to the next page.
7. You will be asked to enter the full name, email address, password, and confidential questions and answers (used to retrieve the password later ). There is also a switch to choose whether to subscribe to the news of the game center and related products. This option is disabled by default. The entered email address must be valid. Use one created in step 1. After entering the details, click "Next" in the navigation bar.
8. On the next page, you will be asked to enter a nickname. Each game center player has a nickname and is visible to other players. Think about anything you think can represent you. (However, nicknames are unique in the game center, so you must find a nickname that is not used by other players. I know this process may be unsatisfactory. If you enter something that has been occupied by the game center, you can only select a different nickname.) In addition, if you want other players to find you using your email address in the game center, open "find ".
Me by email ". You can also add other email addresses to the list. In this way, your account will be associated with multiple email addresses. Other players can find you through any of these associated addresses. Click "done" in the navigation bar.
9. Now you will log on to the game center and the primary Game Center page shown in 1-2 is displayed.
Figure 1-2 logon to the primary game center
The "sandbox" on the leftmost page of the Game Center Application (after login) indicates that you are actually using the sandbox environment.
Now, continue to create game center players in the sandbox environment. To test the sample code in this book, you 'd better create three sandbox players. If you do not want to take the time to create three players, you must create at least two players. Otherwise, you will not be able to test about 90% of the sample code.