Game map display method, device, electronic device and computer-readable storage medium

By dividing the 3D game map into multiple grids and filling the blank area according to the player's position and field of view, the problem of game cameras showing blanks at the edge of the map is solved, improving gaming experience and performance.

CN114404948BActive Publication Date: 2025-05-09BEIJING PIXEL SOFTWARE TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111613164.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-05-09
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

In 3D games, game cameras often display blank issues on the edge of the game map, affecting the player's gaming experience.

Method used

By dividing the game map into multiple grids and storing it, the player's current position in the game scene is obtained, and the target grid whose position coordinates are consistent with the current position are filled with the current position. When the player is at the edge of the map, according to the player's field of view, the blank position of the edge of the game map is filled from the dictionary, and the map features of the retrieved grid are displayed.

Benefits of technology

It effectively solves the problem of game cameras showing blank spaces on the edge of the game map, improves players' gaming experience, and improves game performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114404948B_ABST
    Figure CN114404948B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention proposes a game map display method, device, electronic device and computer-readable storage medium, which belongs to the field of computer graphics. The method is applied to an electronic device, and the electronic device includes a dictionary. The dictionary stores a plurality of grids divided by a game map, and the grids include position coordinates and map elements. The method includes: obtaining the current position of the player in the game scene, retrieving a target grid whose position coordinates are consistent with the current position to fill the current position, and displaying the map elements of the target grid, and judging whether the player is at the edge of the map according to the current position, if so, retrieving grids outside the field of view from the dictionary according to the field of view of the player to fill the blank positions at the edge of the game map, and displaying the map elements of the retrieved grids, so that the blank positions can display map elements, thereby improving the problem of the game camera displaying blank spaces at the edge of the game map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer graphics, and in particular to a game map display method, device, electronic device and computer-readable storage medium. Background Art

