Virtual road network generation method and apparatus, storage medium and electronic equipment

By setting the main road path and generating branch paths through rays in the graphical user interface of the terminal device, the problem of low efficiency in manually constructing game scene routes is solved, enabling the rapid generation of virtual road networks and improving game development efficiency.

CN115888081BActive Publication Date: 2026-05-26NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2022-11-07
Publication Date
2026-05-26

Smart Images

  • Figure CN115888081B_ABST
    Figure CN115888081B_ABST
Patent Text Reader

Abstract

This disclosure relates to the field of computer technology, specifically to a virtual road network generation method and apparatus, a computer-readable storage medium, and an electronic device. The method includes: responding to a main path input operation, setting a main path for a virtual scene region in a virtual region top view; emitting rays from virtual entrances into the virtual region top view based on the orientation of virtual entrances to set branch paths for the virtual scene region; and generating a virtual road network for the virtual scene region based on the main path, branch paths, and virtual objects. The technical solution of this disclosure can solve the problem of low efficiency in manually modeling scene routes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more specifically, to a method for generating a virtual road network, a device for generating a virtual road network, a computer-readable storage medium, and an electronic device. Background Technology

[0002] With the development of terminal devices and the gaming industry, a large number of games of different themes have emerged to meet the needs of players. In the development of some games, elements such as scene routes and other elements need to be constructed.

[0003] However, as the game's development progresses faster, the game map becomes larger and larger, and the number of scene routes that need to be built also increases. Manually modeling scene routes consumes a lot of manpower and resources and has a long production cycle, resulting in low game development efficiency.

[0004] 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

[0005] The purpose of this disclosure is to provide a method and apparatus for generating virtual road networks, a computer-readable storage medium and an electronic device, which can solve the problem of low efficiency in manually modeling scene routes.

[0006] 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.

[0007] According to a first aspect of this disclosure, a method for generating a virtual road network is provided, characterized in that a virtual top view of a virtual scene area is displayed through a graphical user interface of a terminal device, the virtual scene area including at least virtual entrances and virtual objects, the method comprising: in response to a main path input operation, setting a main road path of the virtual scene area in the virtual top view; emitting rays from virtual entrances into the virtual top view according to the orientation of virtual entrances to set branch paths of the virtual scene area; and generating a virtual road network of the virtual scene area based on the main road path, branch paths, and virtual objects.

[0008] According to a second aspect of this disclosure, a virtual road network generation device is provided, characterized in that a virtual top view of a virtual scene area is displayed through a graphical user interface of a terminal device. The virtual scene area includes at least virtual entrances and virtual objects. The device includes: an input operation response module, used to set the main road path of the virtual scene area in the virtual top view in response to a main path input operation; a branch virtual road network generation module, used to emit rays from virtual entrances into the virtual top view of the virtual scene area according to the orientation of virtual entrances, so as to set the branch road paths of the virtual scene area; and a virtual road network generation module, used to generate a virtual road network of the virtual scene area based on the main road path, the branch road path, and the virtual objects.

[0009] According to a third aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the virtual road network generation method of the first aspect of the above embodiments.

[0010] According to a fourth aspect of this disclosure, an electronic device is provided, comprising:

[0011] One or more processors; and

[0012] A memory is used to store one or more programs that, when executed by one or more processors, cause the one or more processors to implement the virtual road network generation method as described in the first aspect of the above embodiments.

[0013] The technical solutions provided in this disclosure may have the following beneficial effects:

[0014] In one embodiment of this disclosure, a virtual road network generation method is provided. In response to a main path input operation, a main road path for a virtual scene area is set in a virtual area top view. Based on the orientation of a virtual entrance, rays are emitted from the virtual entrance into the virtual area top view to set branch road paths for the virtual scene area. A virtual road network for the virtual scene area is then generated based on the main road path, branch paths, and virtual objects. On one hand, a virtual road network can be automatically generated based on virtual objects and virtual scene areas in the scene to meet the needs of the game scene; on the other hand, it requires no manpower or resources, has a short route creation cycle, and thus improves game development efficiency.

[0015] 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

[0016] 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. In the drawings:

[0017] Figure 1 The schematic diagram illustrates an exemplary system architecture of the virtual road network generation method in an exemplary embodiment of the present disclosure;

[0018] Figure 2 A flowchart illustrating a virtual road network generation method in an exemplary embodiment of this disclosure is shown schematically.

[0019] Figure 3 This schematically illustrates a top view of a virtual area displayed through a graphical user interface of a terminal device in an exemplary embodiment of the present disclosure. The virtual scene area includes at least a virtual entrance and virtual objects.

[0020] Figure 4 This schematically illustrates a diagram showing the main path of a virtual scene region set in a top view of a virtual region in an exemplary embodiment of this disclosure;

[0021] Figure 5 This schematically illustrates a diagram of obtaining a main path by pruning the first sub-path in a candidate main path in an exemplary embodiment of this disclosure;

[0022] Figure 6 This schematically illustrates an exemplary embodiment of the present disclosure in which a target rotation angle is determined among multiple rotation angles, and a reference ray corresponding to the target rotation angle is determined as a target reference ray to adjust the path angle between second sub-paths;

[0023] Figure 7 This schematic diagram illustrates the adjustment of path angles between multiple second sub-paths in a first path according to an exemplary embodiment of the present disclosure.

[0024] Figure 8 This illustration schematically depicts a virtual road network used to determine a virtual scene region based on a first target sub-road network and a second target sub-road network in an exemplary embodiment of this disclosure.

[0025] Figure 9 This schematic diagram illustrates the composition of a virtual road network generation apparatus according to an exemplary embodiment of the present disclosure;

[0026] Figure 10 The schematic diagram illustrates a structural schematic of a computer system suitable for implementing an electronic device according to exemplary embodiments of the present disclosure. Detailed Implementation

