Display control method and device in game, electronic equipment and readable storage medium
By displaying the aiming window in the game and adjusting the sight according to the relative position relationship, the problem of difficulty in adjusting the aiming direction of the sight in the open state is solved, and the player's operation efficiency in the game is improved.
Patent Information
- Application Number
- CN202411467941.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, the sighting direction is difficult to adjust when the sighting is open, resulting in inconvenience of players when looking for enemies or items.
The terminal device provides a graphical user interface to display the game scene and the sight, respond to the trigger operation of the sight, display the sight window, and adjust the sighting direction of the sight according to the relative positional relationship between the target virtual object and the scene area.
It realizes fine adjustment of the aiming direction of the scope in the open mirror state, avoiding the problem of unsmooth or excessive sensitivity when fingers are plucked, and shortens the time for players to find targets.
Smart Images

Figure CN119565129A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of game technology, and in particular to a display control method, device, electronic device and storage medium in a game. Background Art
[0002] With the development of computer technology and the diversification of terminal functions, more and more types of electronic games can be played on terminals. Among them, shooting games such as FPS (First-Person Shooting) or TPS (Third-Person Shooting) are relatively popular games. Taking the use of firearms by virtual objects as an example, the virtual objects can be equipped with a scope on the weapon. When the player needs to observe the virtual environment in the game, the scope with a magnification of not 1 is used. The zoomed virtual scene is displayed in the graphical user interface of the terminal, and the player can observe the virtual environment.
[0003] When using a scope with a magnification other than 1, the visible range of the zoomed virtual scene will become smaller. When the player needs to aim at virtual objects, virtual supplies, virtual props, etc. that are not in the current field of view, the player needs to manually adjust the scope's field of view in the virtual environment. When adjusting the aiming direction of the scope with the scope open, the finger movement is not smooth or too sensitive, causing the player to be unable to find the enemy or object at the first moment of aiming, and the left and right hands need to be constantly adjusted to lock the position of virtual objects, virtual supplies, virtual props, etc. Therefore, it is difficult to adjust the aiming direction of the scope when the scope is open. Summary of the invention
[0004] The present application provides a display control method, device, electronic device and storage medium in a game, which solves the problem in the prior art that the aiming direction is difficult to adjust when the aiming scope is in the open position.
[0005] In a first aspect, an embodiment of the present application provides a display control method in a game, wherein a graphical user interface is provided through a terminal device, and at least part of a game scene and a crosshair are displayed on the graphical user interface, wherein the game scene at least includes a first virtual character controlled by the terminal device, and the crosshair is used to indicate an aiming direction of a virtual weapon of the first virtual character, wherein the virtual weapon is configured with a sight, and the method comprises:
[0006] In response to a first trigger operation on the sight, a sighting window is displayed in association with the crosshair position, and a first scene image corresponding to a first scene area is displayed in the sighting window, wherein the first scene area is determined based on the sighting direction of the crosshair;
[0007] In response to a second trigger operation on the crosshair, determining a crosshair adjustment parameter based on a relative position relationship between a target virtual object in the game scene and the first scene area, and adjusting an aiming direction of the crosshair according to the crosshair adjustment parameter and the second trigger operation control;
[0008] According to the adjusted aiming direction, a second scene area is determined from the game scene, and the first scene picture displayed in the aiming window is controlled to be updated to a second scene picture corresponding to the second scene area.
[0009] In a second aspect, an embodiment of the present application further provides a display control device in a game, which provides a graphical user interface through a terminal device, and displays at least part of a game scene and a crosshair on the graphical user interface, wherein the game scene includes at least a first virtual character controlled by the terminal device, and the crosshair is used to indicate an aiming direction of a virtual weapon of the first virtual character, wherein the virtual weapon is equipped with a sight, and the device includes:
[0010] A display module, configured to display a sighting window in association with the crosshair position in response to a first trigger operation on the sighting scope, and display a first scene image corresponding to a first scene area in the sighting window, wherein the first scene area is determined based on the sighting direction of the crosshair;
[0011] an adjustment module, configured to respond to a second trigger operation on the crosshair, determine a crosshair adjustment parameter based on a relative position relationship between a target virtual object in the game scene and the first scene area, and control adjustment of an aiming direction of the crosshair according to the crosshair adjustment parameter and the second trigger operation;
[0012] The updating module is used to determine a second scene area from the game scene according to the adjusted aiming direction, and control the first scene picture displayed in the aiming window to be updated to a second scene picture corresponding to the second scene area.
[0013] In a third aspect, an embodiment of the present application further provides an electronic device, including:
[0014] Processor; and
[0015] The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method described in the first aspect is executed.
[0016] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing a data processing program, which is executed by a processor to perform the method described in the first aspect.
[0017] Compared with the prior art, this application has the following advantages:
[0018] The embodiment of the present application provides a display control method in a game, which provides a graphical user interface through a terminal device, and displays at least part of a game scene and a crosshair on the graphical user interface, wherein the game scene includes at least a first virtual character controlled by the terminal device, and the crosshair is used to indicate the aiming direction of the virtual weapon of the first virtual character, wherein the virtual weapon is equipped with a sight. In response to a first trigger operation on the sight, an aiming window is displayed in association with the crosshair position, and a first scene picture corresponding to a first scene area is displayed in the aiming window, wherein the first scene area is determined based on the aiming direction of the crosshair; in response to a second trigger operation on the crosshair, a crosshair adjustment parameter is determined based on the relative position relationship between the target virtual object in the game scene and the first scene area, and the aiming direction of the crosshair is adjusted according to the crosshair adjustment parameter and the second trigger operation; according to the adjusted aiming direction, a second scene area is determined from the game scene, and the first scene picture displayed in the aiming window is controlled to be updated to a second scene picture corresponding to the second scene area. The method performs a first trigger operation on the sight, so that the sight is in an open state, and an aiming window is displayed in association with the crosshair position, and the first scene picture corresponding to the first scene area is displayed in the aiming window. When the scope is in the open state, the relative position relationship between the target virtual object in the game scene and the first scene area determines the crosshair adjustment parameter. The aiming direction of the crosshair is adjusted based on the crosshair adjustment parameter and the second trigger operation control. The second scene area is determined according to the aiming direction after the crosshair is adjusted, and the second scene picture corresponding to the second scene area is displayed in the aiming window. The player can finely adjust the aiming direction of the scope in the open state, avoiding the problem that the aiming direction of the scope is not smooth or too sensitive when the finger moves the scope. The time for the player to find enemies or objects in the open state is shortened. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A game system for implementing a display control method in a game provided by an embodiment of the present application;
[0020] Figure 2 It is a flowchart of a display control method in a game provided by an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of a graphical user interface provided in an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of an interface for performing a first trigger operation on a sight provided in an embodiment of the present application;
[0023] Figure 5 It is another schematic diagram of a graphical user interface provided in an embodiment of the present application;
[0024] Figure 6 is a schematic diagram of a relative position relationship between a target virtual object and a first scene area provided in an embodiment of the present application;
[0025] Figure 7 is a schematic diagram of an interface for a second trigger operation of a sight provided in an embodiment of the present application;
[0026] Figure 8 is a structural block diagram of a display control device in a game provided by an embodiment of the present application;
[0027] Fig. 9 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0029] It should be noted that the terms "first", "second", "third", etc. in the claims, description and drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. The data used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including", "having" and their variants are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] With the development of computer technology and the diversification of terminal functions, more and more types of electronic games can be played on terminals. Among them, shooting games such as FPS (First-Person Shooting) or TPS (Third-Person Shooting) are relatively popular games. Taking the use of firearms by virtual objects as an example, the virtual objects can be equipped with a scope on the weapon. When the player needs to observe the virtual environment in the game, the scope with a magnification of not 1 is used. The zoomed virtual scene is displayed in the graphical user interface of the terminal, and the player can observe the virtual environment.
[0031] When using a scope with a magnification other than 1, the visible range of the zoomed virtual scene will become smaller. When the player needs to aim at virtual objects, virtual supplies, virtual props, etc. that are not in the current field of view, the player needs to manually adjust the scope's field of view in the virtual environment. When adjusting the aiming direction of the scope with the scope open, the finger movement is not smooth or too sensitive, causing the player to be unable to find the enemy or object at the first moment of aiming, and the left and right hands need to be constantly adjusted to lock the position of virtual objects, virtual supplies, virtual props, etc. Therefore, it is difficult to adjust the aiming direction of the scope when the scope is open.
[0032] In order to solve the problem in the prior art that the aiming direction is difficult to adjust when the aiming scope is in the open position, the present application provides a display control method in a game, a display control device in a game corresponding to the method, an electronic device that can implement the display control method in the game, and a computer-readable storage medium. The following provides embodiments to describe the above method, device, electronic device, and computer-readable storage medium in detail.
[0033] The display control method in the game provided in the embodiment of the present application can be executed by an electronic device, and the electronic device can be a terminal or server with a display screen. The terminal can be a terminal device such as a smart phone, a tablet computer, a laptop computer, a smart wearable device, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0034] In an optional embodiment, when the display control method in the game is run on a terminal device, the terminal device stores a game application and a game virtual scene. The terminal device interacts with the player through a graphical user interface. The terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal device, or the graphical user interface may be presented through holographic projection.
[0035] In an optional embodiment, when the display control method in the game runs on the server, the method can be implemented and executed based on the cloud gaming system. The cloud gaming system refers to a gaming method based on cloud computing. The cloud gaming system includes a server and a client device. The operating body of the game application and the game screen presentation body are separated, and the storage and operation of the game video display method in the game are completed on the server. The game screen presentation is completed on the client, and the client is mainly used for receiving and sending game data and presenting the game screen. For example, the client can be a display device with data transmission function close to the player side, such as a mobile terminal, a TV, a computer, a handheld computer, a personal digital assistant, a head-mounted display device, etc., but the terminal device for processing game data is a server in the cloud. When playing the game, the player operates the client to send instructions to the server, and the server controls the running of the game according to the instructions, encodes and compresses the game screen and other data, and returns it to the client through the network. Finally, the client decodes and outputs the game screen.
[0036] It should be noted that in the embodiments of the present application, the execution subject of the display control method in the game can be a terminal device or a server, wherein the terminal device can be a local terminal device or a client device in the aforementioned cloud game. The embodiments of the present application do not limit the type of the execution subject.
[0037] For example, in combination with the above introduction, Figure 1 A game system 100 for implementing a display control method in a game provided by an embodiment of the present application is shown. The game system 100 may include at least one terminal 110, at least one server 120, at least one database 130, and a network. The terminal 110 held by the player can be connected to the servers of different games through the network. The terminal is any device with computing hardware that can support and execute software application tools corresponding to the game.
[0038] The terminal 110 includes a display screen and a processor, wherein the display screen is used to present a game screen and receive operations generated by players acting on the game screen. The game screen may include a portion of a virtual game scene, which is a virtual world in which virtual characters carry out activities. The processor is used to run the game, generate a game screen, respond to operations, and control the display of the game screen on the display screen. When the player operates the game screen through the display screen, the game screen can control the local content of the terminal by responding to the received operation instructions, and can also control the content of the opposite server by responding to the received operation instructions.
[0039] In addition, when the game system 100 includes multiple terminals, multiple servers, and multiple networks, different terminals can be connected to each other through different networks and different servers. The network can be a wireless network or a wired network, such as a wireless network such as a wireless local area network (WLAN), a local area network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, etc. In addition, different terminals can also use their own Bluetooth network or hotspot network to connect to other terminals or to servers, etc. In addition, the system 100 may include multiple databases, multiple databases are coupled to different servers, and game-related information can be continuously stored in the database when different players play multi-player games online.
[0040] It should be noted that Figure 1 The game system diagram shown is only an example. The game system 100 described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can know that with the evolution of the game system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0041] It should be noted that the operations that occur in the subsequent detailed introduction of the display control method in the game provided by the embodiment of the present application can all be regarded as operations performed by the player through fingers or controlling a medium such as a mouse, keyboard, or stylus. The specific medium to be used can be determined according to the type of electronic device. For example, when the electronic device is a touch screen device such as a mobile phone, a tablet computer, or a game console, the player can operate on the touch screen through any suitable object or accessory such as a finger or stylus. When the terminal device is a non-touch screen terminal device such as a desktop computer or a laptop computer, the player can operate through an external device such as a mouse or keyboard.
[0042] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0043] like Figure 2 As shown, it is a flowchart of a display control method in a game provided by an embodiment of the present application. It should be noted that the steps shown can be performed in a logical order different from that shown in the flowchart of the method. The method may include the following steps S210 to S230.
[0044] A graphical user interface is provided through a terminal device, and at least a portion of a game scene and a crosshair are displayed on the graphical user interface, wherein the game scene includes at least a first virtual character controlled by the terminal device, and the crosshair is used to indicate an aiming direction of a virtual weapon of the first virtual character, wherein the virtual weapon is equipped with a scope.
[0045] In an embodiment of the present application, a game application may be run in a terminal device. By running the game application, a game interface corresponding to the game application is presented in a graphical user interface of the terminal device. The game interface may include a game scene and a crosshair. The game scene includes a first virtual character controlled by the terminal device. The first virtual character may hold a virtual weapon. The virtual weapon may be equipped with a scope. The crosshair in the game interface is used to indicate the aiming direction of the virtual weapon held by the first virtual character.
[0046] The display of the game scene may include two display modes: first-person perspective and third-person perspective. The first-person perspective is used to simulate observing the virtual scene from the perspective of the virtual object. In the first-person perspective display mode, the camera can usually be located at the eyes of the virtual object, or in the vicinity of the eyes of the virtual object, such as the head or chest of the virtual object. The third-person perspective is used to simulate observing the virtual scene from a certain position around the virtual object. In the third-person perspective display mode, the camera is usually located behind the virtual object, so that the virtual object is displayed in the virtual scene, and the user can see the actions of the virtual object and the environment in which it is located in the virtual scene.
[0047] The game scene refers to the visual environment that players can see and interact with in the game. It includes inanimate objects in the game scene, such as trees, rocks, furniture, building structures, etc.; light sources in the game scene, such as lanterns, torches, sunlight, etc.; environmental factors in the game scene, such as weather, climate conditions or other environmental factors that affect the game process (such as rain, snow, wind, temperature changes, etc.); decorative elements in the game scene, such as environmental decorations (such as street lights, signs, billboards, tables and chairs, beds, bookshelves, paintings, sculptures, decorative plates, carpets, floor tiles, grass, fallen leaves, paving stones, pebbles, sand, etc.); terrain features in the game scene, such as hills, rivers, caves, etc.; obstacles in the game scene that block the player's path or restrict the player's movement, such as boxes, fences, walls, etc. Virtual characters in the game scene, such as the first virtual character controlled by the terminal device, the partner virtual character teamed with the first virtual character, and the enemy virtual character of the first virtual character, etc.
[0048] Virtual weapons are various weapons and equipment that appear in electronic games. They can be replicas, variants, or completely fictional designs of weapons in the real world. Virtual weapons can be presented in the form of guns, swords, sticks, bows and arrows, and ammunition, but are not limited to the above forms.
[0049] The first virtual character can obtain virtual weapons from the game scene. Virtual weapons can be obtained in a variety of ways, including but not limited to: purchase, pickup, game rewards, etc.
[0050] A scope is configured on the virtual weapon. For example, in a shooting game, a scope can be equipped on a firearm. The virtual scene can be observed through the scope. The scope can be obtained by purchase, pickup, game reward, etc., but is not limited to this.
[0051] The state of the scope may include an on state and an off state.
[0052] A crosshair is also displayed on the graphical user interface, and the crosshair can help the player controlling the first virtual character aim at the target. The crosshair can be a simple dot, a cross, a circle, or other shapes. The crosshair changes with the player's actions or status. For example, when the player moves or runs, the crosshair may become larger or blurry, indicating that the aiming accuracy is reduced. When the player is still or aiming, the crosshair may become smaller or clearer, indicating that the aiming accuracy is improved.
[0053] For example, Figure 3, which is a schematic diagram of a graphical user interface provided by an embodiment of the present application. At least part of a game scene and a crosshair 301 are displayed on the graphical user interface 30, and the game scene includes a first virtual character 302 controlled by a terminal device. The first virtual character 302 holds a virtual weapon 303, and a sight 304 is configured on the virtual weapon 303.
[0054] Step S210, in response to a first trigger operation on the sight, displaying a sighting window in association with the crosshair position, and displaying a first scene image corresponding to a first scene area in the sighting window, wherein the first scene area is determined based on the sighting direction of the crosshair;
[0055] In an embodiment of the present application, the first trigger operation is a sight opening operation. The first trigger operation is performed on the sight to put the sight into the sight opening state. After the sight is in the sight opening state, an aiming window corresponding to the sight is displayed in the graphical user interface of the terminal device. As the sight changes from the closed state to the open state, the virtual scene corresponding to the aiming direction of the virtual weapon of the first virtual character is magnified. And the first scene picture corresponding to the first scene area is displayed in the aiming window displayed in the graphical user interface. Among them, the first scene area is the area after the scene area corresponding to the aiming direction of the crosshairs before the sight is opened is magnified.
[0056] It should be noted that the first trigger operation may include a single-click operation, a double-click operation, a continuous click operation (clicking more than 3 times in a row), a long press operation, a heavy press operation, etc.
[0057] In an optional embodiment, it is assumed that the virtual weapon held by the first virtual character controlled by the terminal device is equipped with a sight with a preset magnification parameter of 2 times. When the sight is in the off state, the game scene is displayed in the graphical user interface of the terminal device. When the player inputs the first trigger operation for the sight, the aiming window corresponding to the sight is displayed in the graphical user interface, indicating that the sight is in the on state. And the terminal device can enlarge the game scene corresponding to the aiming direction based on the preset magnification parameter of the sight, obtain the enlarged first scene area, and display the enlarged first scene area in the aiming window of the sight.
[0058] It should be noted that the magnification parameter of the content in the first scene area after magnification relative to the same content in the game scene before magnification is the preset magnification parameter of the sight. For example, for the same virtual object, the size displayed in the game scene after magnification is twice that in the game scene before magnification, and the preset magnification parameter of the sight is 2 times. By opening the sight, the virtual scene is magnified. It is convenient for players to observe the virtual scene and better perceive the environment of the game scene.
[0059] The sight has a magnification, which can be 1 or a value greater than 1. For example, the sight can be a red dot sight, a holographic sight, a 2x sight, a 4x sight, an 8x sight, etc. Among them, the magnification of the red dot sight and the holographic sight is 1. The magnifications of the 2x sight, the 4x sight, and the 8x sight are greater than 1. Of course, in practical applications, the magnification of the sight can also be other values, for example, the sight can also be a 10x sight, and the embodiment of the present invention does not specifically limit the magnification of the sight.
[0060] The magnification of the sight can also be 0. For this type of sight, when in the open state, the terminal device can display the corresponding crosshairs of the sight in the game scene to assist the player in aiming, and the present invention does not limit this.
[0061] The magnification of the scope is negatively correlated with the field of view, that is, the higher the magnification of the scope, the more concentrated the field of view is required, and the smaller the field of view is, that is, the smaller the required field of view is. When observing a virtual scene based on a scope with a magnification other than 1, the range of the observable virtual scene will change due to the change in the field of view, while the screen size of the terminal device remains unchanged, so the terminal device can scale the display of the virtual scene.
[0062] For example, Figure 4 , which is a schematic diagram of an interface for performing a first trigger operation on a sighting scope provided by an embodiment of the present application. Figure 4 (a) shows a first trigger operation performed by the sight 301 on the graphical user interface. After the terminal device receives the first trigger operation, Figure 4 As shown in (b), a sighting window 305 is displayed in the graphical user interface. A first scene image corresponding to the first scene area is displayed in the sighting window 305. The first scene area is a scene after the scene area before the sight is opened is magnified based on the preset magnification parameters of the sight.
[0063] It should be noted that the enlarged game scene may include multiple virtual objects, including virtual characters and virtual materials, and the virtual materials include virtual weapons and virtual props.
[0064] The virtual character refers to a character automatically controlled by a player through a terminal device or by a game program. In the embodiment of the present application, the virtual character can be a partner virtual character in a team state with the first virtual character, or can be another virtual character not in a team state with the first virtual character, such as an enemy virtual character.
[0065] The presentation forms of virtual props include but are not limited to virtual character equipment (such as helmets, bulletproof vests, backpacks, shoes), energy supplements (blood packs, first aid kits, medical boxes, etc.), transportation vehicles (cars, motorcycles and boats, etc.) and decorations (such as clothing, headdresses, weapon skins, etc.).
[0066] Step S220, in response to a second trigger operation on the crosshair, determining a crosshair adjustment parameter based on the relative position relationship between the target virtual object in the game scene and the first scene area, and adjusting the aiming direction of the crosshair according to the crosshair adjustment parameter and the second trigger operation control.
[0067] In the embodiment of the present application, the crosshair adjustment parameter is a physical parameter of the stability and reaction speed of the sight operation in the virtual environment, which is used to control the shaking degree of the sight and the speed of returning to a static state. In an optional embodiment, the crosshair adjustment parameter is used to characterize the sensitivity of the crosshair. That is, the crosshair adjustment parameter can be understood as the sensitivity of the crosshair to follow the trigger operation.
[0068] A second trigger operation is performed on the crosshair to find the target virtual object in the virtual scene through the second trigger operation. The second trigger operation may include a sliding operation, a dragging operation, a pinching operation, and a dragging operation.
[0069] Determining the crosshair parameters based on the relative position relationship between the target virtual object and the first scene area in the game scene may be to obtain the relative position relationship between the target virtual object and the first scene area, and based on the preset relative position relationship of the relative position relationship and the matching relationship between the crosshair adjustment parameters, matching the corresponding crosshair adjustment parameters for the relative position relationship. As shown in Table 1, some examples of the matching relationship between the relative position relationship and the crosshair adjustment parameters are as follows:
[0070] Table 1 Some examples of matching relationships between relative position relationships and sight adjustment parameters
[0071] Relative position relationship Crosshair adjustment parameters matching relative position relationship L1(L1≤La) a1 <h2 style=";text-align:left;direction:ltr">L2(La <L2<Lb) <h2 style=";text-align:left;direction:ltr"> b1 L3 (L3 ≥ Lc) c1
[0072] If the relative position relationship between the target virtual object and the first scene area is L1, and the relative position relationship L1 is less than or equal to the first preset threshold La, the sight adjustment parameter matched to the relative position relationship L1 is a1. If the relative position relationship between the target virtual object and the first scene area is L2, and the relative position relationship L2 is greater than the first preset threshold La and less than the second preset threshold Lb, the sight adjustment parameter matched to the relative position relationship L2 is b1. If the relative position relationship between the target virtual object and the first scene area is L3, and the relative position relationship L3 is greater than or equal to the third preset threshold Lc, the sight adjustment parameter matched to the relative position relationship L3 is c1. Among them, the relative position relationship: L1 < L2 < L3; the preset thresholds La < Lb < Lc.
[0073] Exemplarily, as Figure 5 shown, another schematic diagram of a graphical user interface provided by an embodiment of the present application can divide the scene area displayed in the graphical user interface with the first scene area as the center. For example, it is divided into Figure 5 the first area 501, the second area 502, and the third area 503 shown in the figure and the area outside the third area 503. Among them, the first area 501 can be the first scene area corresponding to the aiming window. If the target virtual object is located within the area 501, the sight adjustment parameter can be set to a1. If the target virtual object is located outside the area 501 and within the area 502, the sight adjustment parameter can be set to b1. If the target virtual object is located outside the area 502 and within the area 503 and the area outside the area 503, the sight adjustment parameter can be set to c1.
[0074] In an optional embodiment, determining the sight adjustment parameter based on the relative position relationship between the target virtual object in the game scene and the first scene area includes:
[0075] In response to the relative position between the target virtual object and the first scene area being greater than or equal to the preset threshold, increasing the sight adjustment parameter;
[0076] In response to the relative position between the target virtual object and the first scene area being less than the preset threshold, decreasing the sight adjustment parameter.
[0077] In an embodiment of the present application, the crosshair adjustment parameter is determined based on the relative position relationship between the target virtual object in the game scene and the first scene area. The relative position relationship between the target virtual object and the first scene area can be compared with a preset threshold value, and when the relative position between the target virtual object and the first scene area is greater than or equal to the preset threshold value, the crosshair adjustment parameter is increased. That is, when the relative position between the target virtual object and the first scene area is large, the sensitivity of the crosshair is increased, so that the player can flexibly adjust the aiming direction of the crosshair to quickly aim at the target virtual object. When the relative position between the target virtual object and the first scene area is less than the preset threshold value, the crosshair adjustment parameter is reduced. That is, when the relative position between the target virtual object and the first scene area is small, the sensitivity of the crosshair is reduced, so that the player can finely adjust the aiming direction of the crosshair to avoid missing the target virtual object in the aiming direction.
[0078] In some embodiments, the relative position is the angle between the line connecting the first virtual character and the target virtual object and the aiming direction of the crosshair, and the preset threshold is a preset angle threshold;
[0079] In response to the relative position between the target virtual object and the first scene area being greater than or equal to a preset threshold, increasing the crosshair adjustment parameter includes:
[0080] In response to the angle being greater than or equal to the preset angle threshold, increasing the crosshair adjustment parameter;
[0081] In response to the relative position between the target virtual object and the first scene area being less than the preset threshold, reducing the crosshair adjustment parameter comprises:
[0082] In response to the angle being smaller than the preset angle, the crosshair adjustment parameter is reduced.
[0083] In an embodiment of the present application, a line connecting the first virtual character and the target virtual object is obtained. The angle between the line connecting the first virtual character and the target virtual object and the aiming direction of the crosshair is taken as the relative positional relationship between the target virtual object and the target virtual character. When the angle between the line connecting the first virtual character and the target virtual object and the aiming direction of the crosshair is greater than or equal to a preset angle threshold, the crosshair adjustment parameter is increased. When the angle between the line connecting the first virtual character and the target virtual object and the aiming direction of the crosshair is less than the preset angle threshold, the crosshair adjustment parameter is reduced.
[0084] For example, Figure 6As shown, it is a schematic diagram of the relative position relationship between a target virtual object and a first scene area provided in an embodiment of the present application. Assuming that the target virtual object is the second virtual character B, the target virtual object A and the second virtual object B are connected to obtain the connection line between the target virtual object A and the second virtual object B. The angle between the connection line between the first virtual character and the target virtual object and the aiming direction of the crosshair is obtained as θ. The angle θ is compared with the preset angle threshold θ1. When the angle θ is greater than or equal to the preset angle threshold θ1, the crosshair adjustment parameter is increased. When the angle θ is less than the preset angle threshold θ1, the crosshair adjustment parameter is reduced.
[0085] After the crosshair adjustment parameters are determined, when the second trigger operation is performed, the movement of the crosshair is adjusted according to the determined crosshair adjustment parameters to adjust the aiming direction of the crosshair, thereby helping the player to find the desired target virtual object as quickly as possible in the aiming scope opening mode.
[0086] For example, Figure 7 As shown in FIG. 1 , a schematic diagram of an interface for a second trigger operation of a scope provided in an embodiment of the present application is provided, and a player can Figure 7 In the graphical user interface shown in (a), a double-touch operation is performed on the sight with both hands. After receiving the double-touch operation, the graphical user interface adjusts the parameters of the crosshairs to determine the crosshairs adjustment parameters according to the relative position relationship between the target virtual object in the game scene and the first scene area. The second trigger operation is continued, and the crosshairs determines the adjustment direction according to the crosshairs adjustment parameters and the second trigger operation, so as to help the player find the required target virtual object as soon as possible in the sighting mode.
[0087] Step S230: determining a second scene area from the game scene according to the adjusted aiming direction, and controlling the first scene picture displayed in the aiming window to be updated to a second scene picture corresponding to the second scene area.
[0088] In the embodiment of the present application, after adjusting the aiming direction of the crosshair, the scene area corresponding to the adjusted aiming direction is enlarged based on the preset magnification parameters of the sight to obtain a second scene area. And the first scene picture corresponding to the first scene area in the aiming window is updated to the second scene picture corresponding to the second scene area. Figure 7 (b) shows Figure 7 (a) shows a second scene picture corresponding to a second scene area after the first scene picture corresponding to the first scene area is updated.
[0089] The embodiment of the present application provides a display control method in a game, which provides a graphical user interface through a terminal device, and displays at least part of a game scene and a crosshair on the graphical user interface, wherein the game scene includes at least a first virtual character controlled by the terminal device, and the crosshair is used to indicate the aiming direction of the virtual weapon of the first virtual character, wherein the virtual weapon is equipped with a sight. In response to a first trigger operation on the sight, an aiming window is displayed in association with the crosshair position, and a first scene picture corresponding to a first scene area is displayed in the aiming window, wherein the first scene area is determined based on the aiming direction of the crosshair; in response to a second trigger operation on the crosshair, a crosshair adjustment parameter is determined based on the relative position relationship between the target virtual object in the game scene and the first scene area, and the aiming direction of the crosshair is adjusted according to the crosshair adjustment parameter and the second trigger operation; according to the adjusted aiming direction, a second scene area is determined from the game scene, and the first scene picture displayed in the aiming window is controlled to be updated to a second scene picture corresponding to the second scene area. The method performs a first trigger operation on the sight, so that the sight is in an open state, and an aiming window is displayed in association with the crosshair position, and the first scene picture corresponding to the first scene area is displayed in the aiming window. When the scope is in the open state, the relative position relationship between the target virtual object in the game scene and the first scene area determines the crosshair adjustment parameter. The aiming direction of the crosshair is adjusted based on the crosshair adjustment parameter and the second trigger operation control. The second scene area is determined according to the aiming direction after the crosshair is adjusted, and the second scene picture corresponding to the second scene area is displayed in the aiming window. The player can finely adjust the aiming direction of the scope in the open state, avoiding the problem that the aiming direction of the scope is not smooth or too sensitive when the finger moves the scope. The time for the player to find enemies or objects in the open state is shortened.
[0090] In some embodiments, the target virtual object includes a plurality of;
[0091] After the step of determining the crosshair adjustment parameter based on the relative position relationship between the target virtual object in the game scene and the first scene area, the method further includes:
[0092] According to the number of the target virtual objects, changing the crosshair adjustment parameter;
[0093] The step of adjusting the aiming direction of the crosshair according to the crosshair adjustment parameter and the second trigger operation control comprises:
[0094] The aiming direction of the crosshair is adjusted according to the changed crosshair adjustment parameter and the second trigger operation control.
[0095] In the embodiment of the present application, when there are multiple target virtual objects, the number of target virtual objects is obtained, and the crosshair adjustment parameter is changed based on the number of target virtual objects. The crosshair adjustment parameter is changed based on the number of target virtual objects. If the number of target virtual objects is greater than or equal to the preset number, the crosshair adjustment parameter is increased; if the number of target virtual objects is less than the preset number, the crosshair adjustment parameter is decreased. Then, the aiming direction of the crosshair is adjusted according to the changed crosshair adjustment parameter and the second trigger operation control.
[0096] In some embodiments, changing the crosshair adjustment parameter according to the number of the target virtual objects includes:
[0097] In response to the number of the target virtual objects being greater than or equal to a preset number threshold, increasing the crosshair adjustment parameter based on a preset first weight, where the first weight is used to characterize a change ratio of the number of the target virtual objects to the crosshair adjustment parameter;
[0098] In response to the number of the target virtual objects being less than the preset number threshold, reducing the crosshair adjustment parameter based on the first weight.
[0099] In an embodiment of the present application, the final crosshair adjustment parameter can be determined by the relative position relationship between the target virtual object in the game scene and the first scene area and the number of target virtual objects. Assume that the relative position relationship between the target virtual object in the game scene and the first scene area determines the first sub-crosshair adjustment parameter. Determine the second sub-crosshair adjustment parameter based on the number of target virtual objects. The final crosshair adjustment parameter can be the first sub-crosshair adjustment parameter and the second sub-crosshair adjustment parameter multiplied by the preset corresponding weights to obtain the multiplication result. Add the multiplication results to obtain the final crosshair adjustment parameter.
[0100] When the number of target virtual objects is greater than or equal to a preset number threshold, the second sub-crosshair adjustment parameter is increased, thereby increasing the crosshair adjustment parameter. When the number of target virtual objects is less than the preset number threshold, the second sub-crosshair adjustment parameter is decreased, thereby decreasing the crosshair adjustment parameter.
[0101] In some embodiments, the target virtual object is in a dynamic state;
[0102] After the step of determining the crosshair adjustment parameter based on the relative position relationship between the target virtual object in the game scene and the first scene area, the method further includes:
[0103] According to the movement speed of the target virtual object, the adjustment parameter of the crosshair is changed;
[0104] The step of adjusting the aiming direction of the crosshair according to the crosshair adjustment parameter and the second trigger operation control comprises:
[0105] The aiming direction of the crosshair is adjusted according to the changed crosshair adjustment parameter and the second trigger operation control.
[0106] In an embodiment of the present application, when the target virtual object is in motion, the motion speed of the target virtual object is obtained, and the crosshair adjustment parameter is changed based on the motion of the target virtual object. The crosshair adjustment parameter is changed based on the motion of the target virtual object, and the crosshair adjustment parameter is increased when the motion speed of the target virtual object is greater than or equal to a preset motion speed threshold; and the crosshair adjustment parameter is decreased when the motion speed of the target virtual object is less than a preset value.
[0107] In some embodiments, changing the crosshair adjustment parameter according to the movement speed of the target virtual object includes:
[0108] In response to the movement speed being greater than or equal to a preset speed threshold, increasing the crosshair adjustment parameter based on a preset second weight, wherein the second weight is used to represent a change ratio of the movement speed of the target virtual object to the crosshair adjustment parameter;
[0109] In response to the movement speed being less than the preset speed threshold, the crosshair adjustment parameter is reduced based on the second weight.
[0110] In an embodiment of the present application, the final crosshair adjustment parameter can be determined by the relative position relationship between the target virtual object in the game scene and the first scene area and the movement speed of the target virtual object. Assume that the relative position relationship between the target virtual object in the game scene and the first scene area determines the first sub-crosshair adjustment parameter. Determine the third sub-crosshair adjustment parameter based on the movement speed of the target virtual object. The final crosshair adjustment parameter can be the first sub-crosshair adjustment parameter and the third sub-crosshair adjustment parameter multiplied by the corresponding preset weights to obtain the multiplication result. Add the multiplication results to obtain the final crosshair adjustment parameter.
[0111] When the target virtual object's movement speed is greater than or equal to the preset movement speed threshold, the third sub-crosshair adjustment parameter is increased, thereby increasing the crosshair adjustment parameter. When the target virtual object's movement speed is less than the preset movement speed threshold, the third sub-crosshair adjustment parameter is decreased, thereby decreasing the crosshair adjustment parameter.
[0112] In an optional embodiment, the final crosshair adjustment parameter can be determined by the relative position relationship between the target virtual object in the game scene and the first scene area, the number of target virtual objects, and the movement speed of the target virtual object. Assume that the relative position relationship between the target virtual object in the game scene and the first scene area determines the first sub-crosshair adjustment parameter. Determine the second sub-crosshair adjustment parameter based on the number of target virtual objects. Determine the third sub-crosshair adjustment parameter based on the movement speed of the target virtual object. The final crosshair adjustment parameter can be the first sub-crosshair adjustment parameter, the second sub-crosshair adjustment parameter, and the third sub-crosshair adjustment parameter multiplied by the preset corresponding weights to obtain the multiplication result. Add the multiplication results to obtain the final crosshair adjustment parameter.
[0113] When the target virtual object's movement speed is greater than or equal to the preset movement speed threshold, the third sub-crosshair adjustment parameter is increased, thereby increasing the crosshair adjustment parameter. When the target virtual object's movement speed is less than the preset movement speed threshold, the third sub-crosshair adjustment parameter is decreased, thereby decreasing the crosshair adjustment parameter.
[0114] In an optional embodiment, after the step of determining the crosshair adjustment parameter based on the relative position relationship between the target virtual object in the game scene and the first scene area, the method further includes:
[0115] According to the distance between the target virtual object and the target virtual object, change the crosshair adjustment parameter;
[0116] The step of adjusting the aiming direction of the crosshair according to the crosshair adjustment parameter and the second trigger operation control comprises:
[0117] The aiming direction of the crosshair is adjusted according to the changed crosshair adjustment parameter and the second trigger operation control.
[0118] In some embodiments, changing the crosshair adjustment parameter according to the distance between the target virtual object and the target virtual object includes:
[0119] In response to the distance between the target virtual object and the target virtual object being greater than or equal to a preset distance threshold, increasing the crosshair adjustment parameter based on a preset third weight, wherein the third weight is used to represent a change ratio of the distance between the target virtual object and the target virtual object to the crosshair adjustment parameter;
[0120] In response to the distance between the target virtual object and the target virtual object being less than the preset distance threshold, reducing the crosshair adjustment parameter based on the third weight.
[0121] In an embodiment of the present application, the distance between the target virtual object and the target virtual object is obtained, and the crosshair adjustment parameter is changed based on the distance between the target virtual object and the target virtual object. Wherein, the crosshair adjustment parameter is changed based on the distance between the target virtual object and the target virtual object, and when the distance between the target virtual object and the target virtual object is greater than or equal to a preset distance threshold, the crosshair adjustment parameter is increased; when the distance between the target virtual object and the target virtual object is less than the preset distance threshold, the crosshair adjustment parameter is decreased.
[0122] In an optional embodiment, the final crosshair adjustment parameter can be jointly determined by the relative position relationship between the target virtual object in the game scene and the first scene area, the number of target virtual objects, the movement speed of the target virtual object, and the distance between the target virtual object and the target virtual object. Assume that the relative position relationship between the target virtual object in the game scene and the first scene area determines the first sub-crosshair adjustment parameter. Determine the second sub-crosshair adjustment parameter based on the number of target virtual objects. Determine the third sub-crosshair adjustment parameter based on the movement speed of the target virtual object. Determine the fourth sub-crosshair adjustment parameter based on the distance between the target virtual object and the target virtual object. The final crosshair adjustment parameter can be the first sub-crosshair adjustment parameter, the second sub-crosshair adjustment parameter, the third sub-crosshair adjustment parameter, and the fourth sub-crosshair adjustment parameter multiplied by the preset corresponding weights to obtain the multiplication result. Add the multiplication results to obtain the final crosshair adjustment parameter.
[0123] When the distance between the target virtual object and the target virtual object is greater than or equal to the preset distance threshold, the fourth sub-crosshair adjustment parameter is increased, thereby increasing the crosshair adjustment parameter. When the distance between the target virtual object and the target virtual object is less than the preset distance threshold, the fourth sub-crosshair adjustment parameter is decreased, thereby decreasing the crosshair adjustment parameter.
[0124] In an optional embodiment, after the step of determining the crosshair adjustment parameter based on the relative position relationship between the target virtual object in the game scene and the first scene area, the method further includes:
[0125] According to the volume of the target virtual object, changing the crosshair adjustment parameter;
[0126] The step of adjusting the aiming direction of the crosshair according to the crosshair adjustment parameter and the second trigger operation control comprises:
[0127] The aiming direction of the crosshair is adjusted according to the changed crosshair adjustment parameter and the second trigger operation control.
[0128] In some embodiments, changing the crosshair adjustment parameter according to the volume of the target virtual object includes:
[0129] In response to the volume of the target virtual object being greater than or equal to a preset volume threshold, increasing the crosshair adjustment parameter based on a preset fourth weight, wherein the fourth weight is used to characterize a change ratio of the volume of the target virtual object to the crosshair adjustment parameter;
[0130] In response to the volume of the target virtual object being smaller than the preset volume threshold, reducing the crosshair adjustment parameter based on the fourth weight.
[0131] In an embodiment of the present application, the volume of the target virtual object is obtained, and the crosshair adjustment parameter is changed based on the volume of the target virtual object. The crosshair adjustment parameter is changed based on the volume of the target virtual object, and when the volume of the target virtual object is greater than or equal to a preset volume threshold, the crosshair adjustment parameter is increased; when the volume of the target virtual object is less than the preset volume threshold, the crosshair adjustment parameter is decreased.
[0132] In an optional embodiment, the final crosshair adjustment parameter can be jointly determined by the relative position relationship between the target virtual object in the game scene and the first scene area, the number of target virtual objects, the movement speed of the target virtual object, the distance between the target virtual object and the target virtual object, and the volume of the target virtual object. Assume that the relative position relationship between the target virtual object in the game scene and the first scene area determines the first sub-crosshair adjustment parameter. Determine the second sub-crosshair adjustment parameter based on the number of target virtual objects. Determine the third sub-crosshair adjustment parameter based on the movement speed of the target virtual object. Determine the fourth sub-crosshair adjustment parameter based on the distance between the target virtual object and the target virtual object. Determine the fifth sub-crosshair adjustment parameter based on the volume of the target virtual object. The final crosshair adjustment parameter can be the first sub-crosshair adjustment parameter, the second sub-crosshair adjustment parameter, the third sub-crosshair adjustment parameter, the fourth sub-crosshair adjustment parameter, and the fifth sub-crosshair adjustment parameter, respectively multiplied by the preset corresponding weights to obtain the multiplication result. Add the multiplication results to obtain the final crosshair adjustment parameter.
[0133] When the volume of the target virtual object is greater than or equal to the preset volume threshold, the fourth sub-crosshair adjustment parameter is increased, thereby increasing the crosshair adjustment parameter. When the volume of the target virtual object is less than the preset volume threshold, the fourth sub-crosshair adjustment parameter is decreased, thereby decreasing the crosshair adjustment parameter.
[0134] In some embodiments, before responding to the second trigger operation on the crosshair, determining the first crosshair adjustment parameter based on the relative position relationship between the target virtual object in the game scene and the first scene area, the method further includes:
[0135] Inputting the current attribute state and currently owned virtual resources of the first virtual character into a pre-trained virtual behavior prediction model to obtain a predicted virtual behavior for the first virtual character output by the pre-trained virtual behavior prediction model;
[0136] Based on the pre-built matching relationship and the predicted virtual behavior, a target virtual object matching the predicted virtual behavior is screened from multiple virtual objects; the matching relationship is used to characterize the matching relationship between multiple virtual objects and multiple virtual behaviors.
[0137] In an embodiment of the present application, the current attribute state of the first virtual character refers to the basic values or states possessed by the first virtual character, which determine the performance and ability of the first virtual character in the game. For example, the current attribute state includes: (1) Health (HP): represents the life state of the first virtual character. Usually, when the health drops to 0, the first virtual character will die; (2) Mana / Energy (MP / EP): energy reserves used to cast skills or use special abilities. (3) Stamina: affects the ability of the first virtual character to run, block, and other actions. (4) Experience (XP): obtained by completing tasks or defeating enemies, used to increase levels.
[0138] The currently owned virtual goods refer to the virtual goods that the first virtual character has the right to dispose of and control; for example, the player can sell, discard, or use the virtual goods to attack, etc. The virtual goods owned by the first virtual character can be obtained through purchase, pickup, game rewards, etc.
[0139] Exemplarily, the current attribute status of the first virtual character can be directly obtained from the status bar displayed in the game interface. For example, in the game, there will be a status bar or HUD (Head-Up Display) for displaying health (HP), mana (MP), endurance, and experience (XP). For example, a bar chart corresponding to health (HP), mana (MP), endurance, and experience (XP) is displayed in the status bar. When it is necessary to obtain the current status information of the first virtual character, the data of the bar chart corresponding to health (HP), mana (MP), endurance, and experience (XP) can be directly obtained.
[0140] The current attribute state of the first virtual character may be obtained by directly accessing the state data of the first virtual character, such as accessing the state data of the first virtual character through a third-party tool (plug-in, MOD or API) to obtain the current attribute state of the first virtual character.
[0141] The virtual materials currently owned by the first virtual character can be obtained by accessing the inventory or backpack interface of the first virtual character. In the game, the virtual materials currently owned by the virtual character are usually displayed in the inventory and backpack interface.
[0142] After obtaining the current attribute status of the first virtual character and the virtual supplies currently owned, the obtained current attribute status of the first virtual character and the virtual supplies currently owned are input into a pre-trained virtual behavior prediction model. The pre-trained virtual behavior prediction model predicts the virtual behavior of the first virtual character based on the input current attribute status of the first virtual character and the virtual supplies currently owned, and obtains the predicted virtual behavior of the first virtual character.
[0143] It should be noted that the virtual behavior prediction model is used to predict the virtual behavior of the virtual character based on the current attribute state and the virtual materials currently owned by the virtual character. The pre-trained virtual behavior prediction model is obtained as follows:
[0144] Acquire a training sample set, the training sample set including a plurality of training samples and a true label of each training sample; the training samples represent the attribute state and virtual supplies of each virtual character at each moment in the game, and the true label of the training sample is the virtual behavior performed by each virtual character when it is in the attribute state at each moment and the virtual supplies currently possessed;
[0145] Iteratively training the initial virtual behavior prediction model using the plurality of training samples and the true label of each training sample until a training goal is achieved;
[0146] Obtain a pre-trained virtual behavior prediction model.
[0147] In the embodiment of the present application, the attribute state and virtual materials owned by each virtual character at each moment in the game are obtained and used as training samples. The state information corresponding to each moment is labeled with a real label, that is, the virtual behavior performed when the virtual character is in the attribute state and virtual materials owned at each moment is labeled as the real label corresponding to the training sample. As shown in Table 2 below, some examples of samples and their real labels are shown:
[0148] Table 2 Some examples of samples and their true labels
[0149] sample The true label of the sample Attribute status 1 and virtual material 1 Finding virtual weapons Attribute status 4 and virtual goods 2 Find medical supplies Attribute status 3 and virtual goods 3 Observe your surroundings Attribute status 2 and virtual goods 4 Finding enemy avatars
[0150] It should be noted that the order of health (HP), mana (MP), endurance and experience (XP) is: attribute state 1> attribute state 2> attribute state 3> attribute state 4; the order of the number of virtual supplies owned is: virtual supplies owned 1< virtual supplies owned 2< virtual supplies owned 3< virtual supplies owned 4. Sample 1 is attribute state 1 and virtual supplies owned 1, which means that the attribute state of the virtual character is in the best state, but the virtual supplies owned are less. At this time, the virtual character can first look for virtual weapons to facilitate combat. Sample 2 is attribute state 4 and virtual supplies owned 2, which means that the attribute state of the virtual character is in the worst state, and the virtual supplies owned are less. At this time, the virtual character needs medical supplies to supplement the attribute state, so the virtual character can look for medical supplies to supplement the attribute state. Sample 3 is attribute state 3 and virtual supplies owned 3, which means that the attribute state of the virtual character is in a relatively poor state, and the virtual character has more virtual supplies. At this time, the virtual character replenishes the attribute state through the medical supplies in the virtual supplies while observing the surrounding environment. When sample 4 is attribute state 2 and possesses 4 virtual supplies, it may be that the attribute state of the virtual character is in a better state, and the virtual character possesses sufficient virtual supplies, and can look for enemy virtual characters to attack.
[0151] In the embodiment of the present application, virtual behavior refers to the task that the virtual character is trying to complete in the game, such as finding items, finding enemies, etc.
[0152] After obtaining the training sample set, the initial virtual behavior prediction model is trained using the training sample set, that is, the parameters of the initial virtual behavior prediction model are adjusted by the training sample set until the model converges and the training is completed to obtain the pre-trained virtual behavior prediction model. The pre-trained virtual behavior prediction model is used to predict the virtual behavior performed by the virtual character when it is in the attribute state and virtual materials at different times;
[0153] The target virtual object is the object for which the first virtual character completes the virtual behavior. A matching relationship between the virtual behavior performed by the virtual character and the virtual object is pre-established, as shown in Table 3, which is a matching relationship between the virtual behavior performed by the virtual character and the virtual object provided in an embodiment of the present application;
[0154] Table 3 Examples of matching relationships between virtual behaviors performed by virtual characters and virtual objects
[0155]
[0156]
[0157] After obtaining the predicted virtual behavior of the first virtual character through the pre-trained virtual behavior prediction model, a virtual object matching the predicted virtual behavior is screened from multiple virtual objects based on the matching relationship and the predicted virtual behavior, and the screened virtual object is used as the target virtual object.
[0158] Corresponding to the display control method in the game provided in the embodiment of the present application, the embodiment of the present application also provides a display control device in the game, such as Figure 8 As shown, the device 800 includes:
[0159] A display module 801 is used for displaying a sighting window in association with the crosshair position in response to a first trigger operation on the sighting scope, and displaying a first scene image corresponding to a first scene area in the sighting window, wherein the first scene area is determined based on the sighting direction of the crosshair;
[0160] An adjustment module 802 is used to respond to a second trigger operation on the crosshair, determine a crosshair adjustment parameter based on a relative position relationship between a target virtual object in the game scene and the first scene area, and control adjustment of an aiming direction of the crosshair according to the crosshair adjustment parameter and the second trigger operation;
[0161] The updating module 803 is used to determine a second scene area from the game scene according to the adjusted aiming direction, and control the first scene picture displayed in the aiming window to be updated to a second scene picture corresponding to the second scene area.
[0162] In some embodiments, the crosshair adjustment parameter is used to characterize the sensitivity of the crosshair.
[0163] In some embodiments, the adjustment module is further configured to:
[0164] In response to a relative position between the target virtual object and the first scene area being greater than or equal to a preset threshold, increasing the crosshair adjustment parameter;
[0165] In response to a relative position between the target virtual object and the first scene area being less than the preset threshold, reducing the crosshair adjustment parameter.
[0166] In some embodiments, the relative position is the angle between the line connecting the first virtual character and the target virtual object and the aiming direction of the crosshair, and the preset threshold is a preset angle threshold;
[0167] The tuning module is also used to:
[0168] In response to the angle being greater than or equal to the preset angle threshold, increasing the crosshair adjustment parameter;
[0169] In response to the angle being smaller than the preset angle, the crosshair adjustment parameter is reduced.
[0170] In some embodiments, the target virtual object includes a plurality of;
[0171] The tuning module is also used to:
[0172] According to the number of the target virtual objects, changing the crosshair adjustment parameter;
[0173] The update module is also used to:
[0174] The aiming direction of the crosshair is adjusted according to the changed crosshair adjustment parameter and the second trigger operation control.
[0175] In some embodiments, the adjustment module is further configured to:
[0176] In response to the number of the target virtual objects being greater than or equal to a preset number threshold, increasing the crosshair adjustment parameter based on a preset first weight, where the first weight is used to characterize a change ratio of the number of the target virtual objects to the crosshair adjustment parameter;
[0177] In response to the number of the target virtual objects being less than the preset number threshold, reducing the crosshair adjustment parameter based on the first weight.
[0178] In some embodiments, the target virtual object is in a dynamic state;
[0179] The tuning module is also used to:
[0180] According to the movement speed of the target virtual object, the adjustment parameter of the crosshair is changed;
[0181] The update module is also used to:
[0182] The aiming direction of the crosshair is adjusted according to the changed crosshair adjustment parameter and the second trigger operation control.
[0183] In some embodiments, the adjustment module is further configured to:
[0184] In response to the movement speed being greater than or equal to a preset speed threshold, increasing the crosshair adjustment parameter based on a preset second weight, wherein the second weight is used to represent a change ratio of the movement speed of the target virtual object to the crosshair adjustment parameter;
[0185] In response to the movement speed being less than the preset speed threshold, the crosshair adjustment parameter is reduced based on the second weight.
[0186] In some embodiments, the apparatus further comprises:
[0187] A screening module, used for inputting the current attribute state and currently owned virtual resources of the first virtual character into a pre-trained virtual behavior prediction model, and obtaining a predicted virtual behavior for the first virtual character output by the pre-trained virtual behavior prediction model;
[0188] Based on the pre-built matching relationship and the predicted virtual behavior, a target virtual object matching the predicted virtual behavior is screened from multiple virtual objects; the matching relationship is used to characterize the matching relationship between multiple virtual objects and multiple virtual behaviors.
[0189] In some embodiments, the apparatus further comprises:
[0190] A training module is used to obtain a training sample set, wherein the training sample set includes a plurality of training samples and a true label of each training sample; the training samples represent the attribute state and virtual materials owned by each virtual character at each moment in the game, and the true label of the training sample is the virtual behavior performed by each virtual character when it is in the attribute state at each moment and the virtual materials currently owned;
[0191] Iteratively training the initial virtual behavior prediction model using the plurality of training samples and the true label of each training sample until a training goal is achieved;
[0192] Obtain a pre-trained virtual behavior prediction model.
[0193] Corresponding to the display control method in the game provided in the embodiment of the present application, the embodiment of the present application also provides an electronic device. Fig. 9 As shown, the electronic device 900 includes: a processor 901; and a memory 902, which is used to store a program of a display control method in a game. After the electronic device is powered on and runs the program storing the display control method in the game through the processor, the following steps are performed:
[0194] In response to a first trigger operation on the sight, a sighting window is displayed in association with the crosshair position, and a first scene image corresponding to a first scene area is displayed in the sighting window, wherein the first scene area is determined based on the sighting direction of the crosshair;
[0195] In response to a second trigger operation on the crosshair, determining a crosshair adjustment parameter based on a relative position relationship between a target virtual object in the game scene and the first scene area, and adjusting an aiming direction of the crosshair according to the crosshair adjustment parameter and the second trigger operation control;
[0196] According to the adjusted aiming direction, a second scene area is determined from the game scene, and the first scene picture displayed in the aiming window is controlled to be updated to a second scene picture corresponding to the second scene area.
[0197] Corresponding to the display control method in the game provided in the embodiment of the present application, the embodiment of the present application further provides a computer-readable storage medium storing a program of the display control method in the game, the program is executed by a processor to perform the following steps:
[0198] In response to a first trigger operation on the sight, a sighting window is displayed in association with the crosshair position, and a first scene image corresponding to a first scene area is displayed in the sighting window, wherein the first scene area is determined based on the sighting direction of the crosshair;
[0199] In response to a second trigger operation on the crosshair, determining a crosshair adjustment parameter based on a relative position relationship between a target virtual object in the game scene and the first scene area, and adjusting an aiming direction of the crosshair according to the crosshair adjustment parameter and the second trigger operation control;
[0200] According to the adjusted aiming direction, a second scene area is determined from the game scene, and the first scene picture displayed in the aiming window is controlled to be updated to a second scene picture corresponding to the second scene area.
[0201] Corresponding to the display control method in the game provided by the embodiment of the present application, the embodiment of the present application further provides a computer program product, the program product comprising: a computer program, the computer program is stored in a readable storage medium, at least one processor of the electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device performs the following steps:
[0202] In response to a first trigger operation on the sight, a sighting window is displayed in association with the crosshair position, and a first scene image corresponding to a first scene area is displayed in the sighting window, wherein the first scene area is determined based on the sighting direction of the crosshair;
[0203] In response to a second trigger operation on the crosshair, determining a crosshair adjustment parameter based on a relative position relationship between a target virtual object in the game scene and the first scene area, and adjusting an aiming direction of the crosshair according to the crosshair adjustment parameter and the second trigger operation control;
[0204] According to the adjusted aiming direction, a second scene area is determined from the game scene, and the first scene picture displayed in the aiming window is controlled to be updated to a second scene picture corresponding to the second scene area.
[0205] It should be noted that for the detailed description of the apparatus, electronic device, computer-readable storage medium and computer program product provided in the embodiments of the present application, reference can be made to the relevant description of the method in the embodiments of the present application, which will not be repeated here.
[0206] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
[0207] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0208] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling an electronic device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application.
[0209] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0210] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0211] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0212] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0213] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0214] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A display control method in a game, characterized in that: A graphical user interface is provided through a terminal device, and at least a part of a game scene and a crosshair are displayed on the graphical user interface, wherein the game scene at least includes a first virtual character controlled by the terminal device, and the crosshair is used to indicate an aiming direction of a virtual weapon of the first virtual character, wherein the virtual weapon is equipped with a sight, and the method includes: In response to a first trigger operation on the sight, a sighting window is displayed in association with the crosshair position, and a first scene image corresponding to a first scene area is displayed in the sighting window, wherein the first scene area is determined based on the sighting direction of the crosshair; In response to a second trigger operation on the crosshair, determining a crosshair adjustment parameter based on a relative position relationship between a target virtual object in the game scene and the first scene area, and adjusting an aiming direction of the crosshair according to the crosshair adjustment parameter and the second trigger operation control; According to the adjusted aiming direction, a second scene area is determined from the game scene, and the first scene picture displayed in the aiming window is controlled to be updated to a second scene picture corresponding to the second scene area.
2. The display control method in a game according to claim 1, characterized in that: The crosshair adjustment parameter is used to characterize the sensitivity of the crosshair.
3. The display control method in a game according to claim 1, characterized in that: The determining of the crosshair adjustment parameter based on the relative position relationship between the target virtual object in the game scene and the first scene area includes: In response to a relative position between the target virtual object and the first scene area being greater than or equal to a preset threshold, increasing the crosshair adjustment parameter; In response to a relative position between the target virtual object and the first scene area being less than the preset threshold, reducing the crosshair adjustment parameter.
4. The display control method in a game according to claim 3, characterized in that: The relative position is the angle between the line connecting the first virtual character and the target virtual object and the aiming direction of the crosshair, and the preset threshold is a preset angle threshold; In response to the relative position between the target virtual object and the first scene area being greater than or equal to a preset threshold, increasing the crosshair adjustment parameter includes: In response to the angle being greater than or equal to the preset angle threshold, increasing the crosshair adjustment parameter; In response to the relative position between the target virtual object and the first scene area being less than the preset threshold, reducing the crosshair adjustment parameter comprises: In response to the angle being smaller than the preset angle, the crosshair adjustment parameter is reduced.
5. The display control method in a game according to claim 1, characterized in that: The target virtual object includes a plurality of; After the step of determining the crosshair adjustment parameter based on the relative position relationship between the target virtual object in the game scene and the first scene area, the method further includes: According to the number of the target virtual objects, changing the crosshair adjustment parameter; The step of adjusting the aiming direction of the crosshair according to the crosshair adjustment parameter and the second trigger operation control comprises: The aiming direction of the crosshair is adjusted according to the changed crosshair adjustment parameter and the second trigger operation control.
6. The display control method in a game according to claim 5, characterized in that: The step of changing the crosshair adjustment parameter according to the number of the target virtual objects includes: In response to the number of the target virtual objects being greater than or equal to a preset number threshold, increasing the crosshair adjustment parameter based on a preset first weight, where the first weight is used to characterize a change ratio of the number of the target virtual objects to the crosshair adjustment parameter; In response to the number of the target virtual objects being less than the preset number threshold, reducing the crosshair adjustment parameter based on the first weight.
7. The display control method in a game according to claim 1, characterized in that: The target virtual object is in a dynamic state; After the step of determining the crosshair adjustment parameter based on the relative position relationship between the target virtual object in the game scene and the first scene area, the method further includes: According to the movement speed of the target virtual object, the adjustment parameter of the crosshair is changed; The step of adjusting the aiming direction of the crosshair according to the crosshair adjustment parameter and the second trigger operation control comprises: The aiming direction of the crosshair is adjusted according to the changed crosshair adjustment parameter and the second trigger operation control.
8. The display control method in a game according to claim 7, characterized in that: The step of changing the crosshair adjustment parameter according to the movement speed of the target virtual object includes: In response to the movement speed being greater than or equal to a preset speed threshold, increasing the crosshair adjustment parameter based on a preset second weight, wherein the second weight is used to represent a change ratio of the movement speed of the target virtual object to the crosshair adjustment parameter; In response to the movement speed being less than the preset speed threshold, the crosshair adjustment parameter is reduced based on the second weight.
9. The display control method in a game according to claim 1, characterized in that: Before the step of determining the first crosshair adjustment parameter based on the relative position relationship between the target virtual object in the game scene and the first scene area in response to the second trigger operation on the crosshair, the method further includes: Inputting the current attribute state and currently owned virtual resources of the first virtual character into a pre-trained virtual behavior prediction model to obtain a predicted virtual behavior for the first virtual character output by the pre-trained virtual behavior prediction model; Based on the pre-built matching relationship and the predicted virtual behavior, a target virtual object matching the predicted virtual behavior is screened from multiple virtual objects; the matching relationship is used to characterize the matching relationship between multiple virtual objects and multiple virtual behaviors.
10. The display control method in a game according to claim 9, characterized in that: Before the step of inputting the current attribute state and currently owned virtual resources of the first virtual character into the pre-trained virtual behavior prediction model, the method further includes: Acquire a training sample set, the training sample set including a plurality of training samples and a true label of each training sample; the training samples represent the attribute state and virtual supplies of each virtual character at each moment in the game, and the true label of the training sample is the virtual behavior performed by each virtual character when it is in the attribute state at each moment and the virtual supplies currently possessed; Iteratively training the initial virtual behavior prediction model using the plurality of training samples and the true label of each training sample until a training goal is achieved; Obtain a pre-trained virtual behavior prediction model.
11. A display control device in a game, characterized in that: A graphical user interface is provided through a terminal device, and at least a part of a game scene and a crosshair are displayed on the graphical user interface, wherein the game scene at least includes a first virtual character controlled by the terminal device, and the crosshair is used to indicate an aiming direction of a virtual weapon of the first virtual character, wherein the virtual weapon is equipped with a sight, and the apparatus comprises: A display module, configured to display a sighting window in association with the crosshair position in response to a first trigger operation on the sighting scope, and display a first scene image corresponding to a first scene area in the sighting window, wherein the first scene area is determined based on the sighting direction of the crosshair; an adjustment module, configured to respond to a second trigger operation on the crosshair, determine a crosshair adjustment parameter based on a relative position relationship between a target virtual object in the game scene and the first scene area, and control adjustment of an aiming direction of the crosshair according to the crosshair adjustment parameter and the second trigger operation; The updating module is used to determine a second scene area from the game scene according to the adjusted aiming direction, and control the first scene picture displayed in the aiming window to be updated to a second scene picture corresponding to the second scene area.
12. An electronic device, characterized in that: include: processor; as well as The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method according to any one of claims 1 to 10 is executed.
13. A computer-readable storage medium, characterized in that: A data processing program is stored, and the program is run by a processor to execute the method according to any one of claims 1 to 10.