[0002] Three-dimensional games generally refer to 3D games. 3D games are games that use spatial computers to implement operations. From the perspective of programming implementation, the basic game model (the game's tasks, scenes, and basic terrain) is implemented using a three-dimensional model, and the game's character control is implemented using a spatial programming algorithm. In 3D games, the game map is one of the important factors that affect the player's gaming experience.

[0003] The game camera is one of the basic components of 3D games, used to observe the game world, for example, to follow the character from a distance when walking, to illuminate the character from a close distance when fighting monsters, and to switch perspectives. However, in current 3D games and map tests, it is very easy for the camera to display blank space at the edge of the map. Summary of the invention

[0004] In view of this, an object of the present invention is to provide a game map display method, device, electronic device and computer-readable storage medium, which can improve the problem that the game camera easily displays blank space at the edge of the game map in current 3D games and map tests.

[0005] In order to achieve the above-mentioned purpose, the technical solution adopted in the embodiment of the present invention is as follows.

[0006] In a first aspect, the present invention provides a game map display method, which adopts the following technical solution.

[0007] A game map display method is applied to an electronic device, wherein the electronic device includes a dictionary, wherein the dictionary stores a plurality of grids divided by a game map, wherein the grids include position coordinates and map elements, and the method includes:

[0008] Obtain the current position of the player in the game scene, retrieve a target grid whose position coordinates are consistent with the current position to fill the current position, and display the map elements of the target grid;

[0009] According to the current position, determining whether the player is at the edge of the map;

[0010] If so, based on the field of view of the player, grids outside the field of view are retrieved from the dictionary to fill the blank positions at the edge of the game map, and the map elements of the retrieved grids are displayed.

[0011] In a feasible implementation manner, the method further includes:

[0012] If the player is not at the edge of the game map, the field of view of the player is obtained, and the grids within the field of view are retrieved from the dictionary to fill the surrounding area of ​​the current position.

[0013] In a feasible implementation manner, the step of retrieving grids within the field of view from the dictionary to fill the surrounding area of ​​the current position according to the field of view of the player includes:

[0014] Retrieving the grid within the player's field of view from the dictionary;

[0015] According to the position coordinates of the grids, each of the grids is filled to a corresponding position within the field of vision of the player, and the map elements of the grids within the field of vision are displayed.

[0016] In a feasible implementation manner, the step of retrieving the grid within the player's field of view from the dictionary includes:

[0017] Calculating the position information of the grid within the player's field of view according to the width of the grid;

[0018] According to the position information, a grid whose position coordinates are consistent with the position information is retrieved from the dictionary.

[0019] In a feasible implementation manner, the step of retrieving, from the dictionary, grids outside the field of view to fill blank positions at the edge of the game map according to the field of view of the player includes:

[0020] According to the current position, combined with the preset map information, a blank position around the current position is obtained;

[0021] The field of view of the player is obtained, grids that are outside the field of view and whose relative positions to the current position meet preset rules are retrieved from the dictionary, and the blank positions are filled with the grids.

[0022] In a feasible implementation manner, the method further includes:

[0023] Divide the game map into a plurality of grids according to preset specifications, and obtain the position coordinates of each grid on the game map;

[0024] The position coordinates of the grid and the map elements in the grid are stored in the dictionary in a mapping relationship.

[0025] In a feasible implementation manner, the step of obtaining the field of view of the player includes:

[0026] The field of view parameters of the current game camera are obtained, and combined with the current position, the field of view range of the player is calculated.

[0027] In a second aspect, the present invention provides a game map display device, which adopts the following technical solution.

[0028] A game map display device includes a dictionary, a first filling module and a second filling module;

[0029] The dictionary is used to store a plurality of grids divided by the game map, wherein the grids include position coordinates and map elements;

[0030] The first filling module is used to obtain the current position of the player in the game scene, retrieve a target grid whose position coordinates are consistent with the current position to fill the current position, and display the map elements of the target grid;

[0031] The second filling module is used to determine whether the player is at the edge of the map based on the current position. If so, based on the player's field of view, retrieve grids outside the field of view from the dictionary to fill the blank positions on the edge of the game map, and display the map elements of the retrieved grids.

[0032] In a third aspect, the present invention provides an electronic device, which adopts the following technical solution.

[0033] An electronic device includes a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the game map display method as described in the first aspect.

[0034] In a fourth aspect, the present invention provides a computer-readable storage medium, which adopts the following technical solution.

[0035] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the game map display method as described in the first aspect.

[0036] The game map display method, device, electronic device and computer-readable storage medium provided by the embodiments of the present invention divide the game map into multiple grids and store them. After the player enters the game, the current position of the player in the game scene is obtained, and the targets with position coordinates consistent with the current position are called to fill the current position respectively. When the player is at the edge of the map, the grids outside the player's field of view are called to fill the blank positions at the edge of the game map, and the map elements of the called grids are displayed, so that the blank positions at the edge of the game map can display map elements, thereby improving the problem of the game camera easily displaying blank spaces at the edge of the game map in current 3D games and map tests.

[0037] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are specifically listed below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 A block diagram of an electronic device provided by an embodiment of the present invention is shown.

[0040] Figure 2 A block diagram of a game system provided by an embodiment of the present invention is shown.

[0041] Figure 3 A flowchart diagram showing some steps of a game map display method provided by an embodiment of the present invention is shown.

[0042] Figure 4 A flowchart diagram showing another part of the steps of the game map display method provided by an embodiment of the present invention is shown.

[0043] Figure 5 Shows Figure 3 or Figure 4 Schematic diagram of the process flow of some sub-steps of S107.

[0044] Figure 6 A schematic diagram showing a game map provided by an embodiment of the present invention after being divided into grids.

[0045] Figure 7 Shows Figure 4 Schematic diagram of the process flow of some sub-steps of S109.

[0046] Figure 8 Shows Figure 7 Schematic diagram of the flow chart of some sub-steps of step S109-1.

[0047] Fig. 9 A flowchart diagram showing another part of the steps of the game map display method provided by an embodiment of the present invention is shown.

[0048] Fig.10 A block diagram of a game map display device provided by an embodiment of the present invention is shown.

[0049] Icons: 100 - electronic device; 110 - memory; 120 - processor; 130 - communication module; 140 - game system; 150 - server; 160 - client; 170 - game map display device; 180 - dictionary; 190 - first filling module; 200 - second filling module. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0051] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.