[0027] 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, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., may be employed. In other instances, well-known structures, methods, apparatuses, implementations, materials, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0028] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, or in one or more software-hardened modules, or in different network and / or processor devices and / or microcontroller devices.

[0029] Figure 1 A schematic diagram of an exemplary system architecture for a virtual road network generation method applicable to embodiments of the present disclosure is shown.

[0030] like Figure 1 As shown, system architecture 1000 may include one or more of terminal devices 1001, 1002, and 1003, network 1004, and server 1005. Network 1004 is used as a medium to provide a communication link between terminal devices 1001, 1002, and 1003 and server 1005. Network 1004 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0031] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included. For example, server 1005 could be a server cluster composed of multiple servers.

[0032] Users can use terminal devices 1001, 1002, and 1003 to interact with server 1005 via network 1004 to receive or send messages, etc. Terminal devices 1001, 1002, and 1003 can be various electronic devices with displays, including but not limited to smartphones, tablets, laptops, and desktop computers. Additionally, server 1005 can be a server providing various services.

[0033] In one embodiment, the execution entity of the virtual road network generation method disclosed herein may be a server 1005. The server 1005 may obtain the main path input operation sent by the terminal devices 1001, 1002, and 1003, and set the main road path of the virtual scene area in the virtual area top view. According to the orientation of the virtual entrance, it emits rays from the virtual entrance to the virtual area top view to set the branch road path of the virtual scene area, and generates the virtual road network of the virtual scene area based on the main road path, the branch road path, and the virtual objects.

[0034] In addition, the virtual road network generation method disclosed herein can also be executed through terminal devices 1001, 1002, 1003, etc., to realize the main road path of the virtual scene area in response to the main path input operation, to set the main road path of the virtual scene area in the virtual area top view, to emit rays from the virtual entrance to the virtual area top view according to the orientation of the virtual entrance, to set the branch road path of the virtual scene area, and to generate the virtual road network of the virtual scene area based on the main road path, the branch road path and the virtual object.

[0035] Furthermore, the virtual road network generation method disclosed herein can also be implemented jointly by terminal devices 1001, 1002, and 1003 and server 1005. For example, terminal devices 1001, 1002, and 1003 can respond to a main path input operation, set the main road path of the virtual scene area in the virtual area top view, and send the set main road path to server 1005. This allows server 1005 to emit rays from the virtual entrance into the virtual area top view based on the orientation of the virtual entrance, thereby setting the branch road paths of the virtual scene area. Based on the main road path, branch road paths, and virtual objects, a virtual road network of the virtual scene area is generated.

[0036] With the development of terminal devices and the gaming industry, a large number of games of different themes have emerged to meet the needs of players. In the development of some games, elements such as scene routes and other elements need to be constructed.

[0037] However, as the game's development progresses faster, the game map becomes larger and larger, and the number of scene routes that need to be built also increases. Manually modeling scene routes consumes a lot of manpower and resources and has a long production cycle, resulting in low game development efficiency.

[0038] In one example embodiment of this disclosure, in response to a main path input operation, a main path of the virtual scene region can be set in the virtual region top view. Based on the orientation of the virtual entrance, rays are emitted from the virtual entrance into the virtual region top view to set branch paths of the virtual scene region. A virtual road network of the virtual scene region is generated based on the main path, branch paths, and virtual objects. (See reference...) Figure 2 The diagram illustrates a flowchart of a virtual road network generation method in this exemplary embodiment, which may include the following steps:

[0039] Step S210: In response to the main path input operation, set the main path of the virtual scene area in the virtual area top view;

[0040] Step S220: Based on the orientation of the virtual entrance, emit rays from the virtual entrance into the top view of the virtual area to set the branch paths of the virtual scene area;

[0041] Step S230: Generate a virtual road network for the virtual scene area based on the main road path, branch road paths, and virtual objects.

[0042] In one embodiment of this disclosure, a virtual road network generation method is provided. In response to a main path input operation, a main road path for a virtual scene area is set in a virtual area top view. Based on the orientation of a virtual entrance, rays are emitted from the virtual entrance into the virtual area top view to set branch road paths for the virtual scene area. A virtual road network for the virtual scene area is then generated based on the main road path, branch paths, and virtual objects. On one hand, a virtual road network can be automatically generated based on virtual objects and virtual scene areas in the scene to meet the needs of the game scene; on the other hand, it requires no manpower or resources, has a short route creation cycle, and thus improves game development efficiency.

[0043] Below, we will combine Figure 2 The embodiments will provide a more detailed description of steps S210 to S230 of the virtual road network generation method in this exemplary embodiment.

[0044] Step S210: In response to the main path input operation, set the main path of the virtual scene area in the virtual area top view;

[0045] In one example embodiment of this disclosure, a virtual top view of a virtual scene area can be displayed through the graphical user interface of a terminal device. The virtual scene area includes at least a virtual entrance and virtual objects.

[0046] In one example embodiment of this disclosure, a virtual scene is a virtual scene displayed (or provided) by an application running on a terminal or server. Optionally, the virtual scene is a simulation environment of the real world, a semi-simulated / semi-fictional virtual environment, or a purely fictional virtual environment. The virtual scene can be either a two-dimensional or three-dimensional virtual scene, and the virtual environment can be sky, land, ocean, etc., wherein the land includes environmental elements such as deserts and cities. Among them, a virtual scene is a scene in which the user controls virtual objects and completes the game logic. For example, in a sandbox 3D shooting game, a virtual scene is a 3D game world used by players to control virtual objects to fight. Instances of virtual scenes can include at least one element among mountains, plains, rivers, lakes, oceans, deserts, skies, plants, buildings, and vehicles. For example, in a 2D card game, a virtual scene is a scene used to display and release cards or display the virtual objects corresponding to cards. Instances of virtual scenes can include arenas, battlegrounds, or other "field" elements or other elements that can display the card battle status. For 2D or 3D multiplayer online tactical competitive games, a virtual scene is a 2D or 3D terrain scene used by virtual objects to fight. Instances of virtual scenes can include elements such as canyon-style mountains, lines, rivers, classrooms, desks and chairs, and podiums.

