CN111078541A - Automatic katon detection method and system based on Unity engine - Google Patents
Automatic katon detection method and system based on Unity engine Download PDFInfo
- Publication number
- CN111078541A CN111078541A CN201911201172.4A CN201911201172A CN111078541A CN 111078541 A CN111078541 A CN 111078541A CN 201911201172 A CN201911201172 A CN 201911201172A CN 111078541 A CN111078541 A CN 111078541A
- Authority
- CN
- China
- Prior art keywords
- game
- automatic
- stuck
- fps
- detection
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/70—Game security or game management aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/60—Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Computer Hardware Design (AREA)
- Business, Economics & Management (AREA)
- Computer Security & Cryptography (AREA)
- General Business, Economics & Management (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a stuck automatic detection method and a system based on a Unity engine, comprising the following steps: creating a virtual automatic robot, wherein the virtual automatic robot is used for completely traversing a game scene in which a game program runs according to a preset rule; the virtual automatic robot automatically detects the jamming of a game scene through a plurality of interfaces and automatically captures a screen during traversal; the virtual automatic robot automatically detects the card pause and automatically captures the screen, the collected picture data and the associated scene area are sent to the server, and the server evaluates whether the game program is qualified or not according to the detection rule. The invention has the beneficial effects that: through automatic statistics FPS, detection card pause, game card pause picture storage and uploading to a server for automatic analysis and statistics, without manual intervention, developers can directly obtain the whole card pause percentage and detailed distribution diagram of the game and quickly reappear according to the game picture of the card pause, thereby carrying out game optimization pertinently and improving the game fluency.
Description
Technical Field
The invention belongs to the field of computer games, and particularly relates to a stuck automatic detection method and system based on a Unity engine.
Background
The Unity game engine is the most popular mobile phone game development tool at present, and a great number of popular mobile phone games are developed based on the engine. For the user experience, the smoothness of the game is extremely important, and therefore, the card frame condition of the game needs to be detected in the development process. In the prior art, detection and analysis of a card frame are mainly performed by using a fundamental tool owned by Unity, for example, in a Debug version, a Unity editor can be connected or Unity Profiler data can be derived and deep analysis can be performed to perform statistics of an FPS; although the method solves the existing defects to a certain extent, the method still has the defects of whole-process manual operation, simple and crude test mode, incomplete test information and the like; in addition, the method for acquiring the RGB value of the game image to detect the katton can automatically detect the katton, but the game needs to output the FPS information on a picture, but most mobile games cannot output the FPS on a game interface when being released. How to more effectively detect the FPS condition of the mobile phone game is a technical problem which is urgently needed to be solved at present.
Disclosure of Invention
The invention aims to solve at least one technical problem in the prior art, and provides a stuck automatic detection method and a system thereof based on a Unity engine, which realize automatic statistics of FPS, automatic detection of stuck, automatic screen capture, automatic uploading of stuck information to a server and analysis.
The technical scheme of the invention comprises a stuck automatic detection method based on a Unity engine, which is characterized by comprising the following steps: s100, creating a virtual automatic robot, wherein the virtual automatic robot is used for completely traversing a game scene in which a game program runs according to a preset rule; s200, the virtual automatic robot automatically detects the jamming of a game scene through a plurality of interfaces and automatically captures a screen during traversal; s300, the virtual automatic robot automatically carries out pause detection and automatic screen capture, the collected picture data and the associated scene area are sent to a server, and the server evaluates whether the game program is qualified or not according to the detection rule.
According to the automatic morton detection method based on the Unity engine, the preset rule comprises that all traversals are carried out according to the size of a game scene, the visual angle width and the visual distance of the virtual automatic robot and the optimal route.
According to the Unity engine-based katon automatic detection method, the katon detection comprises the following steps: and setting corresponding FPS threshold values according to different games, reading the FPS value of the current game scene and carrying out screen capture recording, wherein the FPS value is lower than the FPS threshold value and indicates that the game is stuck in the scene.
According to the stuck automatic detection method based on the Unity engine, the stuck detection specifically comprises the following steps: calling a function CalcFPS () to calculate the FPS of the current frame, and using a time. And calling a function Detect () to Detect the stuck, reading and setting a corresponding FPS threshold value, and comparing the FPS threshold value with the FPS value of the current frame.
According to the stuck automatic detection method based on the Unity engine, the automatic screenshot specifically comprises the following steps:
monitoring a WaitForEndOfFrame event of Unity through a function of FrameFunc (), wherein the event marks that each frame of Unity is ended; the three functions of the first step are used in the FrameFunc () function, CalcFPS () is called to calculate the FPS of the current frame, the FPS is used as a parameter to call a Detect () function to obtain whether the current frame is stuck, and if the current frame is stuck, a SaveScreen () function is called to store the current game picture.
According to the Unity engine-based katon automatic detection method, S200 specifically includes: when the virtual automatic robot finishes traversing and a game program is finished, uploading all the saved stuck game picture images to a server, and the server realizes that scripts automatically analyze statistical stuck pictures, frame rate distribution and stuck game pictures; counting the percent of katton, calculating the total number of the katton frames in the running of the computational game, dividing the total number of the game frames to obtain the percent of the katton, and if the percent of the katton is higher than a set value, prompting that the game is unqualified.
According to the Unity engine-based katon automatic detection method, S200 further includes: and drawing a frame rate distribution diagram by taking the frame number of the game as an abscissa and the FPS during the Kanton as an ordinate, and displaying the frame rate diagram through a visual interface.
The technical scheme of the invention also comprises a checkpoint automatic detection system based on the Unity engine, wherein the detection system is used for executing any one of the methods, and is characterized in that: the acquisition module is used for completely traversing the game scenes in which the game programs run by creating the virtual automatic robot according to a preset rule; the detection module is used for automatically performing pause detection and automatic screen capture on a game scene through a plurality of interfaces during traversal; and the evaluation module is used for sending the acquired picture data and the associated scene area to the server according to the picture information which is automatically subjected to the card pause detection and the screen capture, and the server evaluates whether the game program is qualified according to the detection rule.
The invention has the beneficial effects that: through automatic statistics FPS, detection card pause, game card pause picture storage and uploading to a server for automatic analysis and statistics, without manual intervention, developers can directly obtain the whole card pause percentage and detailed distribution diagram of the game and quickly reappear according to the game picture of the card pause, thereby carrying out game optimization pertinently and improving the game fluency.
Drawings
The invention is further described below with reference to the accompanying drawings and examples;
FIG. 1 shows a general flow diagram according to an embodiment of the invention.
Fig. 2 is a general system block diagram according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the present preferred embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to like elements throughout.
In the description of the present invention, the meaning of a plurality of means is one or more, the meaning of a plurality of means is two or more, and larger, smaller, larger, etc. are understood as excluding the number, and larger, smaller, inner, etc. are understood as including the number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present invention, unless otherwise explicitly defined, terms such as set, etc. should be broadly construed, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention in combination with the detailed contents of the technical solutions.
FIG. 1 shows a general flow diagram according to an embodiment of the invention. The method specifically comprises the following steps: s100, creating a virtual automatic robot, wherein the virtual automatic robot is used for completely traversing a game scene in which a game program runs according to a preset rule; s200, the virtual automatic robot automatically detects the jamming of a game scene through a plurality of interfaces and automatically captures a screen during traversal; s300, the virtual automatic robot automatically carries out pause detection and automatic screen capture, the collected picture data and the associated scene area are sent to a server, and the server evaluates whether the game program is qualified or not according to the detection rule.
Based on the flow shown in fig. 1, the present invention proposes the following specific embodiments, including:
the first step is as follows: and the C # is used for realizing the functions of automatically counting FPS, detecting stuck and automatically capturing the screen. The function CalcFPS () is implemented to calculate the FPS of the current frame, and for example, the time. The implementation function Detect () detects the stuck, reads the game stuck standard, the stuck FPS threshold defined by different levels of the game is generally different, if the high-quality game stuck FPS threshold is 15, if the FPS of the current frame is lower than 15, it is determined that the current frame is stuck. The method comprises the steps of automatically intercepting a game screen and storing a game screen () to be used for game optimization analysis positioning, utilizing a Unity interface Screen Capture, CaptureSchreenhostAs texture () to capture a screen, and storing a combination of a current frame number time, frame count and a current FPS value as a file name, wherein if the current frame number is 1000 th frame and the FPS of the current frame is 10, the file name is '1000 _10. png'.
The second step is that: writing a Unity C # plug-in, and realizing that a function named as FrameFunc () monitors a WaitForEndOfFrame event of Unity, wherein the event marks that each frame of Unity is ended. The three functions of the first step are used in the FrameFunc () function, CalcFPS () is called to calculate the FPS of the current frame, the FPS is used as a parameter to call a Detect () function to obtain whether the current frame is stuck, and if the current frame is stuck, a SaveScreen () function is called to store the current game picture.
The third step: when the game exits, all the saved game picture pictures of the katton are uploaded to the server, and the server realizes that the script automatically analyzes the statistical katton picture, the frame rate distribution and the game picture of the katton. Counting the percent of the katton, calculating the number of the uploaded pictures, namely the number of total katton frames in the running process of the game, dividing the total game frame number by the total game frame number to obtain the percent of the katton, and if the percent is higher than 10 percent, determining that the game is unqualified and needs to be optimized. The frame rate distribution of the image quality game takes the frame number of the game as the abscissa and the FPS during the pause as the ordinate, so that a clear frame rate distribution graph can be drawn. If the game needs to be further optimized, the game is sorted from low to high according to the FPS of the katton, the lower the FPS is, the more serious the katton is, the corresponding game picture representation picture is found, and the rapid reappearing position of a developer is assisted to further analyze and optimize.
The fourth step: and (4) running a mobile phone game, and automatically running the map by the robot to obtain the information of all game blocks.
Fig. 2 is a general system block diagram according to an embodiment of the present invention. The system comprises: the acquisition module is used for completely traversing the game scenes in which the game programs run by creating the virtual automatic robot according to a preset rule; the detection module is used for automatically performing pause detection and automatic screen capture on a game scene through a plurality of interfaces during traversal; and the evaluation module is used for sending the acquired picture data and the associated scene area to the server according to the picture information which is automatically subjected to the card pause detection and the screen capture, and the server evaluates whether the game program is qualified according to the detection rule.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention.
Claims (8)
1. A checkpoint automatic detection method based on a Unity engine is characterized by comprising the following steps:
s100, creating a virtual automatic robot, wherein the virtual automatic robot is used for completely traversing a game scene in which a game program runs according to a preset rule;
s200, the virtual automatic robot automatically detects the jamming of a game scene through a plurality of interfaces and automatically captures a screen during traversal;
s300, the virtual automatic robot automatically carries out pause detection and automatic screen capture, the collected picture data and the associated scene area are sent to a server, and the server evaluates whether the game program is qualified or not according to the detection rule.
2. The Unity engine-based katton auto-detection method of claim 1 wherein the preset rules include full traversal according to optimal route based on game scene size, virtual automatic robot perspective breadth and line-of-sight.
3. The Unity engine-based stuck automatic detection method according to claim 1, wherein the stuck detection comprises:
and setting corresponding FPS threshold values according to different games, reading the FPS value of the current game scene and carrying out screen capture recording, wherein the FPS value is lower than the FPS threshold value and indicates that the game is stuck in the scene.
4. The Unity engine-based stuck automatic detection method according to claim 1, wherein the stuck detection specifically comprises:
calling a function CalcFPS () to calculate the FPS of the current frame, and using a time.
And calling a function Detect () to Detect the stuck, reading and setting a corresponding FPS threshold value, and comparing the FPS threshold value with the FPS value of the current frame.
5. The Unity engine-based katton automatic detection method according to claim 1, wherein the automatic screenshot specifically comprises:
monitoring a WaitForEndOfFrame event of Unity through a function of FrameFunc (), wherein the event marks that each frame of Unity is ended;
the three functions of the first step are used in the FrameFunc () function, CalcFPS () is called to calculate the FPS of the current frame, the FPS is used as a parameter to call a Detect () function to obtain whether the current frame is stuck, and if the current frame is stuck, a SaveScreen () function is called to store the current game picture.
6. The Unity engine-based katton automatic detection method according to claim 1, wherein the S200 specifically comprises:
when the virtual automatic robot finishes traversing and a game program is finished, uploading all the saved stuck game picture images to a server, and the server realizes that scripts automatically analyze statistical stuck pictures, frame rate distribution and stuck game pictures;
counting the percent of katton, calculating the total number of the katton frames in the running of the computational game, dividing the total number of the game frames to obtain the percent of the katton, and if the percent of the katton is higher than a set value, prompting that the game is unqualified.
7. The Unity engine based katton auto-detection method according to claim 1, wherein the S200 further comprises:
and drawing a frame rate distribution diagram by taking the frame number of the game as an abscissa and the FPS during the Kanton as an ordinate, and displaying the frame rate diagram through a visual interface.
8. A Unity engine based stuck automatic detection system for performing the method of any of claims 1 to 7, wherein:
the acquisition module is used for completely traversing the game scenes in which the game programs run by creating the virtual automatic robot according to a preset rule;
the detection module is used for automatically performing pause detection and automatic screen capture on a game scene through a plurality of interfaces during traversal;
and the evaluation module is used for sending the acquired picture data and the associated scene area to the server according to the picture information which is automatically subjected to the card pause detection and the screen capture, and the server evaluates whether the game program is qualified according to the detection rule.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911201172.4A CN111078541A (en) | 2019-11-29 | 2019-11-29 | Automatic katon detection method and system based on Unity engine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911201172.4A CN111078541A (en) | 2019-11-29 | 2019-11-29 | Automatic katon detection method and system based on Unity engine |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111078541A true CN111078541A (en) | 2020-04-28 |
Family
ID=70312055
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911201172.4A Pending CN111078541A (en) | 2019-11-29 | 2019-11-29 | Automatic katon detection method and system based on Unity engine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111078541A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111813689A (en) * | 2020-07-22 | 2020-10-23 | 腾讯科技(深圳)有限公司 | Game testing method, apparatus and medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104965773A (en) * | 2015-07-09 | 2015-10-07 | 网易(杭州)网络有限公司 | Terminal, jamming detection method, device as well as game jamming detection method and device |
CN106713571A (en) * | 2015-08-20 | 2017-05-24 | 广州爱九游信息技术有限公司 | Mobile terminal and method for testing performance of game engine application |
CN108255729A (en) * | 2018-01-24 | 2018-07-06 | 珠海金山网络游戏科技有限公司 | A kind of mobile phone games automated testing method and system based on Unity platforms |
CN108804174A (en) * | 2018-05-04 | 2018-11-13 | 努比亚技术有限公司 | A kind of game control method, server, terminal and computer readable storage medium |
CN109857650A (en) * | 2019-01-14 | 2019-06-07 | 珠海金山网络游戏科技有限公司 | A kind of game performance monitor method and system |
-
2019
- 2019-11-29 CN CN201911201172.4A patent/CN111078541A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104965773A (en) * | 2015-07-09 | 2015-10-07 | 网易(杭州)网络有限公司 | Terminal, jamming detection method, device as well as game jamming detection method and device |
CN106713571A (en) * | 2015-08-20 | 2017-05-24 | 广州爱九游信息技术有限公司 | Mobile terminal and method for testing performance of game engine application |
CN108255729A (en) * | 2018-01-24 | 2018-07-06 | 珠海金山网络游戏科技有限公司 | A kind of mobile phone games automated testing method and system based on Unity platforms |
CN108804174A (en) * | 2018-05-04 | 2018-11-13 | 努比亚技术有限公司 | A kind of game control method, server, terminal and computer readable storage medium |
CN109857650A (en) * | 2019-01-14 | 2019-06-07 | 珠海金山网络游戏科技有限公司 | A kind of game performance monitor method and system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111813689A (en) * | 2020-07-22 | 2020-10-23 | 腾讯科技(深圳)有限公司 | Game testing method, apparatus and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103093419B (en) | A kind of method of detected image sharpness and device | |
CN110298231B (en) | Method and system for judging goal of basketball game video | |
CN109145708B (en) | Pedestrian flow statistical method based on RGB and D information fusion | |
CN110287791B (en) | Screening method and system for face pictures | |
CN109413417B (en) | System and method for detecting interactive television service quality | |
US20070283269A1 (en) | Method and system for onboard camera video editing | |
WO2017177903A1 (en) | Online verification method and system for real-time gesture detection | |
CN110517246A (en) | A kind of image processing method, device, electronic equipment and storage medium | |
CN102348049A (en) | Method and device for detecting position of cut point of video segment | |
CN103096117B (en) | Video noise detection method and device | |
CN110830787B (en) | Method and device for detecting screen-patterned image | |
CN108765405A (en) | A kind of image authenticating method and system | |
CN114026874A (en) | Video processing method and device, mobile device and readable storage medium | |
CN112381054A (en) | Method for detecting working state of camera and related equipment and system | |
CN113891070A (en) | Method and device for measuring delay time of network camera | |
CN111078541A (en) | Automatic katon detection method and system based on Unity engine | |
CN115396705A (en) | Screen projection operation verification method, platform and system | |
CN111061647A (en) | Software performance automatic testing method and device and electronic equipment | |
CN107645684A (en) | A kind of barrage adjusting method, device and storage medium | |
CN112837640A (en) | Screen dynamic picture testing method, system, electronic equipment and storage medium | |
CN113127349A (en) | Software testing method and system | |
CN113923443A (en) | Network video recorder testing method and device and computer readable storage medium | |
CN114445358A (en) | Method and system for detecting appearance defects of edges of middle frame of mobile phone, storage medium and computer equipment | |
CN104318226B (en) | Car license recognition equipment parameter setting method and Car license recognition device | |
CN110108448B (en) | Automatic defect detection method for dynamic logo |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |