CN111973990A - Dynamic loading method and device of game map, electronic equipment and storage medium - Google Patents

Dynamic loading method and device of game map, electronic equipment and storage medium Download PDF

Info

Publication number
CN111973990A
CN111973990A CN202010846233.9A CN202010846233A CN111973990A CN 111973990 A CN111973990 A CN 111973990A CN 202010846233 A CN202010846233 A CN 202010846233A CN 111973990 A CN111973990 A CN 111973990A
Authority
CN
China
Prior art keywords
map
game map
display interface
game
loading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010846233.9A
Other languages
Chinese (zh)
Inventor
张会文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Pixel Software Technology Co Ltd
Original Assignee
Beijing Pixel Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Pixel Software Technology Co Ltd filed Critical Beijing Pixel Software Technology Co Ltd
Priority to CN202010846233.9A priority Critical patent/CN111973990A/en
Publication of CN111973990A publication Critical patent/CN111973990A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • A63F13/69Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor by enabling or updating specific game elements, e.g. unlocking hidden features, items, levels or versions
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • User Interface Of Digital Computer (AREA)
  • Instructional Devices (AREA)

Abstract

The application provides a dynamic loading method and device of a game map, electronic equipment and a storage medium. The method comprises the following steps: loading a first game map based on the pixel size of the display interface; the pixel size of the first game map is larger than that of the display interface, and the first game map is a sub-map of the total game map; when the presenting position of the first game map on the display interface is changed in position compared with the presenting position during loading, acquiring the position change amount of the presenting position; loading a second game map on the basis of the first game map based on the amount of position change; wherein the second game map is a subgraph of the overall game map. The dynamic loading method of the game map provided by the embodiment of the application dynamically determines the pixel size of the first game map based on the pixel size of the display interface, and further ensures that the electronic equipment cannot occupy too large memory when a game is started.

Description

