Method, device and equipment for protecting virtual character in game and storage medium
By identifying target areas in the game scene and hiding the virtual characters of players who have disconnected or have low-configuration devices, the issue of fairness in the game for players with disconnected or low-configuration devices is resolved, thus improving the gaming experience.
Patent Information
- Application Number
- CN202210049707.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-17
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2042-01-17
AI Technical Summary
In existing technologies, it is difficult to guarantee the fairness of the game for players who disconnect or have low-configuration devices, leading to a decline in the gaming experience.
In the game scene, identify a target area and control the virtual character to hide in that area, making it invisible to the graphical user interface of other players' terminal devices. This method of avoiding line of sight and becoming invisible protects the virtual characters of players who have disconnected or have low-configuration devices.
By hiding virtual characters, the game ensures relative fairness in combat and enhances the player's gaming experience.
Smart Images

Figure CN116474361B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of games, in particular to a virtual character protection method and device in a game, equipment and a storage medium. BACKGROUND
[0002] With the continuous development of Internet technology, the game industry has also developed rapidly, and various games are becoming more and more common. For online games, if a player drops out, the player will stay in the original position, which will be killed by other players; or if the terminal device performance of a player is poor, the game loading speed is slower than other players, so that other players will attack in advance. Therefore, a protection mechanism is needed to ensure the game fairness of the offline player and the low-configuration player. SUMMARY
[0003] The purpose of the present application is to provide a virtual character protection method, device, equipment and storage medium in a game to ensure the game fairness of the offline player and the low-configuration player in view of the deficiencies in the prior art.
[0004] To achieve the above purpose, the technical scheme adopted by the embodiments of the present application is as follows:
[0005] In a first aspect, the embodiments of the present application provide a virtual character protection method in a game, which comprises:
[0006] In response to the first virtual character meeting a first protection condition, a target area is determined in a game scene, wherein the first protection condition includes that the first virtual character is in an offline state or the game is in a loading state;
[0007] The first virtual character is hidden to the target area, so that the first virtual character is in an invisible state on a graphical user interface provided by a terminal device corresponding to other virtual characters in the game scene.
[0008] In a possible implementation, the target area is determined in the game scene in response to the first virtual character meeting the first protection condition, which comprises:
[0009] In response to the first virtual character meeting the first protection condition, the position of the first virtual character in the game scene is obtained;
[0010] Within a preset game scene range from the position, the target area is determined; wherein the target area includes buildings and grass in the game.
[0011] In a possible implementation, the target area is determined within the preset game scene range from the position, which comprises:
[0012] determine a building or a grass clump closest to the position in the preset game scene range as the target region.
[0013] In a possible implementation, before the control of hiding the first virtual character to the target region, the method further includes:
[0014] detecting whether the first virtual character is currently in a non-combat state;
[0015] if yes, controlling to hide the first virtual character to the target region;
[0016] if no, controlling to keep the first virtual character at a current position.
[0017] In a possible implementation, the method further includes:
[0018] starting timing when the first virtual character is hidden to the target region;
[0019] when the timing reaches a preset duration and the first virtual character meets the first protection condition, un-hiding the first virtual character.
[0020] In a possible implementation, after the control of hiding the first virtual character to the target region, the method further includes:
[0021] in response to the first virtual character meeting a second protection condition, un-hiding the first virtual character, wherein the second protection condition includes that the first virtual character is in an online state or a game loading completion state.
[0022] In a possible implementation, after the control of hiding the first virtual character to the target region, the method further includes:
[0023] in response to the first virtual character meeting a second protection condition, highlighting the first virtual character within a first preset time, so that the first virtual character has visual distinction;
[0024] wherein the second protection condition includes that the first virtual character is in an online state or a game loading completion state.
[0025] In a possible implementation, the method further includes:
[0026] configuring the first virtual character to be in an attack-inhibited state and / or a hit-inhibited state within a second preset time.
[0027] In a possible implementation, after the control of hiding the first virtual role to the target area, the method further includes:
[0028] In response to the first virtual role satisfying a second protection condition, outputting a prompt information to a second virtual role within a preset game scene range, the prompt information being used for prompting the target area where the first virtual role is located.
[0029] The second protection condition includes that the first virtual role is in an online state or a game loading completion state.
[0030] In a possible implementation, after the control of hiding the first virtual role to the target area, the method further includes:
[0031] In response to the first virtual role satisfying a second protection condition, providing a position indication mark in the target area, the position indication mark being used for prompting the target area within a third preset time.
[0032] The second protection condition includes that the first virtual role is in an online state or a game loading completion state.
[0033] In a possible implementation, the position indication mark is displayed within a preset distance range outside the target area.
[0034] In a possible implementation, the method further includes:
[0035] After the first virtual role is hidden to the target area, if there is environment attack information in the target area, the environment attack information is assigned to the first virtual role.
[0036] In a second aspect, the embodiments of the present application further provide a virtual role protection device in a game, and the device includes:
[0037] A determination module is configured to determine a target area in a game scene in response to a first virtual role currently satisfying a first protection condition, and the first protection condition includes that the first virtual role is in an offline state or a game is being loaded.
[0038] A control module is configured to control hiding the first virtual role to the target area, so that the first virtual role is in an invisible state on a graphical user interface provided by a terminal device corresponding to other virtual roles in the game scene.
[0039] In a possible implementation, the determination module is further configured to:
[0040] in response to the first virtual character satisfying the first protection condition, obtaining a position of the first virtual character in the game scene;
[0041] determining the target region within a preset game scene range from the position; wherein the target region comprises a building or a grass in the game.
[0042] In a possible implementation, the determining module is further configured to:
[0043] determine the building or the grass closest to the position in the preset game scene range as the target region.
[0044] In a possible implementation, the apparatus further comprises:
[0045] a detecting module configured to detect whether the first virtual character is currently in a non-combat state;
[0046] The control module is further configured to, if yes, control the first virtual character to hide to the target region; and if no, control the first virtual character to stay at a current position.
[0047] In a possible implementation, the apparatus further comprises:
[0048] a timing module configured to start timing when the first virtual character hides to the target region.
[0049] a canceling module configured to cancel the hiding of the first virtual character when the timing reaches a preset time length and the first virtual character satisfies the first protection condition.
[0050] In a possible implementation, the canceling module is further configured to:
[0051] cancel the hiding of the first virtual character in response to the first virtual character satisfying a second protection condition, wherein the second protection condition comprises the first virtual character being in an online state or a game loading completion state.
[0052] In a possible implementation, the apparatus further comprises:
[0053] a display module configured to highlight the first virtual character within a first preset time in response to the first virtual character satisfying a second protection condition, so that the first virtual character is visually distinguished.
[0054] wherein the second protection condition comprises the first virtual character being in an online state or a game loading completion state.
[0055] In a possible implementation, the apparatus further comprises:
[0056] The configuration module is configured to configure the first virtual character to be in an attack-inhibited state and / or a hit-inhibited state within a second preset time.
[0057] In a possible implementation, the apparatus further includes:
[0058] The output module is configured to, in response to the first virtual character satisfying a second protection condition, output a prompt information to a second virtual character within a preset game scene range, the prompt information being used to prompt a target area in which the first virtual character is located.
[0059] The second protection condition includes that the first virtual character is in an online state or a game loading completion state.
[0060] In a possible implementation, the apparatus further includes:
[0061] The providing module is configured to, in response to the first virtual character satisfying a second protection condition, provide a position indication mark in the target area, the position indication mark being used to prompt the target area within a third preset time.
[0062] The second protection condition includes that the first virtual character is in an online state or a game loading completion state.
[0063] In a possible implementation, the position indication mark is displayed within a preset distance range outside the target area.
[0064] In a possible implementation, the apparatus further includes:
[0065] The assigning module is configured to, after the first virtual character hides to the target area, if there is environment attack information in the target area, assign the environment attack information to the first virtual character.
[0066] In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and the processor executes the machine readable instructions to perform steps of the virtual character protection method in a game as described in the first aspect.
[0067] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, the computer readable storage medium stores a computer program, when the computer program is run by a processor, steps of the virtual character protection method in a game as described in the first aspect are performed.
[0068] The present application has the following beneficial effects:
[0069] The embodiment of the application provides a virtual character protection method, device and equipment in a game and a storage medium, and the method comprises the following steps: in response to a first virtual character satisfying a first protection condition, determining a target area in a game scene; wherein the first protection condition comprises that the first virtual character is in an offline state or the game is in a loading state; and hiding the first virtual character to the target area, so that the first virtual character is in an invisible state on a graphical user interface provided by a terminal device corresponding to other virtual characters in the game scene. The scheme mainly triggers a protection game mechanism provided for the first virtual character when the first virtual character is in an offline state or the game is in a loading state, determines a target area in the game scene, and controls the first virtual character to hide in the target area, so that the first virtual character controlled by an offline player or a low-configuration player in a loading state can hide in the visual field, so that the first virtual character cannot be seen on the graphical user interface provided by the terminal device corresponding to other virtual characters in the game scene, the protection of the first virtual character is realized, and the relative fairness of the overall battle of the game is ensured, and the game experience of the player is improved. BRIEF DESCRIPTION OF DRAWINGS
[0070] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0071] Figure 1 The flowchart of the virtual character protection method in the game provided by the embodiment of the application Figure 1
[0072] Figure 2 The flowchart of the virtual character protection method in the game provided by the embodiment of the application Figure 2
[0073] Figure 3 The target area hidden by the target virtual character in the virtual character protection method in the game provided by the embodiment of the application Figure 1
[0074] Figure 4 The flowchart of the virtual character protection method in the game provided by the embodiment of the application Figure 3
[0075] Figure 5 The flowchart of the virtual character protection method in the game provided by the embodiment of the application Figure 4 ;
[0076] Figure 6 A schematic diagram of a target area hidden by a target virtual character in a game virtual character protection method provided by an embodiment of the present application Figure 2 ;
[0077] Figure 7 A structural schematic diagram of a game virtual character protection device provided by an embodiment of the present application
[0078] Figure 8 A structural schematic diagram of an electronic device provided by an embodiment of the present application DETAILED DESCRIPTION
[0079] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings for the embodiments of the present application to make a clear and complete description of the technical solutions in the embodiments of the present application. It should be understood that the accompanying drawings in the present application are only for the purpose of illustration and description, and are not used to limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn according to the actual proportions. The flowcharts used in the present application show the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flowcharts or one or more operations can be removed from the flowcharts under the guidance of the content of the present application.
[0080] In addition, the described embodiments are only some of the embodiments of the present application, not all the embodiments. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0081] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0082] In the prior art, in most games, the protection mechanism generally adopted is complete hanging or providing a certain invincible time in the online stage. Although this protection method can enable the player to experience the game scene without logging in the game client to a certain extent. However, in this way, the player will still be in a situation where he cannot avoid being killed by the opponent player after hanging or exceeding the invincible time, thereby reducing the player's experience.
[0083] The game virtual character protection method provided in the embodiments of the present application is based on the above problems, and enables the offline player or the low-configuration player to avoid being seen by the opponent player by using the method of hiding in the field of view, thereby ensuring the relative fairness of the overall game battle and improving the game experience of the player.
[0084] The game virtual character protection method in the embodiments of the present application can run on a local terminal device or a server. When the game virtual character protection method runs on the server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0085] In an optional embodiment, various cloud applications can run under the cloud interaction system, for example, cloud games. Taking the cloud games as an example, the cloud games refer to a game mode based on cloud computing. In the running mode of the cloud games, the running subject of the game program and the presentation subject of the game picture are separated, and the storage and running of the game virtual character protection method are completed on the cloud game server. The client device is used for receiving and sending data and presenting the game picture. For example, the client device can be a display device close to the user side with a data transmission function, such as a mobile terminal, a television, a computer, a palm computer, etc. However, the cloud game server in the cloud end performs information processing. When playing the game, the player operates the client device to send operation instructions to the cloud game server, the cloud game server runs the game according to the operation instructions, encodes and compresses the game picture and other data, returns the data to the client device through the network, and finally decodes and outputs the game picture through the client device.
[0086] In an optional embodiment, taking the game as an example, the local terminal device stores the game program and is used for presenting the game picture. The local terminal device is used for interacting with the player through a graphical user interface, that is, the conventional game program is downloaded and installed on the electronic device and is run. The way in which the local terminal device provides the graphical user interface to the player can include various ways, for example, the graphical user interface can be rendered and displayed on the display screen of the terminal, or the graphical user interface can be provided to the player through holographic projection. For example, the local terminal device can include a display screen and a processor, the display screen is used for presenting the graphical user interface, the graphical user interface includes the game picture, and the processor is used for running the game, generating the graphical user interface, and controlling the display of the graphical user interface on the display screen.
[0087] In a possible embodiment, the embodiments of the present application provide a game virtual character protection method applied to a terminal device, wherein the terminal device can be the aforementioned local terminal device or the aforementioned client device in the cloud interaction system.
[0088] The following describes in detail the method for protecting virtual characters in games according to this application through several embodiments.
[0089] Figure 1 This is a flowchart illustrating a method for protecting virtual characters in games, as provided in this application embodiment. It should be noted that the method for protecting virtual characters in games provided in this application does not rely on... Figure 1 The specific order described below is a limitation. It should be understood that in other embodiments, the order of some steps in the game virtual character protection method provided in this application can be interchanged according to actual needs, or some steps can be omitted or deleted. Figure 1 As shown, the method includes:
[0090] S101. In response to the first virtual character meeting the first protection condition, a target area is determined in the game scene.
[0091] The first protection condition includes the first virtual character being offline or the game being in the loading state. That is, when the first virtual character meets the first protection condition, the player is unable to control the first virtual character. For example, upon entering the game, a connection failure occurs between the game client corresponding to the first virtual character and the server, or the game client's configuration is poor, causing the game to fail to load within a preset time. Both of these situations will prevent the player from controlling the first virtual character.
[0092] To address this situation, this embodiment proposes a protection mechanism that controls the first virtual character to enter a protection mode and identifies a target area in the game scene.
[0093] For example, the game scenarios applicable to this application may include: underwater game scenarios, land game scenarios, air combat game scenarios, etc. Correspondingly, the target area may also include underwater, water surface, land (which can be further divided into flat land, caves, mountains, roads, grass, houses, etc.), sky, etc.
[0094] S102, Control the hiding of the first virtual character in the target area so that the first virtual character is invisible on the graphical user interface provided by the terminal device corresponding to other virtual characters in the game scene.
[0095] Based on the above embodiments, the control hides the first virtual character in the target area so that the protected first virtual character cannot be seen on the graphical user interface provided by the terminal devices corresponding to other virtual characters in the game scene, thereby ensuring the relative fairness of the overall game battle and improving the player's game experience.
[0096] In summary, the embodiment of the present application provides a virtual character protection method in a game, which comprises: determining a target area in a game scene in response to a first virtual character satisfying a first protection condition; wherein the first protection condition comprises the first virtual character being in an offline state or the game being in a loading state; and hiding the first virtual character to the target area to make the first virtual character invisible on a graphical user interface provided by a terminal device corresponding to other virtual characters in the game scene. The present scheme mainly triggers a protection game mechanism provided for the first virtual character when the first virtual character is in an offline state or the game is in a loading state, determines a target area in the game scene, and controls the first virtual character to hide in the target area, so that the first virtual character controlled by an offline player or a low-configuration player in a loading state can hide in the visual field to make the first virtual character invisible on the graphical user interface provided by the terminal device corresponding to other virtual characters in the game scene, thereby realizing protection of the first virtual character, ensuring the relative fairness of the overall game battle, and improving the game experience of the player.
[0097] As an optional implementation, with reference to FIG. 1, Figure 2 As an optional implementation, with reference to FIG. 1,
[0098] S201, in response to the first virtual character satisfying the first protection condition, obtaining the position of the first virtual character in the game scene.
[0099] S202, determining the target area within a preset game scene range from the position.
[0100] The target area comprises a building and a grass in the game. It should be understood that the target area can be used as a virtual hiding place of the first virtual character.
[0101] For example, the preset game scene range is within 3 kilometers around the position of the first virtual character in the game scene, and any building or grass within the preset game scene range is used as a target area for the first virtual character to hide.
[0102] Optionally, when the first virtual character is offline or the game is loading, the current position of the first virtual character in the game scene is obtained, and combined with the current position of the first virtual character in the game scene, a target area within a preset game scene range of "the current position of the first virtual character in the game scene" is determined. This allows the first virtual character to be controlled to quickly move from its current position to a nearby target area and then become invisible, so that the opposing player corresponding to the first virtual character cannot see these specially protected first virtual characters, thus achieving the concealment and protection of the first virtual character.
[0103] As an optional implementation, one possible way to "determine the target area within the preset game scene range of distance location" in step S202 above includes: determining the building or bushes closest to the location within the preset game scene range as the target area.
[0104] For example, refer to Figure 3 As shown, when the first virtual character meets the preset protection conditions, the position of the first virtual character in the game scene is obtained as point A. Then, a circular area is drawn with point A as the center and a radius of 3 kilometers. This circular area is used as a preset game scene range, and the preset game scene range includes building Y1 and grass Y2.
[0105] In this embodiment, to improve the efficiency of the first virtual character moving from point A to the target area and becoming invisible, it is also necessary to determine whether there are other virtual characters in building Y1 and bushes Y2. If not, the building Y1 closest to point A is selected as the target area. This allows the first virtual character to quickly enter an area where it can avoid the sight of all opposing players. Furthermore, during the process of controlling the first virtual character to become invisible, such as when moving from the spawn point to the target area, to prevent the first virtual character from being mistakenly killed, it can be configured to be in an unattackable or unselectable state.
[0106] As an optional implementation method, refer to Figure 4 As shown, one optional method of "before controlling the hiding of the first virtual character in the target area" in step S102 above, the method further includes:
[0107] S401. Detect whether the first virtual character is currently in a non-combat state.
[0108] Optionally, to prevent players in combat from using the virtual character protection method provided in this application for survival, it is also necessary to detect in real time whether the first virtual character is currently in a non-combat state before controlling the hiding of the first virtual character to the target area, so as to determine whether the first virtual character needs to be hidden and protected.
[0109] S402, if yes, control the first virtual character to be hidden to the target area.
[0110] In an implementable manner, if the first virtual character meets the first protection condition and the first virtual character is currently in a non-combat state, the control continues to hide the first virtual character to the target area, thereby realizing the protection of the first virtual character.
[0111] S403, if no, control the first virtual character to stay at the current position.
[0112] In another implementable manner, if the first virtual character meets the first protection condition but the first virtual character is currently in a combat state, the control causes the first virtual character to stay at the current position. At this time, the first virtual character cannot hide from the field of view area of the "opponent player corresponding to the first virtual character", that is, the "opponent player corresponding to the first virtual character" can normally attack the "first virtual character", effectively avoiding the situation that some players in a combat state use the virtual character protection method provided in the present application to perform a life-saving behavior, thereby ensuring the relative fairness of the overall game and improving the game experience of the players.
[0113] As an optional implementation, referring to FIG. 1, the method further includes: Figure 5
[0114] S501, start timing when the first virtual character is hidden to the target area.
[0115] S502, cancel the hiding of the first virtual character when the timing reaches a preset time length and the first virtual character meets the first protection condition.
[0116] For example, the preset time length is 10 seconds. That is, when the time length of the first virtual character hidden to the target area exceeds 10 seconds and the first virtual character meets the first protection condition, the control cancels the protection of the first virtual character.
[0117] In the embodiment, in order to ensure the relative fairness of the overall game and also to stimulate the game enthusiasm of the players, a preset hiding time length is set for the first virtual character when the first virtual character is hidden to the target area. When the timing reaches a preset time length and the first virtual character meets the first protection condition, the first virtual character is hidden.
[0118] As an optional implementation, after the step S102 "control the first virtual character to be hidden to the target area", the method further includes:
[0119] In response to the first virtual role satisfying a second protection condition, the first virtual role is unhidden, wherein the second protection condition comprises that the first virtual role is in an online state or a game loading completion state.
[0120] For example, when the game client corresponding to the first virtual role is normally connected with the server, it can be determined that the first virtual role is in the online state. That is, the player corresponding to the first virtual role can normally operate the first virtual role. At this time, the first virtual role no longer satisfies the first protection condition.
[0121] For another example, when the game client corresponding to the first virtual role has completed loading of resource information (such as images, sounds, animations, etc.) required by the game, it can be determined that the first virtual role is in the game loading completion state. The player corresponding to the first virtual role can also normally operate the first virtual role. At this time, the first virtual role no longer satisfies the first protection condition.
[0122] In this embodiment, for example, when the first virtual role is in the online state or the game loading completion state, the first virtual role is unhidden, so that the first virtual role is in a visible state on a graphical user interface provided by a terminal device corresponding to another virtual role in the game scene. At this time, the player corresponding to the first virtual role can normally experience the game, and an opponent role of the first virtual role can normally attack the first virtual role.
[0123] As an optional implementation, after the step S102 of "controlling to hide the first virtual role to the target region", the method further comprises:
[0124] In response to the first virtual role satisfying a second protection condition, the first virtual role is unhidden, wherein the second protection condition comprises that the first virtual role is in an online state or a game loading completion state.
[0125] For example, when the game client corresponding to the first virtual role is normally connected with the server, it can be determined that the first virtual role is in the online state. That is, the player corresponding to the first virtual role can normally operate the first virtual role. At this time, the first virtual role no longer satisfies the first protection condition.
[0126] For example, the "first preset time" is 5 seconds.
[0127] In the embodiment, when the first virtual character is in the online state or the game loading completion state, the first virtual character is highlighted within 5 seconds to make the first virtual character visually distinct, and thus the first virtual character is visually distinct (i.e., in a visible state) on a graphical user interface provided by a terminal device corresponding to another virtual character in the game scene. In this way, the player corresponding to the other virtual character can timely observe that the first virtual character is in the online state or the game loading completion state, the first virtual character that reconnects after being disconnected does not suddenly appear in the battle, the relative fairness of the overall battle is further ensured, the game enthusiasm of the player is stimulated, and thus the game experience of the player is improved.
[0128] As an optional implementation, the method further includes: configuring the first virtual character to be in the attack-inhibited state and / or the attack-receiving-inhibited state within a second preset time.
[0129] For example, the second preset time is 3 seconds. Specifically, the first virtual character is configured to be in the attack-inhibited state and / or the attack-receiving-inhibited state within 3 seconds after the first virtual character is in the online state or the game loading completion state. That is, the opponent character of the first virtual character cannot attack the first virtual character within the 3 seconds, and / or the first virtual character cannot attack the opponent character, the relative fairness of the overall game is ensured, the game enthusiasm of the player is stimulated, and thus the game experience of the player is improved.
[0130] As an optional implementation, after the step S102, the method further includes:
[0131] In response to the first virtual character satisfying a second protection condition, outputting a prompt information to the second virtual character in a preset game scene range, the prompt information being used to prompt a target area in which the first virtual character is located. The second protection condition includes that the first virtual character is in the online state or the game loading completion state.
[0132] The second virtual character is an opponent character of the first virtual character, and the number of the second virtual characters can be one or more.
[0133] For example, the original position of the first virtual character after being online or after the game loading completion is B point, a circular region is drawn with B point as the center and 3 kilometers as the radius, and the circular region is used as a preset game scene range, and one or more second virtual characters exist in the preset game scene range.
[0134] Exemplarily, the prompt information output to the second virtual character within the preset game scene range can be of a plurality of different display types, such as a character special effect. The character special effect can be a special effect rendered in a graphical user interface, or a rendered special effect in the game scene, etc. In this way, the player corresponding to the second virtual character can learn the prompt information about the current state of the first virtual character in a non-audio manner, improving the flexibility of human-computer interaction, and further improving the efficiency of human-computer interaction.
[0135] In this way, the player corresponding to the second virtual character can also accurately determine the approximate range in which the first virtual character is located after going online in a timely manner according to the output prompt information, providing a strong game immersion experience for the player.
[0136] In the embodiment, for example, when the first virtual character is in an online state or a game loading completion state, and it is determined that there is a second virtual character within the preset game scene range, a prompt information is output to the second virtual character, so that the player corresponding to the second virtual character can learn in a timely manner that the first virtual character is currently in an online state or a game loading completion state according to the prompt information, and the player corresponding to the second virtual character can adjust the game strategy in a timely manner to avoid the second virtual character being attacked by the first virtual character without knowing it, and the relative fairness of the game is ensured.
[0137] As an optional implementation, after the step S102 of "hiding the first virtual character to the target area", the method further includes:
[0138] In response to the first virtual character satisfying a second protection condition, a position indication mark is provided in the target area, and the position indication mark is used to prompt the target area within a third preset time. The second protection condition includes that the first virtual character is in an online state or a game loading completion state.
[0139] Exemplarily, for example, the third preset time is 3 seconds.
[0140] In the embodiment, when the first virtual character is in an online state or a game loading completion state within 3 seconds, a position indication mark provided in the target area can also be used to prompt the target area, so that the opponent player of the "player corresponding to the first virtual character" can learn the current position of the first virtual character in a timely manner according to the position indication mark.
[0141] As an optional implementation, the position indication mark is displayed within a preset distance range outside the target area.
[0142] For example, the preset distance is 1 km, and the position indication mark is displayed within a range of 1 km outside the target area, so that the opponent player of the "player corresponding to the first virtual character" can timely and accurately know the current position of the first virtual character according to the obtained position indication mark. In this way, the relative fairness of the overall battle can be ensured, thereby improving the game experience of the player.
[0143] As an optional implementation, the method further comprises:
[0144] After the first virtual character hides in the target area, if the target area has environment attack information, the environment attack information is assigned to the first virtual character.
[0145] Optionally, in the game, the environment attack information can be issued in the activity area where the first virtual character is located, and the environment attack information can act on each virtual character in the activity area, so that some attribute values of each virtual character are reduced. For example, when the first virtual character is attacked by the environment attack information, the health value of the first virtual character is reduced by a preset value. When the first virtual character leaves the activity area attacked by the environment attack information, some attribute values of the first virtual character can be restored, or restored to a certain extent, or the attribute values stop decreasing.
[0146] As an example, the attack mode of the above-mentioned environment attack information can be a poison circle attack, which can act on each virtual character in the area where the virtual material is issued. For example, the environment attack information can be calculated according to the concentration of virtual materials such as "plague poison gas" in the area, which is used to indicate the damage value caused to the first virtual character, so that the first virtual character cannot survive in the target area.
[0147] For example, the preset distance is 1 km, and the position indication mark is displayed within a range of 1 km outside the target area, so that the opponent player of the "player corresponding to the first virtual character" can timely and accurately know the current position of the first virtual character according to the obtained position indication mark. In this way, the relative fairness of the overall battle can be ensured, thereby improving the game experience of the player. Figure 6 If the target area A where the first virtual character hides has environment attack information, the health value or blood volume of the first virtual character can be deducted according to the damage value indicated by the environment attack information existing in the target area, that is, the environment attack information is assigned to the first virtual character. If the health value or blood volume of the first virtual character is 0, and the first virtual character satisfies the first protection condition, the first virtual character will still die under the poison circle attack information in the target area. In this way, the player can avoid hiding in the poison circle by using the virtual character protection method provided in the application, and the fairness of the overall game can be effectively ensured.
[0148] In another implementation, if the life value or blood volume of the target virtual role is not 0, and the first virtual role does not meet the first protection condition, that is, the communication connection of the game client corresponding to the first virtual role is normal, and / or the game client corresponding to the first virtual role has been loaded, at this time, the player corresponding to the first virtual role can control the first virtual role to move out of the target area, so that the first virtual role can quickly escape from the poison circle and avoid the death of the first virtual role in the poison circle.
[0149] As an optional implementation, the "first protection condition" in the step S101 includes that the first virtual role is in an offline state or the game is in a loading state.
[0150] The first virtual role in the offline state means that the communication connection of the game client corresponding to the first virtual role is abnormal. For example, it means that the network connection between the game client corresponding to the first virtual role and the server fails, and then the first virtual role is in the offline state, so that the player corresponding to the first virtual role cannot control the first virtual role.
[0151] The first virtual role in the game loading state means that when entering the game stage, the game client corresponding to the first virtual role is configured to be low, so that the game client loads the resource information of the game scene too slowly, and then the game client has not completed loading within a preset time period, so that the player corresponding to the first virtual role cannot control the first virtual role.
[0152] The following embodiments will specifically describe how to determine whether the first virtual role currently meets the first protection condition.
[0153] As an optional implementation, for the case that the communication connection of the game client corresponding to the first virtual role is abnormal, the method includes:
[0154] The communication connection of the game client corresponding to the first virtual role can be detected in real time based on a heartbeat log.
[0155] The heartbeat log means a log file recording the heartbeat message sent by a sender to a receiver.
[0156] In this embodiment, the sender can refer to the server or the game client, and the receiver can also refer to the game client or the server.
[0157] For example, taking the game client as the sender, the game application installed on the game client will send a heartbeat message to the server at a regular or periodic time from the start of execution, so that the server determines whether the game application on the game client is in a failure state or when the game application on the game client is in a failure state according to the received heartbeat message. At the same time, the server will record the received heartbeat message as a log file and save it to the database of the server.
[0158] If the server does not receive the heartbeat message sent by the game client in a certain message receiving period, the server considers that the game client is in a communication connection abnormal state.
[0159] Similarly, if the sender is the server, the server will also send a heartbeat message to the game client at a regular or periodic time, so that the game client determines whether the game client itself is in a communication connection abnormal state according to the received heartbeat signal.
[0160] As an optional implementation, for the case that the game client corresponding to the first virtual role does not complete loading, the method comprises:
[0161] If the loading completion information sent by the game client corresponding to the first virtual role is not received, it is determined that the game client corresponding to the first virtual role does not complete loading.
[0162] In this embodiment, when the game client corresponding to the first virtual role completes loading of the resource information required by the game scene, the server sends loading completion information. If the server does not receive the loading completion information sent by the game client corresponding to the first virtual role within a predetermined period of time, the server can determine that the game client does not complete loading, so that the player is in a state of being unable to control the first virtual role.
[0163] Based on the same inventive concept, the embodiments of the present application also provide a game virtual role protection device corresponding to the game virtual role protection method. Since the principle of solving problems in the device of the embodiments of the present application is similar to the game virtual role protection method described above, the implementation of the device can be referred to the implementation of the method, and the repeated parts will not be described here.
[0164] Figure 7 The embodiments of the present application also provide a game virtual role protection device, which comprises:
[0165] The determining module 701 is configured to determine a target area in the game scene in response to the first virtual role currently satisfying a first protection condition, wherein the first protection condition comprises that the first virtual role is in an offline state or the game is in a loading state.
[0166] The control module 702 is configured to control hiding the first virtual character to the target area, so that the first virtual character is in an invisible state on a graphical user interface provided by a terminal device corresponding to another virtual character in the game scene.
[0167] In a possible implementation, the determination module 701 is further configured to:
[0168] In response to the first virtual character satisfying the first protection condition, obtaining a position of the first virtual character in the game scene;
[0169] determining a target area within a preset game scene range from the position; and wherein the target area includes a building or a grass in the game.
[0170] In a possible implementation, the determination module 701 is further configured to:
[0171] determining the building or the grass closest to the position in the preset game scene range as the target area.
[0172] In a possible implementation, the apparatus further includes:
[0173] The detection module is configured to detect whether the first virtual character is currently in a non-combat state.
[0174] The control module 702 is further configured to control hiding the first virtual character to the target area if the first virtual character is in the non-combat state, and control keeping the first virtual character at a current position if the first virtual character is not in the non-combat state.
[0175] In a possible implementation, the apparatus further includes:
[0176] The timing module is configured to start timing when the first virtual character is hidden to the target area.
[0177] The cancel module is configured to cancel hiding the first virtual character when the timing reaches a preset time length and the first virtual character satisfies the first protection condition.
[0178] In a possible implementation, the cancel module is further configured to:
[0179] canceling hiding the first virtual character in response to the first virtual character satisfying a second protection condition, wherein the second protection condition includes the first virtual character being in an online state or a game loading completion state.
[0180] In a possible implementation, the apparatus further includes:
[0181] The display module is configured to highlight the first virtual character within a first preset time in response to the first virtual character satisfying the second protection condition, so that the first virtual character is visually distinguished.
[0182] The second protection condition comprises that the first virtual character is in an online state or a game loading completion state.
[0183] In a possible implementation, the apparatus further includes:
[0184] The configuration module is configured to configure the first virtual character to be in an attack-inhibited state and / or a hit-inhibited state within a second preset time.
[0185] In a possible implementation, the apparatus further includes:
[0186] The output module is configured to, in response to the first virtual character satisfying the second protection condition, output a prompt information to the second virtual character within a preset game scene range, the prompt information being used to prompt a target area in which the first virtual character is located.
[0187] The second protection condition comprises that the first virtual character is in an online state or a game loading completion state.
[0188] In a possible implementation, the apparatus further includes:
[0189] The providing module is configured to, in response to the first virtual character satisfying the second protection condition, provide a position indication mark in the target area, the position indication mark being used to prompt the target area within a third preset time.
[0190] The second protection condition comprises that the first virtual character is in an online state or a game loading completion state.
[0191] In a possible implementation, the position indication mark is displayed within a preset distance range outside the target area.
[0192] In a possible implementation, the apparatus further includes:
[0193] The giving module is configured to, after the first virtual character hides to the target area, if there is environment attack information in the target area, give the first virtual character the environment attack information.
[0194] The apparatus is used to execute the method provided by the foregoing embodiments, and has similar implementation principles and technical effects, which are not described herein again.
[0195] The above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs), or the like. For example, when a certain module above is implemented in the form of a processing element scheduling code, the processing element can be a general purpose processor, such as a central processing unit (CPU) or other processor that can invoke code. For another example, the modules can be integrated together to implement a system-on-a-chip (SOC).
[0196] Reference Figure 8 As shown in the above embodiments, the present application also provides an electronic device, which can include the game client or the server in the above embodiments, such as Figure 8 As shown in the above embodiments, the electronic device structure provided by the present application includes a processor 802, a memory 802, and a bus 803. The memory 802 stores machine readable instructions executable by the processor 802 (such as execution instructions corresponding to the response module and the output module in the device in the above embodiments, etc.), and when the electronic device is running, the processor 802 and the memory 802 communicate through the bus 803, and the machine readable instructions are executed by the processor 801 to execute the method steps in the above method embodiments. Figure 8
[0197] The present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to execute the steps of the above game virtual character protection method.
[0198] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. For example, the apparatus embodiments described above are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interface, apparatus or unit, and can be electrical, mechanical or other forms.
[0199] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0200] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
[0201] The integrated unit realized in the form of software functional unit can be stored in a computer readable storage medium. The software functional unit stored in a storage medium includes a plurality of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated as: ROM), random access memory (English: Random Access Memory, abbreviated as: RAM), magnetic disk or optical disk and various program code storage media.
Claims
1. A method for protecting a virtual character in a game, characterized by, The method comprises: determining a target area in the game scene in response to the first virtual character meeting a first protection condition, wherein the first protection condition comprises the first virtual character being in an offline state or the game being in a loading state; controlling the first virtual character to be hidden in the target area, so that the first virtual character is in an invisible state on a graphical user interface provided by a terminal device corresponding to another virtual character in the game scene.
2. The method of claim 1, wherein, The method further comprises: acquiring a position of the first virtual character in the game scene in response to the first virtual character meeting the first protection condition; determining the target area within a preset game scene range from the position, wherein the target area comprises a building or a grass in the game.
3. The method of claim 2, wherein, The method further comprises: determining the building or the grass closest to the position in the preset game scene range as the target area.
4. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: detecting whether the first virtual character is currently in a non-combat state; if yes, controlling the first virtual character to be hidden in the target area; if no, controlling the first virtual character to stay at the current position.
5. The method of claim 1, wherein, The method further comprises: starting timing when the first virtual character is hidden in the target area; when the timing reaches a preset time length and the first virtual character meets the first protection condition, un-hiding the first virtual character.
6. The method of claim 1, wherein, The method further comprises: in response to the first virtual character meeting a second protection condition, un-hiding the first virtual character, wherein the second protection condition comprises the first virtual character being in an online state or the game being in a loading completion state.
7. The method of claim 1, wherein, The method further comprises: in response to the first virtual character meeting a second protection condition, highlighting the first virtual character within a first preset time, so that the first virtual character is visually distinguished; wherein the second protection condition comprises the first virtual character being in an online state or the game being in a loading completion state.
8. The method according to claim 6 or 7, characterized in that, The method further comprises: when the first virtual character is in an online state or a game loading completion state, configuring the first virtual character to be in an attack-inhibited state and / or a hit-inhibited state within a second preset time.
9. The method of claim 1, wherein, The method further comprises: in response to the first virtual character meeting a second protection condition, outputting a prompt information to a second virtual character within a preset game scene range, the prompt information being used to prompt a target area where the first virtual character is located; wherein the second protection condition comprises the first virtual character being in an online state or the game being in a loading completion state.
10. The method of claim 1, wherein, After the control hides the first virtual role to the target area, the method further includes: In response to the first virtual role satisfying a second protection condition, providing a position indication mark in the target area, the position indication mark being used to prompt the target area within a third preset time; Wherein, the second protection condition includes that the first virtual role is in an online state or a game loading completion state.
11. The method of claim 10, wherein, Displaying the position indication mark within a preset distance range outside the target area.
12. The method of claim 1, wherein, The method further includes: After the first virtual role is hidden to the target area, if there is environment attack information in the target area, the environment attack information is assigned to the first virtual role.
13. A virtual character protection apparatus in a game, characterized by comprising: a virtual character protection unit which protects a virtual character from an attack by another virtual character in a game. The device includes: A determination module is configured to determine a target area in a game scene in response to a first virtual role currently satisfying a first protection condition, wherein the first protection condition includes that the first virtual role is in an offline state or a game is being loaded state; A control module is configured to control to hide the first virtual role to the target area, so that the first virtual role is in an invisible state on a graphical user interface provided by a terminal device corresponding to other virtual roles in the game scene.
14. An electronic device, comprising: It includes: A processor, a storage medium and a bus, the storage medium stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the storage medium communicate through the bus, the processor executes the machine readable instructions to execute the steps of the method as claimed in any one of claims 1-12.
15. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, the computer program is executed by the processor to execute the method as claimed in any one of claims 1-12.
Citation Information
Patent Citations
Game role motion processing method and device, storage medium and computer equipment
CN112862935A
Game control method and device, storage medium and computer equipment
CN113426121A