[0047] In one example embodiment of this disclosure, the virtual scene region can be a virtual area within a virtual scene. For example, the virtual scene of a game can be divided into multiple virtual scene regions. It should be noted that this disclosure does not impose any special limitations on the specific method of dividing the virtual scene into multiple virtual scene regions.

[0048] In one example embodiment of this disclosure, a virtual scene region corresponds to a virtual region top view. Specifically, the virtual region top view corresponding to the virtual scene region refers to the view obtained by projecting an orthographic projection downwards from above the virtual scene region.

[0049] In one example embodiment of this disclosure, the virtual scene includes virtual objects. Virtual objects can be virtual units set up in the virtual scene or static objects within the virtual scene. Examples include terrain, houses, bridges, and vegetation in a game scene. Static objects are often not directly controlled by the player, but can respond to the interactive behaviors of virtual objects in the scene (e.g., attacking, demolishing, etc.) and exhibit corresponding behaviors. For example, virtual objects can demolish, pick up, drag, and build buildings. Optionally, virtual objects may not respond to interactive behaviors. For example, virtual objects can still be buildings, doors, windows, and vegetation in a game scene, but virtual objects cannot interact with them; for instance, virtual objects cannot destroy or demolish windows.

[0050] In one example embodiment of this disclosure, the virtual scene includes a virtual entrance. Specifically, the virtual entrance may include an entrance to a virtual scene area. For example, in a game, one can only enter the virtual scene area through a virtual entrance; it is not possible to enter the virtual scene area from any other location besides the virtual entrance.

[0051] It should be noted that this disclosure does not impose any specific limit on the number of virtual entry points.

[0052] In one exemplary embodiment of this disclosure, a virtual scene area can be set in a graphical user interface (GUI), and virtual entrances and virtual objects can be set within the virtual scene area. Specifically, a virtual scene area, as well as virtual entrances and virtual objects set within the virtual scene area, can be set through a GUI, wherein the GUI can be a GUI for an application used to develop game clients. For example, the GUI can be the GUI of Unity (a game engine).

[0053] It should be noted that this disclosure does not impose any special restrictions on the specific type of graphical user interface.

[0054] For example, such as Figure 3 As shown, a virtual area top view 303 of the virtual scene area can be displayed through the graphical user interface 301 of the terminal device. The virtual scene area includes at least a virtual entrance 304 and virtual objects 302.

[0055] In one example embodiment of this disclosure, a main path for a virtual scene region can be set in the virtual region top view in response to a main path input operation. Specifically, the main path input operation can be used to set the main path for a virtual scene region in the virtual region top view. For example, the main path input operation can be a swipe touch operation. It should be noted that this disclosure does not impose any special limitations on the specific form of the main path input operation.

[0056] For example, users can set the main path of a virtual scene area in the top view of the virtual area through the main path input operation. This main path meets the user's expectations for the target path, such as the main path passing through virtual objects in the graphical user interface.

[0057] Specifically, the main path in a virtual scene area refers to the path generated based on the main path input operation, which can be used to indicate the backbone of the virtual road network.

[0058] In one example embodiment of this disclosure, the main path may include one path or multiple paths.

[0059] It should be noted that this disclosure does not impose any specific limit on the number of main road routes.

[0060] For example, such as Figure 4 As shown, the main path 401 of the virtual scene area can be set in the virtual area top view.

[0061] The main road path can be one path or multiple paths. It should be noted that this disclosure does not impose a specific limit on the number of main road paths.

[0062] In one example embodiment of this disclosure, candidate main paths for a virtual scene region can be set in the top view of the virtual region, and the main path is obtained by cropping the first sub-path of the candidate main path. The first sub-path is a path in the candidate main path that overlaps with a virtual object in the top view of the virtual region, and / or a path that extends beyond the virtual scene region. Specifically, the main path is a path specific to the virtual scene region; therefore, the first sub-path extending beyond the virtual scene region can be cropped, and when the candidate main path overlaps with a virtual object, the overlapping portion also needs to be cropped.

[0063] It should be noted that this disclosure does not impose any special restrictions on the specific method of obtaining the main path by cutting the first sub-path in the first path.

[0064] like Figure 5 As shown, the first sub-path in the candidate main path 501 (the path in the first sub-path candidate main path that overlaps with the virtual object 503, and the path that exceeds the virtual scene area 502) can be cut off, and the remaining part in the candidate main path can be determined as the main path 504.

[0065] In one exemplary embodiment of this disclosure, before obtaining the main road path by cutting the first sub-path in the candidate main road path, the path angle between the second sub-paths can be adjusted based on multiple intersection points. The candidate main road path includes multiple second sub-paths and multiple intersection points between different second sub-paths. Specifically, the path angle between the second sub-paths refers to the angle between two second sub-paths. For example, the angle between every two second sub-paths can be adjusted to 90 degrees.

[0066] It should be noted that this disclosure does not impose any special limitations on the specific methods for adjusting the path angles between the second sub-paths.

[0067] In one example embodiment of this disclosure, multiple reference rays with preset angles can be emitted from the initial node corresponding to the second sub-path. A target reference ray is determined based on the rotation angle between the second sub-path and the multiple reference rays. The initial node corresponding to the second sub-path is then adjusted onto the target reference ray to adjust the path angle between the second sub-paths. This can include the following steps S310 to S330:

[0068] Step S310: Emit multiple reference rays with preset angles at intervals from the initial node corresponding to the second sub-path;

[0069] Step S320: Determine the target reference ray based on the rotation angle between the second sub-path and multiple reference rays;

