Component control method, device and electronic equipment in game
Patent Information
- Application Number
- CN202410084565.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-19
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2044-01-19
AI Technical Summary
然而上述两种方式对玩家的即使反映能力的要求通常较弱,难以带给玩家刺激的游戏体验
[0009]The aforementioned component control method, device, and electronic device in a game, in response to a game start command, provides multiple component interaction positions in the game scene; determines at least one target component interaction position from the multiple component interaction positions, creates an interactive component at the target component interaction position, and controls and adjusts each interactive component to be in a visible and invisible state in turn at the corresponding target component interaction position; when the interactive component is in a visible state, in response to an interaction behavior between the target virtual character and the interactive component, controls and updates the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interactive component; in response to the second interaction attribute parameter of the first interactive component falling below the first parameter threshold, the first interactive component is deleted. In this method, players need to concentrate to find randomly appearing game components and hit them, bringing players a more exciting gaming experience.
Smart Images

Figure CN117942566B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of game technology, and more specifically, to a method, apparatus, and electronic device for controlling components in a game. Background Technology
[0002] In games, players typically control a virtual character to attack moving or stationary objects. These two gameplay styles test the player's skills differently. Against moving objects, the primary challenge is aiming ability. Against intricately designed objects, the challenge usually lies in the player's ability to select and combine attack skills. However, both of these methods generally place less emphasis on the player's immediate reaction time, making it difficult to provide a truly exciting gaming experience. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a component control method, device and electronic device in a game, so that players can concentrate on the game, discover randomly appearing game components, and hit them, bringing players a more exciting gaming experience.
[0004] In a first aspect, embodiments of the present invention provide a component control method in a game. A graphical user interface (GUI) is provided via a terminal device, displaying at least a portion of a game scene. The game scene contains at least one virtual character, which includes at least one controlled virtual character controlled by the terminal device. The virtual character has preset first interaction attribute parameters. The method includes: in response to a game start command, providing multiple component interaction positions in the game scene; determining at least one target component interaction position from the multiple component interaction positions; creating an interactive component at each target component interaction position; and controlling and adjusting the display parameters of each interactive component in the game scene according to specified rules, so that each interactive component displays in a corresponding... The target component is alternately in a visible and invisible state at its interactive position. The interactive component has a second interactive attribute parameter. When the interactive component is in a visible state, in response to an interaction between the target virtual character and the interactive component, the first interactive attribute parameter of the target virtual character and the second interactive attribute parameter of the interactive component are updated according to the interaction result of the interaction. The interaction is used to indicate that the first interactive attribute parameter is increased and the second interactive attribute parameter is decreased. The target virtual character is any virtual character from at least one virtual character. In response to the second interactive attribute parameter of the first interactive component being lower than the first parameter threshold, the first interactive component is deleted from the first interactive component's corresponding first interactive component interactive position.
[0005] Secondly, embodiments of the present invention provide a component control device in a game, which provides a graphical user interface through a terminal device, displays at least a portion of a game scene in the graphical user interface, the game scene has at least one virtual character, the at least one virtual character includes at least one controlled virtual character controlled by the terminal device, and the at least one virtual character has preset first interaction attribute parameters. The device includes: a component interaction position providing module, used to provide multiple component interaction positions in the game scene in response to a game start command; and an interaction component creation module, used to determine at least one target component interaction position from the multiple component interaction positions, create an interaction component at each target component interaction position, and control and adjust the display parameters of each interaction component in the game scene according to specified rules, so that each interaction component... The interactive components alternately appear in a visible and invisible state at their respective target component interaction positions. Each interactive component has a second interactive attribute parameter. An interaction module, when the interactive component is visible, responds to an interaction between the target virtual character and the interactive component, and updates the first interactive attribute parameter of the target virtual character and the second interactive attribute parameter of the interactive component based on the interaction result. The interaction behavior instructs the increase of the first interactive attribute parameter and the decrease of the second interactive attribute parameter. The target virtual character is any virtual character from at least one set of virtual characters. A component deletion module, responding to a first interactive component's second interactive attribute parameter falling below a first parameter threshold, deletes the first interactive component from its corresponding first component interaction position.
[0006] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the aforementioned component control method in the game.
[0007] Fourthly, embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the aforementioned component control method in the game.
[0008] The embodiments of the present invention bring the following beneficial effects:
[0009] The aforementioned component control method, device, and electronic device in a game, in response to a game start command, provides multiple component interaction positions in the game scene; determines at least one target component interaction position from the multiple component interaction positions, creates an interactive component at the target component interaction position, and controls and adjusts each interactive component to be in a visible and invisible state in turn at the corresponding target component interaction position; when the interactive component is in a visible state, in response to an interaction behavior between the target virtual character and the interactive component, controls and updates the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interactive component; in response to the second interaction attribute parameter of the first interactive component falling below the first parameter threshold, the first interactive component is deleted. In this method, players need to concentrate to find randomly appearing game components and hit them, bringing players a more exciting gaming experience.
[0010] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0011] To make the above-mentioned objects, features and advantages of the present invention 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 specific embodiments of the present invention or the technical solutions in 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 the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0013] Figure 1 A flowchart of a component control method in a game provided by an embodiment of the present invention;
[0014] Figure 2 A schematic diagram of a receiving component provided in an embodiment of the present invention;
[0015] Figure 3 A schematic diagram of a accommodating component and an interactive component provided in an embodiment of the present invention;
[0016] Figure 4 This is a schematic diagram of a parameter display area provided in an embodiment of the present invention;
[0017] Figure 5 A schematic diagram of a game scene provided in an embodiment of the present invention;
[0018] Figure 6 This is a schematic diagram of the structure of a component control device in a game, provided by an embodiment of the present invention;
[0019] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] In games, high-health monsters are typically included for players to control virtual characters to attack. Alternatively, multiple virtual characters from different factions may be organized to attack each other during a match. These methods usually test players' skill control and strategic character combinations, but they rarely provide a truly exciting gaming experience.
[0022] Based on this, embodiments of the present invention provide a component control method, device, and electronic device in games, which can be applied to various game scenarios.
[0023] In one embodiment of this invention, the component control method in a game can run on a local terminal device or a server. When the component control method in a game runs on a server, it can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0024] 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's execution and the game screen presentation are separated. The storage and execution of the game's component control methods are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. 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.
[0025] 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.
[0026] See Figure 1 First, this invention introduces a component control method in a game, which provides a graphical user interface through a terminal device. The terminal device can be either the aforementioned local terminal device or a client device in the aforementioned cloud interaction system. The graphical user interface displays at least a portion of the game scene, and the game scene includes at least one virtual character, which in turn includes a controlled virtual character controlled by the terminal device.
[0027] Virtual characters in a game scene have preset first interaction attribute parameters. The initial value of these first interaction attribute parameters is usually 0, but other values are also possible. When multiple game matches participated in by a virtual character are related, these first interaction attribute parameters can also be determined based on a specific interactive behavior generated by the virtual character during participation in other game matches. Specific settings can be configured according to requirements and are not limited here.
[0028] The method also includes the following steps:
[0029] Step S102: In response to the game start command, provide multiple component interaction locations in the game scene.
[0030] The game start command can be input by the player through a human-computer interaction device, such as a mouse, keyboard, or touchscreen, into the aforementioned terminal device. It can also be input by the player controlling other controlled virtual characters in the game scene through other terminal devices. Alternatively, it can be generated by the game system after determining that the number of controlled virtual characters in the game scene has reached a specified number, or that the preset start time of the game has been reached. The specific generation method can be configured according to requirements and will not be discussed here.
[0031] The interaction positions of the aforementioned components are typically pre-set. These can be pre-set by game developers or by players editing the current game scene; no restrictions are placed here. Component interaction positions can exist independently within the game scene, not bound to other game components, or they can be set on the surface or inside other game components. The specific settings can be configured according to requirements; no restrictions are placed here.
[0032] For example, when a player editing the current game scene wants to set the interaction positions of components, they can trigger the component interaction position selection mode through touch operations, and select several locations in the game scene to define these locations as component interaction positions. Players can also generate game components in the game scene that are bound to these interaction positions. These game components can have their own built-in interaction positions. Alternatively, players can select or input position parameters to set several positions on the surface or inside the game component; these positions are then defined as component interaction positions. When the player moves this game component within the game scene, the component interaction positions will also move with the game component.
[0033] Step S104: Determine at least one target component interaction position from multiple component interaction positions, create an interactive component at each target component interaction position, and control and adjust the display parameters of each interactive component in the game scene according to the specified rules so that each interactive component is in a visible and invisible state in turn at the corresponding target component interaction position. The interactive component has a second interactive attribute parameter.
[0034] The number of target component interaction locations can be preset or randomly generated; there is no restriction on this. During the game, several time points can be preset, and the number of target component interaction locations can be set for each of these time points, or the number of target component interaction locations can be determined based on a random algorithm at these time points.
[0035] The system can determine the target component interaction position from multiple component interaction positions according to set rules. For example, at the first moment of a game, if it is necessary to determine three target component interaction positions, the first three component interaction positions in the preset order of the multiple component interaction positions can be determined as the target component interaction positions. Alternatively, a preset random algorithm can be used to determine the required number of target component interaction positions from multiple component interaction positions. Specific settings can be configured according to needs and are not limited here.
[0036] Once the target component's interaction location is determined, an interactive component can be created at that location. This interactive component can be considered a 3D model, and its appearance can be customized based on requirements. It can be displayed as a specific creature, such as a gopher or koala, or as a specific item, such as a watermelon or egg. Certain display effects can be set, such as blinking or shaking effects. Specific settings are not limited here. This second interactive attribute can be considered the interactive component's "health points" or "health bar," which decreases as the controlled virtual character interacts with the interactive component. This can be seen as the controlled virtual character attacking the interactive component, reducing its health points.
[0037] When initially generating interactive components, their display parameters can be set to values indicating their invisibility. Since each interactive component needs to alternate between visible and invisible states at its corresponding target component's interaction position, it's necessary to determine the start time for each interactive component to be displayed. This determination can be based on pre-set rules or a random algorithm; no specific restriction is imposed here. Once this time is reached, the interactive component's display parameters are set to values indicating its visibility, thus displaying the interactive component in the game scene.
[0038] If the interactive component's position is bound to a game component within the game scene, its visibility can be controlled by manipulating their relative position. For example, the game component could be a tablet, and the interactive component's position is on top of the tablet. To make it invisible, the interactive component can be moved below the tablet. Furthermore, the visibility of the interactive component can be controlled by adjusting its transparency parameter. For instance, the game component could be displayed as a hollow box, with the interactive component's position inside the box. When the box is opaque, the interactive component is invisible; when the box is transparent, the interactive component is visible.
[0039] Step S106: When the interactive component is in a visible state, in response to the interaction behavior between the target virtual character and the interactive component, the first interactive attribute parameter of the target virtual character and the second interactive attribute parameter of the interactive component are updated according to the interaction result of the interaction behavior. The interaction behavior is used to indicate the increase of the first interactive attribute parameter and the decrease of the second interactive attribute parameter. The target virtual character is any virtual character among at least one virtual character.
[0040] The aforementioned interactive behaviors can be varied. Interactive behaviors can include the target virtual character's designated body part colliding with the interactive component; this designated body part can be the head, hand, or foot, etc.; interactive behaviors can also include the target virtual character controlling game items to collide with the interactive component, for example, the target virtual character can hold a wooden stick and control the stick to make contact with the interactive component; the target virtual character can also throw bomb items at the interactive component, etc. These interactive behaviors can be performed by the target virtual character while standing, walking, or jumping, and there are no restrictions on this.
[0041] If an interactive component is invisible, even if the target virtual character interacts with it, it's usually due to unconscious player input, and the interaction can be considered meaningless. If the interactive component is within a game component, it's typically invisible, and the target virtual character cannot control a specific body part or game item to collide with it, fulfilling the condition that the target virtual character can only interact with the interactive component when it's visible. If the interactive component isn't bound to a game component, it can be set to a collision-preventing state when invisible. This also prevents the target virtual character from colliding with a specific body part or game item, satisfying the condition that the target virtual character can only interact with the interactive component when it's visible. Specific settings can be configured according to needs and are not limited here.
[0042] The results of the above interactive behaviors are typically either successful or failed. Successful interaction usually means that a designated body part of the target virtual character collides with the interactive component, or that a game item controlled by the target virtual character successfully collides with the interactive component. Failed interaction usually means that no collision occurs with the interactive component. Specifically, this can be achieved by detecting whether the collision box of the designated body part or game item collides with the collision box of the interactive component. Alternatively, a trigger can be set at the end of the designated body part or game item to detect whether a collision occurs with the interactive component. Specific configurations can be tailored to requirements and will not be elaborated upon here.
[0043] When an interaction fails, the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interaction component can remain unchanged. Alternatively, if the first interaction attribute of the target virtual character is not zero, its first interaction attribute can be decreased, which can be seen as a "penalty" for the unsuccessful interaction. When an interaction succeeds, the first interaction attribute parameter of the target virtual character can be increased, and the second interaction attribute parameter of the interaction component can be decreased. The increase value of the first interaction attribute parameter is usually preset, and the decrease value of the second interaction attribute parameter is also usually preset. That is, each successful interaction will increase the first interaction attribute parameter by a preset increase value and decrease the second interaction attribute parameter by a preset decrease value.
[0044] As discussed above, the interaction between the target virtual character and the interactive component can be varied. For different interactive behaviors, corresponding increments can be set for the first interactive attribute parameter, and corresponding decrements can be set for the second interactive attribute parameter. For example, if the player controls the target virtual character to stand and hits the interactive component with a game item, the first interactive attribute parameter of the target virtual character will increase by 2, and the second interactive attribute parameter of the interactive component will decrease by 5; if the player controls the target virtual character to jump and hits the interactive component with a game item, the first interactive attribute parameter of the target virtual character will increase by 3, and the second interactive attribute parameter of the interactive component will decrease by 10.
[0045] In step S108, in response to the second interaction attribute parameter of the first interaction component being lower than the first parameter threshold, the first interaction component is deleted from the first interaction position corresponding to the first interaction component.
[0046] The second interaction attribute parameter of the interactive component decreases when the controlled virtual character interacts with it. This controlled virtual character can be a virtual character controlled by the terminal device mentioned above, or it can typically be a virtual character controlled by another terminal device during a game session.
[0047] A first threshold parameter can be preset. This threshold can be 0 or any other value, and is usually less than the initial value of the second interaction attribute parameter. When the second interaction attribute parameter of an interactive component is lower than the first threshold parameter, the interactive component can be directly deleted from its interactive position.
[0048] In some cases, the interactive component can be made transparent, rendering it invisible and preventing the controlled virtual character from interacting with it. Simultaneously, the second interactive attribute parameter of the component can be controlled to increase at a certain recovery rate until it returns to its initial value. Once the interactive component returns to its initial value, its display time can be determined again, making it visible again and allowing the controlled virtual character to interact with it.
[0049] The aforementioned component control method, device, and electronic device in a game, in response to a game start command, provides multiple component interaction positions in the game scene; determines at least one target component interaction position from the multiple component interaction positions, creates an interactive component at the target component interaction position, and controls and adjusts each interactive component to be in a visible and invisible state in turn at the corresponding target component interaction position; when the interactive component is in a visible state, in response to an interaction behavior between the target virtual character and the interactive component, controls and updates the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interactive component; in response to the second interaction attribute parameter of the first interactive component falling below the first parameter threshold, the first interactive component is deleted. In this method, players need to concentrate to find randomly appearing game components and hit them, bringing players a more exciting gaming experience.
[0050] The following embodiments provide a specific method for determining at least one target component interaction position from multiple component interaction positions, creating an interactive component at each target component interaction position, and controlling and adjusting the display parameters of each interactive component in the game scene according to specified rules.
[0051] The number of components to be generated can be preset; for convenience, this can be referred to as the "first component generation quantity." This first component generation quantity is usually set by the game scene designer. When players can edit the game scene themselves, they can usually determine the first component generation quantity by inputting a numerical parameter. When determining the target component interaction position, the target component interaction position can be determined from multiple component interaction positions based on a preset random algorithm and the preset first component generation quantity; wherein the number of target component interaction positions matches the component generation quantity. In specific implementation, multiple component interaction positions can be numbered, and then a random algorithm can be used to select numbers from multiple numbers that match the first component generation quantity, and then the component interaction positions corresponding to each number are determined as the target component interaction positions.
[0052] During a game, multiple operations can be set to determine the target component interaction positions and generate interactive components. For example, at 1 second, 9 seconds, and 17 seconds into the game, 4, 8, and 16 target interaction positions can be determined respectively, and interactive components can be generated at these positions. The number of target interaction positions set at each moment is called the "second component generation quantity." In response to the game duration reaching a specified time, based on a preset random algorithm and the preset second component generation quantity, updated target component interaction positions are determined from multiple component interaction positions, and an interactive component is created at each updated target component interaction position; the number of updated target component interaction positions matches the second component generation quantity.
[0053] The previously determined target component interaction position can be disregarded, and the updated target component interaction position can be directly determined from multiple component interaction positions. In this case, the two determined target component interaction positions may overlap. If an interactive component exists at the updated target component interaction position (i.e., the updated target component interaction position is the same as a previously determined target component interaction position), the second interaction attribute parameter of that interactive component can be directly updated to the preset initial parameter value, and it can be regarded as a newly generated interactive component. If no interactive component exists at the updated target component interaction position, an interactive component needs to be created at the updated target component interaction position.
[0054] In determining the updated target component interaction position, component interaction positions that still contain interactive components can be excluded. Specifically, component interaction positions that do not contain interactive components among multiple component interaction positions can be identified as candidate component interaction positions. Based on a preset random algorithm and a preset number of second components generated, the updated target component interaction position is determined from the candidate component interaction positions. For example, if multiple component interaction positions include A, B, C, and D, and A and B are the first determined target component interaction positions, the interactive component at A has been deleted, while the interactive component at B still exists; then the target component interaction position needs to be re-determined from A, C, and D.
[0055] In a game scene, one or more containment components can be set up. A containment component typically includes multiple component interaction points, such as a "land" component with multiple "mouse holes," or... Figure 2 As shown, the gray area represents the "groundhog hole," and the interactive component "peeks out" from the "groundhog hole" as shown in the image. Figure 3 As shown. If there are multiple container components, each container component usually corresponds to one component interaction position. It can also be set so that one container component corresponds to multiple component interaction positions. The specific settings can be configured according to the requirements, which will not be elaborated here.
[0056] When a game scene includes multiple containment components, in response to the game start command, these components can be directly identified as multiple interactive positions. Determining the target component's interactive position can also be viewed as identifying at least one target containment component from among the multiple containment components. After identifying the target containment component, an interactive component needs to be generated inside it. This can be achieved by controlling and adjusting the position parameters of the interactive component, the target containment component, or both simultaneously, allowing each interactive component to alternately occupy the inside and outside of its corresponding target containment component. Interactive components are invisible when inside their respective target containment components and visible when outside them.
[0057] For example, you can control and adjust the position parameters of an interactive component to move it outside of its target containing component. This is typically done when the interactive component is treated as a living object, such as a "groundhog," and the target containing component is treated as a non-living object, such as a "hillside." You can then control and adjust the position parameters of the interactive component to create the effect of a groundhog peeking out of its burrow on a hillside. You can also control and adjust the position parameters of the target containing component to move it, causing the interactive component to be outside of its containing component. This is typically done when the interactive component is treated as a non-living object, such as a "golden egg," and the target containing component is treated as a living or moving object, such as a dinosaur. You can then control and adjust the position parameters of the target containing component to create the effect of a dinosaur flying away from a golden egg, making the egg visible.
[0058] If it's necessary to control and adjust the position parameters of an interactive component to make it visible, the display time of the interactive component within the target container can be determined based on a preset random algorithm. For example, it could be determined to display the interactive component 2 seconds after its creation. In response to the game's duration reaching the display time corresponding to the interactive component, the interactive component is moved outside the target container.
[0059] The containing component can have a designated surface portion, such as a "hillside" component having a hillside surface. This surface can be displayed as transparent or partially transparent to create a "gopher hole" visual effect. Typically, collision parameters can be set for the designated surface portion, specifying which game components(s) in the game scene they are applicable to. For example, a first relative collision parameter can be pre-set for an interactive component; this first relative collision parameter indicates that the interactive component can pass through the designated surface portion. Therefore, the interactive component can be controlled to move through the designated surface portion of the target containing component to the outside of the target containing component.
[0060] When there are no container components in the game scene, visibility attributes can be set for interactive components to control whether they are visible or invisible. When creating an interactive component at the interaction location of each target component, the visibility attribute parameter of the interactive component can be set to the first parameter; the first parameter indicates that the interactive component is invisible. After determining the display time corresponding to the interactive component at the target component's interaction location based on a preset random algorithm, if the duration of the game reaches the display time of the interactive component, the visibility attribute parameter of the interactive component needs to be set to the second parameter; the second parameter indicates that the interactive component is visible. In the above case, the interactive component can be regarded as floating in the game scene. When the interactive component is visible, the player can control the controlled virtual character to jump, so as to create an interactive behavior of collision with the interactive component.
[0061] The following embodiments provide a specific method for controlling and updating the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interaction component in response to an interaction behavior generated between the target virtual character and the interaction component, based on the interaction result of the interaction behavior.
[0062] In games, specific items are usually assigned to interactive components. These items can be distributed to the target virtual character by the game system, purchased by the target virtual character from the game store, or obtained by the target virtual character within the game environment. The specifics can be set according to needs and are not restricted here.
[0063] When a target virtual character is carrying a specified item, the graphical user interface typically displays a control to trigger an interactive action on that item. Players can trigger this control to initiate a handover action. In response to the interactive action, the virtual character moves the specified item along a preset direction; this preset direction is related to the relative position between the interactive component and the target virtual character. For example, if the interactive component is on the ground, the preset direction is typically vertically downwards, or downwards at a certain angle. When the interactive component is higher than the target virtual character, the preset direction can be vertically upwards, or upwards at a certain angle. The specific settings can be configured according to the actual situation and are not limited here.
[0064] If a collision is detected between a specified prop and an interactive component, the result of the interaction between the virtual character and the interactive component is determined to be a successful interaction. At this time, it is necessary to control and update the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interactive component.
[0065] When the interactive position of a component is located inside the containing component, a specified surface portion of the containing component can be configured to collide with a specified prop. Specifically, a second relative collision parameter can be set for the specified surface portion relative to the specified prop; the second relative collision parameter indicates that the specified prop can collide with the specified surface portion. If a collision between the specified prop and the specified surface portion is detected, the result of the interaction between the virtual character and the interactive component is determined to be an interaction failure.
[0066] After the interaction ends, the virtual character needs to be controlled to move the specified item in the opposite direction of the preset direction so that the specified item is moved to the position it was in before the interaction was triggered.
[0067] After the target virtual character initiates an interaction, the interaction result is considered a successful interaction. The current values of the first and second interaction attribute parameters are obtained. Before the target virtual character initiates an interaction, the current values of both the first and second interaction attribute parameters are usually preset initial values, though these initial values are typically different. The sum of the current value of the first interaction attribute parameter and the preset first interaction value is calculated, and this result is determined as the updated current value of the first interaction attribute parameter for the target virtual character; the first interaction value is greater than zero. This process is similar to integrating the target virtual character's interaction. The difference between the current value of the second interaction attribute parameter and the preset second interaction value is calculated, and this result is determined as the updated current value of the second interaction attribute parameter for the interactive component; the second interaction value is greater than zero. This process is equivalent to the interactive component's "health points" decreasing after a collision.
[0068] A parameter display area can typically be set on the surface of an interactive component. This area can be rendered based on the current value of the component's second interactive attribute parameter; the rendered parameter display area is divided into a first region and a second region; the size of the first region is related to the current value of the second interactive attribute parameter. For example... Figure 5 As shown, the ellipse represents the interactive component, and the rectangular part within it represents the parameter display area; the gray area within the rectangle represents the first area, and the white area represents the second area. At this point, the first area occupies half of the parameter display area, indicating that the current parameter value of the second interactive attribute parameter of the interactive component is half of its initial parameter value.
[0069] Multiple interactive components can be pre-set in the game system. Different interactive components typically have different display appearances, such as different shapes and colors. Players editing the current game scene can choose which interactive components to generate at the interaction locations of various target components. Each type of interactive component has a corresponding first interaction value. Different types of interactive components can have different first interaction values; several types of interactive components can also have the same first interaction value, depending on the requirements, and there are no restrictions here. When updating the first interaction attribute parameter of the target virtual character, the first interaction value needs to be determined based on the type of interactive component corresponding to the interaction behavior; then, the sum of the current parameter value of the first interaction attribute parameter and the first interaction value is calculated, and the result is determined as the updated current parameter value of the first interaction attribute parameter.
[0070] When there are multiple target virtual characters, if each target virtual character interacts with an interactive component, the interaction result of each target virtual character's interaction with the interactive component needs to be calculated independently. Based on the independent calculation results, the first interaction attribute parameter of each target virtual character and the second interaction attribute parameter of the interactive component should be updated accordingly. For example, characters A, B, and C all interact with interactive component 1. If A's interaction is successful, then A's first interaction attribute parameter needs to be increased, and the second interaction attribute parameter of interactive component 1 needs to be decreased for A's interaction. If B's interaction is successful, then B's first interaction attribute parameter needs to be increased, and the second interaction attribute parameter of the interactive component needs to be decreased again based on the already decreased second interaction attribute parameter. If C's interaction fails, then C's first interaction attribute parameter is not processed, and the second interaction attribute parameter of the interactive component is not decreased for C's interaction.
[0071] A target parameter threshold can be pre-set to generate the conditions for determining the end of a game. The game ends when the first interaction attribute parameter of any target virtual character in the game scene is greater than or equal to the target parameter threshold. Then, based on the first interaction attribute parameters of each virtual character in the game scene, the game performance of each virtual character in the game is calculated. Specifically, multiple target virtual characters can be ranked according to the magnitude of their first interaction attribute parameter values, and game items can be distributed to target virtual characters as rewards.
[0072] The following embodiment provides a specific method for deleting a first interactive component from the first interactive component's corresponding first interactive component interaction position when the second interactive attribute parameter of the first interactive component in each interactive component is lower than the first parameter threshold.
[0073] When a game scene includes multiple containment components, and the interactive components are located inside these containment components, the interactive components inside are invisible. If the second interactive attribute parameter of the first interactive component is lower than the first parameter threshold, the first interactive component can be directly deleted from the target containment component corresponding to it. Alternatively, the first interactive component can be moved to the inside of the corresponding target containment component, while simultaneously stopping the process of adjusting the position parameters of the first interactive component and / or the corresponding target containment component so that the first interactive component alternately resides inside and outside the corresponding target containment component, thus making the interactive component invisible. The target virtual character cannot interact with the interactive component, or the interaction behavior can be disabled. Furthermore, the second interactive attribute parameter of the first interactive component can be restored to a preset initial parameter value within a specified time. For example, the specified time can be set to 3 seconds. If the second interactive attribute parameter of the first interactive component restores to the initial parameter value, the first interactive component can be immediately moved to the outside of the containment component, or the display time of the first interactive component can be determined based on a random algorithm, and after the game reaches that display time, the first interactive component can be moved to the outside of the containment component. At this time, the target virtual character can interact with the first interactive component again.
[0074] This disclosure also provides another method for controlling components in a game. Figure 1 This method is implemented based on the method shown. In this method, the interactive component is displayed in the form of a "groundhog", the containing component is displayed in the form of "land", and the specified item carried by the target virtual character is displayed in the form of a "hammer".
[0075] The "groundhog," also known as a score component with a health bar, provides points to the target that hits it (equivalent to the "first interaction value" mentioned above). Each hit deducts a fixed amount of health (equivalent to the "second interaction value" mentioned above). When the health reaches 0, it triggers a falling motion and becomes unhittable for a certain period of time. In some embodiments, the falling "groundhog" can recover its health after a certain period of time and can be hit again.
[0076] One gopher will randomly emerge from each of a set number of gopher holes, disappearing when its health reaches 0. After disappearing, a new gopher will emerge from a new gopher hole; gopher holes that already have gophers will not spawn new ones. Alternatively, a gopher can be randomly selected to spawn in a gopher hole where it is needed. Once a gopher's health is depleted and it retreats back into its hole, it will disappear. Gophers can be divided into common gophers and rare gophers, providing different amounts of points. A set number of rare gophers will appear after a certain time at the start of the game, such as 25 seconds.
[0077] In a specific implementation, the game scene contains 24 holes, which can be considered 24 interactive locations for components. "Gophers" spawn in time intervals, for example, every 10 seconds, with each wave consisting of 8 gophers. They peek out from the selected 8 holes within that wave; the number of times a gopher peeks out from a hole within 10 seconds depends on the configuration, but the hole's location is fixed and they won't go to other holes. At 11 seconds, 8 new holes are selected for the second wave of gopher spawns, and this process repeats. A hammer skill is set for the target virtual character; clicking it attacks the gopher, and clicking while jumping triggers a special attack animation. Multiple target virtual characters can attack the same gopher simultaneously, gaining the same score, and the gopher will also lose health simultaneously. Gophers that don't die will be present in the next wave.
[0078] In the specific implementation process, settings such as Figure 5 The game scene shown, Figure 5 The birthplace in the game indicates the container that can contain "gophers".
[0079] For the above method embodiments, see Figure 6 The embodiment of the present invention shown provides a component control device for a game, which provides a graphical user interface through a terminal device, displays at least a portion of the game scene in the graphical user interface, the game scene includes at least one virtual character, the at least one virtual character includes at least one controlled virtual character controlled by the terminal device, and the at least one virtual character has preset first interaction attribute parameters, the device includes:
[0080] Module 602 provides component interaction locations in response to the game start command, providing multiple component interaction locations in the game scene;
[0081] The interactive component creation module 604 is used to determine at least one target component interaction position from multiple component interaction positions, create an interactive component at each target component interaction position, and control and adjust the display parameters of each interactive component in the game scene according to specified rules so that each interactive component is in a visible and invisible state in turn at the corresponding target component interaction position. The interactive component has a second interactive attribute parameter.
[0082] The interaction module 606 is used to, when the interaction component is in a visible state, respond to the interaction behavior generated between the target virtual character and the interaction component, and control the updating of the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interaction component according to the interaction result of the interaction behavior, wherein the interaction behavior is used to indicate the increase of the first interaction attribute parameter and the decrease of the second interaction attribute parameter, and the target virtual character is any virtual character among at least one virtual character;
[0083] The component deletion module 608 is used to delete the first interactive component from the first interactive component's corresponding first interactive component interaction position when the second interactive attribute parameter of the first interactive component is lower than the first parameter threshold.
[0084] The aforementioned component control device in a game, in response to a game start command, provides multiple component interaction positions in the game scene; it determines at least one target component interaction position from these multiple positions, creates an interactive component at the target component interaction position, and controls the adjustment of each interactive component to alternately be visible and invisible at the corresponding target component interaction position; when an interactive component is visible, in response to an interaction between the target virtual character and the interactive component, it controls the updating of the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interactive component; in response to the second interaction attribute parameter of the first interactive component falling below the first parameter threshold, it deletes the first interactive component. In this method, players need to concentrate to discover randomly appearing game components and attack them, providing a more exciting gaming experience.
[0085] The aforementioned interactive component creation module is also used to: determine the target component interaction position from multiple component interaction positions based on a preset random algorithm and a preset first component generation number; the number of target component interaction positions matches the number of components generated.
[0086] The aforementioned device further includes: an interaction position update module, used to respond to the duration of a game match reaching a specified duration, based on a preset random algorithm and a preset number of second components generated, to determine the updated target component interaction position from multiple component interaction positions, and to create an interactive component at each updated target component interaction position; the number of updated target component interaction positions matches the number of second components generated.
[0087] The aforementioned interactive position update module is also used to: in response to the existence of an interactive component at the updated target component interactive position, update the second interactive attribute parameter of the interactive component to a preset initial parameter value; in response to the absence of an interactive component at the updated target component interactive position, create an interactive component at the updated target component interactive position.
[0088] The aforementioned interaction position update module is also used to: determine the interaction position of a component that does not have an interaction component among multiple component interaction positions as a candidate component interaction position; and determine the updated target component interaction position from the candidate component interaction positions based on a preset random algorithm and a preset number of second components generated.
[0089] The aforementioned game scene includes multiple containment components; the component interaction position providing module is further configured to: in response to the game start command, determine the multiple containment components in the game scene as multiple component interaction positions; the interaction component creation module is further configured to: determine at least one target containment component from the multiple containment components, generate an interaction component inside the target containment component, and control and adjust the position parameters of the interaction component and / or the target containment component so that each interaction component takes turns being located inside and outside the corresponding target containment component, wherein each interaction component is invisible when it is inside the corresponding target containment component, and is visible when it is outside the corresponding target containment component.
[0090] The aforementioned interactive component creation module is also used to: determine the display time corresponding to the interactive component in the target container component based on a preset random algorithm; and control the interactive component to move to the outside of the target container component in response to the game duration reaching the display time corresponding to the interactive component.
[0091] The aforementioned receiving component has a designated surface portion; the designated surface portion has a pre-set first relative collision parameter; the first relative collision parameter indicates that the interactive component can pass through the designated surface portion; the aforementioned interactive component creation module is further configured to: control the interactive component to pass through the designated surface portion of the target receiving component and move to the outside of the target receiving component.
[0092] The aforementioned interactive components have a visibility attribute parameter; the visibility attribute parameter is used to indicate whether the interactive component is in a visible or invisible state; the aforementioned interactive component creation module is also used to: create an interactive component at the interaction position of each target component; the visibility attribute parameter of the interactive component is a first parameter; the first parameter indicates that the interactive component is in an invisible state; determine the display time corresponding to the interactive component at the interaction position of the target component based on a preset random algorithm; in response to the duration of the game reaching the display time of the interactive component, set the visibility attribute parameter of the interactive component to a second parameter; the second parameter indicates that the interactive component is in a visible state.
[0093] The aforementioned target virtual character carries a designated item; the aforementioned interaction module is also used to: in response to an interaction trigger operation, control the virtual character to move the designated item along a preset direction; in response to detecting a collision between the designated item and the interaction component, determine that the result of the interaction behavior between the target virtual character and the interaction component is a successful interaction; and control the updating of the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interaction component.
[0094] The game scene described above includes multiple containment components; the interaction position of the components is located inside the containment components; the containment components have a designated surface portion; the designated surface portion has a pre-set second relative collision parameter; the second relative collision parameter indicates that a designated prop can collide with the designated surface portion; the device also includes: an interaction result determination module, used to determine the result of the interaction behavior between the virtual character and the interaction components as an interaction failure in response to detecting that a designated prop collides with the designated surface portion.
[0095] The aforementioned device also includes: an item movement control module, used to control the virtual character to move a specified item in the opposite direction of a preset direction in response to the end of the interaction, so that the specified item moves to the position it was in before the interaction was triggered.
[0096] The aforementioned interaction module is also used for: responding to the interaction result of the interaction behavior as successful interaction, obtaining the current parameter value of the first interaction attribute parameter and the current parameter value of the second interaction attribute parameter; calculating the sum of the current parameter value of the first interaction attribute parameter and the preset first interaction value, and determining the calculation result as the updated current parameter value of the first interaction attribute parameter of the target virtual character; the first interaction value is greater than zero; calculating the difference between the current parameter value of the second interaction attribute parameter and the preset second interaction value, and determining the calculation result as the updated current parameter value of the second interaction attribute parameter of the interaction component; the second interaction value is greater than zero.
[0097] The aforementioned interactive components include multiple types; each type of interactive component has a corresponding first interactive value; the aforementioned interactive module is also used to: determine the first interactive value based on the type of interactive component corresponding to the interactive behavior; and calculate the sum of the current parameter value of the first interactive attribute parameter and the first interactive value.
[0098] When there are multiple target virtual characters, the device further includes a parameter update module, which is used to respond to the interaction between the multiple target virtual characters and the interaction component, independently calculate the interaction result of the interaction between each target virtual character and the interaction component, and control the update of the first interaction attribute parameter of each target virtual character and the second interaction attribute parameter of the interaction component according to the result of independent calculation.
[0099] The aforementioned interactive component includes a parameter display area; the aforementioned device further includes: a display area rendering module, which renders the parameter display area based on the current parameter value of the second interactive attribute parameter of the interactive component; the rendered parameter display area is divided into a first area and a second area; the size of the first area is related to the current parameter value of the second interactive attribute parameter.
[0100] The aforementioned component deletion module is also used to: in response to the second interactive attribute parameter of the first interactive component in each interactive component being lower than the first parameter threshold, delete the first interactive component from the target containing component corresponding to the first interactive component.
[0101] The aforementioned component deletion module is also used to: control the first interactive component to move to the interior of the corresponding target containing component, and control the cessation of the step of adjusting the position parameters of the first interactive component and / or the corresponding target containing component so that the first interactive component alternately resides inside and outside the corresponding target containing component, until the second interactive attribute parameter of the first interactive component is restored to the preset initial parameter value within a specified time.
[0102] The above-mentioned device further includes: a parameter adjustment module, used to resume the step of adjusting the position parameters of the first interactive component and / or the corresponding target receiving component so that the first interactive component is alternately located inside and outside the corresponding target receiving component in response to the second interactive attribute parameter of the first interactive component being restored to the initial parameter value.
[0103] The aforementioned device further includes: a settlement module, used to determine the end of the game in response to the first interaction attribute parameter of any virtual character in the game scene being greater than or equal to a target parameter threshold, and to settle the game performance of each virtual character in the game scene based on the first interaction attribute parameter of each virtual character in the game scene.
[0104] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the component control method in the aforementioned game. Specifically:
[0105] In response to the start of a game, multiple component interaction positions are provided in the game scene. At least one target component interaction position is determined from these positions. An interactive component is created at each target component interaction position, and the display parameters of each interactive component in the game scene are adjusted according to specified rules, so that each interactive component alternately appears visible and invisible at its corresponding target component interaction position. Each interactive component has a second interaction attribute parameter. When an interactive component is visible, in response to an interaction between a target virtual character and the interactive component, the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interactive component are updated based on the interaction result. The interaction indicates increasing the first interaction attribute parameter and decreasing the second interaction attribute parameter. The target virtual character can be any virtual character from at least one set of virtual characters. In response to the second interaction attribute parameter of the first interactive component falling below a first parameter threshold, the first interactive component is deleted from its corresponding first component interaction position.
[0106] In the above method, players need to concentrate, find randomly appearing game components, and hit them, bringing players a more exciting gaming experience.
[0107] Optionally, the step of determining at least one target component interaction position from multiple component interaction positions includes: determining the target component interaction position from multiple component interaction positions based on a preset random algorithm and a preset first component generation number; the number of target component interaction positions matches the number of components generated.
[0108] Optionally, the above method further includes: in response to the game session lasting for a specified duration, determining the updated target component interaction position from multiple component interaction positions based on a preset random algorithm and a preset number of second components generated, and creating an interactive component at each updated target component interaction position; the number of updated target component interaction positions matches the number of second components generated.
[0109] Optionally, the step of creating an interactive component at each updated target component interaction location includes: in response to the existence of an interactive component at the updated target component interaction location, updating the second interactive attribute parameter of the interactive component to a preset initial parameter value; and in response to the absence of an interactive component at the updated target component interaction location, creating an interactive component at the updated target component interaction location.
[0110] Optionally, the step of determining the updated target component interaction position from multiple component interaction positions based on a preset random algorithm and a preset second component generation number includes: determining the component interaction position where no interactive component exists among the multiple component interaction positions as candidate component interaction positions; and determining the updated target component interaction position from the candidate component interaction positions based on the preset random algorithm and the preset second component generation number.
[0111] Optionally, the game scene includes multiple containment components; in response to the game start command, multiple component interaction positions are provided in the game scene, including: in response to the game start command, determining the multiple containment components in the game scene as multiple component interaction positions; determining at least one target component interaction position from the multiple component interaction positions, creating an interactive component at each target component interaction position, and controlling and adjusting the display parameters of each interactive component in the game scene according to specified rules, so that each interactive component is alternately in a visible and invisible state at the corresponding target component interaction position, including: determining at least one target containment component from the multiple containment components, generating an interactive component inside the target containment component, and controlling and adjusting the position parameters of the interactive component and / or the target containment component, so that each interactive component is alternately located inside and outside the corresponding target containment component, wherein each interactive component is in an invisible state when located inside the corresponding target containment component, and is in a visible state when located outside the corresponding target containment component.
[0112] Optionally, the steps described above for controlling and adjusting the position parameters of the interactive component and / or the target containing component include: determining the display time corresponding to the interactive component in the target containing component based on a preset random algorithm; and controlling the interactive component to move to the outside of the target containing component in response to the duration of the game reaching the display time corresponding to the interactive component.
[0113] Optionally, the aforementioned receiving component has a designated surface portion; the designated surface portion has a preset first relative collision parameter; the first relative collision parameter indicates that the interactive component can pass through the designated surface portion; the step of controlling the interactive component to move to the outside of the target receiving component includes: controlling the interactive component to pass through the designated surface portion of the target receiving component and move to the outside of the target receiving component.
[0114] Optionally, the aforementioned interactive components have a visibility attribute parameter; the visibility attribute parameter is used to indicate whether the interactive component is in a visible or invisible state; the steps of creating an interactive component at the interaction position of each target component and controlling and adjusting the display parameters of each interactive component in the game scene according to specified rules include: creating an interactive component at the interaction position of each target component; the visibility attribute parameter of the interactive component is a first parameter; the first parameter indicates that the interactive component is in an invisible state; determining the display time corresponding to the interactive component at the interaction position of the target component based on a preset random algorithm; in response to the duration of the game reaching the display time of the interactive component, setting the visibility attribute parameter of the interactive component to a second parameter; the second parameter indicates that the interactive component is in a visible state.
[0115] Optionally, the target virtual character carries a designated item; in response to an interaction between the target virtual character and the interactive component, the step of controlling and updating the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interactive component based on the interaction result includes: in response to an interaction trigger operation, controlling the virtual character to move the designated item along a preset direction; in response to detecting a collision between the designated item and the interactive component, determining that the result of the interaction between the target virtual character and the interactive component is a successful interaction; and controlling and updating the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interactive component.
[0116] Optionally, the game scene described above includes multiple containment components; the interaction position of the components is located inside the containment components; the containment components have a designated surface portion; the designated surface portion has a pre-set second relative collision parameter; the second relative collision parameter indicates that a designated prop can collide with the designated surface portion; the method further includes: in response to detecting that a designated prop collides with the designated surface portion, determining that the result of the interaction behavior between the virtual character and the interaction component is an interaction failure.
[0117] Optionally, the above method further includes: in response to the end of the interaction, controlling the virtual character to move the specified item in the opposite direction of the preset direction, so that the specified item moves to the position it was in before the interaction was triggered.
[0118] Optionally, the steps of controlling the updating of the first interactive attribute parameter of the target virtual character and the second interactive attribute parameter of the interactive component based on the interaction result of the interactive behavior include: in response to the interaction result of the interactive behavior being successful, obtaining the current parameter value of the first interactive attribute parameter and the current parameter value of the second interactive attribute parameter; calculating the sum of the current parameter value of the first interactive attribute parameter and a preset first interaction value, and determining the calculation result as the updated current parameter value of the first interactive attribute parameter of the target virtual character; the first interaction value is greater than zero; calculating the difference between the current parameter value of the second interactive attribute parameter and a preset second interaction value, and determining the calculation result as the updated current parameter value of the second interactive attribute parameter of the interactive component; the second interaction value is greater than zero.
[0119] Optionally, the above-mentioned interactive components include multiple types; each type of interactive component has a corresponding first interactive value; the step of calculating the sum of the current parameter value of the first interactive attribute parameter and the preset first interactive value includes: determining the first interactive value based on the type of interactive component corresponding to the interactive behavior; and calculating the sum of the current parameter value of the first interactive attribute parameter and the first interactive value.
[0120] Optionally, when there are multiple target virtual characters, the method further includes: responding to the interaction behavior generated between the multiple target virtual characters and the interaction component, independently calculating the interaction result of the interaction behavior between each target virtual character and the interaction component, and controlling the updating of the first interaction attribute parameter of each target virtual character and the second interaction attribute parameter of the interaction component based on the result of independent calculation.
[0121] Optionally, the above-mentioned interactive component includes a parameter display area; the above method further includes: rendering the parameter display area based on the current parameter value of the second interactive attribute parameter of the interactive component; the rendered parameter display area is divided into a first area and a second area; the size of the first area is related to the current parameter value of the second interactive attribute parameter.
[0122] Optionally, the above-mentioned response to the second interaction attribute parameter of the first interaction component in each interaction component being lower than the first parameter threshold, deleting the first interaction component from the first component interaction position corresponding to the first interaction component, includes: in response to the second interaction attribute parameter of the first interaction component in each interaction component being lower than the first parameter threshold, deleting the first interaction component from the target containing component corresponding to the first interaction component.
[0123] Optionally, the above-mentioned deletion of the first interactive component from the target containing component corresponding to the first interactive component includes: controlling the first interactive component to move to the inside of the corresponding target containing component, and controlling the stopping of the step of adjusting the position parameters of the first interactive component and / or the corresponding target containing component so that the first interactive component is alternately located inside and outside the corresponding target containing component, until the second interactive attribute parameter of the first interactive component is restored to the preset initial parameter value within a specified time.
[0124] Optionally, the above method further includes: in response to the second interaction attribute parameter of the first interaction component being restored to its initial parameter value, resuming the step of adjusting the position parameter of the first interaction component and / or the corresponding target accommodating component so that the first interaction component is alternately located inside and outside the corresponding target accommodating component.
[0125] Optionally, in response to the first interaction attribute parameter of any virtual character in the game scene being greater than or equal to the target parameter threshold, the game match is determined to end, and the game performance of each virtual character in the game match is calculated based on the first interaction attribute parameter of each virtual character in the game scene.
[0126] See Figure 7 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the component control method in the game described above.
[0127] Furthermore, Figure 7 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 100, the communication interface 103 and the memory 101 connected via the bus 102.
[0128] The memory 101 may include high-speed random access memory (RAM) or 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, or metropolitan area network. 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 7 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.
[0129] Processor 100 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 100 or by instructions in software form. Processor 100 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may 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 invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention 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 101, and the processor 100 reads the information from memory 101 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0130] This embodiment also provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the component control method in the above-mentioned game.
[0131] The present invention provides a component control method, apparatus, and electronic device in a game, including a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. Specifically:
[0132] In response to the start of a game, multiple component interaction positions are provided in the game scene. At least one target component interaction position is determined from these positions. An interactive component is created at each target component interaction position, and the display parameters of each interactive component in the game scene are adjusted according to specified rules, so that each interactive component alternately appears visible and invisible at its corresponding target component interaction position. Each interactive component has a second interaction attribute parameter. When an interactive component is visible, in response to an interaction between a target virtual character and the interactive component, the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interactive component are updated based on the interaction result. The interaction indicates increasing the first interaction attribute parameter and decreasing the second interaction attribute parameter. The target virtual character can be any virtual character from at least one set of virtual characters. In response to the second interaction attribute parameter of the first interactive component falling below a first parameter threshold, the first interactive component is deleted from its corresponding first component interaction position.
[0133] In the above method, players need to concentrate, find randomly appearing game components, and hit them, bringing players a more exciting gaming experience.
[0134] Optionally, the step of determining at least one target component interaction position from multiple component interaction positions includes: determining the target component interaction position from multiple component interaction positions based on a preset random algorithm and a preset first component generation number; the number of target component interaction positions matches the number of components generated.
[0135] Optionally, the above method further includes: in response to the game session lasting for a specified duration, determining the updated target component interaction position from multiple component interaction positions based on a preset random algorithm and a preset number of second components generated, and creating an interactive component at each updated target component interaction position; the number of updated target component interaction positions matches the number of second components generated.
[0136] Optionally, the step of creating an interactive component at each updated target component interaction location includes: in response to the existence of an interactive component at the updated target component interaction location, updating the second interactive attribute parameter of the interactive component to a preset initial parameter value; and in response to the absence of an interactive component at the updated target component interaction location, creating an interactive component at the updated target component interaction location.
[0137] Optionally, the step of determining the updated target component interaction position from multiple component interaction positions based on a preset random algorithm and a preset second component generation number includes: determining the component interaction position where no interactive component exists among the multiple component interaction positions as candidate component interaction positions; and determining the updated target component interaction position from the candidate component interaction positions based on the preset random algorithm and the preset second component generation number.
[0138] Optionally, the game scene includes multiple containment components; in response to the game start command, multiple component interaction positions are provided in the game scene, including: in response to the game start command, determining the multiple containment components in the game scene as multiple component interaction positions; determining at least one target component interaction position from the multiple component interaction positions, creating an interactive component at each target component interaction position, and controlling and adjusting the display parameters of each interactive component in the game scene according to specified rules, so that each interactive component is alternately in a visible and invisible state at the corresponding target component interaction position, including: determining at least one target containment component from the multiple containment components, generating an interactive component inside the target containment component, and controlling and adjusting the position parameters of the interactive component and / or the target containment component, so that each interactive component is alternately located inside and outside the corresponding target containment component, wherein each interactive component is in an invisible state when located inside the corresponding target containment component, and is in a visible state when located outside the corresponding target containment component.
[0139] Optionally, the steps described above for controlling and adjusting the position parameters of the interactive component and / or the target containing component include: determining the display time corresponding to the interactive component in the target containing component based on a preset random algorithm; and controlling the interactive component to move to the outside of the target containing component in response to the duration of the game reaching the display time corresponding to the interactive component.
[0140] Optionally, the aforementioned receiving component has a designated surface portion; the designated surface portion has a preset first relative collision parameter; the first relative collision parameter indicates that the interactive component can pass through the designated surface portion; the step of controlling the interactive component to move to the outside of the target receiving component includes: controlling the interactive component to pass through the designated surface portion of the target receiving component and move to the outside of the target receiving component.
[0141] Optionally, the aforementioned interactive components have a visibility attribute parameter; the visibility attribute parameter is used to indicate whether the interactive component is in a visible or invisible state; the steps of creating an interactive component at the interaction position of each target component and controlling and adjusting the display parameters of each interactive component in the game scene according to specified rules include: creating an interactive component at the interaction position of each target component; the visibility attribute parameter of the interactive component is a first parameter; the first parameter indicates that the interactive component is in an invisible state; determining the display time corresponding to the interactive component at the interaction position of the target component based on a preset random algorithm; in response to the duration of the game reaching the display time of the interactive component, setting the visibility attribute parameter of the interactive component to a second parameter; the second parameter indicates that the interactive component is in a visible state.
[0142] Optionally, the target virtual character carries a designated item; in response to an interaction between the target virtual character and the interactive component, the step of controlling and updating the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interactive component based on the interaction result includes: in response to an interaction trigger operation, controlling the virtual character to move the designated item along a preset direction; in response to detecting a collision between the designated item and the interactive component, determining that the result of the interaction between the target virtual character and the interactive component is a successful interaction; and controlling and updating the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interactive component.
[0143] Optionally, the game scene described above includes multiple containment components; the interaction position of the components is located inside the containment components; the containment components have a designated surface portion; the designated surface portion has a pre-set second relative collision parameter; the second relative collision parameter indicates that a designated prop can collide with the designated surface portion; the method further includes: in response to detecting that a designated prop collides with the designated surface portion, determining that the result of the interaction behavior between the virtual character and the interaction component is an interaction failure.
[0144] Optionally, the above method further includes: in response to the end of the interaction, controlling the virtual character to move the specified item in the opposite direction of the preset direction, so that the specified item moves to the position it was in before the interaction was triggered.
[0145] Optionally, the steps of controlling the updating of the first interactive attribute parameter of the target virtual character and the second interactive attribute parameter of the interactive component based on the interaction result of the interactive behavior include: in response to the interaction result of the interactive behavior being successful, obtaining the current parameter value of the first interactive attribute parameter and the current parameter value of the second interactive attribute parameter; calculating the sum of the current parameter value of the first interactive attribute parameter and a preset first interaction value, and determining the calculation result as the updated current parameter value of the first interactive attribute parameter of the target virtual character; the first interaction value is greater than zero; calculating the difference between the current parameter value of the second interactive attribute parameter and a preset second interaction value, and determining the calculation result as the updated current parameter value of the second interactive attribute parameter of the interactive component; the second interaction value is greater than zero.
[0146] Optionally, the above-mentioned interactive components include multiple types; each type of interactive component has a corresponding first interactive value; the step of calculating the sum of the current parameter value of the first interactive attribute parameter and the preset first interactive value includes: determining the first interactive value based on the type of interactive component corresponding to the interactive behavior; and calculating the sum of the current parameter value of the first interactive attribute parameter and the first interactive value.
[0147] Optionally, when there are multiple target virtual characters, the method further includes: responding to the interaction behavior generated between the multiple target virtual characters and the interaction component, independently calculating the interaction result of the interaction behavior between each target virtual character and the interaction component, and controlling the updating of the first interaction attribute parameter of each target virtual character and the second interaction attribute parameter of the interaction component based on the result of independent calculation.
[0148] Optionally, the above-mentioned interactive component includes a parameter display area; the above method further includes: rendering the parameter display area based on the current parameter value of the second interactive attribute parameter of the interactive component; the rendered parameter display area is divided into a first area and a second area; the size of the first area is related to the current parameter value of the second interactive attribute parameter.
[0149] Optionally, the above-mentioned response to the second interaction attribute parameter of the first interaction component in each interaction component being lower than the first parameter threshold, deleting the first interaction component from the first component interaction position corresponding to the first interaction component, includes: in response to the second interaction attribute parameter of the first interaction component in each interaction component being lower than the first parameter threshold, deleting the first interaction component from the target containing component corresponding to the first interaction component.
[0150] Optionally, the above-mentioned deletion of the first interactive component from the target containing component corresponding to the first interactive component includes: controlling the first interactive component to move to the inside of the corresponding target containing component, and controlling the stopping of the step of adjusting the position parameters of the first interactive component and / or the corresponding target containing component so that the first interactive component is alternately located inside and outside the corresponding target containing component, until the second interactive attribute parameter of the first interactive component is restored to the preset initial parameter value within a specified time.
[0151] Optionally, the above method further includes: in response to the second interaction attribute parameter of the first interaction component being restored to its initial parameter value, resuming the step of adjusting the position parameter of the first interaction component and / or the corresponding target accommodating component so that the first interaction component is alternately located inside and outside the corresponding target accommodating component.
[0152] Optionally, the above method further includes: determining the end of the game in response to the first interaction attribute parameter of any virtual character in the game scene being greater than or equal to the target parameter threshold, and calculating the game performance of each virtual character in the game scene based on the first interaction attribute parameter of each virtual character in the game scene.
[0153] 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.
[0154] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly 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 the present invention based on the specific circumstances.
[0155] 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 the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause 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 the present invention. 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.
[0156] In the description of this invention, 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. They are used only for the convenience of describing the invention and for 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. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0157] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention 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 within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these 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 the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A component control method in a game, characterized in that, A graphical user interface is provided through a terminal device, displaying at least a portion of a game scene. The game scene includes at least one virtual character, which includes at least one controlled virtual character controlled by the terminal device. The at least one virtual character has preset first interaction attribute parameters. The method includes: In response to the game start command, multiple component interaction locations are provided in the game scene; Determine at least one target component interaction position from the plurality of component interaction positions, create an interactive component at each target component interaction position, and control and adjust the display parameters of each interactive component in the game scene according to specified rules, so that each interactive component is in a visible state and an invisible state in turn at the corresponding target component interaction position, wherein the interactive component has a second interactive attribute parameter; When the interactive component is in a visible state, in response to an interaction between the target virtual character and the interactive component, the first interactive attribute parameter of the target virtual character and the second interactive attribute parameter of the interactive component are updated according to the interaction result of the interaction. The interaction is used to indicate that the first interactive attribute parameter is increased and the second interactive attribute parameter is decreased. The target virtual character is any virtual character among the at least one virtual character. In response to the second interactive attribute parameter of the first interactive component being lower than the first parameter threshold, the first interactive component is deleted from the first interactive component's corresponding first interactive component interaction position.
2. The method according to claim 1, characterized in that, The step of determining at least one target component interaction position from the plurality of component interaction positions includes: Based on a preset random algorithm and a preset number of first components generated, a target component interaction position is determined from the multiple component interaction positions; the number of target component interaction positions matches the number of components generated.
3. The method according to claim 2, characterized in that, The method further includes: In response to the game session lasting for a specified duration, based on a preset random algorithm and a preset number of second components generated, an updated target component interaction position is determined from the multiple component interaction positions, and an interactive component is created at each updated target component interaction position; the number of updated target component interaction positions matches the number of second components generated.
4. The method according to claim 3, characterized in that, The steps for creating an interactive component at each updated target component's interactive location include: In response to the presence of an interactive component at the updated target component interaction location, the second interactive attribute parameter of the interactive component is updated to a preset initial parameter value; If no interactive component exists at the updated target component interaction location, an interactive component is created at the updated target component interaction location.
5. The method according to claim 3, characterized in that, The step of determining the updated target component interaction position from the plurality of component interaction positions based on a preset random algorithm and a preset number of second components includes: The component interaction positions that do not have interactive components among the multiple component interaction positions are determined as candidate component interaction positions; Based on a preset random algorithm and a preset number of second components generated, the updated target component interaction position is determined from the candidate component interaction positions.
6. The method according to claim 1, characterized in that, The game scene includes multiple containment components; In response to the game start command, multiple component interaction locations are provided in the game scene, including: In response to the game start command, the multiple containment components in the game scene are determined as multiple component interaction positions; The step of determining at least one target component interaction position from the plurality of component interaction positions, creating an interactive component at each target component interaction position, and controlling and adjusting the display parameters of each interactive component in the game scene according to specified rules, so that each interactive component is alternately in a visible and invisible state at the corresponding target component interaction position, includes: At least one target containing component is determined from the plurality of containing components. An interactive component is generated inside the target containing component. The position parameters of the interactive component and / or the target containing component are controlled and adjusted so that each interactive component is alternately located inside and outside the corresponding target containing component. When each interactive component is inside the corresponding target containing component, it is invisible. When each interactive component is outside the corresponding target containing component, it is visible.
7. The method according to claim 6, characterized in that, The step of controlling and adjusting the position parameters of the interactive component and / or the target receiving component includes: Based on a preset random algorithm, the display time corresponding to the interactive component in the target accommodating component is determined; In response to the duration of the game session reaching the display time corresponding to the interactive component, the interactive component is controlled to move to the outside of the target accommodating component.
8. The method according to claim 7, characterized in that, The receiving component has a designated surface portion; the designated surface portion has a preset first relative collision parameter; the first relative collision parameter indicates that the interactive component can pass through the designated surface portion; The step of controlling the interactive component to move outside the target accommodating component includes: The interactive component is controlled to move through a designated surface portion of the target receiving component to the outside of the target receiving component.
9. The method according to claim 1, characterized in that, The interactive component has a visibility attribute parameter; the visibility attribute parameter is used to indicate whether the interactive component is in a visible or invisible state. The steps of creating an interactive component at each target component's interaction location and controlling and adjusting the display parameters of each interactive component in the game scene according to specified rules include: Create an interactive component at the interaction location of each target component; the visibility attribute parameter of the interactive component is a first parameter; the first parameter indicates that the interactive component is in an invisible state; Based on a preset random algorithm, the display time corresponding to the interactive component at the target component's interactive position is determined; In response to the duration of the game session reaching the display time of the interactive component, the visibility attribute parameter of the interactive component is set to a second parameter; the second parameter indicates that the interactive component is in a visible state.
10. The method according to claim 1, characterized in that, The target virtual character is carrying a designated item; The step of controlling and updating the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interaction component in response to an interaction between the target virtual character and the interaction component, based on the interaction result of the interaction, includes: In response to an interactive trigger operation, control the target virtual character to move the designated prop along a preset direction; In response to the detection of a collision between the designated prop and the interactive component, the result of the interaction between the target virtual character and the interactive component is determined to be a successful interaction. Control the updating of the first interactive attribute parameters of the target virtual character and the second interactive attribute parameters of the interactive component.
11. The method according to claim 10, characterized in that, The game scene includes multiple containment components; the interactive position of the components is located inside the containment components; the containment components have designated surface portions; the designated surface portions have pre-set second relative collision parameters; The second relative collision parameter indicates that the specified prop can collide with the specified surface portion; The method further includes: In response to the detection of a collision between the designated prop and the designated surface portion, the result of the interaction between the target virtual character and the interactive component is determined to be an interaction failure.
12. The method according to claim 10, characterized in that, The method further includes: In response to the end of the interaction, the target virtual character is controlled to move the designated item in the opposite direction of the preset direction, so that the designated item moves to the position it was in before the interaction was triggered.
13. The method according to claim 1, characterized in that, The step of controlling the updating of the first interaction attribute parameter of the target virtual character and the second interaction attribute parameter of the interaction component based on the interaction result of the interaction behavior includes: If the interaction result of the interaction behavior is successful, the current parameter value of the first interaction attribute parameter and the current parameter value of the second interaction attribute parameter are obtained. Calculate the sum of the current parameter value of the first interactive attribute parameter and the preset first interactive value, and determine the calculation result as the updated current parameter value of the first interactive attribute parameter of the target virtual character; the first interactive value is greater than zero; Calculate the difference between the current parameter value of the second interaction attribute parameter and the preset second interaction value, and determine the calculation result as the updated current parameter value of the second interaction attribute parameter of the interaction component; the second interaction value is greater than zero.
14. The method according to claim 13, characterized in that, The interactive components include multiple types; each type of interactive component has a corresponding first interactive value; The step of calculating the sum of the current parameter value of the first interactive attribute parameter and the preset first interactive value includes: Based on the type of interactive component corresponding to the interactive behavior, determine the first interactive value; Calculate the sum of the current parameter value of the first interactive attribute parameter and the first interactive value.
15. The method according to claim 1, characterized in that, When the number of target virtual characters is multiple, the method further includes: In response to the interaction between the multiple target virtual characters and the interaction component, the interaction result of the interaction between each target virtual character and the interaction component is calculated independently, and the first interaction attribute parameter of each target virtual character and the second interaction attribute parameter of the interaction component are updated according to the result of the independent calculation.
16. The method according to claim 1, characterized in that, The interactive component includes a parameter display area; The method further includes: Based on the current parameter value of the second interactive attribute parameter of the interactive component, the parameter display area is rendered; the rendered parameter display area is divided into a first area and a second area; the size of the first area is related to the current parameter value of the second interactive attribute parameter.
17. The method according to claim 6, characterized in that, The step of deleting the first interactive component from its corresponding first interactive component interaction position in response to the second interactive attribute parameter of the first interactive component being lower than the first parameter threshold includes: In response to the second interactive attribute parameter of the first interactive component being lower than the first parameter threshold, the first interactive component is deleted from the target containing component corresponding to the first interactive component.
18. The method according to claim 17, characterized in that, Deleting the first interactive component from the target containing component corresponding to the first interactive component includes: Control the first interactive component to move into the interior of the corresponding target containing component, and control the cessation of the step of adjusting the position parameters of the first interactive component and / or the corresponding target containing component so that the first interactive component alternately resides inside and outside the corresponding target containing component, until the second interactive attribute parameter of the first interactive component is restored to the preset initial parameter value within a specified time.
19. The method according to claim 18, characterized in that, The method further includes: In response to the second interaction attribute parameter of the first interaction component being restored to the initial parameter value, the step of adjusting the position parameter of the first interaction component and / or the corresponding target accommodating component is resumed so that the first interaction component is alternately located inside and outside the corresponding target accommodating component.
20. The method according to claim 13, characterized in that, The method further includes: In response to the first interaction attribute parameter of any virtual character in the game scene being greater than or equal to the target parameter threshold, the game match is determined to end, and the game performance of each virtual character in the game match is calculated based on the first interaction attribute parameter of each virtual character in the game scene.
21. A component control device for a game, characterized in that, A graphical user interface is provided via a terminal device, displaying at least a portion of a game scene. The game scene includes at least one virtual character, which in turn includes at least one controlled virtual character controlled by the terminal device. The at least one virtual character has preset first interaction attribute parameters. The device includes: A component interaction location providing module is used to provide multiple component interaction locations in the game scene in response to a game start command; An interactive component creation module is used to determine at least one target component interaction position from the plurality of component interaction positions, create an interactive component at each target component interaction position, and control and adjust the display parameters of each interactive component in the game scene according to specified rules, so that each interactive component is in a visible state and an invisible state in turn at the corresponding target component interaction position, wherein the interactive component has a second interactive attribute parameter; An interaction module is configured to, when the interaction component is in a visible state, respond to an interaction between a target virtual character and the interaction component, and control the updating of a first interaction attribute parameter of the target virtual character and a second interaction attribute parameter of the interaction component based on the interaction result of the interaction, wherein the interaction is used to instruct the increase of the first interaction attribute parameter and the decrease of the second interaction attribute parameter, and the target virtual character is any virtual character among the at least one virtual character; The component deletion module is used to delete the first interactive component from the first interactive component's corresponding first interactive component interaction position when the second interactive attribute parameter of the first interactive component is lower than the first parameter threshold.
22. An electronic device, characterized in that, It 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 component control method in a game according to any one of claims 1-20.
23. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the component control method in the game as described in any one of claims 1-20.
Citation Information
Patent Citations
Game role transmission method and device, electronic equipment and storage medium
CN111729306A
Game role control method, device and equipment, and storage medium
CN111991800A