Method and apparatus for switching display color of virtual character

By switching the color of the virtual character based on the number of hits or the duration of the shooting action, the problem of low shooting accuracy in virtual game scenes is solved, the color difference between the virtual character and scene objects is enhanced, and the player's shooting accuracy and gaming experience are improved.

CN116983634BActive Publication Date: 2026-07-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2022-04-25
Publication Date
2026-07-21

Smart Images

  • Figure CN116983634B_ABST
    Figure CN116983634B_ABST
Patent Text Reader

Abstract

The application discloses a display color switching method and device of a virtual role. The method comprises the following steps: displaying a second virtual role in a first color in a game picture of a first virtual role; and displaying the second virtual role in a second color in the game picture of the first virtual role, in the case that the first virtual role performs a virtual shooting operation on the second virtual role, and the virtual shooting operation meets the condition of switching the display color of the second virtual role. The application solves the technical problem of low accuracy of virtual shooting in a related virtual game scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to a method and apparatus for switching the display color of a virtual character. Background Technology

[0002] In the relevant game scenarios, the differences between the environmental materials and the virtual characters' materials are minimal, and the color schemes of the virtual character models and the virtual environment are also relatively similar. Especially in large-scale map game modes, where many mid-to-long-range battles occur, the overly similar color schemes of the virtual character models and the environment make it difficult for players to distinguish enemy virtual characters within the virtual game environment. This increases the difficulty of target acquisition and aiming, and reduces the accuracy of virtual shooting in the virtual game environment.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This application provides a method and apparatus for switching the display color of a virtual character, in order to at least solve the technical problem of low accuracy in virtual shooting in related virtual game scenes.

[0005] According to one aspect of the embodiments of this application, a method for switching the display color of a virtual character is provided, comprising: displaying a second virtual character of a first color in the game screen of a first virtual character, wherein the first virtual character and the second virtual character belong to different factions; when the first virtual character performs a virtual shooting operation on the second virtual character, and the virtual shooting operation satisfies the condition for switching the display color of the second virtual character, displaying the second virtual character of a second color in the game screen of the first virtual character, wherein the color difference between the second color and the color of a first scene object is greater than the color difference between the first color and the color of the first scene object, and the first scene object is a virtual object adjacent to the second virtual character in a first virtual scene where the second virtual character is located.

[0006] Optionally, when the first virtual character performs a virtual shooting operation on the second virtual character, and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, displaying the second virtual character of the second color in the game screen of the first virtual character includes: displaying the second virtual character of the second color in the game screen of the first virtual character when all N virtual items fired consecutively by the first virtual character hit the target detection range of the second virtual character, wherein N is an integer greater than or equal to 2; or, displaying the second virtual character of the second color in the game screen of the first virtual character when M out of the N virtual items fired consecutively by the first virtual character hit the target detection range, wherein M is less than N; or, displaying the second virtual character of the second color in the game screen of the first virtual character when the number of virtual items fired by the first virtual character that hit the target detection range within a preset time period reaches a preset number.

[0007] Optionally, after displaying the second virtual character of the second color in the game screen of the first virtual character, the method further includes: when the second virtual character moves from the first virtual scene to the second virtual scene, displaying the second virtual character of the third color in the game screen of the first virtual character, wherein the difference between the third color and the color of the second scene object is greater than the difference between the second color and the color of the second scene object, and the color of the second scene object is the color of the virtual object adjacent to the second virtual character in the second virtual scene where the second virtual character is located.

[0008] Optionally, after displaying the second virtual character of the second color in the game screen of the first virtual character, the method further includes: if the second virtual character moves from the first virtual scene to a third virtual scene and the difference between the second color and the color of the object in the third scene meets a preset difference condition, then the second virtual character of the second color continues to be displayed in the game screen of the first virtual character, wherein the color of the object in the third scene is the color of the virtual object adjacent to the second virtual character in the third virtual scene where the second virtual character is located.

[0009] Optionally, the method further includes: when the second virtual character moves from its current position to a target position, controlling the target detection range of the second virtual character to change from a first detection range to a second detection range, wherein the distance between the current position and the position of the first virtual character is a first distance, the distance between the target position and the position of the first virtual character is a second distance, when the first distance is greater than the second distance, the detection range of the first detection range is greater than the detection range of the second detection range, and when the first distance is less than the second distance, the detection range of the first detection range is less than the detection range of the second detection range.

[0010] Optionally, the method further includes: when a virtual shooting operation performed by the first virtual character on the second virtual character hits the hit detection range of the second virtual character, deducting a preset number of virtual resources of the second virtual character, wherein the detection range of the hit detection range is less than or equal to the detection range of the target detection range, and the hit detection range is located within the target detection range.

[0011] Optionally, when the first virtual character performs a virtual shooting operation on the second virtual character, and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, displaying the second virtual character of the second color in the game screen of the first virtual character further includes: when the first virtual character performs a virtual shooting operation on the second virtual character, and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, obtaining the color of a virtual object adjacent to the second virtual character in the first virtual scene; obtaining the second color from a preset color set, wherein the second color has the greatest difference from the obtained color of the virtual object in the preset color set; switching the display color of the second virtual character from the first color to the second color, and displaying the second virtual character of the second color in the game screen of the first virtual character.

[0012] Optionally, obtaining the color of the virtual object adjacent to the second virtual character in the first virtual scene includes: obtaining the color of the virtual object closest to the second virtual character in the first virtual scene; or obtaining the color of the virtual object in the first virtual scene that is less than a preset distance threshold and has the largest area; or obtaining the color of the virtual object in the first virtual scene that is less than a preset distance threshold and has the smallest color difference from the first color.

[0013] Optionally, obtaining the color of the virtual object closest to the second virtual character in the first virtual scene includes: emitting multiple detection rays from the center position of the second virtual character in various directions; determining the virtual object closest to the center position of the second virtual character among the multiple virtual objects collided by the multiple detection rays, and obtaining the color of the virtual object closest to the center position of the second virtual character.