[0070] In one exemplary embodiment of this disclosure, multiple reference rays spaced at preset angles can be emitted from the initial node corresponding to the second sub-path, and a target reference ray can be determined based on the rotation angle between the second sub-path and the multiple reference rays. The first path includes multiple nodes, and multiple second sub-paths are determined based on these nodes. For example, four reference rays spaced 90 degrees apart can be emitted from the initial node corresponding to the second sub-path, and the target reference ray can be determined based on the rotation angle between the second sub-path and each reference ray.

[0071] It should be noted that this disclosure does not impose any special limitations on the specific method of determining the target reference ray based on the rotation angle between the second sub-path and multiple reference rays.

[0072] Step S330: Adjust the initial node corresponding to the second sub-path to the target reference ray to adjust the path angle between the second sub-paths.

[0073] In one exemplary embodiment of this disclosure, after determining the target reference ray through the above steps, the initial node corresponding to the second sub-path can be adjusted onto the target reference ray to adjust the path angle of the second sub-path. For example, the second sub-path can be rotated onto the target reference ray with the initial node of the second sub-path as the rotation center to adjust the path angle between the second sub-paths.

[0074] It should be noted that this disclosure does not impose any special restrictions on the specific method of adjusting the initial node corresponding to the second sub-path onto the target reference ray.

[0075] Through the above steps S310 to S330, multiple reference rays with preset angles can be emitted from the initial node corresponding to the second sub-path. The target reference ray is determined according to the rotation angle between the second sub-path and the multiple reference rays. The initial node corresponding to the second sub-path is adjusted to the target reference ray to adjust the path angle between the second sub-paths.

[0076] In one example embodiment of this disclosure, multiple reference rays can be traversed to obtain the rotation angle between each reference ray and the second sub-path. A target rotation angle is determined from the multiple rotation angles, and the reference ray corresponding to the target rotation angle is determined as the target reference ray. This may include the following steps S410 to S420:

[0077] Step S410: Traverse multiple reference rays and obtain the rotation angle between each reference ray and the second sub-path;

[0078] In one exemplary embodiment of this disclosure, after emitting multiple reference rays spaced at preset angles from the initial node corresponding to the second sub-path through the above steps, the multiple reference rays can be traversed to obtain the rotation angle between each reference ray and the second sub-path. Specifically, the rotation angle between the reference ray and the second sub-path can include the minimum angle between the reference ray and the second sub-path, or it can include the angle obtained by rotating the reference ray and the second sub-path according to a preset rotation direction. It should be noted that this disclosure does not specifically limit the specific type of rotation angle between the reference ray and the second sub-path.

[0079] Step S420: Determine the target rotation angle from among multiple rotation angles, and determine the reference ray corresponding to the target rotation angle as the target reference ray;

[0080] In one exemplary embodiment of this disclosure, after determining the rotation angle between each reference ray and the second sub-path through the above steps, a target rotation angle can be determined among multiple rotation angles, and the reference ray corresponding to the target rotation angle can be determined as the target reference ray. The target rotation angle is the smallest rotation angle among the multiple rotation angles. Specifically, the smallest rotation angle among the multiple rotation angles can be determined as the target rotation angle, and the reference ray corresponding to the target rotation angle can be determined as the target reference ray.

[0081] For example, such as Figure 6 As shown, the second sub-path includes an initial node 603 and an end node 602. Multiple reference rays 6011, 6012, 6013, and 6014 spaced 90 degrees apart can be emitted from the initial node 603 corresponding to the second sub-path. The smallest rotation angle among the multiple rotation angles is determined as the target rotation angle 604, and the reference ray 6011 corresponding to the target rotation angle 604 is determined as the target reference ray. Then, the end node 602 of the second sub-path is moved to the target reference ray 6011 so that the second sub-path is attached to the target reference ray, thereby adjusting the path angle between the second sub-paths.

[0082] like Figure 7 As shown, the initial nodes corresponding to multiple second sub-paths in candidate main path 701 can be adjusted to the target reference ray to adjust the path angles between multiple second sub-paths in candidate main path 702.

[0083] Through the above steps S410 to S420, multiple reference rays can be traversed to obtain the rotation angle between each reference ray and the second sub-path. The target rotation angle is determined from multiple rotation angles, and the reference ray corresponding to the target rotation angle is determined as the target reference ray.

[0084] Step S220: Based on the orientation of the virtual entrance, emit rays from the virtual entrance into the top view of the virtual area to set the branch paths of the virtual scene area;

[0085] In one example embodiment of this disclosure, after setting the main path of the virtual scene area in the virtual area top view through the above steps, rays can be emitted from the virtual entrance into the virtual area top view according to the orientation of the virtual entrance to set the branch paths of the virtual scene area. Specifically, the branch paths are automatically generated and can be used to complete the main path to form a virtual road network. Specifically, emitting rays from the virtual entrance into the virtual area top view can be either a perpendicular ray or a ray emitted from the virtual entrance into the virtual area top view at a preset angle.

[0086] It should be noted that this disclosure does not impose any special limitations on the specific method of emitting rays from the virtual entrance to the top view of the virtual area.

[0087] Step S230: Generate a virtual road network for the virtual scene area based on the main road path, branch road path, and virtual objects.

[0088] In one example embodiment of this disclosure, a virtual road network for a virtual scene area can be generated based on the main road path, the branch road path, and the virtual objects.

[0089] For example, the main path and side paths can be merged to generate the target path, where the side paths do not pass through virtual objects.

[0090] It should be noted that this disclosure does not impose any special limitations on the specific method of generating a virtual road network for a virtual scene area based on the main road path, the branch road path, and the virtual objects.