[0052] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0053] Unity engine is a real-time 3D interactive content creation and operation platform. All creators, including game developers, artists, architects, car designers, and film and television, use Unity to turn their ideas into reality. Most 3D games are developed based on the Unity engine, and 3D games such as mobile games and online games are one of the main forms of entertainment for modern people. With the development of Internet technology, players have higher and higher requirements for the experience of 3D games. In 3D games, the game map is one of the important factors that affect the player's gaming experience.

[0054] The game camera is one of the basic components of 3D games and is used to observe the game world. The game camera determines the player's game field of view and perspective. However, the game map has a certain size and cannot be infinite. Therefore, in the current 3D game and map testing, it is very easy to have the problem that the game camera displays blank space at the edge of the game map.

[0055] Based on the above considerations, the present invention provides a game map display method, device, electronic device and computer-readable storage medium.

[0056] Please refer to Figure 1 , is a block diagram of an electronic device 100. The electronic device 100 includes a memory 110, a processor 120, and a communication module 130. The memory 110, the processor 120, and the communication module 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines.

[0057] The memory 110 is used to store computer programs, machine executable instructions or data. The memory 110 can be, but is not limited to, random access memory (RAM), read only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable read-only memory (EEPROM), etc.

[0058] The processor 120 is used to read / write data, computer programs or machine executable instructions stored in the memory 110 and perform corresponding functions. Specifically, the processor 120 executes the computer program or machine executable instructions in the memory 110 to implement the game map display method provided by the present invention.

[0059] The communication module 130 is used to establish a communication connection between the electronic device 100 and other communication terminals through a network, and to send and receive data through the network.

[0060] It should be understood that Figure 1 The structure shown is only a schematic diagram of the structure of the electronic device 100. The electronic device 100 may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0061] The electronic device 100 may be, but is not limited to, a computer, a mobile phone, an IPad, a notebook computer, a server 150 , a mobile Internet device, etc. The server 150 may be an independent server 150 or a server 150 cluster.

[0062] Please refer to Figure 2 , Figure 2 1 is a block diagram of a game system 140, in which the game map display method provided by the present invention is applied. The game system 140 includes a game server 150 and multiple clients 160, and the game server 150 and the multiple clients 160 are connected via network communication. Multiple clients 160 can play games in the same game scene, such as playing on the same game map or fighting in an arena. Each game supported by the game server 150 includes multiple game maps, and one client 160 can support at least one player to play the game.

[0063] The client 160 can download game data packets from the server 150 to install or update the game. The game on the client 160 can be a stand-alone game or a network game.

[0064] The client 160 may be a computer, a mobile phone, an IPad, a notebook computer, a mobile Internet device, etc. That is, the client 160 is one of the electronic devices 100 described above.

[0065] In one embodiment, see Figure 3 , which is a flow chart of the game map display method provided by the present invention. In this embodiment, the method is mainly applied to Figure 2 The client 160 in FIG. 1 is used as an example.

[0066] At this time, the client 160 includes a dictionary 180, and the dictionary 180 stores a plurality of grids divided by the game map, wherein the grids include position coordinates and map elements.

[0067] S101, obtaining the current position of the player in the game scene.

[0068] Specifically, the client 160 obtains the current position of the player in the game scene through the game camera.

[0069] It should be noted that the player refers to the player character, not the user.

[0070] S103, retrieving a target grid whose position coordinates are consistent with the current position to fill the current position, and displaying the map elements of the target grid.

[0071] S105, judging whether the player is at the edge of the map according to the current position. If so, executing step S107.

[0072] S107, according to the field of vision of the player, grids outside the field of vision are retrieved from the dictionary to fill the blank positions at the edge of the game map, and the map elements of the retrieved grids are displayed.

[0073] In the above-mentioned game map display method, the game map is divided into multiple grids and stored. After the player enters the game, the current position of the player in the game scene is obtained, and the targets whose position coordinates are consistent with the current position are called to fill the current position. When the player is at the edge of the map, the grids outside the player's field of view are called to fill the blank positions at the edge of the game map, and the map elements of the called grids are displayed, so that the blank positions at the edge of the game map can display map elements, thereby improving the current 3D game and map testing. The problem that the game camera easily displays blank spaces at the edge of the game map is improved.

