Interaction control method and device in game and electronic equipment
By automatically determining virtual weapon positions, the game solves the operational burden caused by players manually switching weapons in vehicle shooting games, thus improving the gaming experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2026-02-05
- Publication Date
- 2026-05-15
AI Technical Summary
In vehicle shooting games, players need to manually switch weapons, which increases the operational burden, leading to low efficiency and a poor gaming experience.
The terminal device provides a graphical user interface that automatically determines the virtual weapon position based on the relative position of the attack target and the virtual vehicle, reducing the need for players to manually switch between them.
It reduces the switching time and complexity of virtual weapon slots, improving players' operational efficiency and gaming experience during intense battles.
Smart Images

Figure CN122032085A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of game interaction design technology, and in particular to an interactive control method, device and electronic device in a game. Background Technology
[0002] In current vehicle (such as ship and tank) shooting games, when a vehicle is equipped with multiple weapons in different directions, players typically switch between them by clicking a specific weapon switch button. However, in intense real-time battles, players need to move and fire simultaneously, and manually switching weapons significantly increases the workload, leading to inefficiency. Summary of the Invention
[0003] The purpose of this disclosure is to provide an interactive control method, device, and electronic device in games to improve the convenience of switching weapons and enhance the player's gaming experience.
[0004] In a first aspect, this disclosure provides an interactive control method for a game, which provides a graphical user interface through a terminal device. The graphical user interface displays at least a portion of the game scene, which includes a first virtual object and a virtual vehicle controlled by the terminal device. The virtual vehicle is configured with multiple virtual weapon slots. The method includes: in response to a selection operation on the first virtual object, determining the first virtual object as an attack target; in response to an attack command, determining the first virtual weapon slot among the multiple virtual weapon slots as the current weapon slot of the virtual vehicle based on the relative position between the attack target and the virtual vehicle, and controlling the virtual weapon corresponding to the first virtual weapon slot to attack the attack target.
[0005] Secondly, this disclosure provides an interactive control device for a game, which provides a graphical user interface through a terminal device. The graphical user interface displays at least a portion of the game scene, which includes a first virtual object and a virtual vehicle controlled by the terminal device. The virtual vehicle is configured with multiple virtual weapon slots. The device includes: an object determination module, used to determine the first virtual object as an attack target in response to a selection operation on the first virtual object; and a weapon slot determination module, used to determine the first virtual weapon slot among the multiple virtual weapon slots as the current weapon slot of the virtual vehicle based on the relative position between the attack target and the virtual vehicle in response to an attack command, and control the virtual weapon corresponding to the first virtual weapon slot to attack the attack target.
[0006] Thirdly, this disclosure provides an electronic device including a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the interactive control method in the above-mentioned game.
[0007] Fourthly, this disclosure provides a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement the interactive control method in the aforementioned game.
[0008] The embodiments disclosed herein bring the following beneficial effects:
[0009] This disclosure provides an interactive control method, device, and electronic device for games. First, in response to a selection operation on a first virtual object, the first virtual object is identified as the attack target. Then, in response to an attack command, based on the relative position between the attack target and a virtual vehicle, a first virtual weapon slot from multiple virtual weapon slots is determined as the current weapon slot of the virtual vehicle, and the virtual weapon corresponding to the first virtual weapon slot attacks the attack target. In this method, the virtual weapon slot corresponding to the current weapon slot of the virtual vehicle is automatically determined based on the relative position between the currently selected attack target and the virtual vehicle, without requiring manual selection by the player. This reduces the switching time and complexity of virtual weapon slots, facilitating rapid switching of virtual weapons during intense game battles and enhancing the player's gaming experience.
[0010] Other features and advantages of this disclosure will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.
[0011] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the specific embodiments of this disclosure or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0013] Figure 1 A flowchart of an interactive control method in a game provided as an embodiment of this disclosure; Figure 2 This is a schematic diagram illustrating the generation of multiple sector regions by a virtual vehicle according to an embodiment of the present disclosure; Figure 3 A schematic diagram illustrating the determination of the current weapon position according to an embodiment of this disclosure; Figure 4 A schematic diagram illustrating a boundary marker provided in an embodiment of this disclosure; Figure 5 A schematic diagram of a weapon icon provided for an embodiment of this disclosure; Figure 6 A schematic diagram of a switching trend indicator provided in an embodiment of this disclosure; Figure 7 A schematic diagram illustrating another switching trend indicator provided in an embodiment of this disclosure; Figure 8 This is a schematic diagram illustrating a weapon switching indicator provided in an embodiment of the present disclosure; Figure 9 A schematic diagram of the structure of an interactive control device in a game provided in an embodiment of this disclosure; Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0014] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0015] Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely to illustrate selected embodiments of the disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0016] In the relevant technical solutions, players can adjust their viewing direction, and after adjusting the viewing direction to a certain range, the virtual weapon slot in the virtual vehicle will automatically switch. However, this method is prone to accidental activation of the virtual weapon slot switching process when players are adjusting their viewing direction or are engaged in intense combat based on their current weapon slot. This can lead to interruptions in the player's current operation or visual disorientation, requiring the player to readjust their viewing direction to switch back to the original virtual weapon slot to continue fighting. This not only affects the player's operational efficiency and the continuity of their actions but also impacts the player's gaming experience, causing user dissatisfaction and ultimately hindering the game product's stickiness with users.
[0017] In view of the above problems, this disclosure provides an interactive control method, device and electronic device in games, which can be applied to weapon switching and scene determination in game battles.
[0018] In one embodiment of this disclosure, the interactive control method in a game can run on a local terminal device or a server. When the interactive control method in a game runs on a server, the method can be implemented and executed based on a cloud interactive system, wherein the cloud interactive system includes a server and a client device.
[0019] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separated. The storage and execution of interactive control methods in the game are completed on the cloud gaming server. The client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, the information processing is performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses the game screen and other data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.
[0020] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), i.e., conventionally by downloading, installing, and running the game program via an electronic device. The local terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player via holographic projection. For example, the local terminal device can include a display screen for displaying the GUI, which includes game screens, and a processor for running the game, generating the GUI, and controlling the display of the GUI on the display screen.
[0021] In one possible implementation, this disclosure provides an interactive control method for games, providing a graphical user interface (GUI) through a terminal device. This terminal device can be a local terminal device as mentioned above, or a client device in the aforementioned cloud interactive system. For example, the terminal device can be a mobile phone, tablet computer, or personal computer. The GUI displays at least a portion of the game scene, which includes a first virtual object and a virtual vehicle controlled by a garlic-growing device.
[0022] Virtual vehicles are interactive, non-physical transportation tools driven by a game engine. Their existence relies entirely on program simulation and real-time calculation to enhance players' freedom of movement, tactical choices, and immersive experience in the virtual world. They are not real-world mechanical devices, but rather digital interactive objects constructed through a physics engine, network synchronization mechanisms, artificial intelligence behavior trees, and resource rendering systems. Virtual vehicles offer multiple control positions / roles, allowing players to experience unique operational fun and strategic depth through different control roles. In one embodiment, the specific type of virtual vehicle can be determined based on the application scenario, such as virtual vehicles in land scenarios (e.g., tanks, jeeps, armored vehicles), virtual vehicles in water scenarios (e.g., boats, speedboats), and virtual vehicles in air scenarios (e.g., helicopters, fighter jets, aircraft).
[0023] In one type of game, players can participate in combat by controlling virtual vehicles provided in the game environment, such as ships and tanks. These virtual vehicles typically offer multiple control positions / roles, allowing players to experience different operating perspectives and control methods from different positions, thus achieving all-around combat. Virtual vehicles are equipped with multiple virtual weapon slots. Taking a ship as an example, assuming it has four virtual weapon slots (also called control positions or operating roles): bow, stern, port, and starboard. Players can switch between different virtual weapon slots to experience different operating perspectives and engage targets in different locations. Taking a tank as another example, it typically has three virtual weapon slots: driver, gunner, and commander. The driver is responsible for controlling the vehicle's movement, steering, and speed; the gunner controls the weapon systems for attack or defense; and the commander is responsible for tactical command, skill activation, system management, and improving teamwork.
[0024] like Figure 1 As shown, the interactive control method in the above game includes the following specific steps: Step S102: In response to the selection operation of the first virtual object, the first virtual object is identified as the attack target.
[0025] In practical implementation, the aforementioned first virtual object can be a game character, virtual vehicle, virtual monster, or virtual building in the game scene. The selection operation for the first virtual object can be clicking, double-clicking, or long-pressing the first virtual object. After selecting the first virtual object, it can be designated as the attack target of the virtual vehicle, so that the virtual vehicle can subsequently attack the target.
[0026] Optionally, the game scene may include one or more virtual objects, and the first virtual object mentioned above can be any virtual object in the game scene.
[0027] Step S104: In response to the attack command, based on the relative position between the attack target and the virtual vehicle, the first virtual weapon position among multiple virtual weapon positions is determined as the current weapon position of the virtual vehicle, and the virtual weapon corresponding to the first virtual weapon position is controlled to attack the attack target.
[0028] After identifying the first virtual object as the target of attack, the player triggers an attack command. Based on the relative position between the target and the virtual vehicle, the first virtual weapon slot is automatically determined from multiple virtual weapon slots. This first virtual weapon slot is then set as the current weapon slot for the virtual vehicle, and the player controls the virtual vehicle to use the virtual weapon corresponding to the first virtual weapon slot to attack the target.
[0029] In practical implementation, the aforementioned first virtual weapon slot is the virtual weapon slot among multiple virtual weapon slots that matches the relative position between the attack target and the virtual vehicle. Different virtual weapon slots correspond to different relative positions between the attack target and the virtual vehicle. Furthermore, when the relative positions between the attack target and the virtual vehicle are different, the virtual weapon slot corresponding to the current weapon slot of the virtual vehicle may be the same or different.
[0030] In one optional embodiment, the virtual weapons provided in different virtual weapon slots can achieve the same attack effect. For example, the bow, stern, port, and starboard sides of a virtual ship can all provide cannons, all capable of bombarding enemy characters. Alternatively, the virtual weapons provided in different virtual weapon slots can achieve different attack effects. For example, a cannon can be provided at the bow, a crossbow at the port side, and a machine gun at the starboard side. This enhances the game's richness, facilitates strategic gameplay, and increases the game's enjoyment.
[0031] This disclosure provides an interactive control method in a game where the virtual weapon slot corresponding to the current weapon slot of a virtual vehicle is automatically determined based on the relative position between the currently selected attack target and the virtual vehicle, without requiring the player to manually switch and select it. This method reduces the switching time and complexity of virtual weapon slots, helps to quickly switch virtual weapons in intense game battles, and enhances the player's gaming experience.
[0032] The following examples describe the weapon position switching method.
[0033] Different virtual weapon slots can be configured in different locations within a virtual vehicle, each with a different effective angular range. For example, when the virtual vehicle is a ship, its multiple virtual weapon slots could be gun positions located at the bow, stern, port, and starboard sides, respectively. These guns would be used to control the ship's cannons to attack enemies appearing in front, behind, to the left, and to the right of the ship. Alternatively, different virtual weapon slots could be configured within the same area, but each would have a different effective angular range, allowing players to switch between virtual weapon slots for omnidirectional combat.
[0034] In one optional embodiment of this disclosure, the virtual weapon corresponding to each virtual weapon slot can be a weapon item directly provided by a virtual vehicle at each virtual weapon slot, so that the player can directly control the weapon item provided at each virtual weapon slot to perform corresponding attack actions. Alternatively, the virtual weapon can be a virtual weapon carried by a controlled virtual character assigned by the player to that virtual weapon slot.
[0035] In this context, a controlled virtual character is a virtual character controlled by the player through a terminal device. The player can control the controlled virtual character to drive or manipulate virtual vehicles or virtual weapons corresponding to virtual weapon slots provided in the game scene to perform corresponding game actions. For example, assuming the virtual vehicle is a ship / vessel in the game scene, the player can control the ship / vessel to move forward and turn at sea, or manipulate the virtual weapons corresponding to the virtual weapon slots to release skills and participate in combat.
[0036] For example, in the case where a virtual weapon is a weapon carried by a controlled virtual character assigned by the player to that virtual weapon slot, the multiple virtual weapon slots configured on the virtual vehicle can be displayed in the form of slots so that the player can intuitively see which position can be used to assign a virtual character carrying the weapon to participate in the battle.
[0037] Specifically, multiple virtual weapon positions are configured with different angular effective ranges; multiple virtual weapons are located at different positions on the virtual vehicle, and the angular effective range corresponding to the virtual weapon position is determined based on the relative positional relationship between the installation position of the corresponding virtual weapon position and the orientation of the virtual vehicle.
[0038] In practical implementation, for each virtual weapon position among multiple virtual weapon positions, the effective angle range of the virtual weapon is determined according to the relative positional relationship between the installation position of the virtual weapon position and the orientation of the virtual vehicle. Since the relative positional relationship between the installation position of different virtual weapon positions and the orientation of the virtual vehicle is different, the effective angle range of different virtual weapon positions is different.
[0039] In practical applications, using the orientation of the virtual vehicle as a reference, the effective angle range of each virtual weapon position can be determined based on its installation location on the virtual vehicle. In one specific embodiment, the effective angle range of each virtual weapon position can be determined based on its installation location on the virtual vehicle, and then, using the orientation of the virtual vehicle as a reference, the effective angle range of each virtual weapon position can be determined based on its corresponding effective angle range. For example, a virtual vehicle is configured with four virtual weapon slots, each with an effective angle range of 90 degrees. The virtual vehicle's orientation is set to 0 degrees. The four virtual weapon slots are positioned above, below, to the left, and to the right of the virtual vehicle. Therefore, the effective angle range for the virtual weapon slot above the virtual vehicle is [-45 degrees, 45 degrees], for the virtual weapon slot to the left is [45 degrees, 135 degrees], for the virtual weapon slot to the right is [-45 degrees, -135 degrees], and for the virtual weapon slot below the virtual vehicle is [-135 degrees, -180 degrees] and [135 degrees, 180 degrees], respectively. Here, -180 degrees and 180 degrees are the opposite directions of the virtual vehicle's orientation.
[0040] In another optional embodiment, multiple sector-shaped regions can be generated on a designated plane of the virtual vehicle, with the center of the virtual vehicle as the center. The installation positions of multiple virtual weapon positions on the virtual vehicle are located within different sector-shaped regions. Using the orientation direction of the virtual vehicle as a reference, the vehicle rotates around the center in multiple sector-shaped regions in a preset direction. The effective angle range corresponding to each of the multiple sector-shaped regions is determined based on the rotation angle. The preset direction is either clockwise or counterclockwise. For each virtual weapon position, the effective angle range corresponding to the sector-shaped region where the virtual weapon position is located is determined as the effective angle range corresponding to the virtual weapon position.
[0041] The specified plane can be the plane in which the virtual vehicle is oriented. For example, the specified plane can be the plane in which the XZ axis is located or the plane in which the YZ axis is located in a rectangular coordinate system.
[0042] like Figure 2 The diagram shown is a schematic representation of a virtual vehicle generating multiple sector regions according to an embodiment of this disclosure. Figure 2 The virtual vehicle in the game is a virtual ship. With the center of the virtual ship as the center, four fan-shaped areas are generated on the designated plane of the virtual vehicle through two solid lines with arrows. Each of these four fan-shaped areas is equipped with a virtual weapon position: one bow gun position (i.e., the bow mentioned above), two side gun positions (i.e., the port and starboard positions mentioned above), and one stern gun position (i.e., the stern position mentioned above). Figure 2The dotted lines with arrows indicate the virtual ship's heading direction. This heading direction can be set to 0 degrees. Starting from this heading direction, rotating clockwise around the center back to the virtual ship's heading direction yields a 360-degree effective angle range. This results in four sector-shaped areas with corresponding effective angle ranges: specifically, the sector corresponding to the bow gun position has effective angle ranges from 0 to 22.5 degrees and from 337.5 to 360 degrees; the sector corresponding to the starboard gun position has effective angle ranges from 22.5 to 157.5 degrees; the sector corresponding to the stern gun position has effective angle ranges from 157.5 to 202.5 degrees; and the sector corresponding to the port gun position has effective angle ranges from 202.5 to 337.5 degrees.
[0043] Based on the above description, the specific process of determining the first virtual weapon position among multiple virtual weapon positions as the current weapon position of the virtual vehicle according to the relative position between the attack target and the virtual vehicle can be achieved through the following steps 10-12: Step 10: Determine the orientation of the virtual vehicle and the orientation of the target relative to the virtual vehicle.
[0044] In practice, the orientation of the attack target relative to the virtual vehicle is determined by the relative position of the attack target and the virtual vehicle. For example, if the attack target is located directly to the left of the virtual vehicle, the orientation of the attack target relative to the virtual vehicle is due east; if the attack target is located directly to the right of the virtual vehicle, the orientation of the attack target relative to the virtual vehicle is due west, and so on.
[0045] In one specific embodiment, the process of determining the orientation of the attack target relative to the virtual vehicle may include: determining the orientation of the attack target relative to the virtual vehicle as the direction of the line connecting the center of the virtual vehicle and the attack target. This method can accurately determine the orientation of the attack target relative to the virtual vehicle.
[0046] Step 11: Determine the target angle of the orientation and azimuth on the specified plane of the virtual vehicle.
[0047] In practical implementation, since the effective range of the angle corresponding to the virtual weapon position is determined on the specified plane of the virtual vehicle, in order to ensure the consistency of subsequent calculations, it is necessary to determine the angle between the orientation direction and the azimuth direction on the specified plane of the virtual vehicle and define this angle as the target angle.
[0048] Step 12: From the angle effective ranges corresponding to multiple virtual weapon positions, determine the first angle effective range to which the target angle belongs, and determine the first virtual weapon position corresponding to the first angle effective range as the current weapon position of the virtual vehicle.
[0049] In practical implementation, after obtaining the target angle, it is necessary to determine which virtual weapon position's angle effective range the target angle falls within, and then determine the angle effective range corresponding to the virtual weapon position where the target angle is located as the first angle effective range. Finally, the first virtual weapon position corresponding to the first angle effective range is determined as the current weapon position of the virtual vehicle.
[0050] like Figure 3 The diagram shown is a schematic representation of determining the current weapon position according to an embodiment of this disclosure. Figure 3 The ships in the image are virtual vehicles, and the squares represent the targets of attack. Figure 3 It can be seen that the target angle indicated by the line connecting the center of the ship and the target is within the effective range of the angle corresponding to the port side gun position of the ship. At this time, the port side gun position is determined as the ship's current weapon position.
[0051] The following examples describe the switching method for the virtual weapon slot corresponding to the current weapon slot.
[0052] Specifically, in response to a movement control command, the virtual vehicle is controlled to move within the game scene; during the movement of the virtual vehicle, in response to the relative position between the attack target and the virtual vehicle satisfying a first preset condition, the second virtual weapon position among multiple virtual weapon positions is determined as the current weapon position of the virtual vehicle.
[0053] The aforementioned movement control commands are generated by triggering movement controls in the graphical user interface, or by triggering a movement joystick in the game. In one specific embodiment, movement controls are displayed in the graphical user interface. Players control virtual vehicles to move within the game scene by sliding their actions on the movement controls. The direction of movement of the virtual vehicle matches the direction of the sliding action, and the distance of movement of the virtual vehicle matches the distance of the sliding action.
[0054] In practical applications, movement control commands can be used to control virtual vehicles to move in any direction or distance within the game scene. For example, movement control commands can be used to control virtual vehicles to rotate in various directions or to move them a preset distance in various directions.
[0055] During the movement of the virtual vehicle, if the relative position between the attack target and the virtual vehicle meets a first preset condition, then the second virtual weapon position among multiple virtual weapon positions is determined as the current weapon position of the virtual vehicle. This first preset condition may be that the relative position between the attack target and the virtual vehicle meets the switching condition corresponding to the second virtual weapon position. This switching condition may be that the attack target and the second virtual weapon position configured on the virtual vehicle are closest in distance or have the closest orientation, etc.
[0056] Specifically, the first preset condition includes: the orientation of the virtual vehicle and the target angle of the attack object relative to the orientation of the virtual vehicle on the designated plane of the virtual vehicle are within the effective range of the angle corresponding to the second virtual weapon position.
[0057] Furthermore, if the relative position between the attack target and the virtual vehicle changes during the movement of the virtual vehicle, but the target angle between the orientation of the virtual vehicle and the orientation of the attack target relative to the virtual vehicle on the designated plane of the virtual vehicle is still within the effective range of the angle corresponding to the first virtual weapon position, then it is not necessary to switch the current weapon position of the virtual vehicle.
[0058] The following examples are used to describe the icons displayed in a graphical user interface.
[0059] When the current weapon position of the virtual vehicle is determined, the effective range of the target angle corresponding to the current weapon position of the virtual vehicle is obtained, and the boundary marker used to indicate the effective range of the target angle is displayed in the graphical user interface; in response to a change in the relative position between the attack target and the virtual vehicle, the display position of the boundary marker in the graphical user interface is updated; in response to the position of the boundary marker in the graphical user interface satisfying a second preset condition, the second virtual weapon position of the virtual vehicle is switched to the current weapon position.
[0060] In specific implementation, when the current weapon position of the virtual vehicle is the first virtual weapon position, the effective range of the angle corresponding to the first virtual weapon position is determined as the effective range of the target angle corresponding to the current weapon position; when the current weapon position of the virtual vehicle is the second virtual weapon position, the effective range of the angle corresponding to the second virtual weapon position is determined as the effective range of the target angle corresponding to the current weapon position.
[0061] The graphical user interface displays a boundary marker indicating the effective range of the target angle corresponding to the current weapon position. This boundary marker marks the boundary position of the effective range of the target angle.
[0062] It should be noted that the different angular effective ranges configured for different virtual weapon slots convert the effective attack range of the virtual weapon corresponding to the virtual weapon slot in the 3D virtual scene into the angular effective range in the 2D plane where the graphical user interface is located. This allows the boundary markers indicating the angular effective range to be visualized in the graphical user interface. Therefore, the boundary markers displayed on the graphical user interface help players understand the firing range / attack range of the virtual weapon corresponding to the current weapon slot.
[0063] The display position of the boundary marker in the graphical user interface changes according to the relative position between the attack target and the virtual vehicle. If the position of the boundary marker in the graphical user interface meets a second preset condition, the control switches the second virtual weapon position of the virtual vehicle to the current weapon position. The second preset condition may be that the position of the boundary marker coincides with the virtual boundary line of the angle effective range corresponding to the second virtual weapon position, or that the position of the boundary marker reaches a specified position or coincides with other markers, etc.
[0064] The aforementioned boundary markers are virtual boundary lines. Therefore, the boundary markers can be displayed as lines in the graphical user interface. It is understood that the boundary lines can be of any form or color; for example, they can be dashed or solid lines. Preferably, to enhance the boundary line's highlighting function, the color of the boundary lines needs to be set to differentiate them from the colors of the virtual scene displayed in the graphical user interface.
[0065] Optionally, the display format of the boundary line can adopt the system default format, or the player can choose or edit the candidate formats provided by the system according to their own habits and needs. The embodiments disclosed herein do not impose any special limitations on this.
[0066] By displaying boundary markers as lines in the above manner, compared to other display methods, the interface avoids excessive complexity, reduces the impact on players' view of the current game, and still serves as a warning. Furthermore, using simple lines to represent the complex 3D firing range of each virtual weapon slot is more intuitive and easier to understand. In addition, simple lines reduce system performance consumption, thereby improving system performance and ensuring real-time feedback capabilities.
[0067] In one optional embodiment of this disclosure, based on the boundary marker being a boundary line, the aforementioned display of the boundary marker on the graphical user interface to indicate the effective range of the target angle may specifically include: displaying a vertical virtual boundary line indicating the effective range of the target angle at the target boundary position in the graphical user interface. The target boundary position is determined by a combination of a first display position in the vertical direction and a second display position in the horizontal direction of the graphical user interface. The first display position represents the center position of the interface in the vertical direction, and the second display position adjusts according to changes in the relative position of the attack target and the virtual vehicle.
[0068] For example, to accurately indicate to the player the effective range of the target angle of the current weapon position, the boundary marker can be a vertical virtual boundary line. Furthermore, in the vertical direction (e.g., Y-coordinate), the virtual boundary line is always displayed in the center of the interface, while in the horizontal direction (e.g., X-coordinate), the display position of the virtual boundary line will adjust according to the relative position of the attack target and the virtual vehicle.
[0069] The following will combine Figure 4 The display location and format of boundary markers are illustrated by example. (Refer to...) Figure 4 The diagram shown is a schematic representation of a boundary marker provided in an embodiment of this disclosure. Figure 4 A graphical user interface (GUI) is demonstrated, displaying a virtual scene based on the current game viewpoint. The GUI's coordinate system uses the horizontal axis as the horizontal direction and the vertical axis as the vertical direction. When displaying boundary markers indicating the effective range of the target angle on the GUI, the virtual boundary line is always positioned in the center of the interface, determined by the vertical direction. Since the boundary markers are vertical lines, the virtual boundary line 302 occupies the central area 301 of the interface vertically. Horizontally, it adjusts according to the relative position between the target and the virtual vehicle, with the adjustment range being the x-coordinate of the entire screen. In other words, the virtual boundary line 302 can be located anywhere within the central area 301 of the interface, specifically determined by the relative position between the target and the virtual vehicle and the viewpoint boundary of the effective range of the target angle corresponding to the current weapon position.
[0070] In this approach, regardless of how the player controls the virtual vehicle within the scene using movement control commands, the displayed vertical virtual boundary line remains fixed at the center height of the graphical user interface. This prevents other operations from affecting the boundary marker's display position, facilitating the display of the attack range of key virtual weapons. Furthermore, by adjusting the boundary marker's horizontal position within the graphical user interface in real-time, the warning effect for players about to trigger virtual weapon switching operations can be further enhanced, improving the smoothness of player actions.
[0071] Furthermore, in order to address the technical problems of unclear information transmission when switching virtual weapon positions in related technical solutions, which prevent players from knowing the switched virtual weapon position and thus affect the continuity of player operation, and make it difficult for players to anticipate the operating environment after the switch and thus make it difficult to make decisions in advance, the embodiments of this disclosure can visualize the switched virtual weapon position during the movement of the virtual vehicle, so that players can see in advance the specific identity or job type of the next virtual weapon position to be switched to, thereby achieving the technical effect of reducing the cognitive load of players.
[0072] In an optional embodiment, after displaying a boundary marker in the graphical user interface to indicate the effective range of the target angle, in response to the relative position of the attack target and the virtual vehicle changing according to a preset trend, the next virtual weapon position adjacent to the current weapon position in the preset trend is determined from a plurality of virtual weapon positions, and the position icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position is displayed in the graphical user interface.
[0073] The preset trend represents the changing trend of the relative position between the attack target and the virtual vehicle. For example, the preset trend could be a clockwise or counterclockwise change, which corresponds to a rightward or leftward change on the plane of the graphical user interface. It should be noted that the position of the attack target in the game scene usually does not change. Players can change the relative position between the attack target and the virtual vehicle by controlling the movement of the virtual vehicle. Therefore, the aforementioned changing trend of the relative position between the attack target and the virtual vehicle can be understood as the changing trend of the virtual vehicle's movement. This changing trend could be the virtual vehicle rotating clockwise or counterclockwise. Furthermore, the changing trend of the relative position between the attack target and the virtual vehicle can also be understood as the changing trend of the target angle between the virtual vehicle's orientation and the attack target's orientation relative to the virtual vehicle on a specified plane of the virtual vehicle.
[0074] For example, since the different angular effective ranges configured for each virtual weapon slot, when converted to a three-dimensional spatial coordinate system, represent the effective attack angle range of the corresponding virtual weapon, the player can adjust the orientation of the currently used virtual weapon within its effective attack angle range by controlling the relative position of the attack target and the virtual vehicle to change angles according to a preset trend. This is then reflected in the graphical user interface in real time as the change in the relative distance between the second position of the control boundary marker on the graphical user interface and the first position of the current game view's crosshair.
[0075] When a player changes the relative position of the attack target and the virtual vehicle by controlling the movement of the virtual vehicle, and the relative distance between the second position of the boundary marker on the graphical user interface and the first position of the current game view's crosshair is less than a distance threshold, a warning message can be displayed to enhance the visual reminder to the player since the player is about to switch virtual weapon positions. This warning message also displays the location icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position, reminding the player of the specific identity or role type of the next virtual weapon position they are about to switch to, so that the player can make the corresponding game decision, i.e., whether to switch the current virtual weapon position.
[0076] The distance threshold shown in the above embodiments can be a fixed value pre-configured by the system, or it can be dynamically determined based on the currently controlled virtual vehicle and the player's operation method.
[0077] Displaying the location icon of the next virtual weapon slot and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon slot on the graphical user interface, in one optional embodiment of this disclosure, may specifically include: displaying the location icon of the next virtual weapon slot and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon slot on the first side of the boundary marker.
[0078] The first side corresponds to the direction of the current game view's change. For example, if the current game view changes clockwise, the corresponding first side is the right side; conversely, if the current game view changes counterclockwise, the corresponding first side is the left side.
[0079] For example, the direction to be switched can be shown by the display position of the next virtual weapon slot's location icon and / or the display position of the weapon icon of the corresponding virtual weapon in the next virtual weapon slot.
[0080] Next, we will clearly express the identity or job type of different virtual weapon slots by displaying weapon icons, and take crossbows, cannon barrels, and machine guns as examples to illustrate the relationship between weapon icons and the positions of each virtual weapon. Figure 5 The above embodiments will be described.
[0081] like Figure 5 The image shown is a schematic diagram of a weapon icon provided in an embodiment of this disclosure. Figure 5 The ships in the game are virtual vehicles, and the square icons connected to these virtual vehicles are the targets of attack. The vertical dotted lines displayed to the right of the ships are boundary markers, and the gun icons displayed to the right of these boundary markers are the weapon icons for the virtual weapons in the next virtual weapon slot.
[0082] Furthermore, in an optional embodiment of this disclosure, in addition to displaying the position icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position on the first side of the boundary marker, a switching trend indicator may also be displayed between the boundary marker and the position icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position, and the switching trend indicator points to the position icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position.
[0083] The switching trend indicator represents the switching trend between virtual weapon slots. For example... Figure 6The diagram shown is a schematic of a switching trend indicator provided in an embodiment of this disclosure. When the relative position of the attack target and the virtual vehicle changes in a clockwise direction toward the boundary angle indicated by the boundary indicator, the weapon icon of the virtual weapon corresponding to the next virtual weapon position is displayed on the right side of the boundary indicator, and an arrow pointing in a clockwise direction is displayed between the weapon icon and the boundary indicator. This arrow is the switching trend indicator.
[0084] like Figure 7 The diagram shown is another schematic diagram of a switching trend indicator provided in an embodiment of this disclosure. When the relative position of the attack target and the virtual vehicle changes in a counterclockwise direction toward the boundary angle indicated by the boundary indicator, the weapon icon of the virtual weapon corresponding to the next virtual weapon position is displayed on the right side of the boundary indicator, and an arrow pointing in a clockwise direction is displayed between the weapon icon and the boundary indicator. This arrow is the switching trend indicator.
[0085] The switching trend indicators shown in the above embodiments can intuitively display the specific direction and job type icon that will trigger the switching when the relative position of the attack target and the virtual vehicle continues to change (which can also be understood as continuing to move the virtual vehicle). This reduces the cognitive load on players, eliminates the problem of inconsistent player operation caused by the unknown in traditional technical solutions, and thus improves the player's operating experience.
[0086] In the above embodiments, by displaying the location icon of the next virtual weapon slot and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon slot on the graphical user interface, or by displaying warning information in combination with the switching trend indicator, players can make corresponding decisions based on the warning information, i.e., whether to switch the virtual weapon slot.
[0087] In one alternative embodiment, after the location icon of the next virtual weapon slot and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon slot are displayed on the graphical user interface, if the player chooses not to trigger the switching of the virtual weapon slot, the player can control the relative position of the attack target and the virtual vehicle to change in the opposite direction.
[0088] In an optional embodiment, a weapon switching indicator is displayed in the graphical user interface. This indicator is used to indicate the current virtual weapon slot for a virtual vehicle among multiple virtual weapon slots. The weapon switching indicator can be displayed near the virtual vehicle, such as to its left or right. This method helps players understand which virtual weapon slot is currently occupied by the virtual vehicle and what virtual weapon is being used.
[0089] Furthermore, the aforementioned weapon switching identifier displays multiple sub-identifiers, each corresponding to a multiple virtual weapon position, and the positional relationship of the multiple sub-identifiers on the weapon switching identifier matches the positional relationship of the multiple virtual weapon positions on the virtual vehicle; based on this, in response to determining the first virtual weapon position among the multiple virtual weapon positions as the current weapon position of the virtual vehicle, the sub-identifier corresponding to the first virtual weapon position in the weapon switching identifier is adjusted to a selected state; wherein, the other sub-identifiers in the weapon switching identifier, except for the sub-identifier corresponding to the first virtual weapon position, are displayed in a non-selected state.
[0090] In practice, the selected and unselected states correspond to different display styles. For example, the sub-identifier in the selected state is displayed in the first color or with an outline, while the sub-identifier in the unselected state is displayed in the second color, etc.
[0091] like Figure 8 The image shown is a schematic diagram illustrating a weapon switching indicator provided in an embodiment of this disclosure. Figure 8 The diamond-shaped icon displayed on the left side of the virtual ship is the weapon switching icon. This weapon switching icon contains four diamond-shaped sub-icons, and the position of each sub-icon within the weapon switching icon is relative to... Figure 2 The installation positions of the four virtual weapon slots on the virtual ship are one-to-one. That is, the upper sub-icon of the weapon switching icon corresponds to the bow gun position of the virtual ship, the lower sub-icon corresponds to the stern gun position, the left sub-icon corresponds to the port side gun position, and the right sub-icon corresponds to the starboard side gun position. Figure 8 The relative position of the attack target and the virtual ship will determine the left hull gun position of the virtual vehicle as the current weapon position, thereby adjusting the sub-identifier corresponding to the left hull gun position in the weapon switching identifier to the selected state, which is to change the sub-identifier from white to gray.
[0092] Corresponding to the above method embodiments, this disclosure also provides an interactive control device for a game, which provides a graphical user interface through a terminal device. This graphical user interface displays at least a portion of the game scene, including a first virtual object and a virtual vehicle controlled by the terminal device. The virtual vehicle is configured with multiple virtual weapon slots, such as... Figure 9 As shown, the device includes: The object determination module 60 is used to determine the first virtual object as the attack target in response to the selection operation of the first virtual object.
[0093] The weapon position determination module 61 is used to respond to an attack command, determine the first virtual weapon position among multiple virtual weapon positions as the current weapon position of the virtual vehicle based on the relative position between the attack target and the virtual vehicle, and control the virtual weapon position corresponding to the first virtual weapon position to attack the attack target.
[0094] The interactive control device in the aforementioned game allows the virtual weapon slot corresponding to the current weapon slot of the virtual vehicle to be automatically determined based on the relative position between the currently selected attack target and the virtual vehicle, without requiring the player to manually switch and select. This method reduces the switching time and complexity of the virtual weapon slot, helps to quickly switch virtual weapons in intense game battles, and enhances the player's gaming experience.
[0095] Furthermore, multiple virtual weapon positions are configured with different angular effective ranges; based on this, the aforementioned weapon position determination module 61 is used to: determine the orientation direction of the virtual vehicle, and determine the orientation direction of the attack target relative to the virtual vehicle; determine the target angle of the orientation direction and orientation direction on a specified plane of the virtual vehicle; determine the first angular effective range to which the target angle belongs from the angular effective ranges corresponding to the multiple virtual weapon positions, and determine the first virtual weapon position corresponding to the first angular effective range as the current weapon position of the virtual vehicle.
[0096] Furthermore, the aforementioned weapon position determination module 61 is also used to: determine the direction of the line connecting the center of the virtual vehicle and the target as the orientation of the target relative to the virtual vehicle.
[0097] Furthermore, the aforementioned device also includes a weapon position switching module, used to: control the virtual vehicle to move in the game scene in response to a movement control command; and during the movement of the virtual vehicle, in response to the relative position between the attack target and the virtual vehicle satisfying a first preset condition, control the selection of the second virtual weapon position among multiple virtual weapon positions as the current weapon position of the virtual vehicle.
[0098] Furthermore, the aforementioned first preset condition includes: the orientation of the virtual vehicle and the target angle of the attack object relative to the orientation of the virtual vehicle on the designated plane of the virtual vehicle are within the effective range of the angle corresponding to the second virtual weapon position.
[0099] Furthermore, the aforementioned virtual weapons are located at different positions on the virtual vehicle, and the effective range of the angle corresponding to the virtual weapon position is determined based on the relative positional relationship between the installation position of the corresponding virtual weapon position and the orientation of the virtual vehicle.
[0100] Furthermore, the aforementioned device also includes an identification display module, configured to: obtain the target angle effective range corresponding to the current weapon position of the virtual vehicle, and display a boundary marker in the graphical user interface to indicate the target angle effective range; in response to a change in the relative position between the attack target and the virtual vehicle, control the updating of the display position of the boundary marker in the graphical user interface; and in response to a second preset condition being met by the position of the boundary marker in the graphical user interface, control the switching of the second virtual weapon position of the virtual vehicle to the current weapon position.
[0101] Furthermore, the aforementioned identification display module is used to: display a vertical virtual boundary line at the target boundary position of the graphical user interface to indicate the effective range of the target angle; wherein, the vertical virtual boundary line is a boundary identifier; the target boundary position is determined by a combination of a first display position in the vertical direction and a second display position in the horizontal direction of the graphical user interface, the first display position representing the center position of the interface in the vertical direction, and the second display position adjusting as the relative position of the attack target and the virtual vehicle changes.
[0102] Furthermore, the aforementioned device also includes an icon display module, used to: after displaying a boundary marker in the graphical user interface to indicate the effective range of the target angle, in response to a change in the relative position of the attack target and the virtual vehicle according to a preset trend, determine the next virtual weapon position that is adjacent to the current weapon position in the preset trend from multiple virtual weapon positions, and display the position icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position in the graphical user interface.
[0103] Furthermore, the aforementioned device also includes a trend indicator module, used to: display a switching trend indicator between the boundary indicator and the position icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position, and the switching trend indicator points to the position icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position.
[0104] Furthermore, the aforementioned graphical user interface displays a weapon switching indicator, which is used to indicate the current virtual weapon slot among multiple virtual weapon slots that serve as virtual vehicles.
[0105] Furthermore, the weapon switching identifier displays multiple sub-identifiers, each corresponding to a multiple virtual weapon position, and the positional relationship of the multiple sub-identifiers on the weapon switching identifier matches the positional relationship of the multiple virtual weapon positions on the virtual vehicle. Based on this, the device further includes an identifier adjustment module, used to: in response to determining the first virtual weapon position among the multiple virtual weapon positions as the current weapon position of the virtual vehicle, adjust the sub-identifier corresponding to the first virtual weapon position in the weapon switching identifier to a selected state; wherein, the other sub-identifiers in the weapon switching identifier, except for the sub-identifier corresponding to the first virtual weapon position, are displayed in a non-selected state.
[0106] The interactive control device in the game provided in this disclosure has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.
[0107] This disclosure also provides an electronic device, such as... Figure 10 As shown, the electronic device includes a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor, which executes the machine-executable instructions to implement the interactive control method in the game described above.
[0108] Specifically, a graphical user interface is provided through a terminal device, which displays at least a portion of the game scene. The game scene includes a first virtual object and a virtual vehicle controlled by the terminal device. The virtual vehicle is configured with multiple virtual weapon slots. The interactive control method in the game includes: in response to a selection operation on the first virtual object, identifying the first virtual object as an attack target; in response to an attack command, determining the first virtual weapon slot among the multiple virtual weapon slots as the current weapon slot of the virtual vehicle based on the relative position between the attack target and the virtual vehicle, and controlling the virtual weapon slot corresponding to the first virtual weapon slot to attack the attack target.
[0109] The interactive control method in the aforementioned game allows the virtual weapon slot corresponding to the current weapon slot of the virtual vehicle to be automatically determined based on the relative position between the currently selected attack target and the virtual vehicle, without requiring the player to manually switch and select. This method reduces the switching time and complexity of the virtual weapon slot, helps to quickly switch virtual weapon slots during intense game battles, and enhances the player's gaming experience.
[0110] In an optional embodiment, multiple virtual weapon positions are configured with different angular effective ranges. Based on this, the step of determining the first virtual weapon position among multiple virtual weapon positions as the current weapon position of the virtual vehicle according to the relative position between the attack target and the virtual vehicle includes: determining the orientation direction of the virtual vehicle and determining the azimuth direction of the attack target relative to the virtual vehicle; determining the target angle of the orientation direction and the azimuth direction on a designated plane of the virtual vehicle; determining the first angular effective range to which the target angle belongs from the angular effective ranges corresponding to the multiple virtual weapon positions, and determining the first virtual weapon position corresponding to the first angular effective range as the current weapon position of the virtual vehicle.
[0111] In an optional embodiment, the step of determining the orientation of the attack target relative to the virtual vehicle includes: determining the orientation of the attack target relative to the virtual vehicle as the direction of the line connecting the center of the virtual vehicle and the attack target.
[0112] In an optional embodiment, the method further includes: in response to a movement control command, controlling a virtual vehicle to move within a game scene; during the movement of the virtual vehicle, in response to the relative position between the attack target and the virtual vehicle satisfying a first preset condition, controlling the determination of a second virtual weapon position among multiple virtual weapon positions as the current weapon position of the virtual vehicle.
[0113] In an optional embodiment, the first preset condition includes: the orientation direction of the virtual vehicle and the target angle of the attack target relative to the orientation direction of the virtual vehicle on a specified plane of the virtual vehicle are within the effective range of the angle corresponding to the second virtual weapon position.
[0114] In an optional embodiment, multiple virtual weapon positions are located at different positions on the virtual vehicle, and the effective range of the angle corresponding to the virtual weapon position is determined based on the relative positional relationship between the installation position of the corresponding virtual weapon position and the orientation of the virtual vehicle.
[0115] In an optional embodiment, the method further includes: obtaining the effective range of the target angle corresponding to the current weapon position of the virtual vehicle, and displaying a boundary marker in the graphical user interface to indicate the effective range of the target angle; in response to a change in the relative position between the attack target and the virtual vehicle, controlling the update of the display position of the boundary marker in the graphical user interface; and in response to the position of the boundary marker in the graphical user interface satisfying a second preset condition, controlling the switching of the second virtual weapon position of the virtual vehicle to the current weapon position.
[0116] In an optional embodiment, the step of displaying a boundary marker in the graphical user interface to indicate the effective range of the target angle includes: displaying a vertical virtual boundary line at the target boundary position of the graphical user interface to indicate the effective range of the target angle; wherein the vertical virtual boundary line is a boundary marker; the target boundary position is determined by a combination of a first display position in the vertical direction and a second display position in the horizontal direction of the graphical user interface, the first display position representing the center position of the interface in the vertical direction, and the second display position adjusting as the relative position of the attack target and the virtual vehicle changes.
[0117] In an optional embodiment, after the step of displaying a boundary marker in the graphical user interface to indicate the effective range of the target angle, the method further includes: in response to a change in the relative position of the attack target and the virtual vehicle according to a preset trend, determining the next virtual weapon position that is adjacent to the current weapon position in the preset trend from a plurality of virtual weapon positions, and displaying the position icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position on the graphical user interface.
[0118] In an optional embodiment, the method further includes: displaying a switching trend indicator between the boundary marker and the position icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position, and the switching trend indicator points to the position icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position.
[0119] In an optional embodiment, the graphical user interface displays a weapon switching indicator, which is used to indicate the virtual weapon slot that is the current weapon slot among multiple virtual weapon slots and serves as a virtual vehicle.
[0120] In an optional embodiment, the weapon switching identifier displays multiple sub-identifiers, each corresponding to a multiple virtual weapon position, and the positional relationship of the multiple sub-identifiers on the weapon switching identifier matches the positional relationship of the multiple virtual weapon positions on the virtual vehicle. Based on this, the method further includes: in response to determining the first virtual weapon position among the multiple virtual weapon positions as the current weapon position of the virtual vehicle, adjusting the sub-identifier corresponding to the first virtual weapon position in the weapon switching identifier to a selected state; wherein, the other sub-identifiers in the weapon switching identifier, except for the sub-identifier corresponding to the first virtual weapon position, are displayed in a non-selected state.
[0121] Furthermore, Figure 10 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 101, communication interface 103 and memory 100 connected via the bus 102.
[0122] The memory 100 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 10 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0123] Processor 101 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 101 or by instructions in software form. The processor 101 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 100, and processor 101 reads information from memory 100 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0124] This disclosure also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are invoked and executed by a processor, they cause the processor to implement the interactive control method in the game described above. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0125] Specifically, a graphical user interface is provided through a terminal device, which displays at least a portion of the game scene. The game scene includes a first virtual object and a virtual vehicle controlled by the terminal device. The virtual vehicle is configured with multiple virtual weapon slots. The interactive control method in the game includes: in response to a selection operation on the first virtual object, identifying the first virtual object as an attack target; in response to an attack command, determining the first virtual weapon slot among the multiple virtual weapon slots as the current weapon slot of the virtual vehicle based on the relative position between the attack target and the virtual vehicle, and controlling the virtual weapon slot corresponding to the first virtual weapon slot to attack the attack target.
[0126] The interactive control method in the aforementioned game allows the virtual weapon slot corresponding to the current weapon slot of the virtual vehicle to be automatically determined based on the relative position between the currently selected attack target and the virtual vehicle, without requiring the player to manually switch and select. This method reduces the switching time and complexity of the virtual weapon slot, helps to quickly switch virtual weapon slots during intense game battles, and enhances the player's gaming experience.
[0127] In an optional embodiment, multiple virtual weapon positions are configured with different angular effective ranges. Based on this, the step of determining the first virtual weapon position among multiple virtual weapon positions as the current weapon position of the virtual vehicle according to the relative position between the attack target and the virtual vehicle includes: determining the orientation direction of the virtual vehicle and determining the azimuth direction of the attack target relative to the virtual vehicle; determining the target angle of the orientation direction and the azimuth direction on a designated plane of the virtual vehicle; determining the first angular effective range to which the target angle belongs from the angular effective ranges corresponding to the multiple virtual weapon positions, and determining the first virtual weapon position corresponding to the first angular effective range as the current weapon position of the virtual vehicle.
[0128] In an optional embodiment, the step of determining the orientation of the attack target relative to the virtual vehicle includes: determining the orientation of the attack target relative to the virtual vehicle as the direction of the line connecting the center of the virtual vehicle and the attack target.
[0129] In an optional embodiment, the method further includes: in response to a movement control command, controlling a virtual vehicle to move within a game scene; during the movement of the virtual vehicle, in response to the relative position between the attack target and the virtual vehicle satisfying a first preset condition, controlling the determination of a second virtual weapon position among multiple virtual weapon positions as the current weapon position of the virtual vehicle.
[0130] In an optional embodiment, the first preset condition includes: the orientation direction of the virtual vehicle and the target angle of the attack target relative to the orientation direction of the virtual vehicle on a specified plane of the virtual vehicle are within the effective range of the angle corresponding to the second virtual weapon position.
[0131] In an optional embodiment, multiple virtual weapon positions are located at different positions on the virtual vehicle, and the effective range of the angle corresponding to the virtual weapon position is determined based on the relative positional relationship between the installation position of the corresponding virtual weapon position and the orientation of the virtual vehicle.
[0132] In an optional embodiment, the method further includes: obtaining the effective range of the target angle corresponding to the current weapon position of the virtual vehicle, and displaying a boundary marker in the graphical user interface to indicate the effective range of the target angle; in response to a change in the relative position between the attack target and the virtual vehicle, controlling the update of the display position of the boundary marker in the graphical user interface; and in response to the position of the boundary marker in the graphical user interface satisfying a second preset condition, controlling the switching of the second virtual weapon position of the virtual vehicle to the current weapon position.
[0133] In an optional embodiment, the step of displaying a boundary marker in the graphical user interface to indicate the effective range of the target angle includes: displaying a vertical virtual boundary line at the target boundary position of the graphical user interface to indicate the effective range of the target angle; wherein the vertical virtual boundary line is a boundary marker; the target boundary position is determined by a combination of a first display position in the vertical direction and a second display position in the horizontal direction of the graphical user interface, the first display position representing the center position of the interface in the vertical direction, and the second display position adjusting as the relative position of the attack target and the virtual vehicle changes.
[0134] In an optional embodiment, after the step of displaying a boundary marker in the graphical user interface to indicate the effective range of the target angle, the method further includes: in response to a change in the relative position of the attack target and the virtual vehicle according to a preset trend, determining the next virtual weapon position that is adjacent to the current weapon position in the preset trend from a plurality of virtual weapon positions, and displaying the position icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position on the graphical user interface.
[0135] In an optional embodiment, the method further includes: displaying a switching trend indicator between the boundary marker and the position icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position, and the switching trend indicator points to the position icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position.
[0136] In an optional embodiment, the graphical user interface displays a weapon switching indicator, which is used to indicate the virtual weapon slot that is the current weapon slot among multiple virtual weapon slots and serves as a virtual vehicle.
[0137] In an optional embodiment, the weapon switching identifier displays multiple sub-identifiers, each corresponding to a multiple virtual weapon position, and the positional relationship of the multiple sub-identifiers on the weapon switching identifier matches the positional relationship of the multiple virtual weapon positions on the virtual vehicle. Based on this, the method further includes: in response to determining the first virtual weapon position among the multiple virtual weapon positions as the current weapon position of the virtual vehicle, adjusting the sub-identifier corresponding to the first virtual weapon position in the weapon switching identifier to a selected state; wherein, the other sub-identifiers in the weapon switching identifier, except for the sub-identifier corresponding to the first virtual weapon position, are displayed in a non-selected state.
[0138] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0139] Furthermore, in the description of the embodiments of this disclosure, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this disclosure based on the specific circumstances.
[0140] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0141] In the description of this disclosure, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0142] Finally, it should be noted that the above embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. An interactive control method in a game, characterized in that, A graphical user interface is provided via a terminal device, the graphical user interface displaying at least a portion of the game scene, the game scene including a first virtual object and a virtual vehicle controlled by the terminal device, the virtual vehicle being configured with multiple virtual weapon slots, the method comprising: In response to a selection operation on the first virtual object, the first virtual object is identified as the target of the attack; In response to an attack command, based on the relative position between the attack target and the virtual vehicle, the first virtual weapon position among the plurality of virtual weapon positions is determined as the current weapon position of the virtual vehicle, and the virtual weapon corresponding to the first virtual weapon position is controlled to attack the attack target.
2. The method according to claim 1, characterized in that, The multiple virtual weapon positions are configured with different effective angle ranges; The step of determining the first virtual weapon slot among the plurality of virtual weapon slots as the current weapon slot of the virtual vehicle based on the relative position between the attack target and the virtual vehicle includes: Determine the orientation of the virtual vehicle and the orientation of the target relative to the virtual vehicle; Determine the target angle between the orientation direction and the azimuth direction on a specified plane of the virtual vehicle; From the angle effective ranges corresponding to the plurality of virtual weapon positions, determine the first angle effective range to which the target angle belongs, and determine the first virtual weapon position corresponding to the first angle effective range as the current weapon position of the virtual vehicle.
3. The method according to claim 2, characterized in that, The step of determining the orientation of the attack target relative to the virtual vehicle includes: The direction of the line connecting the center of the virtual vehicle and the target of attack is determined as the orientation of the target of attack relative to the virtual vehicle.
4. The method according to claim 2, characterized in that, The method further includes: In response to movement control commands, the virtual vehicle is controlled to move within the game scene; During the movement of the virtual vehicle, in response to the relative position between the attack target and the virtual vehicle satisfying a first preset condition, the control determines the second virtual weapon position among the plurality of virtual weapon positions as the current weapon position of the virtual vehicle.
5. The method according to claim 4, characterized in that, The first preset condition includes: the orientation of the virtual vehicle and the target angle of the attack target relative to the virtual vehicle on the designated plane of the virtual vehicle are within the effective range of the angle corresponding to the second virtual weapon position.
6. The method according to any one of claims 1-5, characterized in that, The multiple virtual weapons are located at different positions on the virtual vehicle, and the effective range of the angle corresponding to the virtual weapon position is determined based on the relative positional relationship between the installation position of the corresponding virtual weapon position and the orientation of the virtual vehicle.
7. The method according to claim 2, characterized in that, The method further includes: Obtain the effective range of the target angle corresponding to the current weapon position of the virtual vehicle, and display the boundary markers in the graphical user interface to indicate the effective range of the target angle; In response to a change in the relative position between the attack target and the virtual vehicle, the display position of the boundary marker in the graphical user interface is updated. In response to the boundary marker's position in the graphical user interface satisfying a second preset condition, the control switches the virtual vehicle's second virtual weapon position to the current weapon position.
8. The method according to claim 7, characterized in that, The step of displaying boundary markers in the graphical user interface to indicate the effective range of the target angle includes: A vertical virtual boundary line is displayed at the target boundary position in the graphical user interface to indicate the effective range of the target angle; wherein, the vertical virtual boundary line is the boundary identifier; the target boundary position is determined by a combination of a first display position in the vertical direction and a second display position in the horizontal direction of the graphical user interface, the first display position representing the center position of the interface in the vertical direction, and the second display position adjusting as the relative position of the attack target and the virtual vehicle changes.
9. The method according to claim 7, characterized in that, After the step of displaying a boundary marker in the graphical user interface to indicate the effective range of the target angle, the method further includes: In response to a change in the relative position of the attack target and the virtual vehicle according to a preset trend, the next virtual weapon position adjacent to the current weapon position on the preset trend is determined from the plurality of virtual weapon positions, and the position icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position are displayed on the graphical user interface.
10. The method according to claim 9, characterized in that, The method further includes: A switching trend indicator is displayed between the boundary marker and the position icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position, and the switching trend indicator points to the position icon of the next virtual weapon position and / or the weapon icon of the virtual weapon corresponding to the next virtual weapon position.
11. The method according to claim 1, characterized in that, The graphical user interface displays a weapon switching indicator, which is used to indicate the current virtual weapon slot that serves as the virtual vehicle among the plurality of virtual weapon slots.
12. The method according to claim 11, characterized in that, The weapon switching identifier displays multiple sub-identifiers, each sub-identifier corresponding to a multiple virtual weapon position, and the positional relationship of the multiple sub-identifiers on the weapon switching identifier matches the positional relationship of the multiple virtual weapon positions on the virtual vehicle; the method further includes: In response to determining the first virtual weapon slot among the plurality of virtual weapon slots as the current weapon slot of the virtual vehicle, the sub-identifier corresponding to the first virtual weapon slot in the weapon switching identifier is adjusted to a selected state; wherein, the other sub-identifiers in the weapon switching identifier other than the sub-identifier corresponding to the first virtual weapon slot are displayed in a non-selected state.
13. An interactive control device for a game, characterized in that, A graphical user interface is provided via a terminal device, the graphical user interface displaying at least a portion of the game scene, the game scene including a first virtual object and a virtual vehicle controlled by the terminal device, the virtual vehicle being configured with multiple virtual weapon slots, the device comprising: An object determination module is used to determine the first virtual object as an attack target in response to a selection operation on the first virtual object. The weapon position determination module is used to respond to an attack command, determine the first virtual weapon position among the plurality of virtual weapon positions as the current weapon position of the virtual vehicle based on the relative position between the attack target and the virtual vehicle, and control the virtual weapon corresponding to the first virtual weapon position to attack the attack target.
14. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the interactive control method in the game according to any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the interactive control method in the game as described in any one of claims 1 to 12.