[0014] According to another aspect of the embodiments of this application, a device for switching the display color of a virtual character is also provided, comprising: a first display module, configured to display a second virtual character of a first color in the game screen of a first virtual character, wherein the first virtual character and the second virtual character belong to different factions; and a second display module, configured to display a second virtual character of a second color in the game screen of the first virtual character when the first virtual character performs a virtual shooting operation on the second virtual character and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, wherein the color difference between the second color and the color of a first scene object is greater than the color difference between the first color and the color of the first scene object, wherein the first scene object is a virtual object adjacent to the second virtual character in the first virtual scene where the second virtual character is located.

[0015] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-mentioned method for switching the display color of the virtual character when it is run.

[0016] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform a method for switching the display color of a virtual character as described above.

[0017] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described method for switching the display color of a virtual character through the computer program.

[0018] In this embodiment, the first virtual character and the second virtual character belong to different factions. The first virtual character performs a virtual shooting operation on the second virtual character. When this virtual shooting operation satisfies the condition of switching the display color of the second virtual character, the color of the second virtual character is switched from the first color to the second color, and the second virtual character of the second color is displayed in the game screen of the first virtual character. Since the virtual objects adjacent to the second virtual character in the first virtual scene are objects of the first scene, the color difference between the second color and the first scene objects is greater than the color difference between the first color and the first scene objects. This increases the color difference between the second virtual character and the virtual objects adjacent to the second virtual character in the first virtual scene, making it easier for the player to identify the second virtual character. This achieves the goal of increasing the color difference between the second virtual character and the adjacent virtual objects, making it easier to identify the second virtual character, thereby improving the accuracy of virtual shooting in the virtual game scene and solving the technical problem of low accuracy of virtual shooting in related virtual game scenes. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0020] Figure 1 This is a schematic diagram of an application environment for an optional method for switching the display color of a virtual character according to an embodiment of this application;

[0021] Figure 2 This is a flowchart illustrating an optional method for switching the display color of a virtual character according to an embodiment of this application;

[0022] Figure 3 This is an optional game screen illustration according to an embodiment of this application;

[0023] Figure 4 This is another optional game screen illustration according to an embodiment of this application;

[0024] Figure 5 This is another optional game screen illustration according to an embodiment of this application;

[0025] Figure 6 This is another optional game screen illustration according to an embodiment of this application;

[0026] Figure 7 This is another optional game screen illustration according to an embodiment of this application;

[0027] Figure 8This is another optional game screen illustration according to an embodiment of this application;

[0028] Figure 9 This is another optional game screen illustration according to an embodiment of this application;

[0029] Figure 10 This is another optional game screen illustration according to an embodiment of this application;

[0030] Figure 11 This is a schematic diagram of an optional detection range according to an embodiment of this application;

[0031] Figure 12 This is an optional color diagram according to an embodiment of this application;

[0032] Figure 13 This is a schematic diagram of an optional detection ray according to an embodiment of this application;

[0033] Figure 14 This is another optional game screen illustration according to an embodiment of this application;

[0034] Figure 15 This is another optional game screen illustration according to an embodiment of this application;

[0035] Figure 16 This is an optional flowchart according to an embodiment of this application;

[0036] Figure 17 This is a schematic diagram of an optional virtual character display color switching device according to an embodiment of this application;

[0037] Figure 18 This is a computer system architecture block diagram of an optional electronic device according to an embodiment of this application;

[0038] Figure 19 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of this application. Detailed Implementation

[0039] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0040] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0041] According to one aspect of the embodiments of this application, a method for switching the display color of a virtual character is provided. Optionally, as an optional implementation, the above-mentioned method for switching the display color of a virtual character can be applied to, but is not limited to, [examples of other methods]. Figure 1 The environment shown above includes user equipment 102, network 110, and server 112. User equipment 102 includes a memory 104, a processor 106, and a display 108. The memory stores game data, the processor processes the game data, and the display shows the game visuals.

[0042] Optionally, in this embodiment, the user equipment can be a terminal device configured with a target client, which may include, but is not limited to, at least one of the following: mobile phone (such as Android phone, iOS phone, etc.), laptop computer, tablet computer, PDA, MID (Mobile Internet Device), PAD, desktop computer, smart TV, etc. The target client may be a video client, instant messaging client, browser client, game client, etc.

[0043] Optionally, the aforementioned network 110 may include, but is not limited to, wired networks and wireless networks, wherein the wired network includes local area networks, metropolitan area networks and wide area networks, and the wireless network includes Bluetooth, WIFI and other networks that enable wireless communication.

[0044] Optionally, the server 112 includes a database 114 and a processing engine 116, wherein the database is used to store game data and the processing engine is used to process the game data.

[0045] The server mentioned above can be a single server, a server cluster consisting of multiple servers, or a cloud server. The above is merely an example, and this embodiment does not impose any limitations on it.

[0046] Alternatively, as an alternative implementation method, such as Figure 2 As shown, the methods for switching the display color of the aforementioned virtual character include:

[0047] Step S202: Display a second virtual character of the first color in the game screen of the first virtual character, wherein the first virtual character and the second virtual character belong to different factions;

[0048] Among them, the first virtual character and the second virtual character are virtual characters controlled by different players in the virtual game scene. The first virtual character and the second virtual character belong to different factions and are hostile to each other in the virtual game scene.

[0049] Step S204: When the first virtual character performs a virtual shooting operation on the second virtual character and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, the second virtual character of the second color is displayed in the game screen of the first virtual character. The difference between the second color and the color of the first scene object is greater than the difference between the first color and the color of the first scene object. The first scene object is a virtual object adjacent to the second virtual character in the first virtual scene where the second virtual character is located.

[0050] As an optional implementation, this solution can be applied to virtual shooting game scenarios. The virtual shooting involved in this application refers to shooting operations within a virtual game scene on a game client. For example... Figure 3 The game screen shown is the game screen of the first virtual character. In the first virtual game scene, 301 is the virtual shooting prop used by the first virtual character, 302 is the second virtual character of the first color (the first color in the figure is only for illustrating this embodiment, and the specific color can be determined according to the actual situation), and 303 is the virtual object adjacent to the second virtual character in the first virtual scene. As can be seen from the figure, when the color difference between the second virtual character and the adjacent virtual object is small, the player controlling the first virtual character has difficulty distinguishing the second virtual character, making it difficult to aim at the second virtual character and resulting in low accuracy of virtual shooting.

