Navigation data processing method and device, storage medium and electronic equipment
Patent Information
- Application Number
- CN202010690389.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-17
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2040-07-17
AI Technical Summary
[0006]本公开的目的在于提供一种导航数据的处理方法、导航数据的处理装置、计算机可读存储介质及电子设备,进而至少在一定程度上克服由于相关技术的限制而导致的切割准确率低和人力成本高的问题
[0018]由上述技术方案可知,本公开示例性实施例中的导航数据的处理方法、导航数据的处理装置、计算机存储介质及电子设备至少具备以下优点和积极效果:
Smart Images

Figure CN111659123B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a method and apparatus for processing navigation data, a computer-readable storage medium, and an electronic device. Background Technology
[0002] In games, it's often necessary to divide the game scene into different areas to achieve different functions. For example, upon entering a certain room area, the alert level of non-player characters (NPCs) will increase. This basic function requires high efficiency and flexible configuration. Circular and rectangular triggers are commonly used to achieve this, as this approach is relatively simple, easy for developers and designers to understand, and therefore widely adopted.
[0003] However, because the shapes of the divisions are fixed, seamless cutting of the entire game map is not possible, nor can it be automated. This is especially time-consuming and error-prone when dividing large maps.
[0004] Therefore, there is an urgent need in the field to develop a new method and apparatus for processing navigation data.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] The purpose of this disclosure is to provide a method for processing navigation data, a device for processing navigation data, a computer-readable storage medium, and an electronic device, thereby overcoming, to at least some extent, the problems of low cutting accuracy and high labor costs caused by limitations in related technologies.
[0007] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.
[0008] According to a first aspect of the present invention, a method for processing navigation data is provided, the method comprising: acquiring an initial navigation grid of a game scene model, and acquiring target location information of a click operation performed on the initial navigation grid; Based on the target location information, determine the navigation grid to be edited in the initial navigation grid, and receive editing function instructions for the navigation grid to be edited; The target navigation grid is obtained by editing the navigation grid to be edited according to the editing function instructions, and the target navigation grid of the game scene model is saved.
[0009] In an exemplary embodiment of the present invention, obtaining the target location information of the click operation acting on the initial navigation grid includes: Obtain the grid data of the initial navigation grid, and extract the target grid data from the grid data; The target grid data is transformed to obtain data to be processed, so as to determine the target location information of the click operation applied to the initial navigation grid based on the data to be processed.
[0010] In an exemplary embodiment of the present invention, determining the target location information of the click operation acting on the initial navigation grid based on the data to be processed includes: Obtain the position information of the click operation applied to the initial navigation grid, and perform ray detection on the initial navigation grid based on the position information; The target location information of the click operation is determined based on the ray detection results and the data to be processed.
[0011] In an exemplary embodiment of the present invention, determining the navigation grid to be edited in the initial navigation grid based on the target location information includes: Based on the target location information, determine whether the click operation is applied within the initial navigation grid; If the click operation is performed inside the initial navigation grid, the initial navigation grid is determined to be a navigation grid to be edited.
[0012] In one exemplary embodiment of the present invention, the method further includes: The game scene model is divided into multiple partition blocks; The relationship between the multiple partitioned blocks is determined using a cross-validation algorithm to generate a quadtree; wherein the target location information is stored in the quadtree.
[0013] In one exemplary embodiment of the present invention, the editing function instructions include: a split function instruction, an add function instruction, a modify function instruction, and a remove function instruction.
[0014] In an exemplary embodiment of the present invention, the target navigation grid for storing the game scene model includes: The target navigation mesh of the game scene model is saved according to the target format; wherein, the target format includes .py format.
[0015] According to a second aspect of the present invention, a navigation data processing apparatus is provided, the apparatus comprising: an information acquisition module configured to acquire an initial navigation grid of a game scene model and acquire target location information of a click operation performed on the initial navigation grid; The instruction receiving module is configured to determine the navigation grid to be edited in the initial navigation grid based on the target location information, and to receive editing function instructions for the navigation grid to be edited; The mesh editing module is configured to edit the navigation mesh to be edited according to the editing function instructions to obtain the target navigation mesh, so as to save the target navigation mesh of the game scene model.
[0016] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor and a memory; wherein the memory stores computer-readable instructions, which, when executed by the processor, implement the navigation data processing method in any of the above exemplary embodiments.
[0017] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the navigation data processing method in any of the above exemplary embodiments.
[0018] As can be seen from the above technical solutions, the navigation data processing method, navigation data processing apparatus, computer storage medium, and electronic device in the exemplary embodiments of this disclosure have at least the following advantages and positive effects: In the methods and apparatus provided in the exemplary embodiments of this disclosure, the navigation mesh to be edited in the game scene model is edited through editing function instructions. On the one hand, the navigation mesh to be edited can be any polygon, solving the problem of imperfect cutting that cannot be achieved or cannot be achieved by splicing, and enabling more and more precise functions; on the other hand, the editing method is more automated, which facilitates unified modification and hot update, and reduces the manpower and time costs invested.
[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0021] Figure 1 This schematic diagram illustrates a flowchart of a navigation data processing method according to an exemplary embodiment of the present disclosure; Figure 2 This schematic diagram illustrates a flowchart of a method for obtaining target location information in an exemplary embodiment of this disclosure; Figure 3 This schematic diagram illustrates a process flow diagram of a method for further obtaining target location information in an exemplary embodiment of this disclosure; Figure 4 The illustration schematically shows a flowchart of a method for determining a navigation mesh to be edited in an exemplary embodiment of this disclosure; Figure 5 This schematic diagram illustrates a flowchart of a method for storing target location information in a quadtree according to an exemplary embodiment of the present disclosure; Figure 6 This schematic diagram illustrates an interface for obtaining an initial navigation mesh in an application scenario according to an exemplary embodiment of this disclosure. Figure 7 This schematically illustrates an interface diagram of the initial navigation grid in the lower right scene of an exemplary embodiment of this disclosure; Figure 8 This schematic diagram illustrates the interface of editing function instructions in an application scenario of an exemplary embodiment of the present disclosure; Figure 9 This schematic diagram illustrates an interface in an exemplary embodiment of the present disclosure where two regions are selected simultaneously. Figure 10 This schematic diagram illustrates the interface of the segmentation function instruction in an application scenario of an exemplary embodiment of this disclosure; Figure 11 This schematic diagram illustrates the interface for adding function instructions in an application scenario of an exemplary embodiment of this disclosure; Figure 12 This schematic diagram illustrates the interface for modifying function instructions in an application scenario of an exemplary embodiment of this disclosure; Figure 13 This schematic diagram illustrates the structure of a navigation data processing apparatus according to an exemplary embodiment of the present disclosure; Figure 14 This schematically illustrates an electronic device for implementing a method for processing navigation data according to an exemplary embodiment of the present disclosure; Figure 15 The illustration schematically shows a computer-readable storage medium for implementing a method for processing navigation data according to an exemplary embodiment of the present disclosure. Detailed Implementation
[0022] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of these specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0023] The terms “a,” “an,” “the,” and “the” are used in this specification to indicate the presence of one or more elements / components / etc.; the terms “including” and “having” are used to indicate an open-ended inclusion and to mean that there may be other elements / components / etc. in addition to the listed elements / components / etc.; the terms “first” and “second” are used only as markings and are not a limitation on the number of objects.
[0024] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities.
[0025] To address the problems existing in related technologies, this disclosure proposes a method for processing navigation data. Figure 1 A flowchart illustrating the navigation data processing method is shown, such as... Figure 1 As shown, the method for processing navigation data includes at least the following steps: Step S110. Obtain the initial navigation grid of the game scene model, and obtain the target position information of the click operation applied to the initial navigation grid.
[0026] Step S120. Determine the navigation grid to be edited in the initial navigation grid based on the target location information, and receive the editing function instructions for the navigation grid to be edited.
[0027] Step S130. Edit the navigation mesh to be edited according to the editing function instructions to obtain the target navigation mesh, and save the target navigation mesh of the game scene model.
[0028] In the exemplary embodiments disclosed herein, the navigation mesh to be edited in the game scene model is edited through editing function commands. On the one hand, the navigation mesh to be edited can be any polygon, solving the problem of imperfect cutting that cannot be achieved or cannot be achieved by splicing, and enabling more and more precise functions; on the other hand, the editing method is more automated, facilitating unified modification and hot updates, and reducing the manpower and time costs invested.
[0029] The following section provides a detailed explanation of each step in the navigation data processing method.
[0030] In step S110, the initial navigation grid of the game scene model is obtained, and the target position information of the click operation applied to the initial navigation grid is obtained.
[0031] In the exemplary embodiments disclosed herein, the game scene model can be an object designed and manufactured to scale within the game scene, or a scene animation architectural model created by a designer for the game. The initial navigation mesh of the game scene model is a triangular or polygonal mesh marked with walkable areas, created for automatic pathfinding of online game characters.
[0032] Specifically, it can be implemented based on the open-source project Recast, which generates an initial navigation mesh (NavMesh) from a mesh through steps such as voxelization, region generation, outline generation, polygon mesh generation, and height detail generation.
[0033] Once the initial navigation grid is obtained, the user can perform a click operation on the initial navigation grid to process the initial navigation grid corresponding to the click operation. Therefore, the target location information of the click operation can be obtained. This target location information can be coordinate information within the initial navigation grid, or other information representing the location; this exemplary embodiment does not impose any special limitations on this.
[0034] In an optional embodiment, Figure 2 A flowchart illustrating a method for obtaining target location information is shown, such as... Figure 2 As shown, the method includes at least the following steps: in step S210, the grid data of the initial navigation grid is obtained, and the target grid data is extracted from the grid data.
[0035] Since the data for an initial navigation mesh is stored within a structure, this structure can be retrieved as the corresponding mesh data. Furthermore, to reduce workload, useful information can be extracted from the mesh data to serve as the target mesh data.
[0036] In step S220, the target grid data is transformed to obtain data to be processed, so as to determine the target position information of the click operation applied to the initial navigation grid based on the data to be processed.
[0037] After obtaining the target mesh data, the target mesh data can be converted into a new format and stored in a new structure, which is the data to be processed.
[0038] In an optional embodiment, Figure 3 A flowchart illustrating the method for further acquiring target location information is shown, such as... Figure 3 As shown, the method includes at least the following steps: in step S310, the position information of the click operation applied to the initial navigation grid is obtained, and ray detection is performed on the initial navigation grid according to the position information.
[0039] This location information represents the direct impact of the click operation on the game scene model. To make the target location information more closely match the ground, a ray can be used to detect the corresponding target point on the ground from the point of impact of the click operation, that is, to reduce the coordinates of the point of impact of the click operation to the coordinates of the point where it intersects with the ground.
[0040] In step S320, the target location information of the click operation is determined based on the ray detection results and the data to be processed.
[0041] Once the ray detection results are obtained, i.e., the coordinates of the target point on the ground and the data to be processed after transformation, the target location information of the click operation can be determined. At this point, the target location information represents the target point on the ground and is expressed in the form of data to be processed.
[0042] In this exemplary embodiment, the target location information is determined by transformation processing and ray detection. The determination method is accurate and easy to implement, and makes the entire game scene model fit the ground better, resulting in a better effect.
[0043] In step S120, the navigation grid to be edited is determined in the initial navigation grid according to the target location information, and the editing function instruction for the navigation grid to be edited is received.
[0044] In an exemplary embodiment of this disclosure, the navigation grid to be edited, for determining the action of a click operation, can be determined based on the target location information of the click operation.
[0045] In an optional embodiment, Figure 4 A flowchart illustrating the method for determining the navigation mesh to be edited is shown, such as... Figure 4 As shown, the method includes at least the following steps: In step S410, it is determined whether the click operation is applied inside the initial navigation grid based on the target location information.
[0046] Specifically, the PNPoly algorithm can be used to determine whether a click operation occurs within the initial navigation mesh of the scene image. The PNPoly algorithm draws a horizontal ray to the right from the point to be tested, represented by the target location information of the click operation, and calculates the number of intersections with the polygon representing the initial navigation mesh. The PNPoly algorithm is applicable to both convex and concave polygons. Other algorithms can also be used to determine this, and this exemplary embodiment does not impose any special limitations on them.
[0047] In step S420, if the click operation is applied inside the initial navigation grid, the initial navigation grid is determined to be the navigation grid to be edited.
[0048] For example, when a horizontal ray is drawn from the point to be tested to the right, the number of points intersecting with the initial navigation grid is 5. Therefore, it is determined that the click operation is applied inside the initial navigation grid, and the initial navigation grid is further identified as the navigation grid to be edited.
[0049] A horizontal ray drawn from the point to be tested to the right will intersect with the initial navigation grid at 4 points. Therefore, it is determined that the click operation is applied outside the initial navigation grid, and the initial navigation grid is not the navigation grid to be edited.
[0050] In this exemplary embodiment, the target location information of the click operation can be used to determine the navigation mesh to be edited in the game scene model. The determination method is simple and accurate, and can greatly simplify the computation of the algorithm.
[0051] Furthermore, to reduce computational load and improve the efficiency of determining the navigation mesh to be edited, the positional information in the game scene model can be stored in a quadtree.
[0052] In an optional embodiment, Figure 5 A flowchart illustrating a method for storing target location information in a quadtree is shown, such as... Figure 5 As shown, the method includes at least the following steps: In step S510, the game scene model is divided to generate multiple partition blocks.
[0053] According to the spatial coordinate system of the game scene model, the bounding box of the corresponding game scene model can be divided into four equal parts from the center point. Each part can be a three-dimensional space. In addition, it can also be a two-dimensional space depending on the division. The coordinate range of each block can be determined according to the spatial coordinate system. In addition, the bounding box of the game scene model can be divided according to preset length and width thresholds to obtain multiple blocks of equal length, multiple blocks of equal width, or blocks of equal length and width. This exemplary embodiment does not specifically limit the specific division method. Further, the four subspaces generated in the first step are traversed recursively and divided into four equal parts again until the recursion count reaches a specified value, generating the final multiple divided blocks.
[0054] In step S520, the relationship between multiple partitioned blocks is determined to generate a quadtree. The quadtree stores the target position information. To generate a quadtree from the multiple partitioned blocks, a cross-validation algorithm can be used to determine the relationship between the different partitioned blocks. In 3D game development, the commonly used collision detection algorithm is the Axially Aligned Bounding Box (AABB) method. Its basic idea is to completely enclose the 3D object with a cube or sphere, and then calculate whether a collision occurs based on the distance, position, and other relevant information of the bounding box. Therefore, the AABB cross-validation algorithm can determine whether two partitioned blocks collide, i.e., whether they intersect. When two partitioned blocks intersect, it can be determined that these two blocks belong to the same branch on the quadtree, thus generating the quadtree.
[0055] At this point, the quadtree can be a quadtree that stores the spatial structure of the game scene model. A quadtree is a tree-like data structure where each node has four sub-blocks, representing the current space being divided into four subspaces. This process continues recursively until a certain depth is reached or a certain requirement is met, at which point the division stops. Specifically, the root node of the quadtree can determine the size of the entire game scene model, such as the coordinates of the endpoints of the game scene model; the non-leaf nodes of the quadtree can include the endpoint coordinates of the blocks; and the leaf nodes of the quadtree can store the list of regions contained in the subspaces of the blocks, the recursion depth, the current subspace index, the list of subspaces in the current space, the position information of polygons, etc. This exemplary embodiment does not impose any special limitations on these aspects.
[0056] In this exemplary embodiment, the target position information in the game scene model is linearized using a quadtree, which facilitates querying and searching and enables the position of the navigation mesh to be edited to be determined more quickly.
[0057] After determining the navigation grid to be edited based on the user's click action, the user can send an editing command for the navigation grid.
[0058] In an optional embodiment, the editing function instructions include splitting function instructions, adding function instructions, modifying function instructions, and removing function instructions.
[0059] Among them, the split function command can be used to split the navigation grid to be edited and generate multiple navigation grids; the add function command can be used to add a navigation grid related to the navigation grid to be edited; the modify function command can be used to edit the navigation grid to be edited; and the remove function command can be used to remove the navigation grid to be edited.
[0060] In step S130, the navigation mesh to be edited is edited according to the editing function instructions to obtain the target navigation mesh, so as to save the target navigation mesh of the game scene model.
[0061] In an exemplary embodiment of this disclosure, after receiving an edit function instruction, the navigation grid to be edited can be edited accordingly, and the navigation grid generated after editing can be saved as the target navigation grid.
[0062] In an optional embodiment, the target navigation mesh of the game scene model is saved according to a target format. This target format includes .py format.
[0063] The .py format is an abbreviation for Python saved files. Python is a cross-platform computer programming language, a high-level scripting language that combines interpreted, compiled, interactive, and object-oriented features. Saving the target navigation grid as a .py file makes it easier for developers to process and edit the target navigation grid later, allowing for more precise implementation of additional functions.
[0064] The following section provides a detailed description of the navigation data processing method in this embodiment, using an application scenario as an example.
[0065] Figure 6 This diagram illustrates the interface for obtaining the initial navigation grid in an application scenario, such as... Figure 6 As shown, select the Solo Mesh control 611 from the Sample control 610 in this interface, and further, select the required game scene model file from the Input Mesh control 620. The model file format is .obj. In addition, the build control can be used to generate initial mesh data, and the Tools control can be used to select the Create Areas control for editing the initial navigation mesh.
[0066] The original game scene model is a .obj model file, and the generated initial navigation mesh can be a .navmesh file.
[0067] Figure 7 A schematic diagram of the initial navigation grid in the game scene is shown, such as... Figure 7 As shown, each wireframe represents a different initial navigation grid.
[0068] Files in .navmesh format can be read from a linked list and stored in a vector array, with a custom data structure AreaData. Here, v_areas stores the nodes of all initial navigation meshes, nareas is the number of all initial navigation meshes, color is the color library used to display custom colors when drawing areas, and b_min and b_max are the minimum and maximum coordinates in the entire game scene model space.
[0069] Furthermore, by traversing the data linked list of navmesh and converting the data of each node into a custom data structure, the converted data can be edited subsequently.
[0070] Figure 8 The diagram illustrates the interface for editing function commands in an application scenario, such as... Figure 8 As shown, the load area file control 810 can load saved data files, and the select area control 821 or the multi-select area control 822 can select one or more initial navigation grids. In addition, Figure 8 It also includes controls for splitting function instructions, namely the split area control 830; controls for adding function instructions, namely the add new area control 840; controls for modifying function instructions, namely the edit area control 850; and controls for removing function instructions, namely the remove area control 860.
[0071] Figure 9 This shows a schematic diagram of an interface where two areas can be selected simultaneously, such as... Figure 9 As shown, the PNPoly algorithm can be used to find two initial navigation grids as navigation grids to be edited.
[0072] The split area control 830 is a control for splitting function commands.
[0073] Figure 10 The diagram illustrates the interface for the segmentation function command in an application scenario, such as... Figure 10 As shown, find the intersection of the perpendicular line of the edge closest to the target location information of the click operation, and divide a navigation grid to be edited through these two points.
[0074] The Add New Area control 840 is a control for adding function commands.
[0075] Figure 11 The diagram illustrates the interface for adding functional commands in an application scenario, such as... Figure 11 As shown, when the cursor is close to a vertex of the navigation mesh to be edited, it automatically snaps to the vertex coordinates. The snapping function means finding the distance between the target location of the click operation and the navigation mesh to be edited; if it's within a preset distance, it's considered a click on a point. If no point is clicked, it determines the target location by finding the intersection of the perpendicular line to the edge of the navigation mesh and calculating the shortest distance; if neither a point nor an edge is clicked, it's considered the mouse click location. This can be used for static areas such as grass.
[0076] The edit area control 850 is a control for modifying function commands.
[0077] Figure 12 The diagram illustrates an interface for modifying function commands in an application scenario, such as... Figure 12 As shown, first click on a point in the navigation grid to be edited, which is the snap-in function above, and then click on another point to move the original point on the navigation to be edited to the mouse click position, thus changing the shape of the original navigation grid to be edited.
[0078] The remove area control 860 is a control for removing function commands.
[0079] The Remove Area control 860 can remove custom-added areas. Areas generated based on NavMesh will not be removed, but can only be segmented to prevent boundaries from appearing.
[0080] After editing the navigation grid to be edited according to various editing function commands to obtain the target navigation grid, it can be used... Figure 8 The "Save All to File" control (870) saves the target navigation grid of the game scene. For example, it can be saved as a .py file.
[0081] In this application scenario, the navigation data processing method involves editing the navigation mesh in the game scene model using editing function commands. On one hand, the navigation mesh can be any polygon, solving the problem of imperfect cutting that cannot be achieved or cannot be achieved by splicing, and enabling more precise functions. On the other hand, the editing method is more automated, facilitating unified modification and hot updates, and reducing the investment of manpower and time costs.
[0082] Furthermore, in an exemplary embodiment of this disclosure, a navigation data processing apparatus is also provided. Figure 13A schematic diagram of the navigation data processing device is shown, such as... Figure 13 As shown, the navigation data processing device 1300 may include: an information acquisition module 1310, an instruction receiving module 1320, and a grid editing module 1330. Wherein: The information acquisition module 1310 is configured to acquire the initial navigation grid of the game scene model and acquire the target position information of the click operation applied to the initial navigation grid; the instruction receiving module 1320 is configured to determine the navigation grid to be edited in the initial navigation grid according to the target position information and receive the editing function instruction for the navigation grid to be edited; the grid editing module 1330 is configured to edit the navigation grid to be edited according to the editing function instruction to obtain the target navigation grid, so as to save the target navigation grid of the game scene model.
[0083] The specific details of the navigation data processing device 1300 have been described in detail in the corresponding navigation data processing method, so they will not be repeated here.
[0084] It should be noted that although several modules or units of the navigation data processing device 1300 have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0085] Furthermore, in an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.
[0086] The following reference Figure 14 To describe an electronic device 1400 according to such an embodiment of the present invention. Figure 14 The electronic device 1400 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0087] like Figure 14 As shown, the electronic device 1400 is manifested in the form of a general-purpose computing device. The components of the electronic device 1400 may include, but are not limited to: at least one processing unit 1410, at least one storage unit 1420, a bus 1430 connecting different system components (including storage unit 1420 and processing unit 1410), and a display unit 1440.
[0088] The storage unit stores program code that can be executed by the processing unit 1410, causing the processing unit 1410 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present invention.
[0089] Storage unit 1420 may include readable media in the form of volatile storage units, such as random access memory (RAM) 1421 and / or cache memory 1422, and may further include read-only memory (ROM) 1423.
[0090] Storage unit 1420 may also include a program / utility 1424 having a set (at least one) of program modules 1425, such program modules 1425 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0091] Bus 1430 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0092] Electronic device 1400 can also communicate with one or more external devices 1600 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with electronic device 1400, and / or any device that enables electronic device 1400 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1450. Furthermore, electronic device 1400 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1460. As shown, network adapter 1460 communicates with other modules of electronic device 1400 via bus 1430. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 1400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0093] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0094] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the invention described in the "Exemplary Methods" section above.
[0095] refer to Figure 15 As shown, a program product 1500 for implementing the above-described method according to an embodiment of the present invention is described. It may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0096] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0097] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0098] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0099] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0100] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
Claims
1. A method for processing navigation data, characterized in that, The method includes: Obtain the initial navigation grid of the game scene model, and obtain the target position information of the click operation applied to the initial navigation grid; wherein, the initial navigation grid refers to a triangular or polygonal grid marked with walkable areas, which is created for automatic pathfinding of online game characters; Based on the target location information, determine whether the click operation is applied inside the initial navigation grid. If the click operation is applied inside the initial navigation grid, determine that the initial navigation grid is a navigation grid to be edited, and receive the editing function instruction for the navigation grid to be edited. The target navigation grid is obtained by editing the navigation grid to be edited according to the editing function instructions, and the target navigation grid of the game scene model is saved.
2. The method for processing navigation data according to claim 1, characterized in that, The step of obtaining the target location information of the click operation applied to the initial navigation grid includes: Obtain the grid data of the initial navigation grid, and extract the target grid data from the grid data; The target grid data is transformed to obtain data to be processed, so as to determine the target location information of the click operation applied to the initial navigation grid based on the data to be processed.
3. The method for processing navigation data according to claim 2, characterized in that, The step of determining the target location information of the click operation applied to the initial navigation grid based on the data to be processed includes: Obtain the position information of the click operation applied to the initial navigation grid, and perform ray detection on the initial navigation grid based on the position information; The target location information of the click operation is determined based on the ray detection results and the data to be processed.
4. The method for processing navigation data according to claim 1, characterized in that, The method further includes: The game scene model is divided into multiple partition blocks; The relationship between the multiple partitioned blocks is determined using a cross-validation algorithm to generate a quadtree; wherein the target location information is stored in the quadtree.
5. The method for processing navigation data according to claim 1, characterized in that, The editing function commands include: split function commands, add function commands, modify function commands, and remove function commands.
6. The method for processing navigation data according to claim 1, characterized in that, The target navigation grid for storing the game scene model includes: The target navigation mesh of the game scene model is saved according to the target format; wherein, the target format includes .py format.
7. A navigation data processing device, characterized in that, include: The information acquisition module is configured to acquire the initial navigation grid of the game scene model and acquire the target location information of the click operation applied to the initial navigation grid; wherein, the initial navigation grid refers to a triangular or polygonal grid marked with walkable areas for automatic pathfinding of online game characters. The instruction receiving module is configured to determine whether the click operation is applied inside the initial navigation grid based on the target location information; if the click operation is applied inside the initial navigation grid, the initial navigation grid is determined to be a navigation grid to be edited, and an editing function instruction for the navigation grid to be edited is received. The mesh editing module is configured to edit the navigation mesh to be edited according to the editing function instructions to obtain the target navigation mesh, so as to save the target navigation mesh of the game scene model.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the navigation data processing method according to any one of claims 1-6.
9. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; The processor is configured to perform the navigation data processing method according to any one of claims 1-6 by executing the executable instructions.
Citation Information
Patent Citations
Navigation route processing method and device
CN106871921A