[0091] In one example embodiment of this disclosure, when a branch path comes into contact with a virtual object, the branch path can be determined as a first target sub-path network. When the branch path comes into contact with a main path, a second target sub-path network can be determined based on the extended contact state of the branch path. The virtual road network of the virtual scene area can be determined based on the first target sub-path network and the second target sub-path network, which may include the following steps S510 to S530:

[0092] Step S510: When a branch path comes into contact with a virtual object, the branch path is determined as the first target sub-path network.

[0093] In one example embodiment of this disclosure, after generating the main path through the above steps and emitting a ray from the virtual entrance to the virtual area top view to set the branch paths of the virtual scene area, the branch path can be determined as the first target sub-path network when it comes into contact with a virtual object. Specifically, after emitting a ray from the virtual entrance to the virtual area top view, it is possible to detect whether the branch path corresponding to the ray comes into contact with a virtual object. If the branch path comes into contact with a virtual object, the first target sub-path network can be generated.

[0094] For example, if a virtual object is a virtual building, inserting a virtual building into a branch path can generate the first target sub-road network.

[0095] Step S520: When a branch path contacts a main path, determine the second target sub-road network based on the extended contact state of the branch path.

[0096] In one exemplary embodiment of this disclosure, after generating the main path through the above steps and emitting rays from the virtual entrance into the virtual area top view to set the branch paths of the virtual scene area, a second target sub-path network can be determined based on the extended contact state of the branch path when it contacts the main path. The extended contact state indicates the contact state of the branch path with the virtual object after it contacts the main path. For example, if a branch path contacts the main path and then contacts a virtual object, the branch path can be determined as the second target sub-path network.

[0097] Step S530: Determine the virtual road network of the virtual scene area based on the first target sub-road network and the second target sub-road network.

[0098] In one exemplary embodiment of this disclosure, after obtaining the first target sub-road network and the second target sub-road network through the above steps, the virtual road network of the virtual scene region can be determined based on the first target sub-road network and the second target sub-road network. Specifically, the virtual road network of the virtual scene region can be composed of the first target sub-road network and the second target sub-road network, wherein the first target sub-road network may include one or more paths, and the second target sub-road network may include one or more paths. It should be noted that this disclosure does not impose any special limitations on the specific method of determining the virtual road network of the virtual scene region based on the first target sub-road network and the second target sub-road network.

[0099] Through the above steps S510 to S530, when a branch path comes into contact with a virtual object, the branch path can be determined as the first target sub-road network. When the branch path comes into contact with the main road path, the second target sub-road network can be determined according to the extended contact state of the branch path. The virtual road network of the virtual scene area can be determined according to the first target sub-road network and the second target sub-road network.

[0100] In one example embodiment of this disclosure, when a branch path first contacts the main path and then contacts a virtual object, the branch path can be determined as the second target sub-path network. When a branch path first contacts the main path but does not contact a virtual object, determining the second target sub-path network based on the branch path and the main path can include the following steps S610 to S620:

[0101] Step S610: When a branch path first contacts the main path and then contacts a virtual object, the branch path is determined as the second target sub-path network.

[0102] Step S620: After the branch path comes into contact with the main path but before it comes into contact with a virtual object, determine the second target sub-road network based on the branch path and the main path.

[0103] In one exemplary embodiment of this disclosure, rays (branch paths) are emitted from a virtual entrance into a virtual area top view through the above steps. When a branch path first contacts the main path and then contacts a virtual object, the branch path can be identified as a second target sub-path network. When a branch path first contacts the main path but does not contact a virtual object, the second target sub-path network can be determined based on the branch path and the main path. Specifically, the branch path can be connected to the main path to obtain the second target sub-path network.

[0104] In one example embodiment of this disclosure, a second target sub-path network can be obtained by connecting a main path and a branch path, and trimming a third sub-path in the main path. The third sub-path in the main path has a first endpoint and a second endpoint; the first endpoint contacts the edge of the virtual scene region, and the second endpoint contacts the branch path.

[0105] For example, such as Figure 8 As shown, branch paths 802 (thick black lines in the figure) can be set inside the virtual scene area through the virtual entrance 803. When the branch path 802 directly contacts the virtual object 804, the branch path 802 can be determined as the first target sub-path network. After the branch path 802 first contacts the main path 801 (not thick black lines in the figure) and then contacts the virtual object 804, the branch path can be determined as the second target sub-path network. When the branch path first contacts the main path but does not contact the virtual object, the main path and the branch path can be connected, and the third sub-path 805 (black dashed line in the figure) in the main path can be cut to obtain the second target sub-path network. The virtual road network (all paths in the virtual scene area 800) of the virtual scene area is determined based on the first target sub-path network and the second target sub-path network.

[0106] Through the above steps S610 to S620, when a branch path first comes into contact with the main path and then with a virtual object, the branch path can be determined as the second target sub-path network. When a branch path first comes into contact with the main path but does not come into contact with a virtual object, the second target sub-path network can be determined based on the branch path and the main path.

[0107] In one example embodiment of this disclosure, after obtaining the virtual road network of the virtual scene area through the above steps, the virtual road network of the virtual scene area can be input into the road network generation model to obtain a virtual road network model for use in game development.

[0108] It should be noted that this disclosure does not impose any special restrictions on the specific form of the road network generation model.

[0109] In one example embodiment of this disclosure, a virtual road network for a virtual scene area can be generated through the above steps. The virtual road network corresponds to multiple nodes, which can receive movement operations on the nodes, control the nodes to move, and generate a new virtual road network based on the scheme of this disclosure. This scheme allows for rapid adjustment of the virtual road network for a virtual scene area, facilitating route editing for developers and improving game development efficiency.

[0110] It should be noted that this disclosure does not impose any special restrictions on the specific form of node movement operations.