[0051] Optionally, when the first virtual character performs a virtual shooting operation on the second virtual character and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, displaying the second virtual character of the second color in the game screen of the first virtual character includes: when N virtual props fired consecutively by the first virtual character all hit the target detection range of the second virtual character, displaying the second virtual character of the second color in the game screen of the first virtual character, wherein N is an integer greater than or equal to 2.

[0052] As an optional implementation, such as Figure 4 As shown, a target detection range 401 is set for the second virtual character. This target detection range can determine the range near the center of the second virtual character when a shot is fired. The preset range can be determined according to the actual situation, such as 0.5 meters or 0.7 meters from the center of the second virtual character. The target detection range box can be a cuboid collision box, and the specific shape can be set according to the actual situation. It can also be a circle, ellipse, or other shapes. The range of the target detection range is the suppression range of the second virtual character.

[0053] As an optional implementation, the aforementioned virtual props can be virtual bullets fired by virtual shooting props. If N virtual bullets fired consecutively by the first virtual character (the value of N can be set according to the actual situation, such as 5, 6, 8, 9, etc.) all hit the target detection range of the second virtual character within its suppression range, then... Figure 5 The control changes the second virtual character from the first color 501 to the second color, and displays the second virtual character 502 (not shown in the figure, the second color can be blue, red, yellow, etc.) on the game screen of the first virtual character. In another optional implementation, if the first virtual character fires N virtual bullets (N value can be set according to actual conditions, such as 3 seconds, 5 seconds, 10 seconds, etc.) consecutively within the target detection range of the second virtual character for a preset time period (which can be set according to actual conditions), the second virtual character of the second color is displayed on the game screen of the first virtual character. In the above embodiment, if one bullet in the N consecutive virtual bullets misses the target detection range, the number of virtual bullets that consecutively hit the target detection range needs to be recalculated. In this embodiment, the color change of the second virtual character is triggered by the N virtual props continuously hitting the target detection range of the second virtual character. The color difference between the second virtual character of the second color and the virtual objects near the second virtual character is more obvious, making it easier for the player to aim at the second virtual character and improving the accuracy and efficiency of virtual shooting.

[0054] A notification message is also displayed on the game screen of the first virtual character. This message indicates that the second virtual character, displaying a second color, will be triggered if N consecutive virtual items are fired and all hit the target detection range of the second virtual character. The message also indicates the number of consecutive hits the first virtual character has made within the target detection range of the second virtual character. Figure 5The message box 500 shown displays the target consecutive hit count as 10 (the second virtual character is triggered when 10 virtual items are launched consecutively and all hit the target detection range of the second virtual character), the consecutive hit count (the number of times virtual items launched by the first virtual character have consecutively hit the target detection range of the second virtual character), and the result when the first virtual character launches 10 virtual items consecutively and all hit the target detection range of the second virtual character. Figure 5 The second virtual character 502, displayed in a second color, is shown on the game screen of the first virtual character. In this embodiment, the number of consecutive hits to the target and the number of consecutive hits already achieved, displayed in the prompt box, allow the player to understand the gap between the current number of consecutive hits and the target number of consecutive hits in real time, reminding the player to move closer to the target and improving the player's gaming experience.

[0055] Optionally, when the first virtual character performs a virtual shooting operation on the second virtual character and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, displaying the second virtual character of the second color in the game screen of the first virtual character further includes: when M out of N virtual items fired continuously by the first virtual character hit the target detection range, displaying the second virtual character of the second color in the game screen of the first virtual character, wherein M is less than N.

[0056] As another optional implementation, if M out of N virtual bullets fired by the first virtual character (the value of N can be set according to the actual situation, such as 5, 6, 8, 9, etc.) hit the target detection range of the second virtual character within the suppression range (M can be even more according to the actual situation, but M is less than N), the second virtual character is controlled to change from the first color to the second color, and the second virtual character of the second color is displayed on the game screen of the first virtual character.

[0057] Taking N=10 and M=5 as an example, a prompt message is also displayed on the game screen of the first virtual character. This prompt message indicates that the second virtual character, displaying the second color, will be triggered when M virtual items out of N consecutively fired hit the target detection range, and also indicates the number of times the first virtual character has hit the target detection range of the second virtual character. Figure 6 The message box 600 shown displays the number of consecutive launches (the number of virtual items launched consecutively by the first virtual character) and the number of hits (the number of virtual items launched by the first virtual character that have hit the target detection range of the second virtual character). When 5 out of 10 virtual items launched consecutively by the first virtual character hit the target detection range of the second virtual character, such as... Figure 6As shown, the second virtual character (601) of the first color changes to the second virtual character (602) of the second color, and the second virtual character 602 of the second color is displayed on the game screen of the first virtual character. In this embodiment, by displaying the number of virtual items that the first virtual character has continuously launched and the number of targets that have been hit within the detection range in the prompt box, players can understand in real time the number of virtual items launched and the number that have been hit, thereby improving the player's gaming experience.

[0058] In another optional implementation, if M out of N virtual bullets fired by the first virtual character within a preset time period (which can be set according to actual conditions, such as 3 seconds, 5 seconds, 10 seconds, etc.) hit the target detection range of the second virtual character, a second virtual character of a second color is displayed on the game screen of the first virtual character. In this embodiment, counting begins from the first virtual character hitting the target detection range of the second virtual character for the first time. If the number of hits reaches M, a color change of the second virtual character is triggered. The color difference between the second virtual character of the second color and the virtual objects near the second virtual character is more obvious, making it easier for the player to aim at the second virtual character and improving the accuracy and efficiency of virtual shooting.

[0059] Optionally, when the first virtual character performs a virtual shooting operation on the second virtual character and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, the second virtual character of the second color is displayed in the game screen of the first virtual character. This further includes: when the number of virtual props fired by the first virtual character within a preset time and hitting the target detection range reaches a preset number, the second virtual character of the second color is displayed in the game screen of the first virtual character.