Dynamic loading method and device of game map, electronic equipment and storage medium
Technical Field
The application relates to the field of game development, in particular to a dynamic loading method and device of a game map, electronic equipment and a storage medium.
Background
With the explosion of the theme in the world, the manufacture of the geomap in the world is not only realized by a simple UI, but also can support the functions of dragging, zooming in and out, seeking ways, marking and the like. At present, the whole game map is usually loaded at one time for loading the map, and the mode can bring serious memory consumption problems to equipment.
Disclosure of Invention
An object of the embodiments of the present application is to provide a dynamic loading method and apparatus for a game map, an electronic device, and a storage medium, so as to solve the problem of "there is severe memory consumption in a map loading manner in which a whole game map is loaded at one time".
The invention is realized by the following steps:
in a first aspect, an embodiment of the present application provides a method for dynamically loading a game map, where the method includes: loading a first game map based on the pixel size of the display interface; the pixel size of the first game map is larger than that of the display interface, and the first game map is a sub-map of the total game map; when the presenting position of the first game map on the display interface is changed in position compared with the presenting position during loading, acquiring the position change amount of the presenting position; loading a second game map on the basis of the first game map based on the amount of position change; wherein the second game map is a subgraph of the overall game map.
The dynamic loading method of the game map provided by the embodiment of the application dynamically determines the pixel size of the first game map based on the pixel size of the display interface, and further ensures that the electronic equipment cannot occupy too large memory when a game is started. In addition, the dynamic loading of the second game map is only related to the position variation of the presentation position on the display interface, so that the memory occupancy rate of the electronic device is lower under the condition of ensuring the effective loading of the game map.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, loading a first game map based on a pixel size of a display interface includes: determining the number of first map tiles required to be loaded and the row values and the column values of the first map tiles required to be loaded based on the pixel size of the display interface; the first map block is generated by segmenting the first map block according to a preset segmentation value based on the pixel size of the total game map in advance; each of the first map tiles includes row and column values; and loading the first game map according to the determined number of the first map blocks required to be loaded and the row values and the column values of the first map blocks required to be loaded.
In the embodiment of the application, the game map is divided into the map blocks containing the row values and the column values in advance, so that the dynamic loading of rows supplemented by rows and columns supplemented by columns is conveniently realized subsequently, the calculation amount is reduced, and the consumption is further reduced.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, the obtaining a position variation of the presentation position includes: and acquiring the position variation of the presentation position based on the row value and the column value of the first map block positioned at the center in the current display interface and the row value and the column value of the first map block positioned at the center in the display interface when the first map block is loaded.
In the embodiment of the application, the position variation of the presentation position is determined by the row value and the column value of the first map block positioned at the center in the display interface, and the determined position variation is more accurate.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, the obtaining a position variation of the presentation position includes: acquiring the position variation of the presentation position based on the pixel coordinates of the pixel point at the lower left corner in the display interface and the pixel coordinates of the pixel point at the lower left corner in the display interface during loading; and the pixel coordinates of the pixel points of the first game map are the same as the pixel coordinates of the pixel points of the total game map.
In the embodiment of the application, the position variation of the presentation position is obtained through the pixel coordinates of the pixel points of the lower left corner of the first game map in the display interface, and the method is simple and efficient.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, before the obtaining a location change amount of the presentation location when the presentation location of the first game map on the display interface changes from the presentation location at the time of loading, the method further includes: and judging whether the position of the first game map on the display interface is changed compared with the position of the first game map when the first game map is loaded at preset time intervals.
In the embodiment of the application, timer interval detection is adopted, namely, whether the position of the presentation position of the first game map on the display interface is changed or not is judged at preset time intervals, so that the reliability of dynamic loading of the map can be improved.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, before the obtaining a location change amount of the presentation location when the presentation location of the first game map on the display interface changes from the presentation location at the time of loading, the method further includes: judging whether a dragging operation of a user on the first game map is received; wherein the dragging operation of the first game map by the user represents that the user moves the presentation position of the first game map on the display interface.
In the embodiment of the application, the dragging operation of the first game map by the user is received, so that the judgment of whether the display position of the first game map on the display interface is changed is facilitated.
In a second aspect, an embodiment of the present application provides a dynamic loading apparatus for a game map, where the apparatus includes: the first loading module is used for loading a first game map based on the pixel size of the display interface; the pixel size of the first game map is larger than that of the display interface, and the first game map is a sub-map of the total game map; the obtaining module is used for obtaining the position variation of the presenting position when the presenting position of the first game map on the display interface is changed compared with the presenting position during loading; the second loading module is used for loading a second game map on the basis of the first game map on the basis of the position variation; wherein the second game map is a subgraph of the overall game map.
With reference to the technical solution provided by the second aspect, in some possible implementations, the first loading module is specifically configured to determine, based on a pixel size of the display interface, the number of first map tiles that need to be loaded and row values and column values of the first map tiles that need to be loaded; the first map block is generated by segmenting the first map block according to a preset segmentation value based on the pixel size of the total game map in advance; each of the first map tiles includes row and column values; and loading the first game map according to the determined number of the first map blocks required to be loaded and the row values and the column values of the first map blocks required to be loaded.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory, the processor and the memory connected; the memory is used for storing programs; the processor is configured to invoke a program stored in the memory to perform a method as provided in the above-described first aspect embodiment and/or in combination with some possible implementations of the above-described first aspect embodiment.
In a fourth aspect, embodiments of the present application provide a storage medium having stored thereon a computer program, which, when executed by a processor, performs a method as provided in the above-described first aspect embodiment and/or in connection with some possible implementations of the above-described first aspect embodiment.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 2 is a flowchart illustrating steps of a method for dynamically loading a game map according to an embodiment of the present application.
Fig. 3 is a schematic diagram of loading a first game map according to an embodiment of the present application.
Fig. 4 is a schematic view of a game map including a pixel point B according to an embodiment of the present application.
Fig. 5 is a schematic diagram of a first game map before a second game map is loaded according to an embodiment of the present application.
Fig. 6 is a schematic diagram of a first game map after a second game map is loaded according to an embodiment of the present application.
Fig. 7 is a block diagram of a dynamic loading apparatus for a game map according to an embodiment of the present application.
Icon: 100-an electronic device; 101-a processor; 102-a memory; 200-dynamic loading means of the game map; 201-a first load module; 202-an obtaining module; 203-second load module.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
At present, the loading of a map of a game is usually finished by loading the whole game map at one time, and the mode can bring serious memory consumption problems to equipment.
In view of the above problems, the present inventors have studied and researched to provide the following embodiments to solve the above problems.
Referring to fig. 1, a schematic block diagram of an electronic device 100 applying a dynamic loading method of a game map according to an embodiment of the present application is shown. In the embodiment of the present application, the electronic Device 100 may be, but is not limited to, a smart phone, a tablet Computer, a Personal Computer (PC), a Mobile Internet Device (MID), and the like. Structurally, electronic device 100 may include a processor 101 and a memory 102.
The processor 101 and the memory 102 are electrically connected directly or indirectly to enable data transmission or interaction, for example, the components may be electrically connected to each other via one or more communication buses or signal lines. The dynamic loading device of the game map includes at least one software module which can be stored in the memory 102 in the form of software or Firmware (Firmware) or solidified in an Operating System (OS) of the electronic device 100. The processor 101 is configured to execute executable modules stored in the memory 102, such as software function modules and computer programs included in the dynamic loading apparatus of the game map, so as to implement the dynamic loading method of the game map. The processor 101 may execute the computer program upon receiving the execution instruction.
The processor 101 may be an integrated circuit chip having signal processing capabilities. The Processor 101 may also be a general-purpose Processor, for example, a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a discrete gate or transistor logic device, or a discrete hardware component, which can implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present Application. Further, a general purpose processor may be a microprocessor or any conventional processor or the like.
The Memory 102 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), and an electrically Erasable Programmable Read-Only Memory (EEPROM). The memory 102 is used for storing a program, and the processor 101 executes the program after receiving the execution instruction.
It should be understood that the structure shown in fig. 1 is merely an illustration, and the electronic device 100 provided in the embodiment of the present application may have fewer or more components than those shown in fig. 1, or may have a different configuration than that shown in fig. 1. Further, the components shown in fig. 1 may be implemented by software, hardware, or a combination thereof.
Referring to fig. 2, fig. 2 is a flowchart illustrating steps of a dynamic loading method of a game map according to an embodiment of the present application, where the method is applied to the electronic device 100 shown in fig. 1. It should be noted that the dynamic loading method of the game map provided in the embodiment of the present application is not limited to the order shown in fig. 2 and below. The method comprises the following steps: step S101-step S103.
Step S101: loading a first game map based on the pixel size of the display interface; the pixel size of the first game map is larger than that of the display interface, and the first game map is a sub-map of the total game map.
Step S102: when the presenting position of the first game map on the display interface is changed in position compared with the presenting position during loading, the position change amount of the presenting position is obtained.
Step S103: loading a second game map on the basis of the first game map based on the amount of position change; wherein the second game map is a subgraph of the overall game map.
The dynamic loading method of the game map provided by the embodiment of the application dynamically determines the pixel size of the first game map based on the pixel size of the display interface, and further ensures that the electronic equipment cannot occupy too large memory when a game is started. In addition, the dynamic loading of the second game map is only related to the position variation of the presentation position on the display interface, so that the memory occupancy rate of the electronic device is lower under the condition of ensuring the effective loading of the game map.
The above steps are described below with reference to specific examples.
Step S101: loading a first game map based on the pixel size of the display interface; the pixel size of the first game map is larger than that of the display interface, and the first game map is a sub-map of the total game map.
When the electronic equipment runs the game, the position of the initial map can be randomly determined, and the game map can be loaded according to the scene sequence. The method specifically comprises the following steps: firstly, determining a target position, for example, when the user is the first login of the game, the target position is an initial starting point of a game map, such as a position corresponding to a new village or a first level, and the like. The target position is also related to the current game progress, for example, when the user logs in the game and is at the final stage, the target position is the position corresponding to the final stage. After the target position is determined, the pixel size of the first game map is determined based on the pixel size of the display interface. The pixel size of the first game map is larger than that of the display interface and smaller than that of the total game map, namely the first game map is a sub-image of the total game map. And finally loading the first game map.
The display interface is a screen interface of the electronic equipment used when the user logs in the game.
Referring to fig. 3, fig. 3 shows the total game map with a pixel size of 8192 × 8192 and the display interface with a pixel size of 1136 × 640. When the user logs in the game, the target position A is determined, and after the target position A is determined, the pixel size of the first game map is determined based on the pixel size 1136 × 640 of the display interface. The determining of the pixel size of the first game map based on the pixel size of the display interface may be that the horizontal pixel value of the first game map is obtained by adding a first preset value to the horizontal pixel value of the display interface, and the vertical pixel value of the first game map is obtained by adding a second preset value to the vertical pixel value of the display interface. Assuming that the first preset value and the second preset value are both 50, the pixel size of the display interface is 1136 × 640, 1136 is a horizontal pixel value of the display interface, and 640 is a vertical pixel value of the display interface, the pixel size of the first game map is 1186 × 690. Of course, the first preset value and the second preset value may also be different, for example, the first preset value may be 100, and the second preset value may be 1000, which is not limited in this application. For example, in the embodiment of the present application, the pixel size of the determined first game map may be 1186 × 690. A first map of size 1186 x 690 is then loaded, centered on the target location a.
It should be noted that the above dimensions are exemplary, and for example, the pixel size of the display interface may also be 1280 × 960, which is not limited in this application.
Optionally, based on the pixel size of the display interface, loading the first game map may also be based on the pixel size of the display interface, and determining the number of first map tiles required to be loaded and the row values and column values of the first map tiles required to be loaded; and loading the first game map according to the determined number of the first map blocks required to be loaded and the row values and the column values of the first map blocks required to be loaded.
It should be noted that the first map tiles are generated by splitting according to a preset splitting value in advance based on the pixel size of the total game map, wherein each first map tile includes a row value and a column value.
For example, still taking the total pixel size of the game map as 8192 × 8192 as an example, assuming that the preset division value is 256 × 256, the game map with the total pixel size of 8192 × 8192 is divided by the pixel size of 256 × 256, and a total of 32 rows and 32 columns can be generated, resulting in 1024 first map blocks. Each map tile includes row and column values. Then, when the user logs in the game, the number of the first map tiles required to be loaded and the row values and column values of the first map tiles required to be loaded are determined based on the pixel size of the display interface. Assuming that the pixel size of the display interface is 1136 × 640, the number of the first map tiles may be thirty-five tiles with seven rows and five columns, that is, the pixel size of the first map tile is 1792 × 1280. And determining that the pixel size of the first game map formed by the first map blocks is larger than the pixel size of the display interface. And the row value and the column value of the first map block required to be loaded are related to the target position, and assuming that the target position is at the middle position of the game map, the row value of the first map block ranges from 12 to 19 rows, and the column value of the first map block ranges from 13 to 18 columns. And finally, loading the first game map based on the determined number of the first map blocks required to be loaded and the row values and the column values of the first map blocks required to be loaded.
In the embodiment of the application, the game map is divided into the map blocks containing the row values and the column values in advance, so that the dynamic loading of rows supplemented by rows and columns supplemented by columns is conveniently realized subsequently, the calculation amount is reduced, and the consumption is further reduced.
Step S102: when the presenting position of the first game map on the display interface is changed in position compared with the presenting position during loading, the position change amount of the presenting position is obtained.
It should be noted that, the change of the presentation position of the first game map on the display interface means whether the map resource of the current presentation position changes, for example, if the map resource of the presentation position changes from a forest to a city, it indicates that the presentation position changes on the display interface, and at this time, the position change amount of the presentation position is obtained.
Optionally, the embodiment of the present application provides two detection mechanisms, a first detection mechanism is timer interval detection, and a second detection mechanism is drag callback detection.
First, the first timer interval detection will be described. And the timer detects at intervals, namely judges whether the position of the presentation position on the display interface changes every preset time, and acquires the position variation of the presentation position when the position of the presentation position on the display interface changes.
The preset time may be 0.2 second or 0.4 second, and the present application is not limited thereto.
If the first game map is loaded according to the first map block, it is determined that the presentation position of the first game map on the display interface changes, and it may be determined whether the presentation position changes on the display interface based on a row value and a column value of the first map block located at the center in the display interface. For example, taking the preset time 0.2 as an example, the row value and the column value of the first map block located in the center in the current display interface are detected every 0.2 seconds, for example, the row value and the column value of the first map block located in the center in the current display interface are 14 rows and 13 columns, and are compared with the row value and the column value of the first map block located in the center in the display interface detected before 0.2 seconds, when the row value and the column value of the first map block located in the center in the display interface detected before 0.2 seconds are also 14 rows and 13 columns, the position of the display position in the display interface is not changed, and when the row value and/or the column value of the first map block located in the center in the display interface detected before 0.2 seconds are not 14 rows and/or not 13 columns, the position of the display position in the display interface is changed.
After the position change of the presentation position on the display interface is determined in the above manner, based on the row value and the column value of the first map block located at the center in the current display interface and the row value and the column value of the first map block located at the center in the previous time display interface, the position change amount of the presentation position is obtained, for example, if the row value and the column value of the first map block located at the center in the current display interface are 14 rows and 13 columns, and the row value and the column value of the first map block located at the center in the display interface before 0.2 second are 14 rows and 14 columns, the position change amount is-1, that is, the column value change amount 13-14. For another example, if the row value of the first map block located at the center in the current display interface is 14 rows and the column value is 13 columns, and the row value of the first map block located at the center in the display interface 0.2 seconds before is 15 rows and the column value is 14 columns, the position change amounts are the row value change amount-1 and the column value change amount-1.
Correspondingly, if the first game map is loaded according to the first map block, the display position of the first game map on the display interface is judged to be changed, and whether the position of the display position on the display interface is changed or not can be judged based on the row value and the column value of the first map block positioned at the lower left corner in the display interface; or judging whether the position of the presentation position on the display interface changes or not based on the row value and the column value of the first map block positioned at the lower right corner in the display interface. The present application is not limited thereto. For a specific determination process, reference may be made to the above process of determining based on the row value and the column value of the first map block located at the center in the display interface, and repeated description is omitted here to avoid redundancy.
In the embodiment of the application, the position variation of the presentation position is determined by the row value and the column value of the first map block positioned at the center in the display interface, and the determined position variation is more accurate.
If the first game map is loaded directly according to the pixel size, the change of the presentation position of the first game map on the display interface is judged, and whether the position change of the presentation position on the display interface occurs or not can be judged based on the pixel coordinates of the pixel point at the lower left corner in the display interface.
It should be noted that the pixel coordinates of the pixel points of the first game map are the same as the pixel coordinates of the pixel points of the total game map, that is, the pixel coordinates of each pixel point of the first game map correspond to the pixel coordinates of each pixel point of the game map. Referring to fig. 4, for example, if the coordinates of the pixel B in the game map are (270, 180), when the first game map includes the pixel B and the pixel B is the first coordinate at the lower left of the first game map, the coordinates of the pixel B are still (270, 180) instead of (0, 0).
For example, taking the preset time 0.3 as an example, the pixel coordinate of the pixel point at the lower left corner in the current display interface is detected every 0.3 seconds, for example, the pixel coordinate of the pixel point at the lower left corner in the current display interface is (240, 300), the pixel coordinate of the pixel point at the lower left corner in the display interface detected before 0.3 seconds is compared with the pixel coordinate of the pixel point at the lower left corner in the display interface detected before 0.3 seconds, when the pixel coordinate of the pixel point at the lower left corner in the display interface detected before 0.3 seconds is also (240, 300), the position of the presentation position in the display interface is not changed, and when the pixel coordinate of the pixel point at the lower left corner in the display interface detected before 0.3 seconds is not (240, 300), the position of the presentation position in the display interface is changed.
After the position change of the presenting position on the display interface is determined through the above manner, the position change amount of the presenting position is obtained based on the pixel coordinate of the pixel point at the lower left corner in the current display interface and the pixel coordinate of the pixel point at the lower left corner in the display interface at the previous moment, for example, the pixel coordinate of the pixel point at the lower left corner in the current display interface is (240, 300), and the pixel coordinate of the pixel point at the lower left corner in the display interface before 0.3 second is (220, 300), and the position change amount is the transformation amount of the abscissa of the pixel point, that is, the transformation amount 240 of the abscissa of the pixel point is 20. For example, the pixel coordinate of the pixel point at the lower left corner in the current display interface is (240, 300), and the pixel coordinate of the pixel point at the lower left corner in the display interface before 0.3 second is (220, 280), the position variation is the transformation amount of the abscissa of the pixel point and the transformation amount of the ordinate of the pixel point, the transformation amount 240-.
Correspondingly, whether the position of the presentation position changes on the display interface is judged, and whether the position of the presentation position changes on the display interface can be judged based on the pixel coordinates of the pixel points at the lower right corner of the display interface; or judging whether the position of the display position on the display interface changes or not based on the pixel coordinates of the pixel point in the center of the display interface. The present application is not limited thereto. The specific judgment process may refer to the above process of judging based on the pixel coordinates of the pixel points at the lower left corner in the display interface, and is not repeated herein in order to avoid redundancy.
In the embodiment of the application, the position variation of the presentation position is obtained through the pixel coordinates of the pixel points of the lower left corner of the first game map in the display interface, and the method is simple and efficient.
In summary, the timer is used for detecting at intervals, that is, whether the position of the presented position on the display interface changes or not is judged at preset time intervals, so that the reliability of dynamic loading of the map can be improved.
Next, a second drag callback detection will be described.
And detecting the drag call-back, namely judging whether the drag operation of the user on the first game map is received. The dragging operation of the user on the first game map represents that the user moves the presenting position of the first game map on the display interface. That is, when the fact that the user drags the first game map is received, the fact that the position of the presentation position on the display interface is changed is indicated, and at the moment, the position change amount of the presentation position is obtained.
The method for acquiring the position variation of the presenting position may also be the method for acquiring the position variation of the presenting position in the timer interval detection. For example, after receiving a drag operation of the user on the first game map, a row value of the first map tile located at the center in the display interface is 14 rows, and a column value of the first map tile located at the center in the display interface is 13 columns, and before receiving the drag operation of the user on the first game map, a row value of the first map tile located at the center in the display interface is 14 rows, and a column value of the first map tile located at the center in the display interface is 14 columns, and the position variation is column value variation 13-14 ═ 1. For another example, after the drag operation of the user on the first game map is received, the pixel coordinate of the pixel point at the lower left corner in the display interface is (240, 300), and before the drag operation of the user on the first game map is received, the pixel coordinate of the pixel point at the lower left corner in the display interface is (220, 300), and the position variation is the transformation amount of the abscissa of the pixel point, that is, the transformation amount 240 and 220 of the abscissa of the pixel point are 20. Therefore, as to how to obtain the position variation of the presentation position, reference may be made to the manner of obtaining the position variation of the presentation position in the timer interval detection, and in order to avoid redundancy, a repeated description is not provided herein.
In the embodiment of the application, the dragging operation of the first game map by the user is received, so that the judgment of whether the display position of the first game map on the display interface is changed is facilitated.
Step S103: loading a second game map on the basis of the first game map based on the amount of position change; wherein the second game map is a subgraph of the overall game map.
Finally, a second game map is loaded on the first game map based on the determined amount of position change. For ease of understanding, please refer to fig. 5 and 6. Fig. 5 is a schematic diagram of the first game map before the second game map is loaded, and fig. 6 is a schematic diagram of the first game map after the second game map is loaded. To describe with the timer interval detection, assuming that the preset time is 0.2 seconds, the row value and the column value of the first map block located at the center in the current display interface are detected every 0.2 seconds, for example, if the row value of the first map block a1 located at the center in the current display interface is 14 rows and the column value is 13 columns, and the row value and the column value of the first map block a located at the center in the display interface detected before 0.2 seconds are 13 rows and 13 columns, the position change amount is 14-13, which is equal to 1. When the line value change amount is positive, it can be seen from the figure that when the display position of the display interface is moved upward, the second game map having the same value as the line value change amount should be loaded on the first game map. And when the row value transformation amount is negative, the display position of the display interface moves upwards, and a second game map with the same value as the row value transformation amount is correspondingly loaded below the first game map.
In other embodiments, a second game map with twice the amount of position change may be loaded on the basis of the first game map, and the present application is not limited thereto.
Referring to fig. 7, based on the same inventive concept, an embodiment of the present application further provides a dynamic loading apparatus 200 for a game map. The device includes: a first loading module 201, an obtaining module 202 and a second loading module 203.
A first loading module 201, configured to load a first game map based on a pixel size of a display interface; the pixel size of the first game map is larger than that of the display interface, and the first game map is a sub-map of the total game map.
An obtaining module 202, configured to obtain a location change amount of the presentation location when the presentation location of the first game map on the display interface is changed from the presentation location during the loading.
A second loading module 203, configured to load a second game map on the basis of the first game map based on the location variation; wherein the second game map is a subgraph of the overall game map.
Optionally, the first loading module 201 is specifically configured to determine, based on a pixel size of the display interface, a number of first map tiles that need to be loaded and row values and column values of the first map tiles that need to be loaded; the first map block is generated by segmenting the first map block according to a preset segmentation value based on the pixel size of the total game map in advance; each of the first map tiles includes row and column values; and loading the first game map according to the determined number of the first map blocks required to be loaded and the row values and the column values of the first map blocks required to be loaded.
Optionally, the obtaining module 202 is specifically configured to obtain the position variation of the presentation position based on the row value and the column value of the first map block located at the center in the current display interface and the row value and the column value of the first map block located at the center in the display interface at the time of loading.
Optionally, the obtaining module 202 is specifically configured to obtain the position variation of the presentation position based on the pixel coordinate of the pixel point at the lower left corner in the current display interface and the pixel coordinate of the pixel point at the lower left corner in the display interface during loading; and the pixel coordinates of the pixel points of the first game map are the same as the pixel coordinates of the pixel points of the total game map.
Optionally, the dynamic loading apparatus 200 of the game map further includes a first determining module, where the first determining module is configured to determine, at preset intervals, whether a position of the presentation position of the first game map on the display interface changes compared with the presentation position during loading before the position change amount of the presentation position is acquired when the presentation position of the first game map on the display interface changes compared with the presentation position during loading.
Optionally, the dynamic loading apparatus 200 of the game map further includes a second determining module, where the second determining module is configured to determine whether a drag operation of a user on the first game map is received before the position change amount of the presentation position is obtained when the presentation position of the first game map on the display interface is changed from the presentation position during the loading; wherein the dragging operation of the first game map by the user represents that the user moves the presentation position of the first game map on the display interface.
It should be noted that, as those skilled in the art can clearly understand, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Based on the same inventive concept, the present application further provides a storage medium, on which a computer program is stored, and when the computer program is executed, the computer program performs the method provided in the foregoing embodiments.
The storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A dynamic loading method of a game map is characterized by comprising the following steps:
loading a first game map based on the pixel size of the display interface; the pixel size of the first game map is larger than that of the display interface, and the first game map is a sub-map of the total game map;
when the presenting position of the first game map on the display interface is changed in position compared with the presenting position during loading, acquiring the position change amount of the presenting position;
loading a second game map on the basis of the first game map based on the amount of position change; wherein the second game map is a subgraph of the overall game map.
2. The dynamic loading method of the game map according to claim 1, wherein the loading of the first game map based on the pixel size of the display interface comprises:
determining the number of first map tiles required to be loaded and the row values and the column values of the first map tiles required to be loaded based on the pixel size of the display interface; the first map block is generated by segmenting the first map block according to a preset segmentation value based on the pixel size of the total game map in advance; each of the first map tiles includes row and column values;
and loading the first game map according to the determined number of the first map blocks required to be loaded and the row values and the column values of the first map blocks required to be loaded.
3. The dynamic loading method of game map according to claim 2, wherein said obtaining the position variation of the presentation position includes:
and acquiring the position variation of the presentation position based on the row value and the column value of the first map block positioned at the center in the current display interface and the row value and the column value of the first map block positioned at the center in the display interface when the first map block is loaded.
4. The dynamic loading method of game map according to claim 1, wherein said obtaining the position variation of the presentation position includes:
acquiring the position variation of the presentation position based on the pixel coordinates of the pixel point at the lower left corner in the display interface and the pixel coordinates of the pixel point at the lower left corner in the display interface during loading; and the pixel coordinates of the pixel points of the first game map are the same as the pixel coordinates of the pixel points of the total game map.
5. The dynamic loading method of the game map according to claim 1, wherein before the obtaining of the position change amount of the presentation position when the presentation position of the first game map on the display interface changes compared with the presentation position at the time of loading, the method further comprises:
and judging whether the position of the first game map on the display interface is changed compared with the position of the first game map when the first game map is loaded at preset time intervals.
6. The dynamic loading method of the game map according to claim 1, wherein before the obtaining of the position change amount of the presentation position when the presentation position of the first game map on the display interface changes compared with the presentation position at the time of loading, the method further comprises:
judging whether a dragging operation of a user on the first game map is received; wherein the dragging operation of the first game map by the user represents that the user moves the presentation position of the first game map on the display interface.
7. An apparatus for dynamic loading of a game map, the apparatus comprising:
the first loading module is used for loading a first game map based on the pixel size of the display interface; the pixel size of the first game map is larger than that of the display interface, and the first game map is a sub-map of the total game map;
the obtaining module is used for obtaining the position variation of the presenting position when the presenting position of the first game map on the display interface is changed compared with the presenting position during loading;
the second loading module is used for loading a second game map on the basis of the first game map on the basis of the position variation; wherein the second game map is a subgraph of the overall game map.
8. The dynamic loading device of the game map according to claim 7, wherein the first loading module is specifically configured to determine the number of first map tiles to be loaded and the row values and the column values of the first map tiles to be loaded based on the pixel size of the display interface; the first map block is generated by segmenting the first map block according to a preset segmentation value based on the pixel size of the total game map in advance; each of the first map tiles includes row and column values; and loading the first game map according to the determined number of the first map blocks required to be loaded and the row values and the column values of the first map blocks required to be loaded.
9. An electronic device, comprising: a processor and a memory, the processor and the memory connected;
the memory is used for storing programs;
the processor is configured to execute a program stored in the memory to perform the method of any of claims 1-6.
10. A storage medium, having stored thereon a computer program which, when executed by a computer, performs the method of any one of claims 1-6.
CN202010846233.9A 2020-08-20 2020-08-20 Dynamic loading method and device of game map, electronic equipment and storage medium Pending CN111973990A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010846233.9A CN111973990A (en) 2020-08-20 2020-08-20 Dynamic loading method and device of game map, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010846233.9A CN111973990A (en) 2020-08-20 2020-08-20 Dynamic loading method and device of game map, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111973990A true CN111973990A (en) 2020-11-24