[0074] It should be understood that map elements include vegetation, soil, landforms, oceans, land water systems, animals, hydrology, meteorology, NPCs, etc. Thus, by displaying map elements, a game map can be displayed.

[0075] On the basis of the above, refer to Figure 4 The game map display method provided by the present invention further includes step S109. In step S105, the step S109 determines whether the player is at the edge of the map according to the current position. If the player is not at the edge of the game map, step S109 is executed.

[0076] S109, obtaining the field of view of the player, and retrieving the grids within the field of view from the dictionary to fill the surrounding area of ​​the current position.

[0077] Specifically, the client 160 obtains the player's field of view through the game camera, and retrieves the grids within the field of view to fill the area within the field of view.

[0078] When the player is not at the edge of the game map, according to the player's field of view, only the grids within the field of view are called to fill the area within the player's field of view, and the area outside the field of view does not need to be filled, which reduces the game map rendering workload of the game camera, thereby reducing resource consumption and calculation complexity, and can effectively save device performance consumption and improve game performance.

[0079] Further, in one embodiment, for S107, refer to Figure 5 , Figure 5 It is a flowchart of some sub-steps of S107, including the following steps.

[0080] S107-1, based on the current position and in combination with preset map information, obtain blank positions around the current position.

[0081] The preset map information includes the position coordinates of each grid after the game map is divided into multiple grids. In addition, the current position is also expressed in the form of coordinates. That is, the preset map information and the current position are expressed in the same way.

[0082] Specifically, the client 160 can obtain the position of the player's current position in the preset map information based on the player's current position, and thus can know whether there is a blank position around the current position (ie, within the field of view).

[0083] S107-2, obtaining the field of view of the player, retrieving from the dictionary the grids outside the field of view whose relative positions to the current position conform to preset rules, and filling the blank positions with the grids.

[0084] The retrieved grids outside the field of view are grids whose relative positions to the blank positions conform to preset rules, so that the grid filling has regularity, thereby increasing the filling speed.

[0085] In one implementation, the preset rule in S107 - 2 may include being symmetrical with the axis of the current position and being symmetrical with the center of the current position.

[0086] For example, refer to Figure 6 , the game map is a 7*7 grid. If the player's position is (0,0) at this time, the positions of (-1,0), (0,-1) and (-1,-1) are blank areas. Then the grids with position coordinates (7,0), (0,7) and (7,7) can be called to fill the blank positions with position coordinates (-1,0), (0,-1) and (-1,-1) in turn. (7,0) is symmetrical with (0,0) on the X axis, (0,7) is symmetrical with (0,0) on the Y axis, and (7,7) is symmetrical with (0,0) on the center.

[0087] In other implementations, the preset rule may include being symmetrical with the axis of the blank position and being symmetrical with the center of the blank position.

[0088] It should be understood that different games, different game maps, and different game development may have different preset rules.

[0089] And, in one embodiment, for step S109, refer to Figure 7 , Figure 7 It is a flowchart of some sub-steps of S109, including the following steps.

[0090] S109-1, retrieve the grid within the player's field of view from the dictionary.

[0091] S109-2, filling each grid to the corresponding position within the player's field of view according to the position coordinates of the grid, and displaying the map elements of the grid within the field of view.

[0092] Please continue to refer to Figure 6 , with the current position being (2,2) and the field of view being the surrounding eight grids (0,0), (0,1), (0,2), (0,3), (3,2), (3,3), (2,3), (1,3) and (1,2), then the grids with position coordinates of (0,0), (0,1), (0,2), (0,3), (3,2), (3,3), (2,3), (1,3) and (1,2) are retrieved from dictionary 180, filled in the corresponding positions in turn, and the map elements of the grids are displayed.

[0093] Further, with respect to S109-1, referring to FIG. 8, Figure 8 This is a flowchart of some sub-steps of S109-1. The following steps are used to retrieve the grids within the player's field of view from the dictionary 180.