[0111] In one embodiment of this disclosure, a virtual road network generation method is provided. In response to a main path input operation, a main road path for a virtual scene area is set in a virtual area top view. Based on the orientation of a virtual entrance, rays are emitted from the virtual entrance into the virtual area top view to set branch road paths for the virtual scene area. A virtual road network for the virtual scene area is then generated based on the main road path, branch paths, and virtual objects. On one hand, a virtual road network can be automatically generated based on virtual objects and virtual scene areas in the scene to meet the needs of the game scene; on the other hand, it requires no manpower or resources, has a short route creation cycle, and thus improves game development efficiency.

[0112] It should be noted that the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0113] Furthermore, in an exemplary embodiment of this disclosure, a virtual road network generation apparatus is also provided. (Refer to...) Figure 9 As shown, a virtual road network generation device 900 includes an input operation response module 910, a branch virtual road network generation module 920, and a virtual road network generation module 930.

[0114] The input operation response module is used to respond to the main path input operation and set the main path of the virtual scene area in the virtual area top view; the branch virtual road network generation module is used to set the branch path of the virtual scene area by emitting rays from the virtual entrance to the virtual area top view according to the orientation of the virtual entrance; and the virtual road network generation module is used to generate the virtual road network of the virtual scene area according to the main path, branch paths and virtual objects.

[0115] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, a main path of a virtual scene area is set in a virtual area top view. The apparatus further includes: a candidate main path setting unit, used to set a candidate main path of the virtual scene area in the virtual area top view; and a main path trimming unit, used to trim a first sub-path in the candidate main path to obtain the main path; wherein the first sub-path is a path in the candidate main path that overlaps with a virtual object in the virtual area top view and / or a path that extends beyond the virtual scene area.

[0116] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, the candidate main path includes multiple second sub-paths and intersections between multiple different second sub-paths. Before cutting the first sub-path in the candidate main path to obtain the main path, the device further includes: a path angle adjustment unit, used to adjust the path angle between the second sub-paths according to the multiple intersections.

[0117] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, the second sub-path corresponds to an initial node and an end node. To adjust the path angle between the second sub-paths, the apparatus further includes: a reference ray emitting unit, used to emit multiple reference rays spaced at preset angles from the initial node corresponding to the second sub-path; a target reference ray determining unit, used to determine a target reference ray based on the rotation angle between the second sub-path and the multiple reference rays; and a sub-path adjusting unit, used to adjust the initial node corresponding to the second sub-path onto the target reference ray to adjust the path angle between the second sub-paths.

[0118] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, the target reference ray is determined according to the rotation angle between the second sub-path and multiple reference rays. The apparatus further includes: a reference ray traversal unit, used to traverse multiple reference rays and obtain the rotation angle between each reference ray and the second sub-path; and a target rotation angle determination unit, used to determine a target rotation angle among multiple rotation angles and determine the reference ray corresponding to the target rotation angle as the target reference ray; wherein the target rotation angle is the smallest rotation angle among multiple rotation angles.

[0119] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, a virtual road network for a virtual scene area is generated according to the main road path, branch road paths, and virtual objects. The apparatus further includes: a first target sub-road network determining unit, configured to determine a branch road path as a first target sub-road network when the branch road path contacts a virtual object; a second target sub-road network determining unit, configured to determine a second target sub-road network according to the extended contact state of the branch road path when the branch road path contacts the main road path; wherein the extended contact state is used to indicate the contact state of the branch road path with the virtual object after contacting the main road path; and a virtual road network determining unit, configured to determine the virtual road network of the virtual scene area according to the first target sub-road network and the second target sub-road network.

[0120] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, when a branch path contacts a main road path, a second target sub-road network is determined according to the extended contact state of the branch path. The device further includes: a first contact determination unit, used to determine the branch path as the second target sub-road network when the branch path contacts the main road path first and then contacts a virtual object; and a second contact determination unit, used to determine the second target sub-road network based on the branch path and the main road path when the branch path contacts the main road path first but does not contact the virtual object.

[0121] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, a second target sub-road network is determined according to the branch path and the main road path. The apparatus further includes: a second target sub-road network trimming unit, used to connect the main road path and the branch path, and trim a third sub-path in the main road path to obtain the second target sub-road network; wherein the third sub-path in the main road path has a first endpoint and a second endpoint, the first endpoint is in contact with the edge of the virtual scene area, and the second endpoint is in contact with the branch path.

[0122] Since the functional modules of the virtual road network generation device in the example embodiments of this disclosure correspond to the steps of the example embodiments of the virtual road network generation method described above, for details not disclosed in the device embodiments of this disclosure, please refer to the embodiments of the virtual road network generation method described above.

[0123] It should be noted that although several modules or units for the device used to perform actions 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.

[0124] Furthermore, in an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described virtual road network generation method is also provided.

[0125] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be embodied in the following forms: a completely hardware embodiment, a completely software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."

[0126] The following reference Figure 10 To describe an electronic device 1000 according to such an embodiment of the present disclosure. Figure 10 The electronic device 1000 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0127] like Figure 10 As shown, the electronic device 1000 is manifested in the form of a general-purpose computing device. The components of the electronic device 1000 may include, but are not limited to: at least one processing unit 1010, at least one storage unit 1020, a bus 1030 connecting different system components (including storage unit 1020 and processing unit 1010), and a display unit 1040.

[0128] The storage unit stores program code, which can be executed by the processing unit 1010 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the processing unit 1010 can perform actions such as... Figure 2 Step S210: In response to the main path input operation, the main path of the virtual scene area is set in the virtual area top view; Step S220: According to the orientation of the virtual entrance, a ray is emitted from the virtual entrance to the virtual area top view to set the branch path of the virtual scene area; Step S230: A virtual road network of the virtual scene area is generated based on the main path, the branch path and the virtual object.

[0129] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, a main path of a virtual scene region is set in a virtual region top view. The method further includes: setting a candidate main path of the virtual scene region in the virtual region top view; and trimming a first sub-path in the candidate main path to obtain the main path; wherein the first sub-path is a path in the candidate main path that overlaps with a virtual object in the virtual region top view and / or a path that extends beyond the virtual scene region.