[0060] As another optional implementation, if the first virtual character fires M virtual bullets within a preset time period (which can be adjusted according to actual conditions, such as 5 seconds or 10 seconds) that hit the target detection range of the second virtual character (M can be adjusted according to actual conditions, but M is less than N), the second virtual character is controlled to change from the first color to the second color, and the second virtual character of the second color is displayed on the game screen of the first virtual character. In another optional implementation, if the first virtual character fires N virtual bullets consecutively within a preset time period (which can be adjusted according to actual conditions, such as 3 seconds, 5 seconds, 10 seconds, etc.) and M virtual bullets hit the target detection range of the second virtual character, the second virtual character of the second color is displayed on the game screen of the first virtual character. In this embodiment, counting begins from the first virtual character hitting the target detection range of the second virtual character for the first time. If the number of hits reaches M, the color change of the second virtual character is triggered. The color difference between the second virtual character of the second color and the virtual objects near the second virtual character is more obvious, making it easier for the player to aim at the second virtual character and improving the accuracy and efficiency of virtual shooting.

[0061] Taking a preset duration of 10 seconds as an example, a prompt message is also displayed on the game screen of the first virtual character. This prompt message indicates the remaining time of the preset duration, the preset quantity, and the number of virtual props that have hit the target detection range. Figure 7 The message box 700 shown displays the remaining time, the number of targets (preset number), and the number of hits (the number of virtual items that have hit the target detection range). If, within 10 seconds, 5 virtual items launched by the first virtual character hit the target detection range of the second virtual character, then... Figure 7 As shown, the second virtual character 701 of the first color changes to a second virtual character 702 of the second color, and the second virtual character 702 of the second color is displayed on the game screen of the first virtual character. In this embodiment, displaying the remaining time, the number of targets, and the number of hits in the prompt box can enhance the player's gaming experience.

[0062] Optionally, after displaying the second virtual character of the second color in the game screen of the first virtual character, the method further includes: when the second virtual character moves from the first virtual scene to the second virtual scene, displaying the second virtual character of the third color in the game screen of the first virtual character, wherein the difference between the third color and the color of the second scene object is greater than the difference between the second color and the color of the second scene object, and the color of the second scene object is the color of the virtual object adjacent to the second virtual character in the second virtual scene where the second virtual character is located.

[0063] As an optional implementation, since virtual characters can move freely in a virtual game scene, if the second virtual character moves from the first virtual scene to the second game scene, the color of the second virtual character is changed from the second color to the third color. The difference between the third color and the color of adjacent virtual objects of the second virtual character is greater than the difference between the second color and the color of adjacent virtual objects of the second virtual character. For example... Figure 8 As shown, the second virtual character moves from the first virtual scene to the second virtual scene. The second virtual character switches from a second color 801 to a third color 802. 803 in the figure represents a virtual object adjacent to the second virtual character in the second virtual scene. The color difference between the third color and virtual object 803 is greater than the color difference between the second color and virtual object 803. The third color can be set according to actual conditions, such as red, green, or blue. In this embodiment, as the second virtual character moves, the virtual objects near the second virtual character change, and the color of the second virtual character also changes accordingly. This allows the player controlling the first virtual character to accurately distinguish the second virtual character during its movement, improving the accuracy of virtual shooting.

[0064] Optionally, after displaying the second virtual character of the second color in the game screen of the first virtual character, the method further includes: if the second virtual character moves from the first virtual scene to a third virtual scene and the difference between the second color and the color of the object in the third scene meets a preset difference condition, then the second virtual character of the second color continues to be displayed in the game screen of the first virtual character, wherein the color of the object in the third scene is the color of the virtual object adjacent to the second virtual character in the third virtual scene where the second virtual character is located.

[0065] As an optional implementation, since virtual characters can move freely in a virtual game scene, if the second virtual character moves from the first virtual scene to the third virtual scene, and the color difference between the second virtual character and the virtual objects adjacent to the second virtual character in the third virtual scene meets a preset difference condition, the color of the second virtual character can continue to remain the second color. The preset difference condition can be that the difference between the color value of the second color of the second virtual character and the color value of the virtual objects adjacent to the second virtual character is greater than or equal to a threshold. The color value can be the three primary color values, or the values ​​obtained after the three primary colors are processed by a function (e.g., taking the average value, or taking the maximum or minimum value among the three primary colors, etc.). The threshold can also be set according to the actual situation.

[0066] like Figure 9As shown, the second virtual character moves from the first virtual scene to the third virtual scene. If the color of the second virtual character 901 (shown in the figure) and the color of the virtual object 902 adjacent to the second virtual character in the third virtual scene meet the aforementioned preset difference condition, then the second virtual character continues to maintain its second color. The second color shown in the figure can be set according to actual conditions, such as red, green, or blue. In this embodiment, if the color of the second virtual character differs significantly from the color of its nearby virtual objects during movement, the color of the second virtual character can remain unchanged, thus achieving the technical effect of saving game resources.

[0067] Optionally, the method further includes: when the second virtual character moves from its current position to a target position, controlling the target detection range of the second virtual character to change from a first detection range to a second detection range, wherein the distance between the current position and the position of the first virtual character is a first distance, the distance between the target position and the position of the first virtual character is a second distance, when the first distance is greater than the second distance, the detection range of the first detection range is greater than the detection range of the second detection range, and when the first distance is less than the second distance, the detection range of the first detection range is less than the detection range of the second detection range.

[0068] As an optional implementation, such as Figure 10 The second virtual character within target detection range 1001 is the current position of the aforementioned second virtual character, and the second virtual character within target detection range 1002 is the aforementioned target position. The distance between the current position and the position of the first virtual character 100 is d1, and the distance between the target position and the position of the first virtual character is d2. If d1 is greater than d2, the judgment range of target detection range 1001 is larger than the judgment range of target detection range 1002. Conversely, if d1 is less than d2, the judgment range of target detection range 1001 is smaller than the judgment range of target detection range 1002. The judgment range of the target detection range varies within a certain range, decreasing as it approaches infinity. That is, the greater the distance between the second virtual character and the first virtual character, the larger the judgment range of the target detection range will be. This makes it easier for the first virtual character to attack the second virtual character at a distance, improving the accuracy of virtual shooting.