Family

ID=73443525

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010846233.9A Pending CN111973990A (en) 2020-08-20 2020-08-20 Dynamic loading method and device of game map, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111973990A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117065331A (en) * 2023-08-25 2023-11-17 上海皿鎏数字科技有限公司 Game scene loading control method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1924873A (en) * 2006-09-19 2007-03-07 北京金山数字娱乐科技有限公司 Game map storage method and device, display method and system
CN109675309A (en) * 2019-02-01 2019-04-26 网易(杭州)网络有限公司 A kind of building method and device of scene of game
CN110559665A (en) * 2019-09-29 2019-12-13 珠海文景科技有限公司 Game map processing method and device, terminal device and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1924873A (en) * 2006-09-19 2007-03-07 北京金山数字娱乐科技有限公司 Game map storage method and device, display method and system
CN109675309A (en) * 2019-02-01 2019-04-26 网易(杭州)网络有限公司 A kind of building method and device of scene of game
CN110559665A (en) * 2019-09-29 2019-12-13 珠海文景科技有限公司 Game map processing method and device, terminal device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117065331A (en) * 2023-08-25 2023-11-17 上海皿鎏数字科技有限公司 Game scene loading control method and system
CN117065331B (en) * 2023-08-25 2024-03-12 上海皿鎏数字科技有限公司 Game scene loading control method and system

