Method, device and electronic device for constructing mini-map in game
By creating functional components for each functional requirement and loading them into the interface or border components, the problem of low efficiency in minimap development is solved, the interface and functional logic are isolated, and the development efficiency and functional expansion are improved.
Patent Information
- Application Number
- CN202111085287.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-16
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-09-16
AI Technical Summary
The development efficiency of small and medium-sized maps in the existing technology is low, resulting in repeated code writing, poor function expansion, and affect development efficiency.
By creating corresponding functional components for each functional requirement and loading them into the interface component or border component, the isolation between functional components and border components is achieved, and the repeated writing of the program code for the interface and border is avoided.
It improves development efficiency, facilitates function expansion and maintenance management, reduces code redundancy, and improves development efficiency.
Smart Images

Figure CN113797539B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device and electronic device for constructing a mini-map in a game. Background Art
[0002] Minimaps are maps that are often placed in the corners of video game screens to help gamers determine the location of their characters in the game world. They usually only occupy a small area of the game interface and display some important information in the game. With the iteration and refinement of the game, the functions of the minimap are becoming more and more abundant. For example, it can display unit information such as player heroes, soldiers, and defense towers. It can also be used to communicate with teammates, notify teammates to assemble, attack, etc.
[0003] In the prior art, when constructing a small map of a game, all nodes are usually placed in a user interface (UI) node, and each node is maintained using a set of codes. When there are different requirements, different nodes are selected to display the small map.
[0004] However, the map construction method used in the prior art results in code overlap between each node, which causes developers to repeatedly write many functional codes when developing small maps, resulting in low development efficiency. Summary of the invention
[0005] The method, device and electronic device for constructing a mini-map in a game provided in the present application are used to solve the problem of low efficiency in mini-map development in the prior art.
[0006] In a first aspect, an embodiment of the present application provides a method for constructing a mini-map in a game, comprising:
[0007] Obtaining functional requirements for the mini-map of the target game, and establishing functional components corresponding to the functional requirements;
[0008] Determine a current interface component and a current frame component of the mini-map according to the current game data of the target game, wherein the current interface component is used to display the interface of the mini-map, and the current frame component is used for the user to interact with the mini-map;
[0009] The functional component is loaded into the current interface component or the current border component to construct the current mini-map of the target game. The functional component loaded into the current interface component or the current border component is used to implement the functional requirements in the current interface component or the current border component when triggered by a message event of the target game.
[0010] In a possible design of the first aspect, determining the current interface component and the current border component of the mini-map according to the current game data of the target game includes:
[0011] According to the current game data, obtain game map information and a border display position of a small map;
[0012] Determine and obtain the current interface component according to the game map information;
[0013] The current border component is created according to the border display position of the mini-map.
[0014] In another possible design of the first aspect, the step of creating the current border component according to the border display position of the mini-map includes:
[0015] If the frame display position is the left side of the game interface of the target game, a first current frame component is created;
[0016] If the frame display position is the right side of the game interface of the target game, a second current frame component is created, and the first current frame component and the second current frame component are different.
[0017] In another possible design of the first aspect, loading the functional component into the current interface component or the current frame component includes:
[0018] According to a preset corresponding relationship, the functional component corresponding to the current interface component is loaded into the current interface component;
[0019] Loading the functional component corresponding to the current frame component into the current frame component;
[0020] The functional components loaded into the current interface component and the functional components loaded into the current border component are registered with a preset message component, and the preset message component is used to obtain message events of the target game and distribute the message events to the functional components.
[0021] In another possible design of the first aspect, the constructing obtains the current mini-map of the target game, including:
[0022] Displaying the current interface component at a preset position in the game interface of the target game;
[0023] According to the preset position, determining a target display position of the current frame component in the game interface;
[0024] The current frame component is displayed at the target display position to construct a current mini-map of the target game.
[0025] In another possible design of the first aspect, after loading the functional component into the current interface component or the current border component to construct a current mini-map of the target game, the method further includes:
[0026] Obtain a first message event distributed by the preset message component to a first functional component loaded in the current interface component;
[0027] Creating a next border component of the mini-map according to the first message event, wherein the next border component and the current border component have different positions in the game interface of the target game;
[0028] According to the current interface component and the next border component, the next small map of the target game is constructed.
[0029] In another possible design of the first aspect, after creating the next border component of the mini-map according to the first message event, the method further includes:
[0030] Eliminate the current mini-map from the game interface.
[0031] In another possible design of the first aspect, before determining the current interface component and the current border component of the mini-map according to the current game data of the target game, the method further includes:
[0032] The game data of the target game is obtained from a server of the target game and / or a local client of the target game.
[0033] In a second aspect, an embodiment of the present application provides a device for constructing a mini-map in a game, comprising:
[0034] A requirement acquisition module, used to acquire the functional requirements of the small map of the target game and establish functional components corresponding to the functional requirements;
[0035] A component construction module, used to construct a current interface component and a current frame component of the mini-map according to the current game data of the target game, wherein the current interface component is used to display the interface of the mini-map, and the current frame component is used for the user to interact with the mini-map;
[0036] A map construction module is used to load the functional components into the current interface component or the current border component to construct the current mini-map of the target game. The functional components loaded into the current interface component or the current border component are used to implement the functional requirements in the current interface component or the current border component when triggered by a message event of the target game.
[0037] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and at least one processor;
[0038] The memory stores computer-executable instructions;
[0039] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method described above.
[0040] In a fourth aspect, an embodiment of the present application provides a readable storage medium, in which computer instructions are stored. When the computer instructions are executed by a processor, they are used to implement the method as described above.
[0041] In a fifth aspect, an embodiment of the present application provides a program product, including computer instructions, which implement the method described above when executed by a processor.
[0042] The method, device and electronic device for constructing a mini-map in a game provided in the embodiments of the present application can abstract each functional requirement into a corresponding functional component. When constructing the mini-map of the game, the interface display of the mini-map and the functional logic can be isolated, which is convenient for developers to carry out functional development and avoids the situation where each interface display is maintained with a separate set of codes, resulting in repeated code writing, thereby improving development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the description, are used to explain the principles of the present application;
[0044] Figure 1 A schematic diagram of a scene of a method for constructing a mini-map in a game provided in an embodiment of the present application;
[0045] Figure 2 A flowchart of a first embodiment of a method for constructing a mini-map in a game provided in an embodiment of the present application;
[0046] Figure 3 A schematic diagram of a first game interface provided in an embodiment of the present application;
[0047] Figure 4 A flowchart of a second embodiment of a method for constructing a mini-map in a game provided in an embodiment of the present application;
[0048] Figure 5 A schematic diagram of a second game interface provided in an embodiment of the present application;
[0049] Figure 6 A schematic diagram of a third game interface provided in an embodiment of the present application;
[0050] Figure 7 A schematic diagram showing a first current frame component provided in an embodiment of the present application;
[0051] Figure 8 A schematic diagram showing a second current frame assembly provided in an embodiment of the present application;
[0052] Fig. 9 A schematic diagram of the component framework of the mini-map provided in the embodiment of the present application;
[0053] Fig.10 A schematic diagram showing a small map provided in an embodiment of the present application;
[0054] Fig.11 A schematic diagram showing the current interface components provided in the embodiment of the present application;
[0055] Fig.12 A schematic diagram of the position switching of the small map provided in an embodiment of the present application;
[0056] Fig.13 A schematic diagram of the structure of a device for constructing a mini-map in a game provided in an embodiment of the present application;
[0057] Fig.14 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0058] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0060] First, the terms involved in this application are explained:
[0061] Minimap:
[0062] A minimap is a map that is often placed in the corner of a video game screen to help gamers locate their character in the game world. The elements displayed on the minimap generally vary depending on the type of game, and can be the player character, the surrounding terrain, allied units or structures, enemies, important locations, or props. Because minimaps are responsible for indicating important elements of the entire game world, they are very common in video games and games. Most first-person shooter games also have some version or variation of a minimap, usually showing real-time enemies.
[0063] UI:
[0064] User Interface (UI) refers to the medium for interaction and information exchange between the system of an electronic device and the user. It realizes the conversion between the internal form of information and the form acceptable to humans.
[0065] Figure 1 A schematic diagram of a scene of a method for constructing a mini-map in a game provided in an embodiment of the present application, such as Figure 1 As shown, the mobile terminal 11 may be a mobile phone with some electronic games installed in it. When a user opens these electronic games to play, the mobile phone display screen will display the game screen. The user can operate the virtual character in the game screen by clicking, sliding, etc. on the display screen according to the content displayed in the game screen, and control the movement and attack of the virtual character. In order to improve the user's gaming experience, a small map of the game world can also be displayed on the display screen, and the user can determine the position of the virtual character in the game world according to the small map.
[0066] During the game development process, the design of the minimap was initially mainly to facilitate users to determine the location of virtual characters in the game world and to display the overall appearance of the game world. However, with the iteration and refinement of the game, the existing minimap design is not only satisfied with information display, but even contains a lot of interactive operation logic. For example, the current minimap is not only used to display various unit information such as virtual characters, soldiers / monsters, defense towers, etc., but also to send various types of information to facilitate communication between players, such as notifying teammates to gather, launch attacks, retreat, etc. In general, the current minimap carries more information and has more powerful functional requirements.
[0067] In the prior art, when developing and designing a small map, developers generally design a set of program codes to maintain the interface display of a small map. For example, the small map can be displayed in the upper left corner of the display screen, or it can be displayed in the upper right corner of the display screen. The developer develops a set of program codes respectively. When the small map needs to be displayed in the upper left corner of the display screen, the first set of program codes is called, and when the small map needs to be displayed in the upper right corner of the display screen, another set of program codes is called. In this way, each interface display of the small map will correspond to a set of program codes. As the functional requirements of the small map increase, the program code will become repetitive, resulting in code redundancy, which is inconvenient for maintenance and management, and this development method has poor functional extensibility, which is inconvenient for developers to expand functions later, affecting development efficiency.
[0068] In response to the above problems, the embodiments of the present application provide a method, device and electronic device for constructing a mini-map in a game. By creating a corresponding functional component for each functional requirement of the user and then loading it into the interface component or the border component, the interface, border and functional components of the game mini-map can be isolated, and designers do not need to repeatedly write program code for the interface and border, thereby improving development efficiency. At the same time, it is also convenient for designers to expand functions and perform maintenance and management.
[0069] Figure 2 This is a flow chart of a method for constructing a mini-map in a game provided in an embodiment of the present application. This method can be applied to a computer device or a mobile terminal. Figure 2 As shown, the method may specifically include the following steps:
[0070] S201. Obtain functional requirements for a small map of a target game, and establish functional components corresponding to the functional requirements.
[0071] In this embodiment, the functional requirements are used to improve the player's gaming experience. For example, the functional requirements may be to display the position of the virtual character operated by the player in the minimap, to display the target building position in the minimap, to send information in the minimap (for example, a player marks a position in the minimap to notify other players that he is heading to the position or to notify other players to gather at the position or to notify other players to attack the position, etc.).
[0072] The functional component may be specifically implemented by a section of program code. When the functional component is executed by a computer device or a mobile terminal device, the corresponding functional requirements can be implemented on the mini-map.
[0073] For example, Figure 3 A schematic diagram of a first game interface provided in an embodiment of the present application, such as Figure 3As shown, the minimap is displayed in the upper right corner of the game interface 31. The minimap includes an interface component 321 and a border component 322 enclosing the side of the interface component 321. Some function buttons are set in the border component 322. These function buttons correspond to a function component respectively. When the player clicks these function buttons, the corresponding function component will be triggered, and the function component will realize the corresponding function requirement in the interface component 321.
[0074] Exemplarily, the function buttons include a collection button, a query button, an attack button, and a mini-map close button. Exemplarily, the player can click the collection button, and the function component corresponding to the collection button will display a collection prompt on the interface component 321 according to the player's click operation, notifying other players to operate their respective virtual character collections.
[0075] Exemplarily, the border component 322 is also loaded with a functional component for displaying the avatar frames of other players (such as player a, player b, player c, player d, player e, player f, player g). Exemplarily, when a player is killed, his avatar frame goes out, and when the player is reborn, the avatar frame lights up again, making it convenient for other players to understand the survival status of each player in real time.
[0076] Exemplarily, the interface component 321 is loaded with a functional component that can display the positions of virtual characters operated by players in the interface component 321, for example, displaying the positions of virtual characters operated by player a, player b, player c, player d, player e, player f, and player g.
[0077] S202: Determine a current interface component and a current border component of the mini-map according to current game data of the target game.
[0078] Among them, the current interface component is used to display the interface of the minimap, and the current border component is used for users to interact with the minimap.
[0079] Specifically, the current interface component may be the above-mentioned interface component 321, and the current border component may be the above-mentioned border component 322. Both the current interface component and the current border component are implemented by a piece of program code. When the computer device or mobile terminal executes the program code, the above-mentioned interface component 321 will be displayed on the display screen of the computer device or mobile terminal, and the above-mentioned border component 322 will be displayed on the display screen.
[0080] It should be noted that when neither the current interface component nor the current border component has loaded a functional component, it can be regarded as a UI node that cannot realize functional requirements.
[0081] For example, the target game may be a multiplayer online competitive game pre-downloaded in a computer device or a mobile terminal. For example, the multiplayer online competitive game includes multiple maps, and each game played by the player can only load one map, and the maps loaded in different games may be different. At the beginning of the game, the player can also set the display of the game content, such as setting the small map to be displayed in the upper right corner of the display screen by default.
[0082] The current game data refers to the game data included when the player plays the game. For example, the current game data includes the player's setting information, the map information loaded in the game, and the like.
[0083] In this embodiment, each map can be pre-designed with a corresponding interface component stored locally or in the cloud. The computer device or mobile terminal determines the interface component corresponding to the loaded map based on the map required for the current game and uses the corresponding relationship to display the interface component 321 on the game interface 31.
[0084] In some implementations, the game data of the target game may be obtained from a server of the target game and / or a local client of the target game.
[0085] For example, the map information loaded by the long game in the game data can be obtained from the local client, and the player's setting information can be obtained from the server. For example, the player can set a small map to be displayed in the upper right corner of the game interface during the game, and the setting information generated by the player is first sent to the server, and then forwarded by the server to the computer device or mobile terminal.
[0086] S203: Load the functional component into the current interface component or the current border component to construct a current mini-map of the target game.
[0087] Among them, the functional component loaded in the current interface component or the current border component is used to realize the functional requirements in the current interface component or the current border component when triggered by the message event of the target game.
[0088] In this embodiment, the functional component is used to implement specific functions and can be regarded as an abstraction of a specific type of requirements. It needs to be loaded into the interface component or the frame component to implement the specific function. For example, taking the position of the virtual character operated by the player in the interface component 321 as an example of a functional component, this functional component needs to use the interface component 321 as a carrier when implementing its specific function.
[0089] Some functional components are loaded into the current interface component, and some functional components are loaded into the current border component. For example, the functional component that displays the position of the virtual character operated by the player is loaded into the current interface component.
[0090] The message events of the target game can be divided into two categories, one is the message events generated by the interaction between the player and the minimap, and the other is the notification message events of the server parameters. Among them, the messages generated by the interaction between the player and the minimap mainly include clicks, long presses, and expansions, etc. These message events will be distributed to the corresponding functional components to trigger the corresponding functional components to realize their functional requirements. The notification message events of server parameters are mainly message events triggered by players in the game, which are used to perform functions. For example, the virtual character operated by player A kills the virtual character operated by player B in the game. The message event will trigger the corresponding functional component, so that the corresponding functional component displays a prompt message on the interface component. The prompt message includes text and / or pictures to prompt other players that the virtual character operated by player B is killed by the virtual character operated by player A.
[0091] The embodiment of the present application establishes a corresponding functional component for each functional requirement, thereby isolating the functional component from the interface component and the border component. When constructing a small map, it is only necessary to load these functional components into the interface component or the border component accordingly. When functional requirements are subsequently increased, the interface component and the border component can be reused, thereby reducing development workload and improving development efficiency.
[0092] Figure 4 A flow chart of a second embodiment of a method for constructing a mini-map in a game provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, in the above step S202 can be specifically implemented by the following steps:
[0093] S401, obtaining functional requirements for a small map of a target game, and establishing functional components corresponding to the functional requirements;
[0094] S402, obtaining game map information and a border display position of a small map according to current game data;
[0095] S403, determining the current interface component according to the game map information;
[0096] S404: Create a current border component according to the border display position of the mini-map.
[0097] S405: Load the functional component into the current interface component or the current border component to construct a current mini-map of the target game.
[0098] Among them, step S401 and step S405 correspond to the above-mentioned step S201 and step S203, and are not described in detail here. This embodiment will only describe S402 and S403.
[0099] In this embodiment, taking the target game as a multiplayer online competitive game as an example, it includes multiple different game maps. When the game maps are different, the loaded interface components will also change.
[0100] For example, Figure 5 A schematic diagram of a second game interface provided in an embodiment of the present application, such as Figure 5 As shown, the interface component 521 displayed on the game interface 51 is Figure 3 The interface component 321 in is different because Figure 3 The game maps used in Figure 5 The game maps used in the game are different.
[0101] Among them, the frame component 522 is also Figure 3 The border component 322 in the game is different. The border component 522 includes a zoom button and a setting button, each corresponding to a functional component. The functional component corresponding to the zoom button is used to enlarge or reduce the size of the minimap, and the functional component corresponding to the setting button is used for the player to set the minimap, such as setting the display position of the minimap in the game interface 51.
[0102] For example, Figure 6 A schematic diagram of a third game interface provided in an embodiment of the present application, such as Figure 6 As shown, the small map is displayed in the upper left corner of the game interface 61. The small map includes an interface component 621 and a frame component 622 enclosed on the side of the interface component 621. The frame component 622 is provided with some function buttons, such as a setting button, a zoom button, etc. These function buttons correspond to a function component. When the player clicks these function buttons, the corresponding function component is triggered to realize its function requirements. There are also some virtual buttons for players to operate in the game interface 61, such as "return to the city", "attack", "spell" and "heal", etc.
[0103] In this embodiment, the border display position can be set by the player. If the player sets the border display position to the upper left, then Figure 6 As shown, the frame component 622 is displayed at the upper left corner of the game interface 61. The player sets the frame display position to the upper right corner. Figure 3 As shown, the border component 322 is displayed at the upper right corner of the game interface 31 .
[0104] For example, the frame components displayed at different positions may be different, such as Figure 3 and Figure 6As shown, the functional components loaded by the border component 322 and the border component 622 are different. The border component 322 is loaded with a collection button, an inquiry button, an attack button, etc., while the border component 622 is loaded with a zoom button and a setting button, and these buttons correspond to a different functional component respectively.
[0105] Among them, in a game, the current interface component will not change, but there can be multiple border components in a game. The border components can be dynamically loaded according to the needs of players during the game, such as loading border component 322 or loading border component 622.
[0106] In one embodiment, the above “creating a current border component according to the border display position of the mini-map” can be implemented by the following steps:
[0107] If the border display position is on the left side of the game interface of the target game, a first current border component is created;
[0108] If the border display position is on the right side of the game interface of the target game, a second current border component is created.
[0109] The first current border component and the second current border component are different.
[0110] Specifically, the border display position is used to indicate the display position of the border component in the game interface. If the border display position is the left side of the game interface of the target game, the border component needs to be displayed in the upper left corner of the game interface, and a first current border component needs to be created. Similarly, if the border display position is the right side of the game interface of the target game, a second current border component needs to be created.
[0111] For example, Figure 7 A schematic diagram showing a first current frame component provided in an embodiment of the present application, such as Figure 7 As shown, the first current border component 72 is displayed at the upper left corner of the game interface 71 . Figure 8 A schematic diagram showing a second current frame component provided in an embodiment of the present application, such as Figure 8 As shown, the second current border component 82 is displayed in the upper right corner of the game interface 81 , and there is a difference between the first current border component 72 and the second current border component 82 .
[0112] The embodiment of the present application determines the position of the current interface component and further determines the position of the current border component, thereby ensuring that the current interface component does not change in each game, and the current border component can be adjusted according to the position of the current interface component. There is no need to repeatedly develop the program code of the current interface component, thereby improving development efficiency.
[0113] Fig. 9 A schematic diagram of the component framework of the mini-map provided in the embodiment of the present application, such as Fig. 9 As shown, it includes a preset message component 91, an interface component 92, a first frame component 93, a second frame component 94 and a functional component 95. Among them, there is only one interface component 92 in each game, which is loaded with several functional components, and the frame component can be two or more, exemplarily including a first frame component 93 and a second frame component 94, and each frame component is loaded with several functional components. It should be noted that the functional requirements implemented by the functional components loaded in the interface component 92 and the functional components loaded in the frame component 93 are different.
[0114] In the above step S203, "loading the functional component into the current interface component or the current frame component" can be implemented by the following steps:
[0115] According to the preset corresponding relationship, the functional component corresponding to the current interface component is loaded into the current interface component;
[0116] Load the functional component corresponding to the current border component into the current border component;
[0117] Register the function components loaded into the current interface component and the function components loaded into the current border component to the preset message component.
[0118] Among them, the preset message component is used to obtain the message events of the target game and distribute the message events to the functional components.
[0119] In this embodiment, the preset correspondence is used to indicate that the functional component is loaded into the current interface component or the current frame component. Exemplarily, the functional component that displays the position of the virtual character operated by the player in the interface component 321 should be loaded into the current interface component.
[0120] Among them, the current interface component is used to create the current minimap UI object, and the functional components loaded in the current interface component are used to implement specific functional requirements. The current border component is mainly responsible for the current minimap edge UI node, and the functional components loaded in the current border component are used to implement the minimap edge UI node functions, such as including a zoom button for minimap zooming and a collection button for initiating a collection message.
[0121] Each functional component registered to the preset message component is responsible for a specific type of function implementation. It needs to register with the preset message component to listen for messages of interest. For example, each functional component can set a listening event in the preset message component to listen for message events of interest. If so, the functional component will be triggered to implement its specific functions in the current interface component or the current border component.
[0122] Exemplarily, the message events obtained by the preset message component include the above two categories, namely, one is the message events generated by the interaction between the player and the mini-map, and the other is the notification message events of the server parameters.
[0123] Fig.10 A schematic diagram showing a small map provided in an embodiment of the present application, such as Fig.10 As shown, the small map displayed on the game interface 100 is located at the upper left of the game interface 100, and includes an interface component 1001 and a frame component 1002. Further, the "constructing and obtaining the current small map of the target game" in the above step S203 can be specifically implemented by the following steps:
[0124] Display the current interface component at a preset position in the game interface of the target game;
[0125] According to the preset position, determine the target display position of the current border component in the game interface;
[0126] Display the current border component at the target display position to construct the current mini-map of the target game.
[0127] Specifically, in a game, the position of the current interface component on the game interface may change, but its actual content will not change. When the position of the current border component on the game interface changes, the content of the current border component will also change ( Figure 3 The border component in Figure 7 The border components in the .
[0128] Fig.11 A schematic diagram showing the current interface components provided in the embodiment of the present application, namely map information, such as Fig.11 As shown, the map information contained in the current interface component 110 will not change in a game, but in different games, due to the different game maps used, the interface components in different games may be different.
[0129] Exemplarily, the map information includes obstacles, monster locations, map boundaries, and the like.
[0130] In this embodiment, the preset position may be a position set by the player by default. For example, the player sets the current interface component to be displayed in the upper left corner of the game interface by default. After entering the game, the current interface component will be displayed in the upper left corner. The current frame component needs to be surrounded by the current interface component. Therefore, after determining the display position of the current interface component, the target display position can be further obtained.
[0131] Exemplarily, the target display position is the side area of the current interface component.
[0132] The embodiment of the present application can improve the display effect by attaching the border component to the interface component and combining them together. Game players cannot feel that the mini-map is actually composed of two UI nodes (i.e., the interface component and the border component).
[0133] Further, based on the above embodiment, in some embodiments, the method for constructing a mini-map in the above game further includes the following steps:
[0134] Obtain a first message event distributed by a preset message component to a first functional component loaded in the current interface component;
[0135] According to the first message event, create the next border component of the small map;
[0136] According to the current interface component and the next border component, the next small map of the target game is constructed.
[0137] The positions of the next border component and the current border component in the game interface of the target game are different.
[0138] In this embodiment, the first message event may be generated by a player, and the first message event is used to indicate that the player needs to switch the display position of the mini-map, for example, switching the mini-map from the upper left display to the upper right display.
[0139] In a game, there can be multiple frame components, but there is only one frame component displayed on the game interface, namely the current frame component. If the preset message component receives the first message event generated by the player, it will distribute it to the first function component of the current interface component, and the first function component is used to implement the minimap switching management.
[0140] Among them, the function specifically implemented by the first functional component is to select the next border component from several border components, then display the next border component to the upper right corner of the game interface, and adjust the position of the current interface component to match the next border component.
[0141] For example, Fig.12 A schematic diagram of the position switching of the small map provided in the embodiment of the present application is shown as follows: Fig.12 As shown, the current interface component 1201 and the current border component 1202 are initially displayed in the upper left corner of the game interface 1200. When the player generates a first message event indicating that the display position of the minimap needs to be switched, the first functional component will select the next border component 1203 and display the next border component 1203 in the upper right corner of the game interface 1200. At the same time, the position of the current interface component 1201 is adjusted to match it with the next border component 1203.
[0142] The embodiment of the present application creates the next mini-map. During the game, if the user adjusts the mini-map to be displayed on the right, it is only necessary to recreate the border component on the right. The interface component of the mini-map on the left is still reused. There is no need to use two sets of function codes to maintain the left mini-map and the right mini-map respectively, thereby reducing code redundancy.
[0143] Further, based on the above embodiment, in some embodiments, the method for constructing the mini-map in the above game further includes the following steps:
[0144] Remove the current mini-map from the game interface.
[0145] In this embodiment, after the next small map is created, the current small map will be eliminated from the game interface.
[0146] Exemplarily, the current mini-map includes the current interface component, the current border component, and the functional components loaded in the current interface component or the current border component, all of which will be eliminated from the display interface to improve the display effect of the game interface.
[0147] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0148] Fig.13 A schematic diagram of the structure of a device for constructing a mini-map in a game provided in an embodiment of the present application, such as Fig.13 As shown, the construction device 1301 includes a demand acquisition module 1302 , a component construction module 1303 , and a map construction module 1304 .
[0149] The requirement acquisition module 1302 is used to obtain the functional requirements for the small map of the target game and establish the functional components corresponding to the functional requirements. The component construction module 1303 is used to construct the current interface component and the current border component of the small map according to the current game data of the target game. The map construction module 1303 is used to load the functional component into the current interface component or the current border component to construct the current small map of the target game.
[0150] Among them, the current interface component is used to display the interface of the minimap, and the current border component is used for users to interact with the minimap. The functional component loaded in the current interface component or the current border component is used to implement functional requirements in the current interface component or the current border component when triggered by a message event of the target game.
[0151] In some embodiments, the component building module 1303 may be specifically used for:
[0152] According to the current game data, obtain the game map information and the border display position of the small map;
[0153] According to the game map information, determine the current interface component;
[0154] Create the current border component according to the border display position of the mini-map.
[0155] Optionally, in some embodiments, the component building module 1303 may be specifically used for:
[0156] If the border display position is on the left side of the game interface of the target game, a first current border component is created;
[0157] If the border display position is on the right side of the game interface of the target game, a second current border component is created.
[0158] The first current border component and the second current border component are different.
[0159] In some embodiments, the map construction module 1304 may be specifically used to:
[0160] According to the preset corresponding relationship, the functional component corresponding to the current interface component is loaded into the current interface component;
[0161] Load the functional component corresponding to the current border component into the current border component;
[0162] Register the function components loaded into the current interface component and the function components loaded into the current border component to the preset message component.
[0163] Among them, the preset message component is used to obtain the message events of the target game and distribute the message events to the functional components.
[0164] Optionally, in some embodiments, the map construction module 1304 may be specifically used for:
[0165] Display the current interface component at a preset position in the game interface of the target game;
[0166] According to the preset position, determine the target display position of the current border component in the game interface;
[0167] Display the current border component at the target display position to construct the current mini-map of the target game.
[0168] In some embodiments, the constructing device 1301 further includes a map switching module for:
[0169] Obtain a first message event distributed by a preset message component to a first functional component loaded in the current interface component;
[0170] According to the first message event, a next border component of the small map is created, and the next border component and the current border component are located at different positions in the game interface of the target game;
[0171] According to the current interface component and the next border component, the next small map of the target game is constructed.
[0172] Optionally, in some embodiments, the construction device 1301 further includes a map elimination module, which is used to:
[0173] Remove the current mini-map from the game interface.
[0174] In some embodiments, the construction device 1301 further includes a data acquisition module for:
[0175] Obtain game data of the target game from a server of the target game and / or a local client of the target game.
[0176] The device provided in the embodiments of the present application can be used to execute the method in the above embodiments. Its implementation principle and technical effects are similar and will not be repeated here.
[0177] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the map construction module can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0178] Fig.14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.14 As shown, the electronic device 140 includes: at least one processor 1401 , a memory 1402 , a bus 1403 and a communication interface 1404 .
[0179] The processor 1401 , the communication interface 1404 and the memory 1402 communicate with each other via the bus 1403 .
[0180] The communication interface 1404 is used to communicate with other devices. The communication interface includes a communication interface for data transmission and a display interface or operation interface for human-computer interaction.
[0181] The processor 1401 is used to execute the computer-executable instructions stored in the memory 1402, so that at least one processor can execute the relevant steps in the method described in the above embodiment.
[0182] The processor may be a central processing unit, or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the electronic device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0183] The memory is used to store computer executable instructions. The memory may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0184] This embodiment also provides a readable storage medium, in which computer instructions are stored. When at least one processor of an electronic device executes the computer instructions, the electronic device executes the method for constructing a mini-map in a game provided by the various embodiments described above.
[0185] This embodiment also provides a program product, which includes computer instructions, and the computer instructions are stored in a readable storage medium. At least one processor of the electronic device can read the computer instructions from the readable storage medium, and at least one processor executes the computer program / instructions so that the electronic device implements the method for constructing a mini-map in a game provided by the various embodiments described above.
[0186] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0187] It is to be understood that the various numerical numbers involved in the embodiments of the present application are only for the convenience of description and are not intended to limit the scope of the embodiments of the present application. In the embodiments of the present application, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0188] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for constructing a mini-map in a game, characterized in that: include: Obtaining functional requirements for a small map of a target game, and establishing a corresponding functional component for each functional requirement; wherein the functional component is an abstraction of a class of requirements; Determine a current interface component and a current frame component of the mini-map according to the current game data of the target game, wherein the current interface component is used to display the interface of the mini-map, and the current frame component is used for the user to interact with the mini-map; The functional component is loaded into the current interface component or the current border component to realize the function of the current interface component or the current border component, and the current small map of the target game is constructed. The functional component loaded into the current interface component or the current border component is used to realize the functional requirement in the current interface component or the current border component when triggered by the message event of the target game; the functional component is isolated from the current interface component and the current border component; After the function component is loaded into the current interface component or the current frame component to construct the current small map of the target game, the method further includes: In a game, obtaining a first message event distributed by a preset message component to a first functional component loaded in the current interface component; the first message event is used to indicate switching the display position of the mini-map; According to the first message event, keeping the interface component unchanged, creating a next border component of the mini-map, wherein the next border component and the current border component have different positions in the game interface of the target game, so that the border component is adjusted according to the position of the interface component; According to the current interface component and the next border component, the next small map of the target game is constructed.
2. The method according to claim 1, characterized in that The step of determining the current interface component and the current border component of the mini-map according to the current game data of the target game includes: According to the current game data, obtain game map information and a border display position of a small map; Determine and obtain the current interface component according to the game map information; The current border component is created according to the border display position of the mini-map.
3. The method according to claim 2, characterized in that The step of creating the current border component according to the border display position of the mini-map includes: If the frame display position is the left side of the game interface of the target game, a first current frame component is created; If the frame display position is the right side of the game interface of the target game, a second current frame component is created, and the first current frame component and the second current frame component are different.
4. The method according to claim 1, characterized in that: The step of loading the functional component into the current interface component or the current frame component includes: According to a preset corresponding relationship, the functional component corresponding to the current interface component is loaded into the current interface component; Loading the functional component corresponding to the current frame component into the current frame component; The functional components loaded into the current interface component and the functional components loaded into the current border component are registered with a preset message component, and the preset message component is used to obtain message events of the target game and distribute the message events to the functional components.
5. The method according to claim 4, characterized in that The construction obtains the current small map of the target game, including: Displaying the current interface component at a preset position in the game interface of the target game; According to the preset position, determining a target display position of the current frame component in the game interface; The current frame component is displayed at the target display position to construct a current mini-map of the target game.
6. The method according to claim 1, characterized in that After creating the next border component of the mini-map according to the first message event, the method further includes: Eliminate the current mini-map from the game interface.
7. The method according to claim 1, characterized in that Before determining the current interface component and the current border component of the mini-map according to the current game data of the target game, the method further includes: The game data of the target game is obtained from a server of the target game and / or a local client of the target game.
8. A device for constructing a mini-map in a game, characterized in that: include: A requirement acquisition module is used to acquire the functional requirements of the small map of the target game and establish a corresponding functional component for each functional requirement; wherein the functional component is an abstraction of a class of requirements; A component construction module, used to construct a current interface component and a current frame component of the mini-map according to the current game data of the target game, wherein the current interface component is used to display the interface of the mini-map, and the current frame component is used for the user to interact with the mini-map; A map construction module, used for loading the functional component into the current interface component or the current border component to realize the function of the current interface component or the current border component, and constructing the current small map of the target game, wherein the functional component loaded into the current interface component or the current border component is used for realizing the functional requirement in the current interface component or the current border component when triggered by a message event of the target game; the functional component is isolated from the current interface component and the current border component; The map construction module is further used to obtain a first message event distributed by a preset message component to a first functional component loaded in the current interface component in a game; the first message event is used to indicate switching the display position of the mini-map; According to the first message event, keeping the interface component unchanged, creating a next border component of the mini-map, wherein the next border component and the current border component have different positions in the game interface of the target game, so that the border component is adjusted according to the position of the interface component; According to the current interface component and the next border component, the next small map of the target game is constructed.
9. An electronic device, characterized in that: comprising a memory and at least one processor; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that: The readable storage medium stores computer instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
11. A program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Information processing method, device, electronic equipment and memory medium
CN107715454A
Information processing method and device, electronic equipment and storage medium
CN107741819A
Method and device for generating signals in games, method and device for displaying signals in games, equipment and medium
CN110115837A
Information processing device
JP2017170110A
Method of reproducing online game replay, and production system thereof
KR101613368B1