[0069] Optionally, the method further includes: when a virtual shooting operation performed by the first virtual character on the second virtual character hits the hit detection range of the second virtual character, deducting a preset number of virtual resources of the second virtual character, wherein the detection range of the hit detection range is less than or equal to the detection range of the target detection range, and the hit detection range is located within the target detection range.

[0070] As an optional implementation, the second virtual character has two collision boxes attached to it, one being the hit detection range and the other the target detection range (also known as the suppression detection range). Figure 11 In this system, the hit detection range (1102) is smaller than the target detection range (1101). The hit detection range is used to determine whether damage calculation is performed. If the hit is within the hit detection range, a certain amount of virtual resources is deducted from the second virtual character. The specific amount deducted can be determined based on the actual situation, such as deducting a certain amount of health. Since the hit detection range is within the target detection range, if the first virtual character hits the hit detection range, it can also be recorded as the first virtual character hitting the target detection range, and the number of times the first virtual character hits the target detection range is accumulated. In this way, the first virtual character not only attacks the second virtual character but also accumulates a hit for the second virtual character's color switching, improving the player's gaming experience.

[0071] Optionally, when the first virtual character performs a virtual shooting operation on the second virtual character, and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, displaying the second virtual character of the second color in the game screen of the first virtual character further includes: when the first virtual character performs a virtual shooting operation on the second virtual character, and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, obtaining the color of a virtual object adjacent to the second virtual character in the first virtual scene; obtaining the second color from a preset color set, wherein the second color has the greatest difference from the obtained color of the virtual object in the preset color set; switching the display color of the second virtual character from the first color to the second color, and displaying the second virtual character of the second color in the game screen of the first virtual character.

[0072] As an optional implementation, if the shooting operation of the first virtual character satisfies the aforementioned condition for switching the display color of the second virtual character, the color will change according to the color of the virtual objects near the second virtual character. First, the colors of the virtual objects near the second virtual character are obtained. Then, from a preset color set, the color with the largest difference from the color of the virtual objects near the second virtual character is determined, and this color is used as the second color. The color of the second virtual character is then switched to the aforementioned second color.

[0073] As an optional implementation, the aforementioned color difference can be determined by color values, which are represented by the numerical values ​​of the three primary colors (R, G, B). Specifically, R, G, and B can represent the color values ​​of virtual characters and virtual objects, or R, G, and B can be processed by functions, such as averaging, maximum or minimum value processing, etc. In this embodiment, taking the average value of R, G, and B as an example, assuming the color value of the virtual object near the second virtual character is S1 = (R1 + G1 + B1) / 3, the color value of each color is determined in a preset color set, and this color value is also the average value of R, G, and B. The color with the largest difference from S1 in the preset color set is selected as the aforementioned second color.

[0074] As an optional implementation, the aforementioned preset color set may include various material spheres of different colors, such as... Figure 12 As shown, it is a gray material ball. You can regenerate other colors such as red and green from it, and then replace the material ball directly after determining the color of the second virtual character.

[0075] Optionally, obtaining the color of the virtual object adjacent to the second virtual character in the first virtual scene includes: obtaining the color of the virtual object closest to the second virtual character in the first virtual scene; or obtaining the color of the virtual object in the first virtual scene that is less than a preset distance threshold and has the largest area; or obtaining the color of the virtual object in the first virtual scene that is less than a preset distance threshold and has the smallest color difference from the first color.

[0076] Optionally, obtaining the color of the virtual object closest to the second virtual character in the first virtual scene includes: emitting multiple detection rays from the center position of the second virtual character in various directions; determining the virtual object closest to the center position of the second virtual character among the multiple virtual objects collided by the multiple detection rays, and obtaining the color of the virtual object closest to the center position of the second virtual character.

[0077] As an optional implementation, such as Figure 13As shown, multiple detection rays are emitted from the center of the second virtual character in all directions. The more directions of detection rays, the more accurate the detection. Generally, if a virtual object can interfere with the view of the player controlling the first virtual character, then the virtual object must be relatively large. Therefore, eight directions are sufficient to detect virtual objects near the second virtual character. If multiple virtual objects are detected, the one closest to the second virtual character is selected, and its color is obtained. Furthermore, the closer the object is to the player, the greater its impact on the view. After obtaining the virtual objects near the second virtual character, the material attached to those objects can be obtained, and its color value is recorded. This color value is then compared with pre-configured color values, and the one with the largest difference is selected as the color of the second virtual character. Several colors with significant and obvious color value differences can be pre-configured. Therefore, when the color of the second virtual character is triggered, the color values ​​of the virtual objects surrounding the second virtual character are first obtained. Since the numerical difference between colors with the same color value is smaller, only the color with the largest difference between the pre-configured colors and the obtained virtual object color value needs to be selected.

[0078] Optionally, the first virtual character firing a virtual prop that hits the target detection range of the second virtual character includes: firing a virtual ray from the aiming position of the virtual shooting prop used by the first virtual character, and determining the target detection range of the first virtual character firing a virtual prop that hits the second virtual character when the virtual ray intersects with the target detection range.

[0079] As an optional implementation, such as Figure 14 As shown, starting from the crosshair of the virtual shooting tool 1400 used by the first virtual character, and with the current virtual shooting direction as the orientation, a detection ray is fired to detect 1402. If the detection ray intersects with the target detection range 1401, then hit information will be returned and recorded. If the hit is within the hit detection range, then both damage to the second virtual character and a hit within the target detection range will be counted.

[0080] Optionally, the above method further includes: when the first virtual character meets preset conditions, waking up the target virtual shooting equipment of the first virtual character, wherein the target virtual shooting equipment is used to perform the virtual shooting operation on the second virtual character.

[0081] As an optional implementation, the aforementioned target virtual equipment includes, but is not limited to, ultimate skill equipment in a virtual game scene. This ultimate skill equipment is only activated when the first virtual character meets preset conditions. These virtual shooting conditions include, but are not limited to, the number of enemy virtual characters killed by the first virtual character being greater than or equal to a first preset threshold (e.g., 10, 15, etc.), or the number of virtual resources (e.g., virtual coins, virtual items) of the first virtual character being greater than or equal to a second preset threshold (e.g., 50, 65, etc.). Figure 15 In the game screen shown, when the preset conditions are not met, the aforementioned virtual shooting equipment is displayed in gray (unawakened state) 1500, and when the preset conditions are not met, the aforementioned virtual shooting equipment is displayed in highlighted state (awakened state) 1501. In this embodiment, by waking up the target virtual shooting equipment of the first virtual character when the preset conditions are met, the player's fighting desire can be stimulated, and the player's gaming experience can be enhanced.

