Display method and device of virtual scene map and electronic equipment
By providing a graphical user interface on the terminal device, and using the map controllers of each scene area in the virtual scene to acquire and generate map data, the problem of displaying map information in large scenes and multi-region areas in the prior art is solved, and interface efficiency and maintenance are improved.
Patent Information
- Application Number
- CN202510134343.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-06
- Publication Date
- 2025-05-16
AI Technical Summary
The prior art is difficult to meet the needs of large scenarios, multi-region, and complex map information display, and it is easy to generate deep logical coupling internally, reducing the operating efficiency of the interface and improving the difficulty of code maintenance.
The terminal device provides a graphical user interface, and in response to the map display instructions of the virtual scene, the target scene area in the virtual scene is determined. Each scene area has a corresponding map controller, through which map data is obtained and map display content is generated, and map display content of the target scene area is displayed on the graphical user interface.
It reduces the coupling of interface elements display logic, improves the operating efficiency of interface, reduces the difficulty of maintaining related codes, and meets the needs of large scenarios, multi-region and complex map information display.
Smart Images

Figure CN120001040A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of rendering technology, and in particular to a method, device and electronic device for displaying a virtual scene map. Background Art
[0002] In many software, players often need to open the map interface to view the entire scene and the current location. In related technologies, the map interface is displayed by superimposing various map entity elements, and an interface controller is used to logically control these map entity elements. The display order of these map entity elements is usually from bottom to top, which is the map terrain background map, various object icons including players, and detailed pop-up windows when objects are selected. These map entity elements are linearly superimposed on each other and finally rendered on an interface. The interface controller will contain all the logic for manipulating these map entity elements. This method is only applicable to situations where the map interface displays relatively single and static information. It is difficult to meet the display requirements of large scenes, multiple regions, and complex map information, and it is easy to generate deep logical coupling internally, which reduces the operating efficiency of the interface and increases the difficulty of code maintenance. Summary of the invention
[0003] In view of this, the purpose of the present disclosure is to provide a method, device and electronic device for displaying a virtual scene map, so as to reduce the coupling degree of the display logic of interface elements, improve the operation efficiency of the interface, and reduce the difficulty of related code maintenance.
[0004] In a first aspect, an embodiment of the present disclosure provides a method for displaying a virtual scene map, providing a graphical user interface through a terminal device; the method includes: in response to a map display instruction for a virtual scene, determining at least one target scene area in the virtual scene; the virtual scene includes multiple scene areas; each scene area has a corresponding map controller; obtaining map data of the corresponding target scene area through the map controller corresponding to each target scene area, and generating map display content of the target scene area based on the map data corresponding to the target scene area; and displaying the map display content of at least one target scene area on the graphical user interface.
[0005] In a second aspect, an embodiment of the present disclosure provides a display device for a virtual scene map, which provides a graphical user interface through a terminal device; the device includes: a target scene area determination module, which is used to determine at least one target scene area in a virtual scene in response to a map display instruction for a virtual scene; the virtual scene includes multiple scene areas; each scene area has a corresponding map controller; a map display content generation module, which is used to obtain map data of the target scene area through the map controller corresponding to the target scene area, and generate map display content of the target scene area based on the map data corresponding to the target scene area; and a map display module, which is used to display the map display content of at least one target scene area on the graphical user interface.
[0006] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned virtual scene map display method.
[0007] In a fourth aspect, an embodiment of the present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned virtual scene map display method.
[0008] The embodiments of the present invention bring the following beneficial effects:
[0009] The above-mentioned method, device and electronic device for displaying a virtual scene map determine at least one target scene area in the virtual scene in response to a map display instruction for the virtual scene; the virtual scene includes multiple scene areas; each scene area has a corresponding map controller; the map data of the corresponding target scene area is obtained through the map controller corresponding to each target scene area, and the map display content of the target scene area is generated based on the map data corresponding to the target scene area; the map display content of at least one target scene area is displayed on a graphical user interface. In this method, each map controller controls the map display logic of the corresponding scene area, which reduces the coupling degree of the display logic of the interface elements, improves the operation efficiency of the interface, and reduces the difficulty of related code maintenance.
[0010] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or understood by practicing the present disclosure. The purpose and other advantages of the present disclosure are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0011] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0013] Figure 1 A flowchart of a method for displaying a virtual scene map provided by an embodiment of the present disclosure;
[0014] Figure 2 A schematic diagram of a scene area provided in an embodiment of the present disclosure;
[0015] Figure 3 A schematic diagram of another scene area provided in an embodiment of the present disclosure;
[0016] Figure 4 A flowchart of a process of switching between maps of different regions provided in an embodiment of the present disclosure;
[0017] Figure 5 A framework diagram of a map interface system provided by an embodiment of the present disclosure;
[0018] Figure 6 A schematic diagram of the map entity layer and the interactive layer corresponding to the control of different levels of graphical controls provided in the embodiment of the present disclosure;
[0019] Figure 7 A schematic diagram of the structure of a display device for a virtual scene map provided in an embodiment of the present disclosure;
[0020] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0022] In some games, players often need to open the map interface to view the entire scene and the current location. The map interface displays regional topographic maps, various object icons, and indicator marks for player operations, playing an important role in guiding players to explore the scene. Especially in open world scenes, the map interface function is indispensable. Such large scenes will contain a lot of object information. Players can also perform various interactive operations such as clicking to view and adding marks.
[0023] Generally, this kind of map interface is a single interface, and one interface only displays one area. Even if there are different areas, you can only view the map interface of the current area. However, new game designs may face more complex terrain scenes. For example, there are ruins, caves, and sub-areas of various buildings in the large scene of the game. At this time, the map interface is required to be able to quickly switch to the maps of various other sub-areas for viewing while displaying the main scene, so as to specify different exploration strategies. At present, there is a lack of such a technical structure to support such a demand.
[0024] The map interface of an open world scene is generally displayed by superimposing various graphic controls, plus an interface controller to operate these graphic controls for logical control. These graphic controls are displayed in order from bottom to top, including the map terrain background image, various object icons including players, map fog images, and detailed pop-up windows when objects are selected (which contain text controls such as object names and descriptions). These graphic controls are linearly superimposed and finally rendered on an interface. The interface controller will contain all the logic for operating these graphic controls.
[0025] In related technologies, map implementation logic relies on linear superposition of graphical controls and a single controller, which is only applicable to situations where the map interface displays relatively single and static information. However, this solution is difficult to meet the needs of large scenes with multiple regions, the need to display complex map information, and the need to achieve fast switching of multi-region maps. Because there is only one interface controller, deep logical coupling is likely to occur internally, reducing the operating efficiency of the interface and increasing the difficulty of code maintenance. Therefore, a better map interface system framework is needed to meet this demand.
[0026] Based on this, the embodiments of the present disclosure provide a method, device and electronic device for displaying a virtual scene map. The technology can be applied to scenes that require displaying a virtual scene map.
[0027] See also Figure 1 First, a method for displaying a virtual scene map provided by an embodiment of the present invention is introduced. A graphical user interface is provided by a terminal device; the method comprises the following steps:
[0028] Step S102, in response to a map display instruction for a virtual scene, determining at least one target scene area in the virtual scene; the virtual scene includes a plurality of scene areas; each scene area has a corresponding map controller.
[0029] The map display instruction can be generated by the game system, or after the player generates a map viewing operation through a human-computer interaction device. For example, a control for triggering map display can be displayed on a graphical user interface, and the player's triggering operation on the control can be regarded as a map viewing operation, thereby generating a map display instruction. The specific setting can be based on demand and is not limited here.
[0030] The virtual scene can be a virtual game scene or other virtual scene, such as a virtual scene used to simulate a real building. This is not limited here. The virtual scene is usually divided into multiple scene areas. The scene area can include a global area corresponding to the entire virtual scene and a local area corresponding to a part of the virtual scene. When there are multiple local areas, different local areas may or may not have overlapping parts. Figure 2 As shown, the virtual scene can be divided into two local scene areas, area A and area B; Figure 3 As shown, the virtual scene can also be divided into two local scene areas, area C and area D, where area D includes area C.
[0031] The content that needs to be displayed in the map corresponding to different scene areas is usually different. When two scene areas have overlapping parts, such as area C and area D, the details of the displayed content of the maps corresponding to the two are usually the same. Area D is larger than area C, and the map corresponding to area D will display some map content in area C, such as terrain, the name of area C, or the location and name of some important buildings, etc. However, in addition to displaying the location and name of important buildings in area C, the map corresponding to area C usually also displays more detailed content in area C, such as the area occupied by important buildings, some less important buildings, streets, important landscapes, etc. Therefore, the map display content of area D usually does not completely include the map display content of area C.
[0032] Usually, a corresponding map controller can be set for each scene area. The map controller is usually implemented through program code, and can be implemented through functions or data objects. For example, each scene area has a corresponding function, which is used to generate the map display content corresponding to the scene area. The map controllers corresponding to different scene areas are usually independent of each other and will not be affected by other map controllers.
[0033] The target scene area may be one or more. The target scene area may be pre-set, for example, the global scene may be set as the target scene area, that is, when the player needs to open the map, the map corresponding to the global scene is displayed first. When viewing the map, the player may also choose which scene area to view the map. At this time, the generated map viewing instruction usually includes the identifier of the scene area that the player wants to view, so the target scene area may be determined based on the identifier.
[0034] In some cases, the player can also choose to view the maps of two scene areas at the same time to compare the virtual resources included in the two scene areas. Therefore, the target scene area can also be the two scene areas selected by the player. It can be set according to needs and is not limited here.
[0035] Step S104: acquiring map data of the corresponding target scene area through the map controller corresponding to each target scene area, and generating map display content of the target scene area based on the map data corresponding to the target scene area.
[0036] After the target scene area is determined, the map data of the corresponding target scene area needs to be acquired through the map controller corresponding to each target scene area. Then the map controller can generate the map display content of the target scene area based on the acquired map data.
[0037] The map display content usually includes the terrain of the target scene area, virtual items located in the target scene area, the identification of virtual objects, etc. These contents can be displayed through graphics controls. Among them, graphics controls refer to interface elements that can be rendered on the screen in the game, such as a picture, a rectangular box, etc. The interactive interface in the game is the final result after these graphics controls are combined and rendered.
[0038] Step S106: displaying map display content of at least one target scene area on the graphical user interface.
[0039] The above map display content can usually be in a visible state or in an invisible state. After the map display content of the target scene area is generated, the map display content of the target scene area needs to be set to be in a visible state.
[0040] When the player needs to view the map of other scene areas, the currently displayed map display content can be set to an invisible state, and the map display content of the scene area that the player needs to view can be generated, and the generated map display content can be set to a visible state.
[0041] The above-mentioned method for displaying a virtual scene map is to determine at least one target scene area in the virtual scene in response to a map display instruction for the virtual scene; the virtual scene includes multiple scene areas; each scene area has a corresponding map controller; the map data of the corresponding target scene area is obtained through the map controller corresponding to each target scene area, and the map display content of the target scene area is generated based on the map data corresponding to the target scene area; and the map display content of at least one target scene area is displayed on a graphical user interface. In this method, each map controller controls the map display logic of the corresponding scene area, which reduces the coupling degree of the display logic of the interface elements, improves the operation efficiency of the interface, and reduces the difficulty of related code maintenance.
[0042] The following embodiments provide a specific method for determining at least one target scene area in a virtual scene in response to a map display instruction for the virtual scene.
[0043] In actual applications, players usually need to view the scene area where the controlled virtual character controlled by the terminal device is located, so the scene area where the controlled virtual character is located among multiple scene areas can be determined as the target scene area.
[0044] When a player selects a scene area during a map viewing operation, the map display instruction usually includes an identifier of the scene area. For the convenience of writing, the scene area selected by the player is referred to as the "first scene area". In a specific implementation, in response to the map display instruction including the identifier of the first scene area among multiple scene areas, the first scene area is determined as the target scene area.
[0045] The following embodiment provides a specific method of acquiring map data of the corresponding target scene area through a map controller corresponding to each target scene area, and generating map display content of the target scene area based on the map data corresponding to the target scene area.
[0046] In practical applications, the map display content of the target scene area generally includes a first map entity element and a second map entity element. The map entity element is substantially the same as the graphic control. The first map entity element is used to display the terrain of the target scene area, and may be an image control; the second map entity element is used to identify virtual objects in the target scene area, and may be various identifiers. The virtual objects may be buildings, non-player characters or player characters, etc., which are not limited here.
[0047] The map controller needs to generate the first map entity element and the second map entity element corresponding to the target scene area based on the map data corresponding to the target scene area. The display level of the first map entity element is usually lower than the display level of the second map entity element. The first map entity element can be generated first, and then the second map entity element can be generated and superimposed on the first map entity element. The map display content can also include entity elements corresponding to special effects, such as entity elements corresponding to fog effects, entity elements corresponding to flame effects, etc., which are not limited here.
[0048] When the controlled virtual character controlled by the terminal device is in the target scene area, it is necessary to generate the first map entity element corresponding to the target scene area, the second map entity element and the third map entity element corresponding to the controlled virtual character based on the map data corresponding to the target scene area. The third map entity element can usually be considered to be included in the second map entity element, but because the controlled virtual character usually requires special display to enable the player to determine the current location, the third map entity element corresponding to the controlled virtual object can be displayed in a special format.
[0049] When a map viewing instruction is generated, the map data of each scene area can be obtained through the map controller corresponding to the scene area, and the map display content of the scene area can be generated based on the map data corresponding to the scene area. This can quickly respond to the situation where the player switches to display the map. In the process of generating the map display content of each scene area, the map display content of the target scene area can be generated first.
[0050] In order to make the graphical user interface display the map display content of the target scene area, it is necessary to control the map display content of each target scene area to be visible, and control the map display content of other scene areas except at least one target scene area among multiple scene areas to be invisible.
[0051] The player can generate a map switching command through a human-computer interaction device, for example, the player can generate a map switching command by rolling the mouse wheel, or by clicking a related control pre-set in a graphical user interface. In specific implementation, in response to the map switching command, it is necessary to determine the target scene area after switching; and control the map display content of the target scene area after switching to be visible, and control the map display content of other scene areas except the target scene area after switching in multiple scene areas to be invisible, so as to realize the rapid switching of the displayed map.
[0052] As mentioned above, the above map display content usually includes multiple entity elements. The multiple entity elements may include one or more interactive entity elements. For example, the entity element corresponding to a virtual building may be interactive. When the player clicks on the entity element, a detailed information display window corresponding to the virtual building will be displayed. The window may display the properties, durability, virtual props included in the building, etc.
[0053] In a specific implementation, in response to a selection operation on a first element of at least one interactive entity element, a first display layer is generated; the display level of the first display layer is higher than the display level of the map display content. Then, the interactive information corresponding to the first element is displayed on the first display layer. The above-mentioned interactive information may include multiple types, such as the name and attributes of the first element, which are not limited here.
[0054] When the player performs a selection operation on the first element, in response to the selection operation on the first element of the at least one interactive entity element, the display format of the first element can be updated through the map controller corresponding to the target scene area; so as to indicate that the first element is in a selected state through the updated display format. The player can match the first element with the above interaction information to make better game decisions.
[0055] Players can also generate map display perspective update instructions through mouse, keyboard or touch operation, which can be achieved by dragging the area where the map display content is located, or by editing the pre-set perspective update control, which is not limited here. In the specific implementation, in response to the map display perspective update instruction, the update parameters corresponding to the map display content are determined. Among them, the update parameters may include movement parameters, and may also include zoom parameters, or may include movement parameters and zoom parameters at the same time. That is, the player can control the map display content to zoom, or change the field of view direction. Further, the map display content can be updated based on the update parameters through the map controller corresponding to the target scene area.
[0056] The present disclosure also provides another method for displaying a virtual scene map. Figure 1 The method is implemented based on the method shown in the figure. This method solves the display problem of the map interface of an open world with complex terrain in the game, and meets the map display requirements of fast switching of multiple areas on the same interface.
[0057] This method divides the code logic of the map interface into three layers in the code design framework: data layer, map entity layer, and player interaction layer. These three layers of logic management correspond to three code objects in the code.
[0058] The data layer is responsible for reading, monitoring, and organizing all map-related data. It only generates data objects and notifies other parts of data status changes, but does not control other parts. All data in the map interface comes from the data layer. All map-related data in the scene will be uniformly organized into data objects in the data layer for reading by other map modules.
[0059] The map entity layer is responsible for generating and managing the graphical controls displayed on the screen for map entity elements, including icons corresponding to terrain, objects, players, etc., or manually marking such virtual entities.
[0060] Specifically, the map entity layer will contain a map entity manager and multiple map entity controllers (equivalent to the above-mentioned "map controller"). The map entity manager is responsible for collecting and organizing information about different areas in the scene, and then generating map entity controllers corresponding to maps of different areas based on this information. Each map entity controller corresponds to the map display of the entire world scene (global area), or corresponds to the display of a local area. Each map entity controller reads what needs to be displayed in the area from the data layer, generates the corresponding graphics controls and organizes and manages them, and displays the terrain and object icons corresponding to the area. The map entity manager can receive external instructions to determine which area's map is currently displayed.
[0061] The player interaction layer is responsible for receiving player input operations, displaying pop-up windows and other auxiliary display information, and sending instructions to control the movement and scaling of the map entity layer.
[0062] The code objects corresponding to these three layers are not coupled with each other, exist independently, and cannot directly read or control each other. The three are communicated by the same communication manager by forwarding messages. The communication manager will record the needs of each module to listen to certain events, and then notify the module listening to the corresponding event when the event is triggered. The communication manager will also record the needs of each module to obtain data information, and when receiving data requests, it will organize and forward the corresponding data to the corresponding module. In this way, different modules are not coupled with each other, and only send and receive data to the same communication manager, which reduces the coupling between modules and reduces the cost of code maintenance.
[0063] This hierarchical structure achieves the decoupling between data, graphics controls, and functional logic control, and can achieve more flexible map display functions. In the same interface, maps of different areas can be quickly switched.
[0064] Assume that in the game, the player is in the main scene of the entire world. At the same time, there are also areas such as shops, underground caves, and underground caves. These sub-areas have more detailed and rich terrain inside, and need to be displayed as separate map interfaces for viewing. Figure 4The following is the operation and display process when the player opens the map. When the player presses the button to open the map, the map interface corresponding to the area where the player is located will be opened. In this interface, you can also switch back and forth to display the map of other areas by pressing the button, which is convenient for players to view other areas.
[0065] The entire framework of the map interface is as follows Figure 5 As shown. The main body is divided into four parts: communication manager, map data manager, map entity manager, and map interaction manager.
[0066] When you open a map, each manager generates and executes the corresponding functions in the following order:
[0067] 1. Communications Manager.
[0068] The communication manager itself does not record any map data or execute map logic. It only stores event listening requests or registered data interfaces from other modules. All events or data will be defined as an enumeration. These enumerations will be indexed to the corresponding interfaces in the form of dictionaries and stored in the communication manager. When an event is triggered, the message triggered by the event will be forwarded to the recorded module that has a listening requirement for the event. Similarly, when a module wants to obtain certain data, it can send a data request to the communication manager. The manager checks which module can obtain the data, and returns the data to the requesting module after obtaining the data.
[0069] Modules in different layers can only communicate through the communication manager, which can avoid coupling between modules in the map interface system, so that each module only needs to perform its own single function, avoiding code confusion.
[0070] 2. Map data manager.
[0071] This part belongs to the map data layer. The map data manager is only responsible for organizing scene data, monitoring data changes, and registering the map data acquisition interface in the communication manager. These data include the terrain data of the entire scene map, terrain data of different areas, the player's location and area, and all objects contained in each area.
[0072] Different data will be organized into a unified data object format for easy reading by the entire map system. For example, the center location, size, type, and level of each area will be organized into an area data object. All data related to each area can be read from it. Player position data and the area they are in will be organized into a player position data object. The type, location, and status of an object will be organized into an object data object.
[0073] The map data manager will store its own data object acquisition interface in the communication manager. For example, if a module A wants to obtain the position of a player, it will send a query request to the communication manager with the enumeration value of the player's position. The communication manager will query the player's position data interface in the map data manager based on the enumeration value, and after obtaining the data through this interface, return it to the A module.
[0074] Using a map data manager to manage all data uniformly allows multiple modules to share the same data and avoid code duplication. At the same time, when the data source changes, only the changes are made within the map data manager without changing other modules.
[0075] 3. Map entity manager.
[0076] This part belongs to the map entity layer. The map entity manager is responsible for managing all the physical elements in the map. Map entity elements refer to the terrain and objects that actually exist in the map scene, or the guiding entities marked by the player in the scene. The map entity manager will obtain the data objects of each area to be displayed in the current scene and the player's position data object from the map data manager through the communication manager. Then, based on these area data objects, the corresponding map entity controller is generated. Each map entity controller corresponds to an area, and will generate and manipulate the graphical controls that need to be displayed in the area and display them on the screen. The map entity manager will give priority to generating the map entity controller for the area based on the area where the player is currently located.
[0077] Each map entity controller will first generate the graphics control of the terrain map of the area based on the data objects in the current area. Then the map entity controller will obtain all the object data objects in the area, generate the graphics control of each object icon, and overlay it on the terrain map. It will also obtain the player's position data object and overlay the graphics control of the player icon on the terrain map. In this way, the map interface of the current area is displayed on the screen.
[0078] The map interface of the area where the player is currently located will be displayed first. Then the map entity controllers of other areas will be generated in turn and also managed by the map entity manager. Each map entity controller runs in parallel without interfering with each other. The graphical controls of the undisplayed map entity controllers will be hidden. When the map entity manager receives the player's command to switch maps, it will notify the currently displayed map entity controller to hide its graphical controls and display the graphical controls of the map entity controller of the next area. This will achieve switching between map interfaces of different areas.
[0079] 4. Interface interaction manager.
[0080] This part belongs to the interaction layer. The interface interaction manager is specifically responsible for managing the display of information elements other than map elements, as well as managing the interaction logic between players and maps. For example, after selecting a map icon, a small pop-up window will pop up to display detailed information about the object corresponding to the icon. This information may include text that describes the object in detail. This small pop-up window does not belong to the map entity element, but is just an additional graphical control displayed on the interface, which may pop up or disappear at any time. Therefore, the graphical elements of this type of information element are at the top level in the display hierarchy and are located in a separate interaction layer. Moreover, its function itself is different from that of the map element, so a separate interaction manager is formed to manage the functional logic.
[0081] In addition, the player's operations are also initiated in the interaction manager, and then the communication manager sends instructions to notify the map entity controller to control the changes of map entity elements.
[0082] For example, when a player clicks an object icon with the mouse to select it, and the object icon is displayed as selected, and a pop-up window with details pops up, the object icon will initiate a notification event, and inform the interaction manager through the communication manager that the object is selected. The interaction manager will receive the data object corresponding to the object, and make a judgment based on the information in the data object. When it is determined that details need to be displayed, it will control the pop-up window to display the description text of the object. In addition, the data object of the object is marked as selected, and then an instruction is sent to notify the map entity controller to update the selection effect of the graphics control corresponding to the object. In the above process, the logic of the interaction layer and the entity layer are not coupled with each other. The map entity controller only needs to manage the status of the object icon, and does not need to know how the interaction process occurs. The interaction manager can pop up various pop-ups for different objects.
[0083] For example, players control the map's viewing angle to move or zoom through the input of the mouse, keyboard or handle. In the map entity controller, a unified interface will be provided to control the map itself to zoom and move. By changing the parent node graphical controls to which the objects and terrain are attached, the viewing angle of all map elements on the screen in the current area map can be controlled. The input triggered by the player through keyboard buttons, joystick toggles, and mouse movement will be judged and processed in the interaction manager, and then converted into unified zoom parameters and movement parameters, and notifications will be sent through the communication manager to let the map entity controller move and zoom. Here, the logic of the map entity layer and the interaction layer are also independent of each other. The logic of the map entity layer does not need to be changed. When there are different device inputs, the interaction layer only needs to uniformly process and transform the input signals and send the same control command. This makes it very convenient to implement multi-terminal input control to deal with different inputs from the mouse, keyboard, handle, and mobile phone touch screen without worrying about the modification of additional logic.
[0084] Different managers control different levels of graphics controls, such as Figure 6 shown.
[0085] The map entity layer controls all map entity elements, so it includes the base layer, place name layer, map identification layer, and fog layer. Graphic controls of different types of map entity elements will be mounted under the parent node of the corresponding layer. For example, island topographic maps, cave topographic maps, etc. will be at the lowest level of the current area interface and serve as background display in the base layer. Then various place names will be displayed, and the corresponding graphics controls will be superimposed on the base layer for display. Next are various objects in the map, which are mounted on the map identification layer. If the map itself has fog blocking part of the area, the graphics controls as fog will be mounted on the fog layer.
[0086] Because the maps of multiple regional scenes can be switched, the map entity controller corresponding to each region will contain a complete set of the above hierarchy. However, when multiple map entity controllers exist at the same time, only one of the hierarchical graphics controllers will be visible, and the visibility of the others will be hidden.
[0087] The interaction layer controls a separate UI level for displaying graphical controls of additional information such as pop-ups and buttons. This level is higher than all entity levels.
[0088] When creating a map, each map entity controller will generate a key value to uniquely identify itself. The interaction layer will obtain the key value of the currently displayed map entity controller. In this way, when a command is sent through the communication manager, the key value is included in the parameter, and the command can be sent only to the corresponding map entity controller. In this way, the interaction layer can control the display of controls in a single specific map entity controller without affecting other hidden map entity controllers.
[0089] When switching regional maps, the interaction manager listens to the player pressing the input button, and then initiates a request to switch maps to the map entity manager. The map entity manager will turn on the visibility of the corresponding level node controls of the map entity controller of the area to be displayed, and hide the corresponding parts of other areas. After the switch is completed, a notification is sent to inform the interaction manager, and the interaction manager will update the key value of the current map entity controller and clear the interaction status with the previous map entity controller (for example, close the pop-up window being displayed, and notify the selected object icon to restore the original state).
[0090] In the above process, the interaction layer and the map entity layer, as well as each map entity controller, are completely separated and independent, and the code logic is not coupled. The first advantage of this is that a single module can implement very flexible functions in its own internal code without affecting other parts. For example, the main scene map has a special fog effect display, while other maps do not. The main scene map only needs to add a fog management module in the corresponding map entity controller to specifically manage the display of the graphics controls corresponding to the fog. If other area maps do not contain this module, the fog will not be displayed. In this way, the customized display characteristics of each area map can be achieved.
[0091] Second, it can be easily expanded when new regional terrain display requirements are added. For example, when a new type of ruins terrain is added and needs to be displayed as a separate regional map, and the map has both the fog display of the main scene and the small-scale terrain display of the underground cave, it only needs to inherit the original logic and make more judgments.
[0092] This method meets the need for fast switching of multiple areas in the same interface in a large open world with complex terrain. It also achieves the decoupling between data, graphics controls, and functional logic control, so that changes within each code module will not affect other parts, ensuring good scalability or maintainability of the code.
[0093] For the above method embodiments, see Figure 7 A display device for a virtual scene map is shown, which provides a graphical user interface through a terminal device; the device includes:
[0094] The target scene area determination module 702 is used to determine at least one target scene area in the virtual scene in response to a map display instruction for the virtual scene; the virtual scene includes a plurality of scene areas; each scene area has a corresponding map controller;
[0095] A map display content generating module 704 is used to obtain map data of the target scene area through a map controller corresponding to the target scene area, and generate map display content of the target scene area based on the map data corresponding to the target scene area;
[0096] The map display module 706 is used to display map display content of at least one target scene area on the graphical user interface.
[0097] The above-mentioned display device of a virtual scene map determines at least one target scene area in the virtual scene in response to a map display instruction for the virtual scene; the virtual scene includes multiple scene areas; each scene area has a corresponding map controller; the map data of the corresponding target scene area is obtained through the map controller corresponding to each target scene area, and the map display content of the target scene area is generated based on the map data corresponding to the target scene area; the map display content of at least one target scene area is displayed on a graphical user interface. In this method, each map controller controls the map display logic of the corresponding scene area, which reduces the coupling degree of the display logic of the interface elements, improves the operation efficiency of the interface, and reduces the difficulty of related code maintenance.
[0098] The above-mentioned target scene area determination module is also used to: determine the scene area where the controlled virtual character is located in multiple scene areas as the target scene area; the controlled virtual character is controlled by the terminal device; or, in response to a map display instruction including an identifier of the first scene area among multiple scene areas, determine the first scene area as the target scene area.
[0099] The map display content of the above-mentioned target scene area includes a first map entity element and a second map entity element; the first map entity element is used to display the terrain of the target scene area; the second map entity element is used to identify virtual objects in the target scene area; based on the map data corresponding to the target scene area, the step of generating the map display content of the target scene area includes: based on the map data corresponding to the target scene area, generating the first map entity element and the second map entity element corresponding to the target scene area.
[0100] The above-mentioned map display content generation module is also used to: in response to the controlled virtual character controlled by the terminal device being in the target scene area, generate a first map entity element corresponding to the target scene area, a second map entity element and a third map entity element corresponding to the controlled virtual character based on the map data corresponding to the target scene area.
[0101] The above-mentioned map display content generation module is also used to: for each scene area, obtain the map data of the scene area through the map controller corresponding to the scene area, and generate the map display content of the scene area based on the map data corresponding to the scene area; the step of displaying the map display content of at least one target scene area on the graphical user interface includes: controlling the map display content of each target scene area to be visible, and controlling the map display content of other scene areas except at least one target scene area among the multiple scene areas to be invisible.
[0102] The above-mentioned map display content includes multiple entity elements; the multiple entity elements include at least one interactive entity element; the above-mentioned device also includes: a first display layer generation module, used to generate a first display layer in response to a selection operation on a first element of at least one interactive entity element; the display level of the first display layer is higher than the display level of the map display content; and the interactive information corresponding to the first element is displayed on the first display layer.
[0103] The above-mentioned device also includes: a display format update module, which is used to respond to a selection operation on a first element in at least one interactive physical element, and update the display format of the first element through a map controller corresponding to the target scene area; the updated display format is used to indicate that the first element is in a selected state.
[0104] The above-mentioned device also includes: an update parameter determination module, which is used to determine the update parameters corresponding to the map display content in response to the map display perspective update instruction; the update parameters include movement parameters and / or zoom parameters; and a display content update module, which is used to update the map display content based on the update parameters through the map controller corresponding to the target scene area.
[0105] The above-mentioned device also includes: a scene switching module, which is used to determine the target scene area after switching in response to a map switching instruction; a visible state control module, which is used to control the map display content of the target scene area after switching to be in a visible state, and control the map display content of other scene areas among multiple scene areas except the target scene area after switching to be in an invisible state.
[0106] The multiple scene areas include a global area and a local area.
[0107] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned virtual scene map display method, for example:
[0108] In response to a map display instruction for a virtual scene, at least one target scene area in the virtual scene is determined; the virtual scene includes multiple scene areas; each scene area has a corresponding map controller; map data of the corresponding target scene area is acquired through the map controller corresponding to each target scene area, and map display content of the target scene area is generated based on the map data corresponding to the target scene area; and the map display content of at least one target scene area is displayed on a graphical user interface.
[0109] In the above manner, each map controller controls the map display logic of the corresponding scene area, which reduces the coupling degree of the display logic of the interface elements, improves the operation efficiency of the interface, and reduces the difficulty of related code maintenance.
[0110] Optionally, the above-mentioned step of determining at least one target scene area in the virtual scene includes: determining the scene area where the controlled virtual character is located among multiple scene areas as the target scene area; the controlled virtual character is controlled by a terminal device; or, in response to a map display instruction including an identifier of a first scene area among multiple scene areas, determining the first scene area as the target scene area.
[0111] Optionally, the map display content of the target scene area includes a first map entity element and a second map entity element; the first map entity element is used to display the terrain of the target scene area; the second map entity element is used to identify virtual objects in the target scene area; based on the map data corresponding to the target scene area, the step of generating the map display content of the target scene area includes: based on the map data corresponding to the target scene area, generating the first map entity element and the second map entity element corresponding to the target scene area.
[0112] Optionally, the step of generating a first map entity element and a second map entity element corresponding to the target scene area based on the map data corresponding to the target scene area includes: in response to a controlled virtual character controlled by the terminal device being in the target scene area, generating a first map entity element and a second map entity element corresponding to the target scene area and a third map entity element corresponding to the controlled virtual character based on the map data corresponding to the target scene area.
[0113] Optionally, the above-mentioned step of obtaining the map data of the corresponding target scene area through the map controller corresponding to each target scene area, and generating the map display content of the target scene area based on the map data corresponding to the target scene area, includes: for each scene area, obtaining the map data of the scene area through the map controller corresponding to the scene area, and generating the map display content of the scene area based on the map data corresponding to the scene area; the step of displaying the map display content of at least one target scene area on the graphical user interface includes: controlling the map display content of each target scene area to be visible, and controlling the map display content of other scene areas among the multiple scene areas except at least one target scene area to be invisible.
[0114] Optionally, the map display content includes multiple entity elements; the multiple entity elements include at least one interactive entity element; the method also includes: generating a first display layer in response to a selection operation on a first element in at least one interactive entity element; the display level of the first display layer is higher than the display level of the map display content; and displaying interactive information corresponding to the first element on the first display layer.
[0115] Optionally, the above method also includes: in response to a selection operation on a first element among at least one interactive entity element, updating a display format of the first element through a map controller corresponding to the target scene area; the updated display format is used to indicate that the first element is in a selected state.
[0116] Optionally, the above method also includes: in response to a map display perspective update instruction, determining update parameters corresponding to the map display content; the update parameters include movement parameters and / or zoom parameters; and updating the map display content based on the update parameters through a map controller corresponding to the target scene area.
[0117] Optionally, the above method also includes: in response to a map switching instruction, determining the target scene area after switching; controlling the map display content of the target scene area after switching to be visible, and controlling the map display content of other scene areas among the multiple scene areas except the target scene area after switching to be invisible.
[0118] Optionally, the above-mentioned multiple scene areas include global areas and local areas.
[0119] See also Figure 8 As shown, the electronic device includes a processor 100 and a memory 101, wherein the memory 101 stores machine executable instructions that can be executed by the processor 100, and the processor 100 executes the machine executable instructions to implement the above-mentioned virtual scene map display method.
[0120] Further, Figure 8 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 100 , the communication interface 103 and the memory 101 are connected via the bus 102 .
[0121] The memory 101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0122] The processor 100 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 100. The above processor 100 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as a hardware decoding processor for execution, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the method of the above embodiment in combination with its hardware.
[0123] This embodiment also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned virtual scene map display method.
[0124] A method, device and electronic device for displaying a virtual scene map provided in an embodiment of the present disclosure include a computer-readable storage medium storing program code, and the program code includes instructions that can be used to execute the methods described in the foregoing method embodiments, for example:
[0125] In response to a map display instruction for a virtual scene, at least one target scene area in the virtual scene is determined; the virtual scene includes multiple scene areas; each scene area has a corresponding map controller; map data of the corresponding target scene area is acquired through the map controller corresponding to each target scene area, and map display content of the target scene area is generated based on the map data corresponding to the target scene area; and the map display content of at least one target scene area is displayed on a graphical user interface.
[0126] In the above manner, each map controller controls the map display logic of the corresponding scene area, which reduces the coupling degree of the display logic of the interface elements, improves the operation efficiency of the interface, and reduces the difficulty of related code maintenance.
[0127] Optionally, the above-mentioned step of determining at least one target scene area in the virtual scene includes: determining the scene area where the controlled virtual character is located among multiple scene areas as the target scene area; the controlled virtual character is controlled by a terminal device; or, in response to a map display instruction including an identifier of a first scene area among multiple scene areas, determining the first scene area as the target scene area.
[0128] Optionally, the map display content of the target scene area includes a first map entity element and a second map entity element; the first map entity element is used to display the terrain of the target scene area; the second map entity element is used to identify virtual objects in the target scene area; based on the map data corresponding to the target scene area, the step of generating the map display content of the target scene area includes: based on the map data corresponding to the target scene area, generating the first map entity element and the second map entity element corresponding to the target scene area.
[0129] Optionally, the step of generating a first map entity element and a second map entity element corresponding to the target scene area based on the map data corresponding to the target scene area includes: in response to a controlled virtual character controlled by the terminal device being in the target scene area, generating a first map entity element and a second map entity element corresponding to the target scene area and a third map entity element corresponding to the controlled virtual character based on the map data corresponding to the target scene area.
[0130] Optionally, the above-mentioned step of obtaining the map data of the corresponding target scene area through the map controller corresponding to each target scene area, and generating the map display content of the target scene area based on the map data corresponding to the target scene area, includes: for each scene area, obtaining the map data of the scene area through the map controller corresponding to the scene area, and generating the map display content of the scene area based on the map data corresponding to the scene area; the step of displaying the map display content of at least one target scene area on the graphical user interface includes: controlling the map display content of each target scene area to be visible, and controlling the map display content of other scene areas among the multiple scene areas except at least one target scene area to be invisible.
[0131] Optionally, the map display content includes multiple entity elements; the multiple entity elements include at least one interactive entity element; the method also includes: generating a first display layer in response to a selection operation on a first element in at least one interactive entity element; the display level of the first display layer is higher than the display level of the map display content; and displaying interactive information corresponding to the first element on the first display layer.
[0132] Optionally, the above method also includes: in response to a selection operation on a first element among at least one interactive entity element, updating a display format of the first element through a map controller corresponding to the target scene area; the updated display format is used to indicate that the first element is in a selected state.
[0133] Optionally, the above method also includes: in response to a map display perspective update instruction, determining update parameters corresponding to the map display content; the update parameters include movement parameters and / or zoom parameters; and updating the map display content based on the update parameters through a map controller corresponding to the target scene area.
[0134] Optionally, the above method also includes: in response to a map switching instruction, determining the target scene area after switching; controlling the map display content of the target scene area after switching to be visible, and controlling the map display content of other scene areas among the multiple scene areas except the target scene area after switching to be invisible.
[0135] Optionally, the above-mentioned multiple scene areas include global areas and local areas. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system and device can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0136] In addition, in the description of the embodiments of the present disclosure, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present disclosure can be understood according to specific circumstances.
[0137] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0138] In the description of the present disclosure, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present disclosure and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present disclosure. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0139] Finally, it should be noted that the above embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above embodiments, those skilled in the art should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for displaying a virtual scene map, characterized in that: Providing a graphical user interface through a terminal device; the method comprises: In response to a map display instruction for a virtual scene, determining at least one target scene area in the virtual scene; the virtual scene includes a plurality of scene areas; each of the scene areas has a corresponding map controller; Acquiring map data of the corresponding target scene area through the map controller corresponding to each target scene area, and generating map display content of the target scene area based on the map data corresponding to the target scene area; The map display content of the at least one target scene area is displayed on the graphical user interface.
2. The method according to claim 1, characterized in that The step of determining at least one target scene area in the virtual scene comprises: Determining a scene area where the controlled virtual character is located in the multiple scene areas as a target scene area; the controlled virtual character is controlled by the terminal device; Alternatively, in response to the map display instruction including an identifier of a first scene area among the multiple scene areas, the first scene area is determined as the target scene area.
3. The method according to claim 1, characterized in that: The map display content of the target scene area includes a first map entity element and a second map entity element; the first map entity element is used to display the terrain of the target scene area; the second map entity element is used to identify the virtual object in the target scene area; The step of generating map display content of the target scene area based on the map data corresponding to the target scene area comprises: Based on the map data corresponding to the target scene area, a first map entity element and a second map entity element corresponding to the target scene area are generated.
4. The method according to claim 3, characterized in that The step of generating a first map entity element and a second map entity element corresponding to the target scene area based on the map data corresponding to the target scene area comprises: In response to the controlled virtual character controlled by the terminal device being in the scene area, based on the map data corresponding to the target scene area, a first map entity element and a second map entity element corresponding to the target scene area and a third map entity element corresponding to the controlled virtual character are generated.
5. The method according to claim 1, characterized in that: The step of acquiring map data of the corresponding target scene area through the map controller corresponding to each target scene area, and generating map display content of the target scene area based on the map data corresponding to the target scene area comprises: For each of the scene areas, map data of the scene area is acquired through a map controller corresponding to the scene area, and map display content of the scene area is generated based on the map data corresponding to the scene area; The step of displaying the map display content of the at least one target scene area on the graphical user interface comprises: The map display content of each of the target scene areas is controlled to be in a visible state, and the map display content of other scene areas among the multiple scene areas except the at least one target scene area is controlled to be in an invisible state.
6. The method according to claim 1, characterized in that The map display content includes a plurality of entity elements; the plurality of entity elements include at least one interactive entity element; The method further comprises: In response to a selection operation on a first element of the at least one interactive entity element, a first display layer is generated; the display level of the first display layer is higher than the display level of the map display content; The interactive information corresponding to the first element is displayed on the first display layer.
7. The method according to claim 6, characterized in that The method further comprises: In response to a selection operation on a first element among the at least one interactive entity element, a display format of the first element is updated through a map controller corresponding to the target scene area; the updated display format is used to indicate that the first element is in a selected state.
8. The method according to claim 1, characterized in that The method further comprises: In response to a map display viewing angle update instruction, determining update parameters corresponding to the map display content; the update parameters include movement parameters and / or scaling parameters; The map display content is updated based on the update parameters through the map controller corresponding to the target scene area.
9. The method according to claim 5, characterized in that The method further comprises: In response to a map switching instruction, determining a target scene area after switching; The map display content of the switched target scene area is controlled to be in a visible state, and the map display content of other scene areas among the multiple scene areas except the switched target scene area is controlled to be in an invisible state.
10. The method according to claim 1, characterized in that The multiple scene areas include a global area and a local area.
11. A display device for a virtual scene map, characterized in that: Providing a graphical user interface through a terminal device; the device comprises: A target scene area determination module, configured to determine at least one target scene area in the virtual scene in response to a map display instruction for the virtual scene; the virtual scene includes a plurality of scene areas; each of the scene areas has a corresponding map controller; A map display content generation module, used to obtain map data of the target scene area through a map controller corresponding to the target scene area, and generate map display content of the target scene area based on the map data corresponding to the target scene area; A map display module is used to display map display content of at least one target scene area on the graphical user interface.
12. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the method for displaying a virtual scene map according to any one of claims 1 to 10.
13. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions prompt the processor to implement the method for displaying a virtual scene map according to any one of claims 1 to 10.