[0130] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, the candidate main path includes multiple second sub-paths and intersections between multiple different second sub-paths. Before cutting the first sub-path in the candidate main path to obtain the main path, the method further includes: adjusting the path angle between the second sub-paths according to the multiple intersections.

[0131] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, the second sub-path corresponds to an initial node and an end node. Adjusting the path angle between the second sub-paths includes: emitting multiple reference rays spaced at preset angles from the initial node corresponding to the second sub-path; determining a target reference ray based on the rotation angle between the second sub-path and the multiple reference rays; and adjusting the initial node corresponding to the second sub-path onto the target reference ray to adjust the path angle between the second sub-paths.

[0132] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, determining the target reference ray according to the rotation angle between the second sub-path and multiple reference rays includes: traversing multiple reference rays to obtain the rotation angle between each reference ray and the second sub-path; determining the target rotation angle among multiple rotation angles, and determining the reference ray corresponding to the target rotation angle as the target reference ray; wherein the target rotation angle is the smallest rotation angle among multiple rotation angles.

[0133] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, a virtual road network for a virtual scene area is generated according to the main road path, branch road paths, and virtual objects, including: when a branch road path contacts a virtual object, determining the branch road path as a first target sub-road network; when a branch road path contacts a main road path, determining a second target sub-road network according to the extended contact state of the branch road path; wherein, the extended contact state is used to indicate the contact state of the branch road path with the virtual object after contacting the main road path; and determining the virtual road network of the virtual scene area according to the first target sub-road network and the second target sub-road network.

[0134] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, when a branch path contacts a main road path, a second target sub-road network is determined according to the extended contact state of the branch path, including: when the branch path contacts the main road path first and then contacts a virtual object, the branch path is determined as the second target sub-road network; when the branch path contacts the main road path first but does not contact a virtual object, the second target sub-road network is determined according to the branch path and the main road path.

[0135] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, determining a second target sub-road network according to a branch path and a main path includes: connecting the main path and the branch path, and trimming a third sub-path in the main path to obtain the second target sub-road network; wherein the third sub-path in the main path has a first endpoint and a second endpoint, the first endpoint being in contact with the edge of the virtual scene area, and the second endpoint being in contact with the branch path.

[0136] One embodiment of this disclosure provides an electronic device that, in response to a main path input operation, sets the main path of a virtual scene area in a virtual area top view, emits rays from the virtual entrance into the virtual area top view according to the orientation of the virtual entrance, to set the branch paths of the virtual scene area, and generates a virtual road network of the virtual scene area based on the main path, branch paths, and virtual objects. On the one hand, it can automatically generate a virtual road network based on virtual objects and virtual scene areas in the scene to meet the needs of the game scene; on the other hand, it does not require manpower and material resources, and the route creation cycle is short, thereby improving the game development efficiency.

[0137] Storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 1021 and / or a cache memory unit 1022, and may further include a read-only memory unit (ROM) 1023.

[0138] Storage unit 1020 may also include a program / utility 1024 having a set (at least one) program module 1025, such program module 1025 including but not limited to: 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.

[0139] Bus 1030 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 multiple bus structures.

[0140] Electronic device 1000 can also communicate with one or more external devices 1070 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with electronic device 1000, and / or any device that enables electronic device 1000 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 1050. Furthermore, electronic device 1000 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 1060. As shown, network adapter 1060 communicates with other modules of electronic device 1000 via bus 1030. 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 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0141] 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.

[0142] 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 this disclosure may also be implemented as a program product including program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.

[0143] In one exemplary embodiment of this disclosure, in response to a main path input operation, a main path of a virtual scene region can be set in a virtual region top view, and a ray can be emitted from the virtual entrance to the virtual region top view according to the orientation of the virtual entrance to set a branch path of the virtual scene region. A virtual road network of the virtual scene region can be generated based on the main path, the branch paths, and the virtual objects.

[0144] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, a main path of a virtual scene region is set in a virtual region top view. The method further includes: setting a candidate main path of the virtual scene region in the virtual region top view; and trimming a first sub-path in the candidate main path to obtain the main path; wherein the first sub-path is a path in the candidate main path that overlaps with a virtual object in the virtual region top view and / or a path that extends beyond the virtual scene region.

[0145] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, the candidate main path includes multiple second sub-paths and intersections between multiple different second sub-paths. Before cutting the first sub-path in the candidate main path to obtain the main path, the method further includes: adjusting the path angle between the second sub-paths according to the multiple intersections.

[0146] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, the second sub-path corresponds to an initial node and an end node. Adjusting the path angle between the second sub-paths includes: emitting multiple reference rays spaced at preset angles from the initial node corresponding to the second sub-path; determining a target reference ray based on the rotation angle between the second sub-path and the multiple reference rays; and adjusting the initial node corresponding to the second sub-path onto the target reference ray to adjust the path angle between the second sub-paths.

[0147] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, determining the target reference ray according to the rotation angle between the second sub-path and multiple reference rays includes: traversing multiple reference rays to obtain the rotation angle between each reference ray and the second sub-path; determining the target rotation angle among multiple rotation angles, and determining the reference ray corresponding to the target rotation angle as the target reference ray; wherein the target rotation angle is the smallest rotation angle among multiple rotation angles.

[0148] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, a virtual road network for a virtual scene area is generated according to the main road path, branch road paths, and virtual objects, including: when a branch road path contacts a virtual object, determining the branch road path as a first target sub-road network; when a branch road path contacts a main road path, determining a second target sub-road network according to the extended contact state of the branch road path; wherein, the extended contact state is used to indicate the contact state of the branch road path with the virtual object after contacting the main road path; and determining the virtual road network of the virtual scene area according to the first target sub-road network and the second target sub-road network.

