Talking about how to do safe and reliable game activities

Source: Internet
Author: User

Talking about how to develop the reliable game activity

The annual Dragon Boat Festival comes, the shopping arcade activity is flying, the game activity also not to be outdone, everywhere discounts the special offer free to send.

The customer is happy to blossom, the player is flattered. The real store earns the pots full, the virtual business. Not It's lucky that games don't get brushed.

Unfortunately, the game has been brushed, the player gets a piece of treasure, the game business losses, developers are also implicated, developers light warning disciplinary, heavy fines, dismissal, in the very people, they have to squat. As a developer, do activity development, it is a career to make bets, careless, small life is not guaranteed. Is there any solution to reduce the game activity by the player malicious brush or avoid being maliciously brushed by the player. The answer is yes. Nonsense said so much, today on the Dragon Boat Festival activities, talking about the development of security programs under the game, and the world stay up overtime fighting in the forefront of the code farmers share.

First, let's analyze the reason for the article being brushed. Before we analyze, let's give an example.

Assuming that there is such a demand for operations, in the Dragon Boat Festival to hold dumplings donation activities, the player first to NPC to get Zongzi, request a VIP player to receive 10, non-VIP players to receive one, the total number of Zongzi daily production of 10,000, after the end, and then NPC out to donate. Finally, according to the number of donations, donation rewards:

The first Apple Mac one,

The second---fifth place iphone5,

Sixth place--the 100th of Samsung's furious 31.

In addition to the above award, the donation reached 500, with a gift of 20,000 RMB value of the secret gift package.

Pro, it's tempting to see the rewards above. Jealous of it. Do you want to be able to grab it. OK, about how to rob, wait a moment to discuss again, first talk about code farmers to operate the case how to develop it.

Code farmers see, this activity is not simple, is not in the pick before the VIP, the total decline to 0. So desperate to start coding. Brush, brush, brush, 2 hours code finished. After testing all OK. The code is not pasted, simply look at the process of receiving and donating:

Description: This process is asynchronous. asynchronous, you know.

Analysis:

See what's on the top of the process? This type of bug can also be estimated if no problems are found. Well, let me get down to it: Before you send Zongzi, verify that it is a VIP, and that it is all right to receive it today. The problem arises from the dumplings in the warehouse to receive Zongzi, and then update the data. Zongzi Mail has been sent or directly to the player backpack, in today's pick up the number of updates, but in the asynchronous process, before the data update, the logic of the player data is not updated before, playing home plug-in, in the second level to send a number of receive messages, in the asynchronous process, the player data has not synchronized to the logical server, Cause the player to receive unlimited. The solution is to send the player dumplings, need to be in the verification is not a VIP, the number of today is to reach the upper limit. Unfortunately, there is no validation. Player unlimited brushes.

See what's on the top of the process? This type of bug can also be estimated if no problems are found. Well, let me go: Before the list, the code farmers did not verify the existence of Zongzi in the backpack, without first deduction on the list directly. Players are happy. The Code farmer tragedy.

Through the 2 process analysis above, the results are as follows:

All brush players have reached 100, and have received a value of 20,000 RMB gift package. Suppose there are 1000 people brushes, 20 million ram loss in Ashes. The yard farmer was expelled ...

Reason Analysis:

A Receive normal flow under no problem, but play home plug directly lead to brush

B Logical verification of the list is not rigorous, without first deduction, then the list

Through the above example, whether there is a revelation, whether the awareness of activity risk a little awakening. Do you think game safety must be taken seriously? OK, no more nonsense. Let's go to the bottom of the game and discuss the security and reliability scheme.

In most games, rewards for games are usually sent to the player via email, and we start with the sending of emails and the disposition of items. Mail sent or sent directly to the backpack, the player immediately received items, the model is the disadvantage of the player after the brush, can not immediately deal with, prohibit the player brush. This behavior seriously affects the quality of the activity and even causes the activity to close. So. We have a better sending mode for the delivery of the goods. The answer is yes. Small make up to talk about their own thinking program:

1. Buffer Period

Set the message send buffer period. That is, the server sent mail that day, but the player can not immediately receive, to a certain period of time before receiving, such as 3 days before receiving.

The advantage of this method is that the player can not immediately receive the goods, the items will not enter the player backpack, can not access the market circulation. Even if the player malicious brush, operators are not afraid. Because the player receives the mail before, has the N day buffer period, the operator may use the N day buffer period, carries on the inquiry log, the determination malicious brushes the article player and to its processing. Operators will have no loss.

The disadvantage of this method is that the player can not receive the items immediately, the enthusiasm of participating activities is reduced.

2. Starting use Period

Set up the item starting use period. Although the mail is sent directly to the player or directly to the player's backpack, the player does not use it directly after the item is active, even if the item is traded and flowed to the market. Even if the player by brush, brush out unlimited items, but can not use, but also in vain. In the event, if the player is found to be malicious brush, operators are not afraid, in a limited time to find solutions to the malicious brush items, directly modify the initial validity period, or destroy.

The disadvantage of this method is that the player can not use the object directly, the enthusiasm of participating activities is reduced.

3. Redemption voucher

The mail sends the voucher of the exchange goods and is convertible during the initial use period. Instead of sending a reward item directly, the message is sent as a voucher for redemption and can be exchanged within the initial validity period. Even if the player maliciously brushes the item, the value is not big, brushes is the voucher, but is not the real item. Operators found that malicious brushes were immediately found to solve the problem and eliminate the malicious brush.

4. Strengthen the logic of rigor

5. Code Audit

6. Development tools to verify the frequency of message delivery.

Red alert for exception messages.

The above is the game security of some of the thinking, the wrong place, please criticize the guidance. Positive comments are welcome.

2013.06.13 Book in Wen extract court

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.