Genesis-3d Open source game engine Full Instance Tutorial Cool game Chapter 02: How to achieve internal purchase

Source: Internet
Author: User

2. How to achieve internal purchase

Internal Purchase Overview:

In-game shopping refers to the player in the game, using money to obtain a game props a way. Developers get the benefit of the development game from the player's purchase, so a lot of games have an inside purchase module. Below we take on the mobile phone iOS platform to achieve cool game inside purchase For example, introduce the game inside the basic process of purchase.

Principle:

The internal purchase flowchart, as shown in Figure 2-1.

Figure 2-1

Implementation method:

Step 1:

The developer will put the items on the shelves. Register Mpid with a built-in developer account on Game Center, which includes information on items on the shelves: name, number, and price. Before the product is on the shelves, developers need to register as iphone develop on the iphone devcenter. If not, it takes a $99.00 to buy an account at Apple's official register. Register the original account and the shelf products can refer to Apple's official website: https://developer.apple.com.

Step 2:

The production of the UI. This piece on the developer's custom design, the general content is: button, prop name, props information and so on.

Step 3:

The realization of the internal purchase.

The 3.1 engine provides an interface invoke function with the App Store. The flowchart of the player buying props in the game, as shown in Figure 2-3-1-1. In the process implementation, the developer only needs to add the following section of code.

The internal purchase flowchart, as shown in Figure 2-3-1-1.

Figure 2-3-1-1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.