Game copy implementation method, device, storage medium and electronic device
By creating multiple scene instances and determining the target instance, only the resources in the current scene area are loaded, the performance burden caused by multi-scene game copies is solved, and the load balancing and response speed of the game is improved.
Patent Information
- Application Number
- CN202211124821.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-15
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-09-15
AI Technical Summary
In the prior art, the implementation method of multi-scene game copy results in too large resources for a single scene, which brings a large performance burden to the game client and server.
By creating multiple scene instances corresponding to the game copy and determining the target scene instance from multiple scene instances, the game character is controlled to enter the target scene instance, only the resources in the current scene area are loaded, and server information capture is reduced.
It reduces the performance burden of game clients and servers and solves the possible connectivity vulnerabilities between non-connected scene areas.
Smart Images

Figure CN115487501B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, storage medium and electronic device for implementing a game copy. Background Art
[0002] Game copy is an important way of playing massively multiplayer online role-playing games (full name: Massive Multiplayer Online Role-Playing Game, English abbreviation: MMORPG). Game copy is a part of the virtual world in the game, consisting of a set of independent map scenes. Only players and teams composed of players can enter the same game copy. Different players or teams cannot see each other and cannot support each other.
[0003] In the related art, the implementation method of multi-scene game copies is to place multiple scene areas of the multi-scene game copies on the same map, that is, to design the multi-scene game copies as a single-scene super-large copy composed of multiple scene areas. However, this implementation method will cause the resources of a single scene to be too large, which will in turn cause a large performance burden on the game client and game server. Summary of the invention
[0004] The purpose of this application is to provide a game copy implementation method, device, storage medium and electronic device to reduce the scene resources required to load to enter the game copy, thereby reducing the performance burden of the game client and the game server.
[0005] The present application embodiment provides a method for implementing a game copy, including:
[0006] In response to the game character successfully matching the game copy, multiple scene instances corresponding to the game copy are created, the game copy includes multiple scene areas that are not connected to each other, and each scene area corresponds to a scene instance;
[0007] determining a target scene instance from a plurality of scene instances;
[0008] Control the game character to enter the target scene instance.
[0009] The embodiment of the present application also provides a game copy implementation device, including:
[0010] A creation module, configured to create a plurality of scene instances corresponding to the game copy in response to the game character successfully matching the game copy, wherein the game copy includes a plurality of scene areas that are not connected to each other, and each scene area corresponds to a scene instance;
[0011] A first determining module, used to determine a target scene instance from multiple scene instances;
[0012] The first control module is used to control the game character to enter the target scene instance.
[0013] The creation module is specifically used for:
[0014] Get an unused sequence number from a pre-established sequence number pool;
[0015] Get the scene area number of each scene area;
[0016] Determine the scene instance number corresponding to each scene area according to the sequence number and the scene area number of each scene area;
[0017] Create a scene instance corresponding to the scene instance number for each scene area.
[0018] The game copy implementation device further includes:
[0019] A second determination module, used to determine an index scene instance from multiple scene instances;
[0020] The first determination module is specifically used for:
[0021] In response to a request for the game character to enter the game copy, a target scene instance number is determined according to a scene instance number of an index scene instance corresponding to the game copy and a scene area number of a scene area that the game character needs to enter;
[0022] Determine a target scene instance from multiple scene instances whose scene instance number is consistent with the target scene instance number.
[0023] The game copy implementation device further includes:
[0024] A receiving module, used for receiving a scene instance destruction instruction, wherein the scene instance destruction instruction carries the scene instance number of the index scene instance to be destroyed;
[0025] A third determination module is used to determine the scene instance numbers of multiple scene instances to be destroyed corresponding to the target game copy according to the scene instance number of the index scene instance to be destroyed and the scene area numbers of multiple scene areas in the target game copy corresponding to the scene instance number of the index scene instance to be destroyed;
[0026] A destruction module is used to destroy multiple scene instances to be destroyed;
[0027] A marking module is used to mark the sequence number used by the scene instance number of the index scene instance to be destroyed as unused in response to successfully destroying multiple scene instances to be destroyed.
[0028] The game copy implementation device further includes:
[0029] An acquisition module, used to acquire a first scene instance number of a first scene instance where the first game character is currently located, and a second scene instance number of a second scene instance where the second game character is currently located;
[0030] A fourth determination module is used to determine, according to the first scene instance number, a third scene instance number of an index scene instance corresponding to the same game copy as the first scene instance, and to determine, according to the second scene instance number, a fourth scene instance number of an index scene instance corresponding to the same game copy as the second scene instance;
[0031] The fifth determination module is used to determine that the first game character and the second game character are located in the same game copy when the third scene instance number is the same as the fourth scene instance number.
[0032] The game copy implementation device further includes:
[0033] A sixth determination module, configured to determine a next scene instance corresponding to the next scene area in response to a request of the game character to jump to the next scene area in the game copy;
[0034] The second control module is used to control the game character to jump to the next scene instance.
[0035] The game copy implementation device further includes:
[0036] a seventh determination module, for determining, in response to a request of the game character to re-enter the game copy, a historical scene instance that the game character last entered from a plurality of scene areas, and determining a historical position of the game character last in the historical scene instance;
[0037] The third control module is used to control the game character to enter the historical position in the historical scene instance.
[0038] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for loading by a processor to execute the steps in any of the above-mentioned game copy implementation methods.
[0039] An embodiment of the present application also provides an electronic device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the steps in any of the above-mentioned game copy implementation methods by calling the computer program stored in the memory.
[0040] The game copy implementation method, device, storage medium and electronic device provided by the present application, in response to the successful matching of the game character to the game copy, creates multiple scene instances corresponding to the game copy, the game copy includes multiple scene areas that are not connected to each other, and each scene area corresponds to a scene instance, and then determines the target scene instance from the multiple scene instances, and controls the game character to enter the target scene instance. This ensures that when the game character enters any scene area of the game copy, the game client only needs to load the scene resources corresponding to the current scene area, and the game server only needs to capture the information in the current scene area, which greatly reduces the performance burden of the game client and the game server. At the same time, because the scene instance is physically isolated, it also fundamentally solves the problem of connectivity vulnerabilities between non-connected scene areas. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The technical solution and other beneficial effects of the present application will be made apparent by describing in detail the specific implementation methods of the present application in conjunction with the accompanying drawings.
[0042] Figure 1 It is a scene diagram of a game copy implementation system provided in an embodiment of the present application;
[0043] Figure 2 It is a flowchart of a method for implementing a game copy provided in an embodiment of the present application;
[0044] Figure 3 is another flowchart of the method for implementing a game copy provided in an embodiment of the present application;
[0045] Figure 4 is another flowchart of the method for implementing a game copy provided in an embodiment of the present application;
[0046] Figure 5 is another flowchart of the method for implementing a game copy provided in an embodiment of the present application;
[0047] Figure 6 is another flowchart of the method for implementing a game copy provided in an embodiment of the present application;
[0048] Figure 7 is another scenario schematic diagram of the game copy implementation system provided by an embodiment of the present application;
[0049] Figure 8 It is a structural diagram of a game copy implementation device provided in an embodiment of the present application;
[0050] Fig. 9 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0052] Embodiments of the present application provide a method, device, storage medium, and electronic device for implementing a game copy.
[0053] See also Figure 1 , Figure 1 A scenario diagram of a game copy implementation system provided in an embodiment of the present application. The game copy implementation system may include any game copy implementation device provided in an embodiment of the present application. The game copy implementation device may be specifically integrated in an electronic device such as a terminal or a server (for example, a game server), wherein the terminal may be a smart phone, a tablet computer, a smart Bluetooth device, a laptop computer, or a personal computer (PC) and the server may be a single server or a server cluster composed of multiple servers.
[0054] The electronic device can create multiple scene instances corresponding to the game copy in response to the game character successfully matching the game copy, the game copy includes multiple scene areas that are not connected to each other, and each scene area corresponds to a scene instance; determine a target scene instance from the multiple scene instances; and control the game character to enter the target scene instance.
[0055] Specifically, Figure 1 As shown, the game copy realization system may include at least one terminal device 01 and a game server 02 connected to the terminal device 01, and the game copy realization device may be integrated in the game server 02. The terminal device 01 may be a user device with a game client installed, and may interact with a corresponding user (or player) through a graphical user interface. The game character may be a virtual object controlled by a player in the game through the terminal device 01.
[0056] In a specific example, during the game, the game server 02 may create a game copy for the game character (and other game characters on the same team or as opponents of the game character) in response to a successful match of a game character copy, and create multiple scene instances based on multiple unconnected scene areas included in the game copy. Afterwards, the game server 02 may also respond to the game character's request to enter the game copy, determine a scene instance corresponding to the scene area that the game character needs to enter from the multiple scene instances created as the target scene instance, and control the game character to enter the target scene instance to achieve entry into the game copy.
[0057] like Figure 2 As shown, Figure 2 : is a flowchart of a method for implementing a game copy provided in an embodiment of the present application. The specific process of the method for implementing a game copy may be as follows:
[0058] S101. In response to a game character successfully matching a game copy, multiple scene instances corresponding to the game copy are created, the game copy includes multiple scene areas that are not connected to each other, and each scene area corresponds to a scene instance.
[0059] In this embodiment, the scene areas in the game copy are not connected to each other, which may refer to the paths between the scene areas on the game map being not connected. Specifically, the game copy may include multiple different game levels, and a scene area in the game copy may correspond to a game level in the game copy. For different game levels in the game copy, the game character controlled by the player needs to enter different scene areas in the game copy to complete the tasks corresponding to the game level and obtain the game resources corresponding to the game level.
[0060] Specifically, the game server can create a game copy for the game character (and other game characters on the same team or opponents with the game character) in response to the successful matching of the game character copy controlled by a certain player in the game, and based on this, it can be determined that the game character successfully matches the game copy. Afterwards, the game server can create multiple scene instances based on multiple unconnected scene areas included in the game copy in response to the game character successfully matching the game copy, and each scene instance can be the same as the game scene located in its corresponding scene area. That is, the game copy is a large game scene composed of multiple small game scenes, and the scene instance is equivalent to one of the multiple small game scenes.
[0061] In some embodiments, Figure 3 As shown, the above S101 may specifically include:
[0062] S1011. In response to the game character successfully matching the game copy, an unused serial number is obtained from a pre-established serial number pool.
[0063] Specifically, the sequence number pool may store a plurality of different sequence numbers, and the unused sequence numbers may be sequence numbers marked as unused among the plurality of sequence numbers.
[0064] S1012. Obtain the scene area number of each scene area.
[0065] Specifically, the above-mentioned scene area number can be used to uniquely identify the scene area in the above-mentioned game copy, that is, each scene area in the above-mentioned game copy can correspond to a unique scene area number.
[0066] S1013. Determine the scene instance number corresponding to each scene area according to the sequence number and the scene area number of each scene area.
[0067] Specifically, the scene instance number corresponding to each scene area can be obtained by adding the sequence number suffix obtained from the above sequence number pool to the scene area number of each scene area. For example, if the sequence number obtained from the above sequence number pool is 10001, and the scene area number of a scene area in the above game copy is XXX101, then the scene instance number corresponding to the scene area can be XXX101.10001.
[0068] S1014. Create a scene instance corresponding to the scene instance number according to each scene area.
[0069] Specifically, after obtaining multiple scene instance numbers corresponding to multiple unconnected scene areas in the above-mentioned game copy, and the multiple scene instances to which the multiple scene instance numbers belong, the above-mentioned game server can call the corresponding scene instance through the scene instance number to realize entry into the above-mentioned game copy.
[0070] In some specific embodiments, after obtaining multiple scene instance numbers corresponding to multiple unconnected scene areas in the above-mentioned game copy, and the multiple scene instances to which the multiple scene instance numbers belong, the above-mentioned game server can also mark the serial numbers obtained from the above-mentioned serial number pool and used to form the multiple scene instance numbers as used, so as to avoid the serial number being used by scene instance numbers corresponding to different game copies at the same time, thereby ensuring the uniqueness of the scene instance numbers corresponding to each game copy.
[0071] S102. Determine a target scene instance from multiple scene instances.
[0072] In this embodiment, the target scene instance may be a scene instance corresponding to the scene area that the game character needs to enter in the game copy. Specifically, the scene area that the game character needs to enter in the game copy may be the scene area where the first game level scene in the game copy is located, or may be the scene area where the latest game level scene that the game character is allowed to enter by passing levels in the previous game process is located, and no specific limitation is made here.
[0073] In some specific embodiments, after S101 and before S102, as Figure 4 As shown, the above method may also include:
[0074] S104. Determine an index scene instance from multiple scene instances.
[0075] In one example, the game server may randomly select a scene instance from the multiple scene instances corresponding to the game copy as the index scene instance corresponding to the game copy. In another example, the game server may also use the scene instance corresponding to the scene area where the first game level scene in the game copy is located as the index scene instance, that is, the index scene instance corresponding to the game copy may be the scene instance corresponding to the scene area where the first game level scene in the game copy is located.
[0076] Specifically, after obtaining the index scene instance corresponding to the above-mentioned game copy, the above-mentioned game server can call the corresponding scene instance through the scene instance number of the index scene instance to realize the entry into the above-mentioned game copy, so as to be better compatible with the technical solution for entering the game copy in the prior art (that is, realizing the entry into the game copy through the scene area number of the game copy).
[0077] Accordingly, if Figure 4 As shown, the above S102 may specifically include:
[0078] S1021. In response to a request from a game character to enter a game copy, a target scene instance number is determined according to the scene instance number of the index scene instance corresponding to the game copy and the scene area number of the scene area that the game character needs to enter.
[0079] In this embodiment, the scene instance number of the scene instance corresponding to each scene area in the above-mentioned game copy may include the serial number obtained from the above-mentioned serial number pool when forming the scene instance number, and the scene area number of each scene area in the above-mentioned game copy. In addition, when the scene instance number of the index scene instance corresponding to the above-mentioned game copy is known, the scene instance number of each scene instance corresponding to the above-mentioned game copy can be obtained by replacing the scene area number included in the scene instance number of the index scene instance with the scene area number corresponding to each scene instance in the above-mentioned game copy. In one example, the above-mentioned target scene instance number can be obtained by replacing the scene area number included in the scene instance number of the index scene instance corresponding to the above-mentioned game copy with the scene area number of the scene area that the above-mentioned game character needs to enter in the above-mentioned game copy.
[0080] In a specific embodiment, the request for the game character to enter the game copy may carry the scene area number of the scene area in the game copy that the game character needs to enter. In another specific embodiment, the scene area number of the scene area in the game copy that the game character needs to enter may also be determined by the game server based on the attribute information of the game character (e.g., the type, level, skill parameters, virtual prop parameters, combat data, etc. of the game character) and / or the attribute information of the game copy (e.g., the copy type of the game copy).
[0081] S1022. Determine a target scene instance whose scene instance number is consistent with the target scene instance number from multiple scene instances.
[0082] Specifically, after obtaining the target scene instance number, the game server may determine that the scene instance to which the target scene instance number belongs is the target scene instance that the game character requests to enter.
[0083] S103. Control the game character to enter the target scene instance.
[0084] It should be noted that the game copy implementation method provided in this embodiment, by mapping the game copies of multiple scenes to multiple scene instances, can enable the game character to enter the game copies of the multiple scenes by entering one of the scene instances. In addition, since different scene instances maintain a certain degree of independence and are not rigidly combined, multiple scene instances can be deployed in a distributed manner, thereby avoiding excessive resource occupation of a single process, ensuring the stability of load balancing, and improving the response speed of activation, destruction, and intermediate gameplay.
[0085] Furthermore, it can be understood that, compared with the solution in the related art of directly controlling the game character to enter the scene area that needs to be entered in the game copy, which requires the game client to load the entire game copy, the solution in this embodiment of controlling the game character to enter the scene instance corresponding to the scene area that the game character needs to enter in the game copy enables the game client to only load the scene resources corresponding to the scene area that the game character needs to enter in the game copy, without having to load the entire game copy, which greatly reduces the performance burden of the game client.
[0086] In some embodiments, Figure 5 As shown, after the above S103, the above method may further include:
[0087] S105. In response to the game character's request to jump to the next scene area in the game copy, determine the next scene instance corresponding to the next scene area.
[0088] In one example, the next scene area may be the next level scene of the scene area in the game copy that the game character is currently in. In another example, the next scene area may also be another scene area other than the scene area in which the game character is currently located that the game character chooses to enter autonomously in the game copy.
[0089] S106. Control the game character to jump to the next scene instance.
[0090] In a specific embodiment, the request for the game character to jump to the next scene area in the game copy may include the scene instance number corresponding to the next scene area, or may include the scene area number of the next scene area.
[0091] Specifically, in an embodiment where the request for the game character to jump to the next scene area in the game copy includes the scene instance number corresponding to the next scene area, the game server can determine, from the multiple scene instances corresponding to the game copy, a scene instance whose scene instance number is consistent with the scene instance number corresponding to the next scene area as the next scene instance.
[0092] Specifically, in an embodiment where the request for the game character to jump to the next scene area in the game copy includes the scene area number of the next scene area, the game server can determine the scene instance number corresponding to the next scene area based on the scene area number of the next scene area and the serial number of the scene instance numbers used to form the multiple scene instances corresponding to the game copy, and then the game server can determine the scene instance whose scene instance number is consistent with the scene instance number corresponding to the next scene area from the multiple scene instances corresponding to the game copy as the next scene instance.
[0093] In some embodiments, in order to meet the needs of game users to interrupt and re-enter the game at any time, such as Figure 6 As shown, after the above S103, the above method may further include:
[0094] S107. In response to the request of the game character to re-enter the game copy, determine the historical scene instance that the game character last entered from multiple scene instances, and determine the game character's most recent historical position in the historical scene instance.
[0095] S108. Control the game character to enter the historical position in the historical scene instance.
[0096] Specifically, in the process of the above-mentioned game character executing the above-mentioned game copy, the above-mentioned game server can periodically record the scene instance number of the scene instance where the above-mentioned game character is currently located and the position of the above-mentioned game character in the scene instance where it is currently located. For example, the scene instance number of the scene instance where the above-mentioned game character is currently located and the position of the above-mentioned game character in the scene instance where it is currently located can be recorded once every fixed time period (for example, 5 minutes) to obtain multiple historical records.
[0097] In some specific embodiments, during the process of the game character executing the game copy, the game server may also record the scene instance number of the scene instance in which the game character is currently located and the position of the game character in the scene instance in which the game character is currently located when the game character is offline, so as to obtain corresponding historical records.
[0098] Accordingly, the game server may respond to the game character's request to re-enter the game copy and, based on the historical records, determine the scene instance most recently entered by the game character as a historical scene instance from among multiple scene instances corresponding to the game copy, and determine the game character's most recent historical position in the historical scene instance.
[0099] In some specific embodiments, the above method may further include:
[0100] Step A: Receive a scene instance destruction instruction, which carries the scene instance number of the index scene instance to be destroyed.
[0101] Specifically, after detecting that the execution of the above-mentioned game copy has ended, the above-mentioned game server can generate the above-mentioned scene instance destruction instruction to trigger the destruction of all scene instances corresponding to the above-mentioned game copy, so as to release memory.
[0102] Step B. Determine the scene instance numbers of multiple scene instances to be destroyed corresponding to the target game copy based on the scene instance number of the index scene instance to be destroyed and the scene area numbers of multiple scene areas in the target game copy corresponding to the index scene instance to be destroyed.
[0103] In this embodiment, the target game copy may include a plurality of scene areas that are not interconnected, and the target game copy may be a game copy to which the game character is successfully matched, or may be another game copy.
[0104] Specifically, the scene instance number of the scene instance corresponding to each scene area in the target game copy (that is, the scene instance to be destroyed) may include the serial number obtained from the serial number pool when forming the scene instance number, and the scene area number of each scene area in the target game copy. In addition, when the scene instance number of the index scene instance corresponding to the target game copy (that is, the index scene instance to be destroyed) is known, the scene instance number of each scene instance to be destroyed corresponding to the target game copy can be obtained by replacing the scene area number included in the scene instance number of the index scene instance to be destroyed with the scene area number corresponding to each scene instance to be destroyed in the target game copy.
[0105] Step C: destroy multiple scene instances to be destroyed.
[0106] Specifically, after determining the scene area numbers of all scene instances corresponding to the same game copy as the above-mentioned index scene instance to be destroyed (that is, the above-mentioned scene instance to be destroyed) based on the scene instance number of the above-mentioned index scene instance to be destroyed, all scene instances corresponding to the same game copy as the above-mentioned index scene instance to be destroyed can be destroyed based on the determined scene area number.
[0107] Step D: In response to successfully destroying multiple scene instances to be destroyed, marking the sequence numbers used by the scene instance numbers of the indexed scene instances to be destroyed as unused.
[0108] Specifically, after detecting that all scene instances corresponding to the same game copy as the above-mentioned index scene instance to be destroyed have been successfully destroyed, the serial number used to form the scene instance number of the above-mentioned index scene instance to be destroyed can be marked as unused so that the serial number can be reused.
[0109] In some other specific embodiments, for a game copy in which team play is performed, in order to determine whether two game characters in the game are in the same game copy, the above method may further include:
[0110] Step E. Obtain the first scene instance number of the first scene instance where the first game character is currently located, and the second scene instance number of the second scene instance where the second game character is currently located.
[0111] Step F. Determine, based on the first scene instance number, the third scene instance number of the index scene instance corresponding to the same game copy as the first scene instance.
[0112] Step G. Determine the fourth scene instance number of the index scene instance corresponding to the same game copy as the second scene instance based on the second scene instance number.
[0113] Step H. When the third scene instance number is the same as the fourth scene instance number, it is determined that the first game character and the second game character are located in the same game copy.
[0114] In the present embodiment, each game copy corresponds to a unique index scene instance, and the scene instance number of each index scene instance is unique. In other words, the scene instance number of the index scene instance can correspond to the game copy one by one. Moreover, the scene instance numbers of any two scene instances corresponding to the same game copy are all from the same sequence number and different scene area numbers, and the scene instance numbers of any two scene instances corresponding to different game copies are all from different sequence numbers and different scene area numbers. Therefore, in the case where the scene instance numbers of the scene instances currently located by two game characters in the game are the same, it can be determined that the two game characters are located in the same game copy. However, in the case where the scene instance numbers of the scene instances currently located by two game characters in the game are different, the two game characters are likely to be located in the same game copy, that is, it is impossible to determine whether the two game characters are located in the same game copy.
[0115] Furthermore, in order to facilitate the determination of whether two game characters in the game are located in the same game copy, the solution adopted in this embodiment is to obtain the scene instance number of the scene instance in which the two game characters are currently located, and then convert the two obtained scene instance numbers into scene instance numbers of the indexed scene instances corresponding to the same game copy, and then determine whether the scene instance numbers of the two obtained indexed scene instances are the same. If they are the same, it can be determined that the two game characters are located in the same game copy. If they are different, it can be determined that the two game characters are located in different game copies.
[0116] In a specific application scenario, such as Figure 7As shown, the game server may include a copy management unit, a scene management unit, and a scene jump unit. The copy management unit is mainly used to manage multiple game copies in the game (e.g., game copy 1, game copy 2, and game copy 3, etc.), and the game copy successfully matched by the game character can be any one of the multiple game copies, for example, it can be game copy 3. The scene management unit is mainly used to create and manage scene instances corresponding to each game copy (e.g., scene instance 1, scene instance 2, and scene instance 3 corresponding to game copy 3, etc.), and a single game copy and its corresponding multiple scene instances can establish a logical association through the scene area number, sequence number, and scene instance number corresponding to the single game copy, and the scene area number, sequence number, and scene instance number corresponding to different game copies can be different. The scene jump unit is mainly used to jump between multiple scene instances corresponding to the same game copy. Moreover, the above-mentioned game server can easily find all the scene instances required for the operation and corresponding to the same game copy based on a single scene instance number (for example, the scene instance number of the above-mentioned index scene instance), which corresponds to the scene instance belonging to the single scene instance number, so as to complete the entry into one of the scene instances and the jump operation between different scene instances corresponding to the same game copy.
[0117] As can be seen from the above, the game copy implementation method provided in this embodiment creates multiple scene instances corresponding to the game copy in response to the game character successfully matching the game copy. The game copy includes multiple scene areas that are not connected to each other, and each scene area corresponds to a scene instance. Then, the target scene instance is determined from the multiple scene instances, and the game character is controlled to enter the target scene instance. This ensures that when the game character enters any scene area of the game copy, the game client only needs to load the scene resources corresponding to the current scene area, and the game server only needs to capture the information in the current scene area, which greatly reduces the performance burden of the game client and the game server. At the same time, because the scene instance is physically isolated, it also fundamentally solves the problem of connectivity vulnerabilities between non-connected scene areas.
[0118] Based on the method described in the above embodiment, this embodiment will be further described from the perspective of the game copy implementation device. Figure 8 , Figure 8 The game copy implementation device provided by the embodiment of the present application is specifically described, and the game copy implementation device includes: a creation module 301, a first determination module 302 and a first control module 303, wherein:
[0119] (1) Create module 301
[0120] The creation module 301 is used to create multiple scene instances corresponding to the game copy in response to the game character successfully matching the game copy. The game copy includes multiple scene areas that are not connected to each other, and each scene area corresponds to a scene instance.
[0121] (2) First determination module 302
[0122] The first determining module 302 is used to determine a target scene instance from multiple scene instances.
[0123] (3) First Control Module 303
[0124] The first control module 303 is used to control the game character to enter the target scene instance.
[0125] In one embodiment, the creation module 301 may be specifically used for:
[0126] Get an unused sequence number from a pre-established sequence number pool;
[0127] Get the scene area number of each scene area;
[0128] Determine the scene instance number corresponding to each scene area according to the sequence number and the scene area number of each scene area;
[0129] Create a scene instance corresponding to the scene instance number for each scene area.
[0130] In a specific embodiment, the game copy implementation device may further include:
[0131] (4) Second determination module
[0132] The second determination module is used to determine an index scene instance from multiple scene instances.
[0133] Accordingly, the first determining module 302 may be specifically configured to:
[0134] In response to a request for the game character to enter the game copy, a target scene instance number is determined according to a scene instance number of an index scene instance corresponding to the game copy and a scene area number of a scene area that the game character needs to enter;
[0135] Determine a target scene instance from multiple scene instances whose scene instance number is consistent with the target scene instance number.
[0136] In some embodiments, the game copy implementation device may further include:
[0137] (5) Receiving module
[0138] The receiving module is used to receive a scene instance destruction instruction, wherein the scene instance destruction instruction carries the scene instance number of the index scene instance to be destroyed.
[0139] (6) Third determination module
[0140] The third determination module is used to determine the scene instance numbers of multiple scene instances to be destroyed corresponding to the target game copy based on the scene instance number of the index scene instance to be destroyed and the scene area numbers of multiple scene areas in the target game copy corresponding to the scene instance number of the index scene instance to be destroyed.
[0141] (7) Destroy module
[0142] The destruction module is used to destroy multiple scene instances to be destroyed.
[0143] (8) Marking module
[0144] A marking module is used to mark the sequence number used by the scene instance number of the index scene instance to be destroyed as unused in response to successfully destroying multiple scene instances to be destroyed.
[0145] In some other embodiments, the game copy implementation device may further include:
[0146] (9) Get module
[0147] The acquisition module is used to acquire the first scene instance number of the first scene instance where the first game character is currently located, and the second scene instance number of the second scene instance where the second game character is currently located.
[0148] (10) Fourth determination module
[0149] The fourth determination module is used to determine the third scene instance number of the index scene instance corresponding to the same game copy as the first scene instance according to the first scene instance number, and to determine the fourth scene instance number of the index scene instance corresponding to the same game copy as the second scene instance according to the second scene instance number.
[0150] (11) Fifth determination module
[0151] The fifth determination module is used to determine that the first game character and the second game character are located in the same game copy when the third scene instance number is the same as the fourth scene instance number.
[0152] In some embodiments, the game copy implementation device may further include:
[0153] (12) Sixth determination module
[0154] The sixth determination module is used to determine the next scene instance corresponding to the next scene area in response to the request of the game character to jump to the next scene area in the game copy.
[0155] (13) Second control module
[0156] The second control module is used to control the game character to jump to the next scene instance.
[0157] In some other embodiments, the game copy implementation device may further include:
[0158] (14) Seventh determination module
[0159] The seventh determination module is used to determine the historical scene instance that the game character last entered and the historical position of the game character last in the historical scene instance from multiple scene areas in response to the request of the game character to re-enter the game copy.
[0160] (15) Third Control Module
[0161] The third control module is used to control the game character to enter the historical position in the historical scene instance.
[0162] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above modules can be found in the previous method embodiments, which will not be repeated here.
[0163] As can be seen from the above, the game copy implementation device provided by this embodiment includes a creation module, which is used to create multiple scene instances corresponding to the game copy in response to the game character successfully matching the game copy, and the game copy includes multiple scene areas that are not connected to each other, and each scene area corresponds to a scene instance; a first determination module, which is used to determine the target scene instance from multiple scene instances; a first control module, which is used to control the game character to enter the target scene instance, thereby ensuring that when the game character enters any scene area of the game copy, the game client only needs to load the scene resources corresponding to the current scene area, and the game server only needs to capture the information in the current scene area, which greatly reduces the performance burden of the game client and the game server. At the same time, because the scene instances are physically isolated, it also fundamentally solves the problem of connectivity vulnerabilities between non-connected scene areas.
[0164] Accordingly, the embodiment of the present application also provides an electronic device, which may be a terminal or a server, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer, a personal digital assistant (PDA), or other terminal devices. Fig. 9As shown, Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 400 includes a processor 401 having one or more processing cores, a memory 402 having one or more computer-readable storage media, and a computer program stored in the memory 402 and executable on the processor. The processor 401 is electrically connected to the memory 402. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.
[0165] The processor 401 is the control center of the electronic device 400. It uses various interfaces and lines to connect various parts of the entire electronic device 400, executes various functions of the electronic device 400 and processes data by running or loading software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, thereby monitoring the electronic device 400 as a whole.
[0166] In the embodiment of the present application, the processor 401 in the electronic device 400 will load instructions corresponding to the processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 will run the application programs stored in the memory 402 to implement various functions:
[0167] In response to the game character successfully matching the game copy, multiple scene instances corresponding to the game copy are created, the game copy includes multiple scene areas that are not connected to each other, and each scene area corresponds to a scene instance;
[0168] determining a target scene instance from a plurality of scene instances;
[0169] Control the game character to enter the target scene instance.
[0170] In one example, multiple scene instances corresponding to a game copy are created, including:
[0171] Get an unused sequence number from a pre-established sequence number pool;
[0172] Get the scene area number of each scene area;
[0173] Determine the scene instance number corresponding to each scene area according to the sequence number and the scene area number of each scene area;
[0174] Create a scene instance corresponding to the scene instance number for each scene area.
[0175] In one example, the method further includes:
[0176] Determine an indexed scene instance from the plurality of scene instances;
[0177] A target scene instance is determined from multiple scene instances, including:
[0178] In response to a request for the game character to enter the game copy, a target scene instance number is determined according to a scene instance number of an index scene instance corresponding to the game copy and a scene area number of a scene area that the game character needs to enter;
[0179] Determine a target scene instance from multiple scene instances whose scene instance number is consistent with the target scene instance number.
[0180] In one example, the method further includes:
[0181] Receive a scene instance destruction instruction, where the scene instance destruction instruction carries the scene instance number of the index scene instance to be destroyed;
[0182] Determine the scene instance numbers of the multiple scene instances to be destroyed corresponding to the target game copy according to the scene instance number of the index scene instance to be destroyed and the scene area numbers of the multiple scene areas in the target game copy corresponding to the scene instance number of the index scene instance to be destroyed;
[0183] Destroy multiple scene instances to be destroyed;
[0184] In response to successfully destroying multiple scene instances to be destroyed, the sequence numbers used by the scene instance numbers of the indexed scene instances to be destroyed are marked as unused.
[0185] In one example, the method further includes:
[0186] Obtain a first scene instance number of a first scene instance where the first game character is currently located, and a second scene instance number of a second scene instance where the second game character is currently located;
[0187] Determine, according to the first scene instance number, a third scene instance number of an index scene instance corresponding to the same game copy as the first scene instance;
[0188] Determine, according to the second scene instance number, a fourth scene instance number of an index scene instance corresponding to the same game copy as the second scene instance;
[0189] When the third scene instance number is the same as the fourth scene instance number, it is determined that the first game character and the second game character are located in the same game copy.
[0190] In one example, the method further includes:
[0191] In response to a request by the game character to jump to a next scene area in the game copy, determining a next scene instance corresponding to the next scene area;
[0192] Control the game character to jump to the next scene instance.
[0193] In one example, the method further includes:
[0194] In response to a request for the game character to re-enter the game copy, determining from the plurality of scene instances the historical scene instance that the game character last entered, and the game character's most recent historical position in the historical scene instance;
[0195] Control the game character to enter the historical position in the historical scene instance.
[0196] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0197] Optional, such as Fig. 9 As shown, the electronic device 400 further includes: a touch screen 403, a radio frequency circuit 404, an audio circuit 405, an input unit 406, and a power supply 407. The processor 401 is electrically connected to the touch screen 403, the radio frequency circuit 404, the audio circuit 405, the input unit 406, and the power supply 407, respectively. Those skilled in the art can understand that Fig. 9 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0198] The touch display screen 403 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 403 may include a display panel and a touch panel. Among them, the display panel may be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces may be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel may be used to collect the user's touch operation on or near it (such as the user using any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 401, and can receive the command sent by the processor 401 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 401 to determine the type of touch event, and then the processor 401 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 403 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 403 can also be used as a part of the input unit 406 to realize the input function.
[0199] In an embodiment of the present application, the processor 401 executes a game application to generate a screen of a virtual three-dimensional scene on the touch display screen 403, which includes a graphical user interface (UI interface), and the graphical user interface includes a second spatial orientation indicator, which displays a spatial orientation mark corresponding to the target object, and the spatial orientation mark is used to indicate the position of the target object.
[0200] The touch screen 403 can be used to present images of a virtual three-dimensional scene and a graphical user interface and receive operation instructions generated by a user acting on the graphical user interface.
[0201] The radio frequency circuit 404 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals with the network device or other electronic devices.
[0202] The audio circuit 405 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 405 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 405 and converted into audio data, and then the audio data is output to the processor 401 for processing, and then sent to another electronic device through the radio frequency circuit 404, or the audio data is output to the memory 402 for further processing. The audio circuit 405 may also include an earplug jack to provide communication between an external headset and an electronic device.
[0203] The input unit 406 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0204] The power supply 407 is used to supply power to various components of the electronic device 400. Optionally, the power supply 407 can be logically connected to the processor 401 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 407 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0205] although Fig. 9 Not shown, the electronic device 400 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0206] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0207] From the above, it can be seen that the electronic device provided in this embodiment can reduce the scene resources required to be loaded to enter a game copy, thereby reducing the performance burden of the game client and the game server.
[0208] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0209] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer program can be loaded by a processor to execute the steps in any one of the game copy implementation methods provided in the embodiment of the present application. For example, the computer program can execute the following steps:
[0210] In response to the game character successfully matching the game copy, multiple scene instances corresponding to the game copy are created, the game copy includes multiple scene areas that are not connected to each other, and each scene area corresponds to a scene instance;
[0211] determining a target scene instance from a plurality of scene instances;
[0212] Control the game character to enter the target scene instance.
[0213] In one example, multiple scene instances corresponding to a game copy are created, including:
[0214] Get an unused sequence number from a pre-established sequence number pool;
[0215] Get the scene area number of each scene area;
[0216] Determine the scene instance number corresponding to each scene area according to the sequence number and the scene area number of each scene area;
[0217] Create a scene instance corresponding to the scene instance number for each scene area.
[0218] In one example, the method further includes:
[0219] Determine an indexed scene instance from the plurality of scene instances;
[0220] A target scene instance is determined from multiple scene instances, including:
[0221] In response to a request for the game character to enter the game copy, a target scene instance number is determined according to a scene instance number of an index scene instance corresponding to the game copy and a scene area number of a scene area that the game character needs to enter;
[0222] Determine a target scene instance from multiple scene instances whose scene instance number is consistent with the target scene instance number.
[0223] In one example, the method further includes:
[0224] Receive a scene instance destruction instruction, where the scene instance destruction instruction carries the scene instance number of the index scene instance to be destroyed;
[0225] Determine the scene instance numbers of the multiple scene instances to be destroyed corresponding to the target game copy according to the scene instance number of the index scene instance to be destroyed and the scene area numbers of the multiple scene areas in the target game copy corresponding to the scene instance number of the index scene instance to be destroyed;
[0226] Destroy multiple scene instances to be destroyed;
[0227] In response to successfully destroying multiple scene instances to be destroyed, the sequence numbers used by the scene instance numbers of the indexed scene instances to be destroyed are marked as unused.
[0228] In one example, the method further includes:
[0229] Obtain a first scene instance number of a first scene instance where the first game character is currently located, and a second scene instance number of a second scene instance where the second game character is currently located;
[0230] Determine, according to the first scene instance number, a third scene instance number of an index scene instance corresponding to the same game copy as the first scene instance;
[0231] Determine, according to the second scene instance number, a fourth scene instance number of an index scene instance corresponding to the same game copy as the second scene instance;
[0232] When the third scene instance number is the same as the fourth scene instance number, it is determined that the first game character and the second game character are located in the same game copy.
[0233] In one example, the method further includes:
[0234] In response to a request from the game character to jump to a next scene area in the game copy, determining a next scene instance corresponding to the next scene area;
[0235] Control the game character to jump to the next scene instance.
[0236] In one example, the method further includes:
[0237] In response to a request for the game character to re-enter the game copy, determining from the plurality of scene instances the historical scene instance that the game character last entered, and the game character's most recent historical position in the historical scene instance;
[0238] Control the game character to enter the historical position in the historical scene instance.
[0239] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0240] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0241] Since the computer program stored in the storage medium can execute the steps in any one of the game copy implementation methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the game copy implementation methods provided in the embodiments of the present application can be achieved. Please see the previous embodiments for details and will not be repeated here.
[0242] The above is a detailed introduction to a game copy implementation method, device, storage medium and electronic device provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for implementing a game copy, characterized in that: include: In response to the game character successfully matching the game copy, a plurality of scene instances corresponding to the game copy are created, wherein the game copy includes a plurality of scene areas that are not connected to each other, and each of the scene areas corresponds to one of the scene instances; Determine a target scene instance from the multiple scene instances; Controlling the game character to enter the target scene instance; The creating of multiple scene instances corresponding to the game copy includes: obtaining an unused serial number from a pre-established serial number pool, wherein the scene instance numbers corresponding to any two scene instances of the same game copy are from the same serial number and different scene area numbers; obtaining the scene area number of each of the scene areas; determining the scene instance number corresponding to each of the scene areas according to the serial number and the scene area number of each of the scene areas; and creating the scene instance corresponding to the scene instance number according to each of the scene areas.
2. The game copy implementation method according to claim 1, characterized in that: The method further comprises: Determine an index scene instance from the multiple scene instances, each game copy corresponds to a unique index scene instance, and the scene instance number of each index scene instance is unique; The determining a target scene instance from the multiple scene instances comprises: In response to the request of the game character to enter the game copy, a target scene instance number is determined according to the scene instance number of the index scene instance corresponding to the game copy and the scene area number of the scene area that the game character needs to enter, wherein the target scene instance number is obtained by replacing the scene area number contained in the scene instance number of the index scene instance corresponding to the game copy with the scene area number of the scene area that the game character needs to enter in the game copy; Determine a target scene instance whose scene instance number is consistent with the target scene instance number from the multiple scene instances.
3. The game copy implementation method according to claim 2, characterized in that: The method further comprises: Receive a scene instance destruction instruction, wherein the scene instance destruction instruction carries the scene instance number of the index scene instance to be destroyed; Determine the scene instance numbers of the multiple scene instances to be destroyed corresponding to the target game copy according to the scene instance number of the index scene instance to be destroyed and the scene area numbers of the multiple scene areas in the target game copy corresponding to the index scene instance to be destroyed; Destroying the multiple scene instances to be destroyed; In response to successfully destroying the multiple scene instances to be destroyed, the sequence numbers used by the scene instance numbers of the indexed scene instances to be destroyed are marked as unused.
4. The game copy implementation method according to claim 2, characterized in that: The scene instance numbers of any two scene instances corresponding to different game copies are from different sequence numbers and different scene area numbers, and the method further includes: Obtain a first scene instance number of a first scene instance where the first game character is currently located, and a second scene instance number of a second scene instance where the second game character is currently located; Determine, according to the first scene instance number, a third scene instance number of an index scene instance corresponding to the same game copy as the first scene instance; Determine, according to the second scene instance number, a fourth scene instance number of an index scene instance corresponding to the same game copy as the second scene instance; When the third scene instance number is the same as the fourth scene instance number, it is determined that the first game character and the second game character are located in the same game copy.
5. The game copy implementation method according to claim 1, characterized in that: The method further comprises: In response to a request by the game character to jump to a next scene area in the game copy, determining a next scene instance corresponding to the next scene area; Control the game character to jump to the next scene instance.
6. The game copy implementation method according to claim 1, characterized in that: The method further comprises: In response to a request by the game character to re-enter the game copy, determining a historical scene instance that the game character last entered from the multiple scene areas, and determining a historical position of the game character last in the historical scene instance; The game character is controlled to enter the historical position in the historical scene instance.
7. A game copy implementation device, characterized in that: include: A creation module, configured to create, in response to a successful matching of a game character with a game copy, a plurality of scene instances corresponding to the game copy, wherein the game copy includes a plurality of scene areas that are not interconnected, and each of the scene areas corresponds to one scene instance; A determination module, used to determine a target scene instance from the multiple scene instances; A control module, used for controlling the game character to enter the target scene instance; The creating of multiple scene instances corresponding to the game copy includes: obtaining an unused serial number from a pre-established serial number pool, wherein the scene instance numbers corresponding to any two scene instances of the same game copy are from the same serial number and different scene area numbers; obtaining the scene area number of each of the scene areas; determining the scene instance number corresponding to each of the scene areas according to the serial number and the scene area number of each of the scene areas; and creating the scene instance corresponding to the scene instance number according to each of the scene areas.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is suitable for being loaded by a processor to execute the steps in the game copy implementation method as described in any one of claims 1-6.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor executes the steps in the game copy implementation method as described in any one of claims 1-6 by calling the computer program stored in the memory.