Similar Documents

Publication Publication Date Title
US10182018B2 (en) Resource management based on device-specific or user-specific resource usage profiles
US9678797B2 (en) Dynamic resource management for multi-process applications
US20140317524A1 (en) Automatic magnification and selection confirmation
JP6141262B2 (en) Removal and correction of target ambiguity
US20190188030A1 (en) Terminal background application management method and apparatus
EP3958120A1 (en) Method and device for anonymous page management, terminal device, and readable storage medium
US11275618B2 (en) Method, device and medium for allocating resource based on type of PCI device
CN110764986A (en) Page fluency detection method and device
CN110020383B (en) Page data request processing method and device
CN111068316A (en) Game frame number adjusting method and device, storage medium and electronic equipment
CN113625973A (en) Data writing method and device, electronic equipment and computer readable storage medium
CN112214276A (en) Information processing apparatus, system, and method, and non-transitory computer-readable recording medium
CN111973990A (en) Dynamic loading method and device of game map, electronic equipment and storage medium
CN111400633A (en) Page resource loading method and device
CN111127612A (en) Game scene node updating method and device, storage medium and electronic equipment
CN109597673B (en) Method for creating virtual machine and scheduling equipment
CN108733478B (en) Three-dimensional image processing method and device
US11413542B2 (en) Systems and methods for measuring and optimizing the visual quality of a video game application
CN111857854A (en) Shutdown resource loading method and device, storage medium and electronic equipment
CN115660941B (en) Image moving method and device, electronic equipment and computer readable storage medium
CN109271538A (en) A kind of picture storage method and relevant device
CN114546171A (en) Data distribution method, data distribution device, storage medium and electronic equipment
CN114546910A (en) Access control method, device, storage medium and electronic device
CN105224324A (en) A kind of method for information display and electronic equipment
CN111388994A (en) Method, device, equipment and storage medium for processing virtual props in game

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination