CN111957040B - Detection method and device for shielding position, processor and electronic device - Google Patents

Detection method and device for shielding position, processor and electronic device Download PDF

Info

Publication number
CN111957040B
CN111957040B CN202010929105.0A CN202010929105A CN111957040B CN 111957040 B CN111957040 B CN 111957040B CN 202010929105 A CN202010929105 A CN 202010929105A CN 111957040 B CN111957040 B CN 111957040B
Authority
CN
China
Prior art keywords
coordinate point
virtual character
virtual
game
standable
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.)
Active
Application number
CN202010929105.0A
Other languages
Chinese (zh)
Other versions
CN111957040A (en
Inventor
姜斌
王嘉恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202010929105.0A priority Critical patent/CN111957040B/en
Publication of CN111957040A publication Critical patent/CN111957040A/en
Application granted granted Critical
Publication of CN111957040B publication Critical patent/CN111957040B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/53Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game
    • A63F13/537Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen
    • A63F13/5372Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen for tagging characters, objects or locations in the game scene, e.g. displaying a circle under the character controlled by the player
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/822Strategy games; Role-playing games
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/30Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device
    • A63F2300/308Details of the user interface
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/807Role playing or strategy games

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a detection method and device for shielding positions, a processor and an electronic device. The method comprises the following steps: acquiring at least one coordinate point on which the virtual character can stand from the game map; obtaining an image to be compared corresponding to a standing coordinate point, wherein the image to be compared is used for recording a game picture when the virtual character is located at the standing coordinate point; acquiring a game picture when the virtual character is positioned at a non-shielding position in a game scene as a reference picture; based on the images to be compared and the reference map, whether the position of the virtual character at the standable coordinate point is blocked or not is determined. The method solves the technical problems that the operation mode of manually traversing the game map to acquire the position of the shielding object in the related art is easy to consume excessive time cost and labor cost and is easy to cause omission.

Description

Detection method and device for shielding position, processor and electronic device
Technical Field
The present invention relates to the field of computers, and in particular, to a method and an apparatus for detecting a shielding position, a processor, and an electronic device.
Background
Action role playing games (Action Role Playing Game, abbreviated as ARPG) generally refer to games in which a game player is responsible for playing a specific virtual role and moving in a realistic or fictional world, with the action of the virtual role played by the game player being more prominent. Quality assurance (QUALITY ASSURANCE, simply QA) personnel are typically responsible for providing enough trust that an entity can meet quality requirements, yet all planned and systematic activities are implemented in the quality management hierarchy and validated as needed.
At present, the ARPG game provided in the related art is inevitably shielded by a shielding object arranged in a game scene in the process of walking by the virtual character. One more common solution for occlusion handling is to modify the occlusions in the game scene so that they do not occlude the avatar during its walking. With this solution, in order for the game player to observe the virtual character as much as possible without being occluded by the occlusion provided within the game scene, different degrees of modification thereof are required. Before the modification, the position of the shielding object which can cause shielding needs to be found.
For finding the position of the shielding object which can cause shielding, a more common way for finding the shielding position is as follows: and (3) manually operating a virtual character to traverse each position on the game map, judging the position which can cause shielding by naked eyes, storing the shielding positions in a specific file in a screenshot mode, and continuously traversing the next position until all positions on the game map are traversed, so that a final traversing result can be obtained.
However, a significant disadvantage of this mode of operation is that: excessive time and labor costs are required, and the manual search is easy to miss the shielding position, so that accurate results are difficult to obtain even though excessive time and labor costs are consumed. In addition, if the artwork modifies the game scene to some extent, the QA person needs to traverse the entire game map again to re-determine the occlusion position, thereby repeatedly consuming time costs and labor costs.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
At least some embodiments of the present invention provide a method, an apparatus, a processor, and an electronic device for detecting a shielding position, so as to at least solve the technical problems that in the related art, an operation mode of manually traversing a game map to obtain a position where a shielding object is located is easy to consume excessive time cost and labor cost, and is easy to cause omission.
According to one embodiment of the present invention, a method for detecting an occlusion position is provided, wherein a graphical user interface is provided by a terminal device, the graphical user interface at least partially includes a game scene, the game scene includes a game map and a virtual character, and the method includes:
Acquiring at least one coordinate point on which the virtual character can stand from the game map; obtaining an image to be compared corresponding to a standing coordinate point, wherein the image to be compared is used for recording a game picture when the virtual character is located at the standing coordinate point; acquiring a game picture when the virtual character is positioned at a non-shielding position in a game scene as a reference picture; based on the images to be compared and the reference map, whether the position of the virtual character at the standable coordinate point is blocked or not is determined.
Optionally, acquiring at least one coordinate point that the virtual character can stand on from the game map includes: acquiring a size parameter, a distance parameter, a starting coordinate point and a preset route finding diagram of a game map, wherein the distance parameter is used for representing the distance between two adjacent coordinate points in the game map, the starting coordinate point is used for representing the starting position of a virtual character in the game map, and the route finding diagram is used for recording the walking position information of the virtual character in the game map; acquiring a plurality of coordinate points to be selected in a game map by adopting a size parameter, a distance parameter and a starting coordinate point; and selecting a standable coordinate point from a plurality of coordinate points to be selected based on the routing graph.
Optionally, acquiring a plurality of coordinate points to be selected in the game map by using the size parameter, the distance parameter and the initial coordinate point includes: determining a traversing range in the game map by adopting the size parameter and the initial coordinate point; and starting from the initial coordinate point, acquiring a plurality of coordinate points to be selected in a traversing range according to the distance parameter.
Optionally, selecting a standable coordinate point from a plurality of coordinate points to be selected based on the routing graph includes: respectively determining whether each coordinate point in a plurality of coordinate points to be selected is located in a walking area represented by a road finding diagram; coordinate points located within the walkable region are recorded as standable coordinate points.
Optionally, the starting coordinate point is a standable coordinate point.
Optionally, acquiring an image to be compared corresponding to the standable coordinate point includes: traversing each standable coordinate point in turn from the initial coordinate point; and sequentially capturing the game picture when the virtual character traverses to each standable coordinate point, and obtaining the image to be compared corresponding to each standable coordinate point.
Optionally, obtaining a game picture when the virtual character is located at a non-shielding position in the game scene, as a reference picture, includes: hiding other resources except the virtual roles in the game scene; and capturing a game picture of the game scene which is hidden and contains the virtual character, and obtaining a reference picture.
Optionally, determining whether the position of the virtual character at the standable coordinate point is blocked based on the image to be compared and the reference image includes: acquiring a first virtual frame surrounding a virtual character in a reference diagram; determining the pixel duty ratio of the virtual character in the reference diagram in the first virtual frame as a reference duty ratio; acquiring a second virtual frame surrounding the virtual character in the image to be compared, wherein the second virtual frame and the first virtual frame have the same size; determining the pixel duty ratio of the virtual character in the image to be compared in the second virtual frame as a target duty ratio; and determining whether the position of the virtual character at the standing coordinate point is blocked or not according to the target duty ratio and the reference duty ratio.
Optionally, determining whether the position of the virtual character at the standable coordinate point is occluded according to the target duty ratio and the reference duty ratio includes: determining whether the difference between the reference duty cycle and the target duty cycle is less than a preset threshold; if the difference value between the reference duty ratio and the target duty ratio is smaller than a preset threshold value, determining that the position of the virtual character at the standable coordinate point is not blocked; and if the difference value between the reference duty ratio and the target duty ratio is greater than or equal to a preset threshold value, determining that the position of the virtual character at the standable coordinate point is blocked.
Optionally, determining the pixel duty ratio of the virtual character in the first virtual frame in the reference diagram as the reference duty ratio includes: rendering the virtual character to a target color; and calculating the ratio of the number of pixels of the target color to the total number of pixels contained in the first virtual frame in the reference image to obtain the reference duty ratio.
Optionally, determining the pixel duty ratio of the virtual character in the second virtual frame in the image to be compared as the target duty ratio includes: rendering the virtual character to a target color; and calculating the ratio of the number of pixels of the target color in the image to be compared to the total number of pixels contained in the second virtual frame, and obtaining the target duty ratio.
According to an embodiment of the present invention, there is further provided a device for detecting a blocking position, providing a graphical user interface through a terminal device, where the graphical user interface at least partially includes a game scene, and the game scene includes a game map and a virtual character, and including:
the acquisition module is used for acquiring at least one coordinate point on which the virtual character can stand from the game map; obtaining an image to be compared corresponding to a standing coordinate point, wherein the image to be compared is used for recording a game picture when the virtual character is located at the standing coordinate point; obtaining a game picture when the virtual character is positioned at a non-shielding position in the game scene as a reference picture; and the determining module is used for determining whether the position of the virtual character at the standable coordinate point is blocked or not based on the image to be compared and the reference image.
Optionally, the acquiring module is configured to acquire a size parameter, a distance parameter, a starting coordinate point and a preset routing map of the game map, where the distance parameter is used to represent a distance between two adjacent coordinate points in the game map, the starting coordinate point represents a starting position of the virtual character in the game map, and the routing map is used to record position information of the virtual character that can walk in the game map; acquiring a plurality of coordinate points to be selected in a game map by adopting a size parameter, a distance parameter and a starting coordinate point; and selecting a standable coordinate point from a plurality of coordinate points to be selected based on the routing graph.
Optionally, an acquisition module is used for determining a traversal range in the game map by adopting the size parameter and the initial coordinate point; and starting from the initial coordinate point, acquiring a plurality of coordinate points to be selected in a traversing range according to the distance parameter.
Optionally, the acquiring module is configured to determine whether each coordinate point of the plurality of coordinate points to be selected is located in a walkable area represented by the route finding graph; coordinate points located within the walkable region are recorded as standable coordinate points.
Optionally, the starting coordinate point is a standable coordinate point.
Optionally, the acquiring module is used for traversing each standable coordinate point in turn from the initial coordinate point; and sequentially capturing the game picture when the virtual character traverses to each standable coordinate point, and obtaining the image to be compared corresponding to each standable coordinate point.
Optionally, the acquiring module is used for hiding other resources except the virtual roles in the game scene; and capturing a game picture of the game scene which is hidden and contains the virtual character, and obtaining a reference picture.
Optionally, the determining module is used for acquiring a first virtual frame surrounding the virtual character in the reference diagram; determining the pixel duty ratio of the virtual character in the reference diagram in the first virtual frame as a reference duty ratio; acquiring a second virtual frame surrounding the virtual character in the image to be compared, wherein the second virtual frame and the first virtual frame have the same size; determining the pixel duty ratio of the virtual character in the image to be compared in the second virtual frame as a target duty ratio; and determining whether the position of the virtual character at the standing coordinate point is blocked or not according to the target duty ratio and the reference duty ratio.
Optionally, the determining module is used for determining whether the difference value between the reference duty ratio and the target duty ratio is smaller than a preset threshold value; if the difference value between the reference duty ratio and the target duty ratio is smaller than a preset threshold value, determining that the position of the virtual character at the standable coordinate point is not blocked; and if the difference value between the reference duty ratio and the target duty ratio is greater than or equal to a preset threshold value, determining that the position of the virtual character at the standable coordinate point is blocked.
Optionally, the determining module is used for rendering the virtual character into a target color; and calculating the ratio of the number of pixels of the target color to the total number of pixels contained in the first virtual frame in the reference image to obtain the reference duty ratio.
Optionally, the determining module is used for rendering the virtual character into a target color; and calculating the ratio of the number of pixels of the target color in the image to be compared to the total number of pixels contained in the second virtual frame, and obtaining the target duty ratio.
According to an embodiment of the present invention, there is also provided a nonvolatile storage medium in which a computer program is stored, wherein the computer program is configured to execute the detection method of the occlusion position in any one of the above-mentioned items when running.
According to an embodiment of the present invention, there is further provided a processor for running a program, wherein the program is configured to execute the method for detecting the occlusion position in any of the above-mentioned claims at run-time.
According to an embodiment of the present invention, there is also provided an electronic device including a memory in which a computer program is stored, and a processor configured to run the computer program to perform the method of detecting the occlusion position in any of the above.
In at least some embodiments of the present invention, a to-be-compared image corresponding to at least one standing coordinate point is obtained from a game map, where the to-be-compared image is used to record a game picture when the virtual character is located at the standing coordinate point, and a game picture when the virtual character is located at a non-shielding position in a game scene is obtained as a reference picture.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a flow chart of a method of detecting occlusion positions according to one embodiment of the present invention;
FIG. 2 is a schematic diagram of determining a reference duty cycle according to an alternative embodiment of the present invention;
FIG. 3 is a schematic illustration of determining occlusion positions according to an alternative embodiment of the present invention;
fig. 4 is a block diagram of a detection apparatus for a blocking position according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one embodiment of the present invention, there is provided an embodiment of a method of detecting an occlusion position, it being noted that the steps shown in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is shown in the flowchart, in some cases the steps shown or described may be performed in an order different from that herein.
The method embodiments may be performed in a mobile terminal, a computer terminal, or similar computing device. Taking the mobile terminal as an example, the mobile terminal can be a terminal device such as a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palm computer, a mobile internet device (Mobile Internet Devices, abbreviated as MID), a PAD, etc. A mobile terminal may include one or more processors (which may include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processor (GPU), a Digital Signal Processing (DSP) chip, a Microprocessor (MCU), a programmable logic device (FPGA), a neural Network Processor (NPU), a Tensor Processor (TPU), an Artificial Intelligence (AI) type processor, etc., detection means) and a memory for storing data. Optionally, the mobile terminal may further include a transmission device, an input/output device, and a display device for a communication function. It will be appreciated by those of ordinary skill in the art that the foregoing structural descriptions are merely illustrative and are not intended to limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than the above structural description, or have a different configuration than the above structural description.
The memory may be used to store a computer program, for example, a software program of application software and a module, for example, a computer program corresponding to the method for detecting an occlusion position in the embodiment of the present invention, and the processor executes various functional applications and data processing by running the computer program stored in the memory, that is, implements the method for detecting an occlusion position described above. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, the memory may further include memory remotely located with respect to the processor, the remote memory being connectable to the mobile terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through the base station to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
Display devices may be, for example, touch screen type Liquid Crystal Displays (LCDs) and touch displays (also referred to as "touch screens" or "touch display screens"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a Graphical User Interface (GUI), and the user may interact with the GUI by touching finger contacts and/or gestures on the touch-sensitive surface, where the man-machine interaction functions optionally include the following interactions: executable instructions for performing the above-described human-machine interaction functions, such as creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving electronic mail, talking interfaces, playing digital video, playing digital music, and/or web browsing, are configured/stored in a computer program product or readable storage medium executable by one or more processors.
In this embodiment, a method for detecting an occlusion position of a mobile terminal is provided, a graphical user interface is provided through a terminal device, the graphical user interface at least partially includes a game scene, the game scene includes a game map and a virtual character, fig. 1 is a flowchart of a method for detecting an occlusion position according to one embodiment of the present invention, and as shown in fig. 1, the method includes the following steps:
Step S10, obtaining at least one coordinate point on which the virtual character can stand from a game map;
because virtual scene resources such as virtual mountains, rivers and the like are usually set in the game map, the roles of the scene resources are mainly as follows: enriching and beautifying the display effect of the game scene, in addition, the map boundary is usually set in the game map, and the function is that: the maximum range of motion of the virtual character is limited, so that the areas where the scene resources are located are often areas where the virtual character cannot be reached, i.e. no all areas on the game map have passable paths. It follows that in determining the occlusion position, firstly, an unreachable region of the virtual character can be excluded, so that at least one coordinate point on which the virtual character can stand can be selected within the feasible region of the virtual character. In order to select a standing coordinate point, the whole game map can be separated according to preset parameters so as to obtain the coordinate point for the virtual character to stand. The specific selection of the standable coordinate points will be described in further detail in the following alternative embodiments.
Step S12, obtaining an image to be compared corresponding to a standing coordinate point, wherein the image to be compared is used for recording a game picture when the virtual character is positioned at the standing coordinate point;
At each of the standable coordinate points, a game screen (i.e., an image to be compared) displayed within the graphical user interface corresponding to each of the standable coordinate points may be acquired, such as by way of a game screen shot. The game picture contains the coordinate point where the virtual character is currently located. If the virtual character still has a virtual shelter at the coordinate point of the virtual character, the virtual shelter is also contained in the current game picture.
Step S14, obtaining a game picture when the virtual character is positioned at a non-shielding position in the game scene as a reference picture;
step S16, determining whether the position of the virtual character at the standable coordinate point is blocked or not based on the image to be compared and the reference image.
In a game scene, there are often various situations that a virtual character is not blocked by a virtual shield, a part of the virtual character is blocked by the virtual shield, and all of the virtual character is blocked by the virtual shield. If the virtual character is all occluded by the virtual occlusion, it may be determined that the standable coordinate point belongs to an occlusion position. If the virtual character portion is occluded by the virtual occlusion, it is also necessary to determine whether the position of the virtual character at the standable coordinate point is occluded further based on the image to be compared and the reference map.
Through the steps, the method can acquire at least one standing coordinate point of the virtual character from the game map, acquire the image to be compared corresponding to the standing coordinate point, the image to be compared is used for recording the game picture when the virtual character is positioned at the standing coordinate point, and acquire the game picture when the virtual character is positioned at the non-shielding position in the game scene as a reference picture.
Alternatively, in step S10, acquiring a standable coordinate point from the game map may include performing the steps of:
Step S101, acquiring a size parameter, a distance parameter, a starting coordinate point and a preset route finding map of a game map, wherein the distance parameter is used for representing the distance between two adjacent coordinate points in the game map, the starting coordinate point is used for representing the starting position of a virtual character in the game map, and the route finding map is used for recording the position information of the virtual character capable of walking in the game map;
step S102, acquiring a plurality of coordinate points to be selected in a game map by adopting a size parameter, a distance parameter and a starting coordinate point;
step S103, selecting a standable coordinate point from a plurality of coordinate points to be selected based on the route map.
The distance parameter is used to represent the distance between two adjacent coordinate points in the game map. The smaller the distance between every two coordinate points, the finer the detection result is finally obtained, but the longer the consumed detection time is, in contrast. Thus, the distance parameter is typically an empirical value, such as: the half width of the virtual character is selected to be proper, so that the situation that the virtual character moves on the game map according to the half step length is checked, and the excessive detection time can be avoided on the premise that coordinate points are not omitted as much as possible. The initial coordinate point is a coordinate point corresponding to the initial position of the virtual character in the game map (for example, the game place of birth). The route map is used for recording the position information of the virtual character walkable in the game map (for example, controlling the virtual character to automatically move to a specific coordinate point to find the optimal path between two adjacent coordinate points) and recording the information of all the passable areas in the game map.
Firstly, the size parameter, the distance parameter, the initial coordinate point and the route finding map of the game map which are configured in advance can be obtained, then, the size parameter, the distance parameter and the initial coordinate point are adopted to obtain a plurality of coordinate points to be selected in the game map, the coordinate points to be selected are matched with the route finding map for verification to obtain a verification result, and finally, a plurality of coordinate points to be selected are selected from the verification result to be recorded.
Optionally, in step S102, acquiring a plurality of coordinate points to be selected in the game map using the size parameter, the distance parameter, and the start coordinate point may include the following steps:
step S1021, determining a traversing range in the game map by adopting the size parameter and the initial coordinate point;
step S1022, starting from the initial coordinate point, obtaining a plurality of coordinate points to be selected in the traversing range according to the distance parameter.
Since the size parameter is used for limiting the maximum movable range of the virtual character, and the initial coordinate point is used for limiting the initial position of the virtual character on the game map, the virtual character can be controlled to traverse the coordinate points from the initial position and from the transverse direction and the longitudinal direction according to the distance parameter, and therefore a plurality of coordinate points to be selected are obtained through traversing.
Assuming that the game map has a width w, a height h, a distance parameter d, and birth point coordinates (x, y), the coordinate minimum value cannot be smaller than (x-w, y-h), and the coordinate maximum value cannot be larger than (x+w, y+h). The traversal process is to obtain all coordinate points (X, Y) with X ranging from [ X-w, x+w ], Y ranging from [ Y-w, y+w ] and distance parameter d, thereby obtaining a plurality of coordinate points to be selected.
Optionally, in step S103, selecting a standable coordinate point from a plurality of coordinate points to be selected based on the routing map may include performing the steps of:
step S1031, determining whether each coordinate point in the plurality of coordinate points to be selected is located in a walkable area represented by the road finding diagram;
step S1032, the coordinate points located in the walkable region are recorded as standable coordinate points.
After traversing to obtain the coordinate points to be selected, matching verification is required to be performed with the route finding diagram so as to verify whether each coordinate point to be selected in the coordinate points to be selected is located in a walking area represented by the route finding diagram or not. The coordinate points to be selected, which are located in the walkable region, are then recorded as a plurality of standable coordinate points. In an alternative embodiment, descriptive information (e.g., identification information, location information) for a plurality of standable coordinate points may be stored as a list.
Optionally, in step S12, acquiring the image to be compared corresponding to the standable coordinate point may include the following steps:
step S121, starting from the initial coordinate point, traversing each standable coordinate point in turn;
step S122, screenshot is sequentially carried out on the game picture when the virtual character traverses to each standable coordinate point, and the image to be compared corresponding to each standable coordinate point is obtained.
The initial coordinate point is a standable coordinate point. In the process of acquiring a plurality of images to be compared by using a plurality of standable coordinate points, starting from the initial coordinate point of the virtual character, the plurality of standable coordinate points can be traversed in turn according to the description information recorded in the list. And traversing the virtual character to the game picture corresponding to each standable coordinate point, and sequentially performing screen capturing processing, so as to obtain an image to be compared corresponding to each standable coordinate point. In an alternative embodiment, the avatar may move from the current coordinate point to the next coordinate point within a single frame duration. And the screen capturing tool is used for carrying out screen capturing processing on the current game picture displayed in the graphical user interface of each frame so as to obtain game screen capturing corresponding to the virtual character on each available standing coordinate point, obtain a screen capturing result and further judge whether the virtual character is blocked by a blocking object on each standing coordinate point according to the screen capturing result.
Optionally, in step S14, acquiring a game screen when the virtual character is located at an unoccluded position in the game scene may include the following execution steps as a reference map:
step S141, hiding other resources except the virtual roles in the game scene;
step S142, capturing a game screen of the game scene which is hidden and includes the virtual character, and obtaining a reference image.
The reference map can be obtained by hiding other resources except the virtual character in the game scene and capturing the game picture of the game scene which is hidden and contains the virtual character in the graphical user interface. At this time, only the virtual character is included in the reference diagram.
Optionally, in step S16, determining whether the position of the virtual character at the standable coordinate point is blocked based on the image to be compared and the reference map may include performing the steps of:
step S161, a first virtual frame surrounding the virtual character in the reference diagram is acquired;
step S162, determining the pixel duty ratio of the virtual character in the reference diagram in the first virtual frame as the reference duty ratio;
step S163, a second virtual frame surrounding the virtual character in the image to be compared is obtained, wherein the second virtual frame has the same size as the first virtual frame;
Step S164, determining the pixel duty ratio of the virtual character in the second virtual frame in the image to be compared as a target duty ratio;
step S165, determining whether the position of the virtual character at the standable coordinate point is blocked according to the target duty ratio and the reference duty ratio.
In the reference diagram, a first virtual frame surrounding the virtual character (i.e., a bounding box contour) and a second virtual frame surrounding the virtual character in the image to be compared may be acquired, respectively. The second virtual frame is the same size as the first virtual frame (the same size also has the meaning of substantially the same shape, that is, the same virtual frame is referred to as a first virtual frame in the reference drawing and a second virtual frame in the image to be compared). Then, the pixel duty ratio (i.e., reference duty ratio) of the virtual character in the first virtual frame in the reference map and the pixel duty ratio (i.e., target duty ratio) of the virtual character in the second virtual frame in the image to be compared can be determined, respectively. And finally, determining whether the position of the virtual character at the standing coordinate point is blocked or not according to the target duty ratio and the reference duty ratio.
The above-mentioned reference duty cycle only needs to be calculated once in the course of determining the occlusion position within the game map. It is necessary to ensure that the avatar is not occluded by any obscuration when calculating the reference duty cycle. The pixel number ratio of the target color is the normal display proportion of the virtual character within the rectangular range of the bounding box of the virtual character. For a standable coordinate point where the subsequent occlusion relationship changes, if the virtual character is occluded by any occlusion, then the pixel count ratio of the target color will be less than the reference ratio.
The first virtual frame and the second virtual frame may be bounding box outlines of virtual characters or boundaries of the entire image user interface.
Optionally, in step S164, determining whether the position of the avatar at the standable coordinate point is blocked according to the target duty ratio and the reference duty ratio may include performing the steps of:
step S1641, determining whether the difference between the reference duty cycle and the target duty cycle is less than a preset threshold;
step S1642, if the difference between the reference duty ratio and the target duty ratio is smaller than the preset threshold, determining that the position of the virtual character at the standable coordinate point is not blocked;
in step S1643, if the difference between the reference duty ratio and the target duty ratio is greater than or equal to the preset threshold, it is determined that the position of the virtual character at the standable coordinate point is blocked.
In determining whether the position of the virtual character at the standing coordinate point is blocked according to the target duty ratio and the reference duty ratio, firstly, calculating a difference value between the target duty ratio and the reference duty ratio, and then determining whether the difference value between the reference duty ratio and the target duty ratio is smaller than a preset threshold value. And when the difference value between the reference duty ratio and the target duty ratio is smaller than a preset threshold value, determining that the position of the virtual character at the standable coordinate point is not blocked. And when the difference value between the reference duty ratio and the target duty ratio is larger than or equal to a preset threshold value, determining that the position of the virtual character at the standable coordinate point is blocked.
Optionally, in step S162, determining the pixel duty ratio of the virtual character in the reference diagram in the first virtual frame as the reference duty ratio may include the following steps:
step S1621, rendering the virtual character to a target color;
in step S1622, a ratio of the number of pixels of the target color to the total number of pixels included in the first virtual frame in the reference image is calculated to obtain a reference duty ratio.
Because the virtual character itself has a corresponding art map, if the color lacks uniformity, it is unfavorable to judge the display position of the virtual character on the graphical user interface. Based on the above consideration, the target color (for example, pure red) which is less concentrated in the art design process of the game scene is specifically selected, so that when the virtual character is displayed at a standable coordinate point, the whole body of the virtual character can be displayed as the target color (for example, pure red) through a coloring device (loader) on the virtual character, so that the ratio of the number of pixels of the target color in the reference image to the total number of pixels contained in the first virtual frame is calculated, and the reference duty ratio is obtained.
In particular, color statistics may be performed on all pixel points within an area (e.g., a rectangular area) occupied by a first virtual box (i.e., bounding box outline) bounding the virtual character in the graphical user interface using the reference map. Based on the characteristics of the ARPG game, the virtual character is typically located in the center of the graphical user interface and the position remains relatively fixed, and thus, the size and position of the rectangular area can be predetermined. Then, the ratio of the number of pixels of the target color to the total number of pixels included in the first virtual frame in the reference image is reused to obtain the reference duty ratio.
In an alternative embodiment, fig. 2 is a schematic diagram of a determined reference duty cycle according to an alternative embodiment of the present invention, where the loader on the avatar is modified so that the entire avatar is displayed in the target color (black in the figure, and true red in the figure) as shown in fig. 2. Secondly, in order to eliminate the interference of the game scene, the game scene resources except the virtual characters are hidden in the graphical user interface, and the target game picture is obtained. Then, the target game picture is subjected to screenshot processing, and a first virtual frame (a dotted line part in the figure) of the position of the virtual character is selected to calculate the target color duty ratio, and the target color duty ratio is taken as the reference duty ratio, for example: the number of pixels included in the area occupied by the outline of the virtual character is divided by the number of all pixels in the first virtual frame, and the obtained reference duty ratio is 50%.
Optionally, in step S163, determining the pixel duty ratio of the virtual character in the second virtual frame in the image to be compared, as the target duty ratio, may include the following performing steps:
step S1631, rendering the virtual character to a target color;
step S1632, calculating the ratio of the number of pixels of the target color in the image to be compared to the total number of pixels contained in the second virtual frame, and obtaining the target duty ratio.
As described above, by selecting a target color (e.g., pure red) that is less intensively used in the art design process of the game scene, when the avatar is displayed at a standable coordinate point, the entire avatar can be displayed as the target color (e.g., pure red) by the loader on the avatar, so that the ratio of the number of pixels of the target color in the image to be compared to the total number of pixels included in the second avatar is calculated, and the target duty ratio is obtained.
It should be noted that, in view of the display color of the virtual obstacle in the game scene, there may be the same situation as the above-mentioned target color. In this case, the target duty ratio may deviate during calculation, and thus the detection result regarding the shielding position may lack accuracy. For this purpose, in the special case described above, the target color (e.g., pure yellow) may be updated, and the ratio of the number of pixels of the target color to the total number of pixels included in the second virtual frame in the image to be compared may be recalculated to retrieve the target duty ratio. Then, a difference between the target duty ratio and the reference duty ratio is calculated again and compared with a preset threshold value, thereby determining whether the position of the virtual character at the standable coordinate point is blocked.
FIG. 3 is a schematic diagram of determining occlusion positions according to an alternative embodiment of the present invention, as shown in FIG. 3, wherein the pixel duty cycle (i.e., target duty cycle) of the avatar in the second virtual box is calculated for each screenshot of the avatar corresponding to each reachable standing coordinate point. Next, a difference between the target duty cycle and the reference duty cycle is calculated, and then it is determined whether the difference between the reference duty cycle and the target duty cycle is less than a preset threshold. And when the difference value between the reference duty ratio and the target duty ratio is smaller than a preset threshold value, determining that the position of the virtual character at the standable coordinate point is not blocked. And when the difference value between the reference duty ratio and the target duty ratio is larger than or equal to a preset threshold value, determining that the position of the virtual character at the standable coordinate point is blocked. Thus, the shielding position to be recorded can be obtained. In fig. 3, a partial region in the target color region displayed by the virtual character is blocked by the virtual tree resource. At this time, the target duty ratio obtained by dividing the number of pixels included in the remaining area except for the area covered by the virtual tree resources in the area occupied by the outline of the virtual character by the number of all pixels in the rectangular area is 40%. Then, the target duty ratio is subtracted from the reference duty ratio of 50%, thereby obtaining a duty ratio of 10% in which the virtual character is blocked by the virtual tree resource. Assuming that the preset threshold is 10%, the current standing coordinate point of the virtual character can be recorded as a shielding position, and the game screen shot and the coordinate position corresponding to the shielding position are recorded, so that convenience is brought to secondary confirmation and modification of the game scene display content by artistic staff. In addition, the distance parameter and the shielding threshold parameter can be controlled in a parameterization manner, so that personalized setting is convenient for different types of game maps, and further, the balance between accuracy and artistic effect is realized.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiment also provides a device for detecting a shielding position, which is used for implementing the above embodiment and the preferred embodiment, and is not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 4 is a block diagram of a detection apparatus for an occlusion position according to an embodiment of the present invention, in which a graphic user interface is provided through a terminal device, the graphic user interface at least partially including a game scene including a game map and virtual characters, the apparatus including: an acquisition module 10, configured to acquire at least one coordinate point where the virtual character can stand from the game map; obtaining an image to be compared corresponding to a standing coordinate point, wherein the image to be compared is used for recording a game picture when the virtual character is located at the standing coordinate point; obtaining a game picture when the virtual character is positioned at a non-shielding position in the game scene as a reference picture; a determining module 20 is configured to determine whether the position of the virtual character at the standable coordinate point is blocked based on the image to be compared and the reference map.
Optionally, the obtaining module 10 is configured to obtain a size parameter of the game map, a distance parameter, a starting coordinate point, and a preset routing map, where the distance parameter is used to represent a distance between two adjacent coordinate points in the game map, the starting coordinate point is used to represent a starting position of the virtual character in the game map, and the routing map is used to record position information of the virtual character that can walk in the game map; acquiring a plurality of coordinate points to be selected in a game map by adopting a size parameter, a distance parameter and a starting coordinate point; and selecting a standable coordinate point from a plurality of coordinate points to be selected based on the routing graph.
Optionally, an obtaining module 10 is configured to determine a traversal range in the game map using the size parameter and the starting coordinate point; and starting from the initial coordinate point, acquiring a plurality of coordinate points to be selected in a traversing range according to the distance parameter.
Optionally, the acquiring module 10 is configured to determine whether each coordinate point of the plurality of coordinate points to be selected is located in a walkable area represented by the route map; coordinate points located within the walkable region are recorded as standable coordinate points.
Optionally, the starting coordinate point is a standable coordinate point.
Optionally, the acquiring module 10 is configured to sequentially traverse each standable coordinate point from the initial coordinate point; and sequentially capturing the game picture when the virtual character traverses to each standable coordinate point, and obtaining the image to be compared corresponding to each standable coordinate point.
Optionally, the acquiring module 10 is configured to conceal other resources except for the virtual character in the game scene; and capturing a game picture of the game scene which is hidden and contains the virtual character, and obtaining a reference picture.
Optionally, the determining module 20 is configured to obtain a first virtual box surrounding the virtual character in the reference diagram; determining the pixel duty ratio of the virtual character in the reference diagram in the first virtual frame as a reference duty ratio; acquiring a second virtual frame surrounding the virtual character in the image to be compared, wherein the second virtual frame and the first virtual frame have the same size; determining the pixel duty ratio of the virtual character in the image to be compared in the second virtual frame as a target duty ratio; and determining whether the position of the virtual character at the standing coordinate point is blocked or not according to the target duty ratio and the reference duty ratio.
Optionally, the determining module 20 is configured to determine whether the difference between the reference duty cycle and the target duty cycle is less than a preset threshold; if the difference value between the reference duty ratio and the target duty ratio is smaller than a preset threshold value, determining that the position of the virtual character at the standable coordinate point is not blocked; and if the difference value between the reference duty ratio and the target duty ratio is greater than or equal to a preset threshold value, determining that the position of the virtual character at the standable coordinate point is blocked.
Optionally, a determining module 20 for rendering the virtual character to a target color; and calculating the ratio of the number of pixels of the target color to the total number of pixels contained in the first virtual frame in the reference image to obtain the reference duty ratio.
Optionally, a determining module 20 for rendering the virtual character to a target color; and calculating the ratio of the number of pixels of the target color in the image to be compared to the total number of pixels contained in the second virtual frame, and obtaining the target duty ratio.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Embodiments of the present invention also provide a non-volatile storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described nonvolatile storage medium may be configured to store a computer program for performing the steps of:
s1, acquiring at least one coordinate point on which a virtual character can stand from a game map;
s2, obtaining an image to be compared corresponding to the standing coordinate point, wherein the image to be compared is used for recording a game picture when the virtual character is located at the standing coordinate point;
s3, obtaining a game picture when the virtual character is positioned at a non-shielding position in the game scene as a reference picture;
and S4, determining whether the position of the virtual character at the standable coordinate point is blocked or not based on the image to be compared and the reference image.
Alternatively, in the present embodiment, the above-described nonvolatile storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, acquiring at least one coordinate point on which a virtual character can stand from a game map;
s2, obtaining an image to be compared corresponding to the standing coordinate point, wherein the image to be compared is used for recording a game picture when the virtual character is located at the standing coordinate point;
s3, obtaining a game picture when the virtual character is positioned at a non-shielding position in the game scene as a reference picture;
and S4, determining whether the position of the virtual character at the standable coordinate point is blocked or not based on the image to be compared and the reference image.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (14)

1. A method for detecting a shielding position, providing a graphical user interface through a terminal device, wherein the graphical user interface at least partially comprises a game scene, and the game scene comprises a game map and a virtual character, and the method is characterized by comprising the following steps:
acquiring at least one coordinate point on which the virtual character can stand from the game map;
obtaining an image to be compared corresponding to the standable coordinate point, wherein the image to be compared is used for recording a game picture when the virtual character is positioned at the standable coordinate point;
obtaining a game picture when the virtual character is positioned at a non-shielding position in the game scene as a reference picture;
determining whether the position of the virtual character at the standable coordinate point is blocked or not based on the image to be compared and the reference image;
wherein determining whether the position of the virtual character at the standable coordinate point is blocked based on the image to be compared and the reference map includes: acquiring a first virtual frame surrounding the virtual role in the reference graph; determining the pixel duty ratio of the virtual character in the first virtual frame in the reference diagram as a reference duty ratio; acquiring a second virtual frame surrounding the virtual character in the image to be compared, wherein the second virtual frame and the first virtual frame have the same size; determining the pixel duty ratio of the virtual character in the second virtual frame in the image to be compared as a target duty ratio; and determining whether the position of the virtual character at the standable coordinate point is blocked or not according to the target duty ratio and the reference duty ratio.
2. The method of claim 1, wherein obtaining at least one coordinate point from the game map at which the virtual character can stand comprises:
acquiring a size parameter, a distance parameter, a starting coordinate point and a preset route finding map of the game map, wherein the distance parameter is used for representing the distance between two adjacent coordinate points in the game map, the starting coordinate point is used for representing the starting position of the virtual character in the game map, and the route finding map is used for recording the walking position information of the virtual character in the game map;
acquiring a plurality of coordinate points to be selected in the game map by adopting the size parameter, the distance parameter and the initial coordinate point;
and selecting the standable coordinate point from the coordinate points to be selected based on the route map.
3. The method of claim 2, wherein obtaining the plurality of coordinate points to be selected in the game map using the size parameter, the distance parameter, and the start coordinate point comprises:
determining a traversal range in the game map by adopting the size parameter and the initial coordinate point;
And starting from the initial coordinate point, acquiring a plurality of coordinate points to be selected in the traversing range according to the distance parameter.
4. The method of claim 2, wherein selecting the standable coordinate point from the plurality of coordinate points to be selected based on the roadmap comprises:
respectively determining whether each coordinate point in the plurality of coordinate points to be selected is located in a walking area represented by the route finding diagram;
and recording coordinate points located in the walkable region as the standable coordinate points.
5. The method of claim 2, wherein the starting coordinate point is a standable coordinate point.
6. The method of claim 5, wherein acquiring the image to be compared corresponding to the standable coordinate point comprises:
traversing each standable coordinate point in turn from the initial coordinate point;
and sequentially capturing the game picture when the virtual character traverses to each standable coordinate point, and obtaining the image to be compared corresponding to each standable coordinate point.
7. The method according to claim 1, wherein acquiring a game screen when the virtual character is located at an unobstructed position in the game scene as the reference map includes:
Hiding other resources except the virtual roles in the game scene;
and capturing a game picture of the game scene which is subjected to the hiding process and contains the virtual character, and obtaining a reference picture.
8. The method of claim 1, wherein determining whether the position of the virtual character at the standable coordinate point is occluded from the target duty cycle and the reference duty cycle comprises:
determining whether a difference between the reference duty cycle and the target duty cycle is less than a preset threshold;
if the difference value between the reference duty ratio and the target duty ratio is smaller than the preset threshold value, determining that the position of the virtual character at the standable coordinate point is not blocked;
and if the difference value between the reference duty ratio and the target duty ratio is greater than or equal to the preset threshold value, determining that the position of the virtual character at the standable coordinate point is blocked.
9. The method of claim 1, wherein determining a pixel duty cycle of the virtual character in the reference map in the first virtual box as the reference duty cycle comprises:
rendering the virtual character to a target color;
And calculating the ratio of the number of the pixels of the target color to the total number of the pixels contained in the first virtual frame in the reference image to obtain the reference duty ratio.
10. The method of claim 1, wherein determining a pixel duty cycle of the virtual character in the second virtual box in the image to be compared as the target duty cycle comprises:
rendering the virtual character to a target color;
and calculating the ratio of the number of the pixels of the target color in the image to be compared to the total number of the pixels contained in the second virtual frame, and obtaining the target duty ratio.
11. A detection apparatus for a blocking position, providing a graphical user interface through a terminal device, wherein the graphical user interface at least partially includes a game scene, and the game scene includes a game map and a virtual character, and the detection apparatus is characterized by comprising:
the acquisition module is used for acquiring at least one coordinate point on which the virtual character can stand from the game map; obtaining an image to be compared corresponding to the standable coordinate point, wherein the image to be compared is used for recording a game picture when the virtual character is positioned at the standable coordinate point; obtaining a game picture when the virtual character is positioned at a non-shielding position in the game scene as a reference picture;
A determining module, configured to determine whether the position of the virtual character at the standable coordinate point is blocked based on the image to be compared and the reference map;
wherein the determining module is configured to determine whether the position of the virtual character at the standable coordinate point is blocked based on the image to be compared and the reference map by performing the steps of: acquiring a first virtual frame surrounding the virtual role in the reference graph; determining the pixel duty ratio of the virtual character in the first virtual frame in the reference diagram as a reference duty ratio; acquiring a second virtual frame surrounding the virtual character in the image to be compared, wherein the second virtual frame and the first virtual frame have the same size; determining the pixel duty ratio of the virtual character in the second virtual frame in the image to be compared as a target duty ratio; and determining whether the position of the virtual character at the standable coordinate point is blocked or not according to the target duty ratio and the reference duty ratio.
12. A non-volatile storage medium, characterized in that a computer program is stored in the storage medium, wherein the computer program is arranged to perform the method of detecting an occlusion position as claimed in any of the claims 1 to 10 at run-time.
13. A processor, characterized in that the processor is arranged to run a program, wherein the program is arranged to execute the method of detecting an occlusion position as claimed in any of the claims 1 to 10 at run time.
14. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of detecting an occlusion position as claimed in any of the claims 1 to 10.
CN202010929105.0A 2020-09-07 2020-09-07 Detection method and device for shielding position, processor and electronic device Active CN111957040B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010929105.0A CN111957040B (en) 2020-09-07 2020-09-07 Detection method and device for shielding position, processor and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010929105.0A CN111957040B (en) 2020-09-07 2020-09-07 Detection method and device for shielding position, processor and electronic device

Publications (2)

Publication Number Publication Date
CN111957040A CN111957040A (en) 2020-11-20
CN111957040B true CN111957040B (en) 2024-02-23

Family

ID=73392446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010929105.0A Active CN111957040B (en) 2020-09-07 2020-09-07 Detection method and device for shielding position, processor and electronic device

Country Status (1)

Country Link
CN (1) CN111957040B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112090084B (en) * 2020-11-23 2021-02-09 成都完美时空网络技术有限公司 Object rendering method and device, storage medium and electronic equipment
CN112843730A (en) * 2020-12-31 2021-05-28 上海米哈游天命科技有限公司 Shooting method, device, equipment and storage medium
CN112807684A (en) * 2020-12-31 2021-05-18 上海米哈游天命科技有限公司 Obstruction information acquisition method, device, equipment and storage medium
CN113177996B (en) * 2021-04-07 2023-03-24 网易(杭州)网络有限公司 Through-mold analysis method and device for virtual model, processor and electronic device
CN113018858B (en) * 2021-04-12 2023-07-25 深圳市腾讯计算机系统有限公司 Virtual character detection method, computer equipment and readable storage medium
CN113101637B (en) * 2021-04-19 2024-02-02 网易(杭州)网络有限公司 Method, device, equipment and storage medium for recording scenes in game
CN113706608B (en) * 2021-08-20 2023-11-28 云往(上海)智能科技有限公司 Pose detection device and method of target object in preset area and electronic equipment
CN114225416A (en) * 2021-12-16 2022-03-25 网易(杭州)网络有限公司 Game control method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103366374A (en) * 2013-07-12 2013-10-23 重庆大学 Fire fighting access obstacle detection method based on image matching
CN104759097A (en) * 2015-04-13 2015-07-08 四川天上友嘉网络科技有限公司 Automatic way-finding method in game
CN109126134A (en) * 2018-09-29 2019-01-04 北京金山安全软件有限公司 Game role moving method and device and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6925848B2 (en) * 2017-04-13 2021-08-25 アルパイン株式会社 Display control device, display control method and camera monitoring system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103366374A (en) * 2013-07-12 2013-10-23 重庆大学 Fire fighting access obstacle detection method based on image matching
CN104759097A (en) * 2015-04-13 2015-07-08 四川天上友嘉网络科技有限公司 Automatic way-finding method in game
CN109126134A (en) * 2018-09-29 2019-01-04 北京金山安全软件有限公司 Game role moving method and device and electronic equipment

Also Published As

Publication number Publication date
CN111957040A (en) 2020-11-20

Similar Documents

Publication Publication Date Title
CN111957040B (en) Detection method and device for shielding position, processor and electronic device
US11270497B2 (en) Object loading method and apparatus, storage medium, and electronic device
EP3951721A1 (en) Method and apparatus for determining occluded area of virtual object, and terminal device
US20220249949A1 (en) Method and apparatus for displaying virtual scene, device, and storage medium
CN108389245B (en) Animation scene rendering method and device, electronic equipment and readable storage medium
CN108596955B (en) Image detection method, image detection device and mobile terminal
KR102433857B1 (en) Device and method for creating dynamic virtual content in mixed reality
US11043027B2 (en) Three-dimensional graphics image processing
CN110069125B (en) Virtual object control method and device
CN111475089B (en) Task display method, device, terminal and storage medium
CN111986229A (en) Video target detection method, device and computer system
CN113975812A (en) Game image processing method, device, equipment and storage medium
CN114063858A (en) Image processing method, image processing device, electronic equipment and storage medium
CN110858409A (en) Animation generation method and device
CN110719415B (en) Video image processing method and device, electronic equipment and computer readable medium
US20230206573A1 (en) Method of learning a target object by detecting an edge from a digital model of the target object and setting sample points, and method of augmenting a virtual model on a real object implementing the target object using the learning method
CN114742970A (en) Processing method of virtual three-dimensional model, nonvolatile storage medium and electronic device
CN113117334B (en) Method and related device for determining visible area of target point
CN112348965A (en) Imaging method, imaging device, electronic equipment and readable storage medium
CN115423827B (en) Image processing method, image processing device, electronic equipment and storage medium
CN110941974B (en) Control method and device of virtual object
CN116310241B (en) Virtual character position control method, device, electronic equipment and storage medium
US11875445B2 (en) Seamless image processing of a tiled image region
CN111258423B (en) Component display method and device, storage medium and augmented reality display equipment
US20230063800A1 (en) Drawing revenue sharing server, drawing revenue sharing method, and computer program

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
GR01 Patent grant
GR01 Patent grant