[0082] Optionally, the above method further includes: displaying the second virtual character of the second color in the game screen of the first virtual character within a preset effective time period; and continuing to display the second virtual character of the first color in the game screen of the first virtual character when the preset effective time period ends.

[0083] As an optional implementation, the aforementioned preset effective duration is the display duration of the second color, which can be set according to actual conditions, such as 10 seconds, 15 seconds, etc. After the aforementioned preset effective duration ends, the second virtual character in the first color continues to be displayed.

[0084] Optionally, the above method further includes: after the first virtual character performs a virtual shooting operation on the second virtual character and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, if the first virtual character continues to perform a virtual shooting operation on the second virtual character and the virtual shooting operation continues to hit the second virtual character, the second virtual character of a fourth color is displayed in the game screen of the first virtual character, wherein the difference between the fourth color and the color of the first scene object is greater than the difference between the second color and the color of the first scene object.

[0085] As an optional implementation, the more times the virtual shooting operation hits the second virtual character, the greater the color difference between the second virtual character and the objects in the first scene, meaning the more obvious the color of the second virtual character. For example, after displaying the second virtual character of the second color in the game screen of the first virtual character, if the first virtual character continues to fire N virtual items that all hit the target detection range of the second virtual character, then the second virtual character of the fourth color is displayed in the game screen of the first virtual character; or, after displaying the second virtual character of the second color in the game screen of the first virtual character, if M out of the N virtual items fired by the first virtual character continue to hit the target detection range, then the second virtual character of the fourth color is displayed in the game screen of the first virtual character; or, after displaying the second virtual character of the second color in the game screen of the first virtual character, if the number of virtual items fired by the first virtual character that hit the target detection range within a preset time period reaches a preset number, then the second virtual character of the fourth color is displayed in the game screen of the first virtual character. In this embodiment, the more times the first virtual character hits the target detection range of the second virtual character, the more obvious the difference between the color of the second virtual character and the color of the virtual objects nearby becomes. This can encourage players to increase the number of virtual shots and improve the game experience.

[0086] As an optional implementation, such as Figure 16 The flowchart shown includes the following steps:

[0087] S1601, a second virtual character of the first color is displayed on the game screen of the first virtual character, wherein the color difference between the first color and the virtual objects near the second virtual character is small, making it difficult for the player controlling the first virtual character to distinguish the second virtual character.

[0088] S1602, the first virtual character fires a virtual item at the second virtual character. The virtual item can be a virtual bullet fired by the first virtual character using a virtual shooting item.

[0089] S1603, determine whether the virtual prop hits the target detection range of the second virtual character. If yes, proceed to step S1604; otherwise, proceed without S1601.

[0090] S1604, Accumulate the number of times the first virtual character hits the target detection range;

[0091] S1605, Is the cumulative number of hits greater than the preset value? The preset value can be set according to the actual situation, such as 5, 10, etc. If it is greater, proceed to step S1606; otherwise, proceed to step S1604.

[0092] S1606, Calculate the total time taken to reach the preset value for a hit;

[0093] S1607, determine whether the total duration is within the preset duration. The preset duration can be set according to the actual situation, such as 10 seconds, 20 seconds, etc. If yes, proceed to step S1608; otherwise, proceed to step S1603.

[0094] S1608, Obtain the color of the virtual object near the second virtual character, and switch the color of the second virtual character according to the color of the virtual character;

[0095] S1609, Determine whether the color-changing time of the second virtual character has ended. If yes, proceed to step S1610; otherwise, proceed to step S1608.

[0096] S1610, switch the second virtual character back to its original color.

[0097] In this application, by providing a target detection tool for the virtual character, when the target is hit within the detection range, the skin color of the virtual character can switch according to the color of the nearby virtual objects, making it easier to distinguish visually. This can reduce the difficulty of target acquisition and aiming for shooting players in many scenarios due to the inability to quickly distinguish between characters and scenes, thereby appropriately improving the kill capability.

[0098] It is understood that in the specific embodiments of this application, data such as user information are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0099] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0100] According to another aspect of the embodiments of this application, a device for switching the display color of a virtual character, used for implementing the above-described method for switching the display color of a virtual character, is also provided. For example... Figure 17As shown, the device includes: a first display module 1702, used to display a second virtual character of a first color in the game screen of the first virtual character, wherein the first virtual character and the second virtual character belong to different factions; and a second display module 1704, used to display a second virtual character of a second color in the game screen of the first virtual character when the first virtual character performs a virtual shooting operation on the second virtual character, and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, wherein the difference between the second color and the color of a first scene object is greater than the difference between the first color and the color of the first scene object, and the color of the first scene object is the color of the virtual object adjacent to the second virtual character in the first virtual scene where the second virtual character is located.

[0101] Optionally, the above-described device is further configured to display the second virtual character of the second color on the game screen of the first virtual character when all N virtual items launched by the first virtual character hit the target detection range of the second virtual character, wherein N is an integer greater than or equal to 2; or, when M out of the N virtual items launched by the first virtual character hit the target detection range, display the second virtual character of the second color on the game screen of the first virtual character, wherein M is less than N; or, when the number of virtual items launched by the first virtual character that hit the target detection range within a preset time period reaches a preset number, display the second virtual character of the second color on the game screen of the first virtual character.

[0102] Optionally, the above-described device is further configured to, after displaying the second virtual character of the second color in the game screen of the first virtual character, and when the second virtual character moves from the first virtual scene to the second virtual scene, display the second virtual character of the third color in the game screen of the first virtual character, wherein the difference between the third color and the color of the second scene object is greater than the difference between the second color and the color of the second scene object, and the color of the second scene object is the color of the virtual object adjacent to the second virtual character in the second virtual scene where the second virtual character is located.