[0094] S201, calculating the position information of the grid within the player's field of view according to the width of the grid.

[0095] S202, according to the location information, retrieve from the dictionary a grid whose location coordinates are consistent with the location information.

[0096] For details, please refer to Figure 6, take the game map as a 7*7 grid, the field of view parameter of the game camera as 500, and the grid width as 256 as an example, the field of view is about two grids (500 / 256), so the 8 grids around the current position are the field of view. If the current position is (2,2), then the area with positions (0,0), (0,1), (0,2), (0,3), (3,2), (3,3), (2,3), (1,3) and (1,2) is the field of view. Therefore, calling the grids with position coordinates (0,0), (0,1), (0,2), (0,3), (3,2), (3,3), (2,3), (1,3) and (1,2) can call the grids within the player's field of view.

[0097] From the above content, it can be seen that by knowing the field of view parameters and the current position (the field of view parameter of the game camera is 500, and the grid width is 256), the steps of "obtaining the player's field of view" in S109 and S107-2 can be implemented.

[0098] Specifically, "obtaining the player's field of view" can be achieved by obtaining the field of view parameters of the current game camera and calculating the player's field of view in combination with the current position.

[0099] In addition, the game map display method provided by the present invention also includes the step of obtaining and storing the grid, referring to Fig. 9 Specifically, this step includes the following steps.

[0100] S301, dividing the game map into a plurality of grids according to a preset specification, and obtaining the position coordinates of each grid on the game map.

[0101] Specifically, the client 160 establishes a coordinate system on the game map, and the coordinate system uses a preset specification as a basic unit to divide the game map on which the coordinate system is constructed into a plurality of grids, each of which has its own position coordinates.

[0102] S302, storing the position coordinates of the grid and the map elements in the grid in a dictionary in a mapping relationship.

[0103] It should be understood that a complete game has more than one game map, so the dictionary 180 stores grids of multiple game maps. Multiple game maps can be numbered and the game map numbers can be added to the corresponding grids of the game maps to identify which game map the grid belongs to.

[0104] In a specific implementation, when the player operates the game camera to move, the client 160 obtains the player's position coordinates through the game camera, and determines whether the player character has moved based on the player's position coordinates, and obtains the grid corresponding to the player's current position (i.e., the grid whose position coordinates are consistent with the current position) through the position coordinates after each movement of the player, thereby retrieving the grid corresponding to the current position to fill the player's current position, and according to the preset width of the grid, obtains the grid within the player's field of view to fill the surrounding visible area of ​​the player's current position.

[0105] Furthermore, the game map display method provided by the present invention can independently call a grid (i.e., move a grid) to fill it, without the need to move a large grid composed of multiple grids, thereby meeting the requirements of the current pixel game engine that players can move to any position on the game map, thereby improving the sophistication of the game.

[0106] In addition, the game map display method provided by the present invention can effectively improve the testing efficiency of artists in testing the continuity of the map and enable artists to model the terrain more efficiently.

[0107] It should be noted that this embodiment uses the game map display method provided by the present invention to be applied to the client 160 in the game system 140 as an example, but it does not mean that the game map display method can only be applied to the client 160 of the game system 140. The game map display method can be applied to the server 150 of the game system 140, and can also be applied to various pixel software 3D engines, such as unity. And these application scenarios are only examples, not scope limitations.

[0108] It should be understood that although Figure 3-Figure 9 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 3-Figure 9 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0109] In order to execute the corresponding steps in the above-mentioned implementation manner and each possible method, a method for implementing the game map display device 170 is given below. Optionally, the game map display device 170 can adopt the above-mentioned Figure 1The device structure of the electronic device 100 is shown. Fig.10 , Fig.10 This is a functional module diagram of a game map display device 170 provided in an embodiment of the present invention. It should be noted that the basic principle and technical effects of the game map display device 170 provided in this embodiment are the same as those of the above-mentioned embodiments. For the sake of brief description, for parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above-mentioned embodiments. The game map display device 170 includes: a dictionary 180, a first filling module 190 and a second filling module 200.

[0110] The dictionary 180 is used to store a plurality of grids divided by the game map.