[0149] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, when a branch path contacts a main road path, a second target sub-road network is determined according to the extended contact state of the branch path, including: when the branch path contacts the main road path first and then contacts a virtual object, the branch path is determined as the second target sub-road network; when the branch path contacts the main road path first but does not contact a virtual object, the second target sub-road network is determined according to the branch path and the main road path.

[0150] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, determining a second target sub-road network according to a branch path and a main path includes: connecting the main path and the branch path, and trimming a third sub-path in the main path to obtain the second target sub-road network; wherein the third sub-path in the main path has a first endpoint and a second endpoint, the first endpoint being in contact with the edge of the virtual scene area, and the second endpoint being in contact with the branch path.

[0151] One embodiment of this disclosure provides a computer-readable signal medium that, in response to a main path input operation, sets the main path of a virtual scene area in a virtual area top view, emits rays from virtual entrances into the virtual area top view based on the orientation of virtual entrances to set branch paths of the virtual scene area, and generates a virtual road network of the virtual scene area based on the main path, branch paths, and virtual objects. On the one hand, it can automatically generate a virtual road network based on virtual objects and virtual scene areas in the scene to meet the needs of the game scene; on the other hand, it requires no manpower or resources, has a short route creation cycle, and thus improves the game development efficiency.

[0152] 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.

[0153] 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.

[0154] Program code for performing the operations of this disclosure 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 computing 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 devices 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 can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0155] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0156] 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 generating a virtual road network, characterized in that, The method of displaying a virtual top view of a virtual scene area through a graphical user interface of a terminal device, wherein the virtual scene area includes at least a virtual entrance and virtual objects, includes: In response to the main path input operation, the main path of the virtual scene area is set in the virtual area top view; Based on the orientation of the virtual entrance, rays are emitted from the virtual entrance into the top view of the virtual area to set the branch paths of the virtual scene area; A virtual road network for the virtual scene area is generated based on the main road path, the branch road path, and the virtual object. The step of generating a virtual road network for the virtual scene region based on the main road path, the branch road paths, and the virtual object includes: determining the branch road path as a first target sub-road network when the branch road path contacts the virtual object; determining a second target sub-road network based on the extended contact state of the branch road path when the branch road path contacts the main road path; wherein the extended contact state is used to indicate the contact state of the branch road path with the virtual object after contacting the main road path; and determining the virtual road network of the virtual scene region based on the first target sub-road network and the second target sub-road network.

2. The method according to claim 1, characterized in that, The method of setting the main path of the virtual scene area in the top view of the virtual area further includes: In the top view of the virtual region, set the candidate main path of the virtual scene region; The main path is obtained by trimming the first sub-path in the candidate main path; wherein the first sub-path is the path in the candidate main path that overlaps with the virtual object in the virtual area top view and / or the path that extends beyond the virtual scene area.

3. The method according to claim 2, characterized in that, The candidate main path includes multiple second sub-paths and intersections between different second sub-paths. Before trimming the first sub-path in the candidate main path to obtain the main path, the method further includes: Adjust the path angle between the second sub-paths based on the multiple intersection points.

4. The method according to claim 3, characterized in that, The second sub-path corresponds to an initial node and an end node. Adjusting the path angle between the second sub-paths includes: Multiple reference rays with preset angles are emitted from the initial node corresponding to the second sub-path; The target reference ray is determined based on the rotation angle between the second sub-path and the multiple reference rays; Adjust the initial node corresponding to the second sub-path to the target reference ray to adjust the path angle between the second sub-paths.

5. The method according to claim 4, characterized in that, The step of determining the target reference ray based on the rotation angle between the second sub-path and the multiple reference rays includes: Traverse multiple reference rays to obtain the rotation angle between each reference ray and the second sub-path; A target rotation angle is determined from among the multiple rotation angles, and the reference ray corresponding to the target rotation angle is determined as the target reference ray; Wherein, the target rotation angle is the smallest among the plurality of rotation angles.

6. The method according to claim 1, characterized in that, When the branch path contacts the main road path, determining the second target sub-road network based on the extended contact state of the branch path includes: When the branch path first contacts the main path and then contacts the virtual object, the branch path is identified as the second target sub-path network. If the branch path comes into contact with the main path but does not come into contact with the virtual object, a second target sub-road network is determined based on the branch path and the main path.

7. The method according to claim 6, characterized in that, The step of determining the second target sub-road network based on the branch road path and the main road path includes: Connect the main road path and the branch road path, and cut the third sub-path in the main road path to obtain the second target sub-road network; The third sub-path in the main path has a first endpoint and a second endpoint. The first endpoint contacts the edge of the virtual scene area, and the second endpoint contacts the branch path.

8. A virtual road network generation device, characterized in that, The device displays a virtual top view of a virtual scene area through a graphical user interface on a terminal device. The virtual scene area includes at least a virtual entrance and virtual objects. The device comprises: An input operation response module is used to respond to a main path input operation and set the main path of the virtual scene area in the virtual area top view. A branch road virtual road network generation module is used to emit rays from the virtual entrance to the virtual area top view according to the orientation of the virtual entrance, so as to set the branch road paths of the virtual scene area; A virtual road network generation module is used to generate a virtual road network for the virtual scene area based on the main road path, the branch road path, and the virtual object. The step of generating a virtual road network for the virtual scene region based on the main road path, the branch road paths, and the virtual object includes: determining the branch road path as a first target sub-road network when the branch road path contacts the virtual object; determining a second target sub-road network based on the extended contact state of the branch road path when the branch road path contacts the main road path; wherein the extended contact state is used to indicate the contact state of the branch road path with the virtual object after contacting the main road path; and determining the virtual road network of the virtual scene region based on the first target sub-road network and the second target sub-road network.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, include: One or more processors; as well as A memory for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the method as described in any one of claims 1 to 7.