[0103] Optionally, the above-described device is further configured to, after displaying the second virtual character of the second color in the game screen of the first virtual character, continue to display the second virtual character of the second color in the game screen of the first virtual character when the second virtual character moves from the first virtual scene to the third virtual scene and the difference between the second color and the color of the object in the third scene meets a preset difference condition, wherein the color of the object in the third scene is the color of the virtual object adjacent to the second virtual character in the third virtual scene where the second virtual character is located.

[0104] Optionally, the above-described device is further configured to control the target detection range of the second virtual character to change from a first detection range to a second detection range when the second virtual character moves from its current position to a target position, wherein the distance between the current position and the position of the first virtual character is a first distance, and the distance between the target position and the position of the first virtual character is a second distance; when the first distance is greater than the second distance, the detection range of the first detection range is greater than the detection range of the second detection range; when the first distance is less than the second distance, the detection range of the first detection range is less than the detection range of the second detection range.

[0105] Optionally, the above-described device is further configured to deduct a preset number of virtual resources from the second virtual character when the virtual shooting operation performed by the first virtual character on the second virtual character hits the hit detection range of the second virtual character, wherein the detection range of the hit detection range is less than or equal to the detection range of the target detection range, and the hit detection range is located within the target detection range.

[0106] Optionally, the above-described device is further configured to, when the first virtual character performs a virtual shooting operation on the second virtual character and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, obtain the color of a virtual object adjacent to the second virtual character in the first virtual scene; obtain the second color from a preset color set, wherein the second color has the greatest difference from the obtained color of the virtual object in the preset color set; switch the display color of the second virtual character from the first color to the second color, and display the second virtual character of the second color in the game screen of the first virtual character.

[0107] Optionally, the above-mentioned device is further configured to obtain the color of the virtual object closest to the second virtual character in the first virtual scene; or obtain the color of the virtual object in the first virtual scene that is less than a preset distance threshold and has the largest area; or obtain the color of the virtual object in the first virtual scene that is less than a preset distance threshold and has the smallest color difference from the first color.

[0108] Optionally, the above-described device is further configured to emit multiple detection rays from the center position of the second virtual character in various directions; among the multiple virtual objects collided by the multiple detection rays, determine the virtual object closest to the center position of the second virtual character, and obtain the color of the virtual object closest to the center position of the second virtual character.

[0109] According to one aspect of this application, a computer program product is provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 1809, and / or installed from removable media 1811. When the computer program is executed by central processing unit 1801, it performs various functions provided in embodiments of this application.

[0110] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0111] Figure 18 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present application is shown.

[0112] It should be noted that, Figure 18 The computer system 1800 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0113] like Figure 18As shown, the computer system 1800 includes a central processing unit (CPU) 1801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1802 or programs loaded from storage section 1808 into random access memory (RAM). The RAM 1803 also stores various programs and data required for system operation. The CPU 1801, ROM 1802, and RAM 1803 are interconnected via a bus 1804. An input / output interface 1805 (I / O interface) is also connected to the bus 1804.

[0114] The following components are connected to the input / output interface 1805: an input section 1806 including a keyboard, mouse, etc.; an output section 1807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1808 including a hard disk, etc.; and a communication section 1809 including a network interface card such as a local area network card, modem, etc. The communication section 1809 performs communication processing via a network such as the Internet. A drive 1810 is also connected to the input / output interface 1805 as needed. Removable media 1811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on the drive 1810 as needed so that computer programs read from them can be installed into the storage section 1808 as needed.

[0115] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1809, and / or installed from removable medium 1811. When the computer program is executed by central processing unit 1801, it performs various functions defined in the system of this application.

[0116] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described method for switching the display color of a virtual character is also provided. This electronic device may be... Figure 1 The terminal device or server shown. This embodiment uses this electronic device as an example for illustration. Figure 19As shown, the electronic device includes a memory 1902 and a processor 1904. The memory 1902 stores a computer program, and the processor 1904 is configured to execute the steps of any of the above method embodiments via the computer program.

[0117] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.

[0118] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0119] S1, a second virtual character of the first color is displayed in the game screen of the first virtual character, wherein the first virtual character and the second virtual character belong to different factions;

[0120] S2, when the first virtual character performs a virtual shooting operation on the second virtual character and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, the second virtual character of the second color is displayed in the game screen of the first virtual character, wherein the color difference between the second color and the color of the first scene object is greater than the color difference between the first color and the first scene object, and the first scene object is a virtual object adjacent to the second virtual character in the first virtual scene where the second virtual character is located.

[0121] Alternatively, as those skilled in the art will understand, Figure 19 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 19 This does not limit the structure of the aforementioned electronic devices or electronic equipment. For example, electronic devices or electronic equipment may also include components that are more... Figure 19 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 19 The different configurations shown.

[0122] The memory 1902 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for switching the display color of virtual characters in this embodiment. The processor 1904 executes various functional applications and data processing by running the software programs and modules stored in the memory 1902, thereby realizing the aforementioned method for switching the display color of virtual characters. The memory 1902 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1902 may further include memory remotely located relative to the processor 1904, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 1902 may be used, but is not limited to, to store game data, such as information related to the first virtual character, the second virtual character, and first scene objects. As an example, such as Figure 19 As shown, the memory 1902 may include, but is not limited to, the first display module and the second display module in the device for switching the display color of the virtual character. Furthermore, it may include, but is not limited to, other module units in the device for switching the display color of the virtual character, which will not be described further in this example.

[0123] Optionally, the aforementioned transmission device 1906 is used to receive or send data via a network. Specific examples of the network may include wired and wireless networks. In one example, the transmission device 1906 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 1906 is a Radio Frequency (RF) module used for wireless communication with the Internet.

[0124] In addition, the aforementioned electronic device also includes: a display 1908 for displaying the game screen of the first virtual character; and a connection bus 1910 for connecting the various module components in the aforementioned electronic device.

[0125] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.

[0126] According to one aspect of this application, a computer-readable storage medium is provided, wherein a processor of a computer device reads computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the method for switching the display color of a virtual character provided in the various alternative implementations described above.

[0127] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0128] S1, a second virtual character of the first color is displayed in the game screen of the first virtual character, wherein the first virtual character and the second virtual character belong to different factions;