[0111] Among them, the grid includes location coordinates and map elements.

[0112] The first filling module 190 is used to obtain the current position of the player in the game scene, retrieve the target grid whose position coordinates are consistent with the current position to fill the current position, and display the map elements of the target grid.

[0113] The second filling module 200 is used to determine whether the player is at the edge of the map based on the current position. If so, based on the player's field of view, grids outside the field of view are retrieved from the dictionary 180 to fill the blank positions on the edge of the game map, and the map elements of the retrieved grids are displayed.

[0114] Optionally, the above modules can be stored in the form of software or firmware. Figure 1 The processor 120 in the memory 110 shown in FIG1 is executed. Meanwhile, the data, program codes, etc. required to execute the above modules can be stored in the memory 110.

[0115] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device implementation described above is only schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0116] In addition, the functional modules in various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0117] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, 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. The computer software product is stored in a storage medium, including several instructions for 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 invention. 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 codes.

[0118] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A game map display method, characterized in that: Applied to an electronic device, the electronic device includes a dictionary, the dictionary stores a plurality of grids divided by a game map, the grids include position coordinates and map elements, the method includes: Obtain the current position of the player in the game scene, retrieve a target grid whose position coordinates are consistent with the current position to fill the current position, and display the map elements of the target grid; According to the current position, determining whether the player is at the edge of the map; If so, based on the field of view of the player, grids outside the field of view are retrieved from the dictionary to fill the blank positions on the edge of the game map, and the map elements of the retrieved grids are displayed; wherein the blank positions on the edge of the game map are outside the game map.

2. The game map display method according to claim 1, characterized in that: The method further comprises: If the player is not at the edge of the game map, the field of view of the player is obtained, and the grids within the field of view are retrieved from the dictionary to fill the surrounding area of ​​the current position.

3. The game map display method according to claim 2, characterized in that: The step of retrieving grids within the field of view from the dictionary to fill the surrounding area of ​​the current position according to the field of view of the player includes: Retrieving the grid within the player's field of view from the dictionary; According to the position coordinates of the grids, each of the grids is filled to a corresponding position within the field of vision of the player, and the map elements of the grids within the field of vision are displayed.

4. The game map display method according to claim 3, characterized in that: The step of retrieving the grid within the player's field of view from the dictionary includes: Calculating the position information of the grid within the player's field of view according to the width of the grid; According to the position information, a grid whose position coordinates are consistent with the position information is retrieved from the dictionary.

5. The game map display method according to claim 1, characterized in that: The step of retrieving, from the dictionary, grids outside the field of view to fill blank positions at the edge of the game map according to the field of view of the player comprises: According to the current position, combined with preset map information, a blank position around the current position is obtained; The field of view of the player is obtained, grids that are outside the field of view and whose relative positions to the current position meet preset rules are retrieved from the dictionary, and the blank positions are filled with the grids.

6. The game map display method according to claim 1, characterized in that: The method further comprises: Divide the game map into a plurality of grids according to preset specifications, and obtain the position coordinates of each grid on the game map; The position coordinates of the grid and the map elements in the grid are stored in the dictionary in a mapping relationship.

7. The game map display method according to claim 2 or 5, characterized in that: The step of obtaining the player's field of view includes: The field of view parameters of the current game camera are obtained, and combined with the current position, the field of view range of the player is calculated.

8. A game map display device, characterized in that: including a dictionary, a first filling module and a second filling module; The dictionary is used to store a plurality of grids divided by the game map, wherein the grids include position coordinates and map elements; The first filling module is used to obtain the current position of the player in the game scene, retrieve a target grid whose position coordinates are consistent with the current position to fill the current position, and display the map elements of the target grid; The second filling module is used to determine whether the player is at the edge of the map based on the current position. If so, based on the field of view of the player, retrieve grids outside the field of view from the dictionary to fill the blank positions on the edge of the game map, and display the map elements of the retrieved grids; wherein the blank positions on the edge of the game map are outside the game map.

9. An electronic device, characterized in that: It includes a processor and a memory, the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the game map display method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the game map display method as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Game map storage method and device, display method and system

    CN1924873A