[0129] S2, when the first virtual character performs a virtual shooting operation on the second virtual character and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, the second virtual character of the second color is displayed in the game screen of the first virtual character, wherein the color difference between the second color and the color of the first scene object is greater than the color difference between the first color and the first scene object, and the first scene object is a virtual object adjacent to the second virtual character in the first virtual scene where the second virtual character is located.

[0130] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0131] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0132] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0133] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0134] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0135] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0136] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0137] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for switching the display color of a virtual character, characterized in that, include: A second virtual character of the first color is displayed in the game screen of the first virtual character, wherein the first virtual character and the second virtual character belong to different factions; When the first virtual character performs a virtual shooting operation on the second virtual character, and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, the second virtual character of the second color is displayed in the game screen of the first virtual character. The difference between the second color and the color of the first scene object is greater than the difference between the first color and the color of the first scene object. The first scene object is a virtual object adjacent to the second virtual character in the first virtual scene where the second virtual character is located. When the second virtual character moves from the first virtual scene to the second virtual scene, the second virtual character of the third color is displayed in the game screen of the first virtual character. The difference between the third color and the color of the second scene object is greater than the difference between the second color and the color of the second scene object. The color of the second scene object is the color of the virtual object adjacent to the second virtual character in the second virtual scene where the second virtual character is located. When the second virtual character moves from the first virtual scene to the third virtual scene, and the difference between the second color and the color of the objects in the third scene meets a preset difference condition, the second virtual character with the second color continues to be displayed in the game screen of the first virtual character. The color of the objects in the third scene is the color of the virtual objects adjacent to the second virtual character in the third virtual scene where the second virtual character is located.

2. The method according to claim 1, characterized in that, When the first virtual character performs a virtual shooting operation on the second virtual character, and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, the second virtual character of the second color is displayed in the game screen of the first virtual character, including: If all N virtual items launched consecutively by the first virtual character hit the target detection range of the second virtual character, then the second virtual character of the second color is displayed in the game screen of the first virtual character, where N is an integer greater than or equal to 2; or, If M out of N virtual items launched consecutively by the first virtual character hit the target detection range, then the second virtual character of the second color is displayed on the game screen of the first virtual character, where M is less than N; or... If the number of virtual props launched by the first virtual character that hit the target detection range within a preset time period reaches a preset number, the second virtual character of the second color is displayed on the game screen of the first virtual character.

3. The method according to claim 2, characterized in that, The method further includes: When the second virtual character moves from its current position to the target position, the target detection range of the second virtual character is controlled to change from a first detection range to a second detection range. The distance between the current position and the position of the first virtual character is the first distance, and the distance between the target position and the position of the first virtual character is the second distance. When the first distance is greater than the second distance, the detection range of the first detection range is greater than the detection range of the second detection range. When the first distance is less than the second distance, the detection range of the first detection range is less than the detection range of the second detection range.

4. The method according to claim 2, characterized in that, The method further includes: If a virtual shooting operation performed by the first virtual character on the second virtual character hits the hit detection range of the second virtual character, a preset number of virtual resources of the second virtual character are deducted, wherein the detection range of the hit detection range is less than or equal to the detection range of the target detection range, and the hit detection range is located within the target detection range.

5. The method according to claim 1, characterized in that, When the first virtual character performs a virtual shooting operation on the second virtual character, and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, displaying the second virtual character in the second color in the game screen of the first virtual character further includes: When the first virtual character performs a virtual shooting operation on the second virtual character, and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character, the color of the virtual object adjacent to the second virtual character in the first virtual scene is obtained; The second color is obtained from a preset color set, wherein the second color has the greatest difference from the obtained color of the virtual object in the preset color set; The display color of the second virtual character is switched from the first color to the second color, and the second virtual character of the second color is displayed in the game screen of the first virtual character.

6. The method according to claim 5, characterized in that, The step of obtaining the color of the virtual object adjacent to the second virtual character in the first virtual scene includes: Obtain the color of the virtual object closest to the second virtual character in the first virtual scene; or Obtain the color of the largest virtual object in the first virtual scene that is less than a preset distance threshold from the second virtual character; or Obtain the color of the virtual object in the first virtual scene that is less than a preset distance threshold from the second virtual character and has the smallest color difference from the first color.

7. The method according to claim 6, characterized in that, The step of obtaining the color of the virtual object closest to the second virtual character in the first virtual scene includes: Multiple detection rays are emitted from the center of the second virtual character in all directions; Among the multiple virtual objects collided with by the multiple detection rays, the virtual object closest to the center position of the second virtual character is determined, and the color of the virtual object closest to the center position of the second virtual character is obtained.

8. A device for switching the display color of a virtual character, characterized in that, include: A first display module is used to display a second virtual character of a first color in the game screen of the first virtual character, wherein the first virtual character and the second virtual character belong to different factions; The second display module is used to display the second virtual character in the game screen of the first virtual character when the first virtual character performs a virtual shooting operation on the second virtual character and the virtual shooting operation satisfies the condition of switching the display color of the second virtual character. The second color is greater than the color difference between the second color and the first scene object. The first scene object is a virtual object adjacent to the second virtual character in the first virtual scene where the second virtual character is located. The device is further configured to, after displaying the second virtual character of a second color in the game screen of the first virtual character, and when the second virtual character moves from the first virtual scene to the second virtual scene, display the second virtual character of a third color in the game screen of the first virtual character, wherein the difference between the third color and the color of the second scene object is greater than the difference between the second color and the color of the second scene object, and the color of the second scene object is the color of the virtual object adjacent to the second virtual character in the second virtual scene where the second virtual character is located: The device is further configured to, after displaying the second virtual character of the second color in the game screen of the first virtual character, continue to display the second virtual character of the second color in the game screen of the first virtual character when the second virtual character moves from the first virtual scene to the third virtual scene and the difference between the second color and the color of the object in the third scene meets a preset difference condition, wherein the color of the object in the third scene is the color of the virtual object adjacent to the second virtual character in the third virtual scene where the second virtual character is located.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or computer at runtime as described in any one of claims 1 to 7.

10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1 to 7.

11. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 7 through the computer program.