Component editing method and apparatus in game, and electronic device
By generating target constraint components in the game and editing component attribute parameters, the problem of poor player editing experience caused by the abstract constraint settings in the existing technology is solved, and a more intuitive and easy-to-operate component editing method is achieved.
Patent Information
- Application Number
- PCT/CN2025/103043
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-15
- Filing Date
- 2025-06-24
- Publication Date
- 2026-01-22
AI Technical Summary
In existing technologies, the process of setting constraints for components such as ropes, springs, and ball sockets by creating abstract physical constraints on virtual objects is rather abstract, resulting in a poor gaming experience for players and a high learning curve.
This paper provides a method for editing components in games. It generates target constraint components through a graphical user interface and determines component attribute parameters in response to editing operations. This generates constraint components with a certain model shape in the game running scene, which conforms to the player's operating habits and reduces the learning cost.
This makes the use of constraint components more intuitive and usable, conforms to players' operating habits, and reduces the learning cost.
Smart Images

Figure CN2025103043_22012026_PF_FP_ABST
Abstract
Description
Game component editing methods, devices, and electronic devices
[0001] Cross-references to related applications
[0002] This application claims priority to Chinese Patent Application No. 202410950704.9, filed on July 15, 2024, entitled "Method, Apparatus and Electronic Device for Editing Components in a Game", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This disclosure relates to the field of game interaction design technology, and in particular to a method, apparatus and electronic device for editing components in a game. Background Technology
[0004] To achieve physical constraints on two virtual objects using components similar to ropes, springs, or ball sockets, related technologies achieve this by creating abstract physical constraints on these two virtual objects. This creation process is rather abstract and requires a high level of skill from the player, resulting in a poor gaming experience for the player. Summary of the Invention
[0005] The purpose of this disclosure is to provide a method, device, and electronic device for editing components in games, which simplifies the constraint settings of scene components, better suits the player's operating habits, and makes the constraint settings of components such as ropes, springs, and ball sockets more intuitive, thereby lowering the learning threshold for players to edit.
[0006] In a first aspect, this disclosure provides a component editing method in a game, the method comprising: displaying a graphical user interface by running a game program, the graphical user interface including a game editing scene; wherein the game editing scene includes multiple scene components; generating a target constraint component in the game editing scene in response to a first editing operation, wherein the target constraint component is configured with a virtual model matching the target constraint effect corresponding to the constraint component; determining component attribute parameters corresponding to the target constraint component, and a first scene component and a second scene component associated with the target constraint component in response to a second editing operation on the target constraint component; wherein the first scene component and the second scene component are scene components among multiple scene components, and the target constraint component is configured to constrain the motion relationship of the first scene component and / or the second scene component according to the component attribute parameters; and generating a game running scene corresponding to the game editing scene in the graphical user interface in response to a game running command, the game running scene including a first scene component model corresponding to the first scene component and a second scene component model corresponding to the second scene component.
[0007] Secondly, this disclosure provides a component editing device for a game, comprising: an interface display module configured to display a graphical user interface by running a game program, the graphical user interface including a game editing scene; wherein the game editing scene includes multiple scene components; a component generation module configured to perform a response to a first editing operation to generate a target constraint component in the game editing scene, wherein the target constraint component is configured with a virtual model matching the target constraint effect corresponding to the constraint component; a component editing module configured to perform a response to a second editing operation on the target constraint component to determine component attribute parameters corresponding to the target constraint component, and a first scene component and a second scene component associated with the target constraint component; wherein the first scene component and the second scene component are scene components among multiple scene components, and the target constraint component is configured to constrain the motion relationship of the first scene component and / or the second scene component according to the component attribute parameters; and a game running module configured to perform a response to a game running command to generate a game running scene corresponding to the game editing scene in the graphical user interface, the game running scene including a first scene component model corresponding to the first scene component and a second scene component model corresponding to the second scene component.
[0008] Thirdly, this disclosure provides an electronic device including a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the component editing method in the above-mentioned game.
[0009] Fourthly, this disclosure provides a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement the component editing method in the aforementioned game.
[0010] The embodiments disclosed herein bring the following beneficial effects:
[0011] This disclosure provides a method, apparatus, and electronic device for editing components in a game. The method involves running a game program and displaying a graphical user interface (GUI). The GUI includes a game editing scene containing multiple scene components. In response to a first editing operation, a target constraint component is generated in the game editing scene. This target constraint component is configured with a virtual model matching the target constraint effect. In response to a second editing operation on the target constraint component, component attribute parameters corresponding to the target constraint component, as well as a first scene component and a second scene component associated with the target constraint component, are determined. The target constraint component is configured to constrain the motion relationship between the first scene component and / or the second scene component based on the component attribute parameters. In response to a game running command, a game running scene corresponding to the game editing scene is generated in the GUI. This game running scene includes a first scene component model corresponding to the first scene component and a second scene component model corresponding to the second scene component. In this method, players can generate constraint components with a certain model shape in the game editing scene and edit the component attribute parameters of the constraint components, making the use of constraint components with constraint effects more intuitive and usable. Simultaneously, this editing method conforms to player operating habits and reduces the learning cost.
[0012] Other features and advantages of this disclosure will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.
[0013] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of this disclosure, the accompanying drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 is a flowchart of one of the component editing methods in a game provided by an embodiment of this disclosure;
[0016] Figure 2 is a schematic diagram of the selection of one of the scene components provided in an embodiment of this disclosure;
[0017] Figure 3 is a schematic diagram of anchor point setting in one of the scene components provided in an embodiment of this disclosure;
[0018] Figure 4 is a schematic diagram showing one of the distance indicator markers provided in the embodiments of this disclosure;
[0019] Figure 5 is a schematic diagram showing the position indicator and speed indicator corresponding to one of the sliding guide rail assemblies provided in the embodiments of this disclosure;
[0020] Figure 6 is a schematic diagram showing one of the rotation axis indicator and rotation angle indicator provided in the embodiments of this disclosure;
[0021] Figure 7 is a schematic diagram showing the position indicator and speed indicator corresponding to one of the hinge components provided in the embodiments of this disclosure;
[0022] Figure 8 is a schematic diagram showing the indicator markings corresponding to one of the ball-and-socket components provided in an embodiment of this disclosure;
[0023] Figure 9 is a schematic diagram showing the indicator markings corresponding to one of the spring assemblies provided in the embodiments of this disclosure;
[0024] Figure 10 is a schematic diagram of the structure of a component editing device in a game according to one of the embodiments of this disclosure;
[0025] Figure 11 is a schematic diagram of the structure of one of the electronic devices provided in the embodiments of this disclosure.
[0026] Figure label:
[0027] 1-Target constraint component; 2-Parameter setting window; 3-Indicator of inward applied force; 4-Indicator of outward applied force. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0029] Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely to illustrate selected embodiments of the disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0030] In one embodiment of this disclosure, the component editing method in a game can run on a local terminal device or a server. When the component editing method in a game runs on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0031] 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 editing 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.
[0032] 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.
[0033] In one possible implementation, this disclosure provides a component editing method in a game, as shown in Figure 1. The method includes the following specific steps:
[0034] Step S102: A graphical user interface is displayed by running the game program. The graphical user interface includes a game editing scene, which includes multiple scene components.
[0035] In practical implementation, the graphical user interface described above is displayed when the game program runs on the terminal device. This game program can be any game application, and the terminal device can be either the aforementioned local terminal device or a client device within the aforementioned cloud interaction system. For example, the terminal device can be a mobile phone, tablet, or personal computer. The game editing scene described above is a scene provided by the running game program; it can also be understood as a scene provided by the game editor during the game editing phase. In the game editing scene, editable components can be edited, and the edited components are designated as scene components within the game editing scene. In practical applications, when a player triggers a game editing command, the game editing scene can be displayed in the graphical user interface. This game editing command can be determined according to the game rules. For example, the editing command could be entering the game editor or selecting a scene map for editing.
[0036] In one specific embodiment, after the game editing scene is displayed in the graphical user interface, scene components can be set in the game editing scene in the following way: a component editing window is displayed in the graphical user interface; wherein, the component editing window includes multiple scene component controls; in response to a selection operation on a target scene component control in the component editing window, a scene component corresponding to the target scene component control is generated in the game editing scene. The aforementioned target scene component control can be any scene component control included in the component editing window. The specific operation of the aforementioned selection operation on the target scene component control can be determined according to development needs or according to user settings. For example, the selection operation can be an operation of dragging the target scene component control into the game editing scene, or an operation of clicking or long-pressing the target scene component control in the component editing window, etc.
[0037] Specifically, the component types and forms of the scene component controls included in the aforementioned component editing window can be set according to development needs. For example, the component editing window can include multiple different types of scene component controls, including: terrain component controls, mechanism component controls, decoration component controls, and combination component controls, etc. Each type of scene component control also contains multiple scene component controls. For example, mechanism component controls also include motion mechanism component controls, functional mechanism component controls, logic component controls, object component controls, and floor component controls. Among them, motion mechanism component controls also include cylinders, gears, cross gears, clockwise turntables, etc.
[0038] Step S104: In response to the first editing operation, a target constraint component is generated in the game editing scene, wherein the target constraint component is configured with a virtual model that matches the target constraint effect corresponding to the target constraint component.
[0039] In practical implementation, the specific operation corresponding to the first editing operation can be determined according to R&D needs. For example, the first editing operation can be an operation of dragging the component control corresponding to the target constraint component from a preset component editing window, or an operation of long-pressing the component control corresponding to the target constraint component in the component editing window, etc. In a specific embodiment, a component editing window is displayed in a graphical user interface; wherein, the component editing window includes multiple constraint component controls and multiple scene component controls; in response to the selection operation of the target constraint component control in the component editing window, the target constraint component corresponding to the target constraint component control is generated in the game editing scene. The target constraint component control can be any constraint component control included in the component editing window, and the selection operation can be an operation of dragging the target constraint component control to the game editing scene, or an operation of clicking or long-pressing the target constraint component control in the component editing window, etc.
[0040] Specifically, the aforementioned component editing window contains not only multiple scene component controls but also multiple constraint component controls. The constraint effects and virtual models corresponding to each constraint component control are pre-set, and different constraint components have different constraint effects and corresponding virtual models. Constraint components are primarily used to constrain the motion relationships of their associated scene components. For example, constraint components may include sliding rail components, hinge components, ball joint components, rope components, spring components, and rigid connection components. Specifically, the sliding rail component constrains the positional relationship between two associated scene components, as well as the sliding direction and distance of the scene components; the hinge component constrains the positional relationship between two associated scene components, as well as the rotation direction and angle of the scene components; the ball joint component constrains the positional relationship between two associated scene components, as well as the direction and angle of rotation of one scene component when it is fixed; the rope component connects two associated scene components; the spring component elastically connects two scene components; and the rigid connection component rigidly connects two scene components, thereby constraining the motion of the two scene components based on the connection relationship.
[0041] In practical implementation, each constraint component's corresponding virtual model has a specific shape, and this shape is associated with the constraint effect of the constraint component. For example, the virtual model corresponding to a spring component resembles the shape of a spring, and the virtual model corresponding to a sliding rail component resembles the shape of a sliding rail. The specific virtual model corresponding to the target constraint component can be displayed in the game editing scene, thus vividly demonstrating the constraint effect and component type. In one optional implementation, some constraint components are visible in the game editing scene but not in the game running scene, such as sliding rail components, hinge components, and ball socket components; some constraint components are visible in both the game editing and running scenes, such as rope components, spring components, and rigid connection components. In another optional implementation, the visibility of constraint components in the game running scene can be determined based on player settings.
[0042] Step S106: In response to the second editing operation for the target constraint component, determine the component attribute parameters corresponding to the target constraint component, as well as the first scene component and the second scene component associated with the target constraint component; wherein, the first scene component and the second scene component are scene components among multiple scene components, and the target constraint component is configured to constrain the motion relationship between the first scene component and / or the second scene component according to the component attribute parameters.
[0043] The specific operation corresponding to the second editing operation mentioned above can be determined based on development needs and player actions. For example, the second editing operation could be that the player selects the target constraint component, then triggers the settings control in the graphical user interface, displays a parameter settings window in the graphical user interface, and then edits the component attribute parameters corresponding to the target constraint component and the operations of the associated scene components in the parameter settings window; the second editing operation could also be that the player triggers the settings control to display a parameter settings window in the graphical user interface, which includes multiple editable component attribute parameters and selectable scene components, and the player can edit in the parameter settings window. After editing, the edited component attribute parameters and the selected scene components are applied to the target constraint component, that is, the edited component attribute parameters are determined as the component attribute parameters corresponding to the target constraint component, and the selected scene components are determined as the scene components associated with the target constraint component.
[0044] In practical implementation, there are usually two scene components associated with the target constraint component. The target constraint component can constrain the motion relationship between these two scene components based on its component attribute parameters and corresponding constraint effects. These motion relationships include relative and / or absolute motion relationships, and the specific types of these relationships can be determined based on development requirements. Specifically, since different constraint components have different constraint effects, the parameter types of their component attribute parameters will also differ. The parameter types for each constraint component's component attribute parameters are pre-set. For example, the component attribute parameters for a rope component may include rope length, whether the rope is stretchable, and tensile strength; the component attribute parameters for a sliding rail component may include movement direction parameters, movement distance limit parameters, and movement speed.
[0045] In one specific embodiment, the aforementioned motion relationship includes at least one of the following: positional relationship, direction of movement, and direction of rotation. The positional relationship may be the relative positional relationship between a first scene component and a second scene component associated with the target constraint component; the direction of movement may be the direction of movement of the first scene component relative to the second scene component, and this direction of movement may also be a movable direction of the first scene component or the second scene component; the direction of rotation may be the direction of rotation of the first scene component relative to the second scene component, and the direction of rotation may also be a rotatable direction of the first scene component or the second scene component, etc.
[0046] Step S108: In response to the game running command, generate a game running scene corresponding to the game editing scene in the graphical user interface. The game running scene includes a first scene component model corresponding to the first scene component and a second scene component model corresponding to the second scene component.
[0047] In practical implementation, the triggering method of the aforementioned game execution command can be determined according to development needs. For example, the game execution command can be triggered by clicking a specified control displayed in the graphical user interface, or it can be generated when a player participates in a game. When a player triggers the game execution command, a game execution scene corresponding to the game editing scene will be generated in the graphical user interface. This game execution scene displays the first scene component model corresponding to the first scene component and the second scene component model corresponding to the second scene component. The target constraint components associated with the first and second scene components may or may not be displayed in the game execution scene, mainly depending on the player's editing operation and the game rules.
[0048] In practical applications, the game running scene can also include player characters. Players control player characters to fight or complete levels in the game running scene. When the player character collides with the first scene component model or the second scene component model, the first scene component model or the second scene component model may move. The movement of the first scene component model and the second scene component model will be constrained by the target constraint component.
[0049] The component editing method in the aforementioned game allows players to generate constraint components with a certain model shape in the game editing scene, and edit the component attribute parameters of the constraint components, making the use of constraint components with constraint effects more intuitive and usable; at the same time, this editing method conforms to the player's operating habits and reduces the learning cost.
[0050] The following examples describe how to edit the target constraint component.
[0051] Specifically, the above response, in response to the second editing operation of the target constraint component, determines the component attribute parameters corresponding to the target constraint component, as well as the specific process of the first scene component and the second scene component associated with the target constraint component, which can be achieved through the following steps 10-11:
[0052] Step 10: In response to the second editing operation on the target constraint component, control the display of the parameter setting panel corresponding to the target constraint component in the graphical user interface; wherein, the parameter setting panel includes multiple editable controls and multiple component selection controls.
[0053] In specific implementations, the parameter setting panels corresponding to constraint components with different constraint effects may be different. The parameter setting panel corresponding to each constraint component with a constraint effect is pre-set. The parameter setting panel usually includes multiple editable controls and multiple component selection controls. Each editable control can set one or more component attribute parameters. Different editable controls can set different component attribute parameters. Each component selection control can set a scene component associated with the target constraint component. In a specific embodiment, each parameter setting panel contains two component selection controls.
[0054] Step 11: Respond to the first setting operation for multiple editable controls, and determine the component attribute parameters corresponding to the target constraint component based on the first setting operation.
[0055] In practice, the first setting operation described above can be determined based on development needs and player actions, and is not specifically limited here. Players can determine the component attribute parameters corresponding to the target constraint component by setting the parameter values of at least some of the editable controls among multiple editable controls. Since different constraint components have different component attribute parameters, the editable controls corresponding to different constraint components will also differ. The settings of the editable controls for different constraint components will be introduced in detail later.
[0056] Step 12: Respond to a second setting operation for multiple component selection controls, determine a first scene component and a second scene component from the game editing scene based on the second setting operation, and connect the first scene component and the second scene component to the target constraint component respectively.
[0057] The specific operation corresponding to the second setting operation mentioned above can be determined according to the development needs. For example, this second setting operation could be a selection operation of scene components in the game editing scene after clicking a component selection control, an operation of entering the component name of a scene component on a component selection control, or an operation of selecting a scene component from a drop-down list provided by the component selection control, etc. In specific implementation, players can select two scene components from the game editing scene as scene components associated with the target constraint component by setting the component selection control. After determining the scene components associated with the target constraint component, the target constraint component and the associated scene components will be connected by lines in the graphical user interface. That is, a line segment identifier will be displayed between the scene components associated with the target constraint component and the target constraint component in the graphical user interface. This line segment identifier can indicate the connection relationship between components, so that players can clearly see which scene components in the game editing scene are associated with the target constraint component.
[0058] In an optional embodiment, step 12 may further include: responding to a trigger operation on a first component selection control among multiple component selection controls, controlling the display of a first identifier in the graphical user interface; wherein the first identifier is used to indicate the current state of selecting a scene component; responding to a selection operation on a target scene component in the game editing scene, determining the target scene component as the first scene component associated with the target constraint component, and de-displaying the first identifier in the graphical user interface. Specifically, the first component selection control may be any one of multiple component selection controls in the parameter setting window, and the trigger operation on the first component selection control may be a click operation or a long press operation on the first component selection control, etc.
[0059] In one specific embodiment, in response to a selection operation of a target scene component in a game editing scene, the system identifies whether the component type of the target scene component belongs to a preset component type. If it does, a first prompt message is displayed in the graphical user interface, indicating that the target scene component cannot be associated with a target constraint component. If it does not belong, the target scene component is determined as the first scene component associated with the target constraint component. There can be multiple preset component types, which can be set in a blacklist. The component types in the blacklist are all component types corresponding to scene components that cannot be associated with constraint components. When a player selects a scene component associated with a target constraint component, and the selected target scene component's component type is a component type in the blacklist, a prompt message will appear to indicate that the currently selected target scene component cannot be connected to the constraint component. The preset component types can be determined according to development needs, such as terrain components or vegetation components.
[0060] In another specific embodiment, in response to a trigger operation on the first component selection control among multiple component selection controls, a scene component of a preset component type in the game editing scene is determined, and the scene component of the preset component type is hidden or displayed; wherein, the preset component type is the component type corresponding to a scene component that cannot be associated with the target constraint component. In this method, when the player triggers the component selection control to select a scene component associated with the target constraint component, the scene component of the preset component type in the game editing scene will be hidden or displayed, thereby preventing the player from selecting the scene component of the preset component type, reducing the player's error rate and improving the selection efficiency of scene components.
[0061] Figure 2 shows a schematic diagram of scene component selection provided in an embodiment of this disclosure. The component labeled 1 in Figure 2 is a target constraint component, which is a rope component. The parameter setting panel corresponding to the rope component labeled 2 includes two component selection controls and an editable control corresponding to the rope component. Each editable control is used to set different component attribute parameters. The component attribute parameters corresponding to the rope component in Figure 2 are whether collisions start between connected objects, rope length, whether the rope is stretchable, and whether the rope and rope length are displayed during operation. Players can edit the component attribute parameters through the editable controls corresponding to each component attribute parameter. In Figure 2, component selection control 1 is currently selected. When the player selects component selection control 1, the first indicator "Connect Scene Component" will be displayed in the graphical user interface. The player can select any scene component currently displayed in the game editing scene (the circular component, pentagram component, and hexagonal component in Figure 2 are scene components) as the scene component associated with the target constraint component. After selecting the associated scene component, the component icon or component name of the scene component will be displayed in the corresponding display position of component selection control 1. The box with the plus sign is the display position. Similarly, component selection control 2 is triggered in the same way as component selection control 1.
[0062] In an optional embodiment, the first component selection control in the parameter setting panel corresponds to an anchor point setting control; after determining the target scene component as the first scene component associated with the target constraint component in response to the selection operation of the target scene component in the game editing scene, the anchor point editing item is displayed in the graphical user interface in response to the trigger operation of the anchor point setting control; the position of the first anchor point in the first scene component is determined in response to the setting operation of the anchor point editing item; wherein, the first anchor point is used to connect the first scene component with the target constraint component.
[0063] In practice, the parameter setting panels for different constraint components are different. Some parameter setting panels display anchor point setting controls under the component selection controls, while others do not. When the anchor point setting controls are not displayed, players do not need to set the anchor points of the associated scene components. That is, when the preset position in the first or second scene component is connected to the target constraint component, the preset position is usually the default position. For example, the default position can be the center position, the upper left corner position, or a fixed position of the scene component.
[0064] After the player triggers the anchor point setting control, an anchor point editing item will be displayed in the graphical user interface. This anchor point editing item can be a coordinate input control displayed in the graphical user interface, allowing the player to adjust the anchor point position by inputting coordinate values; alternatively, the anchor point editing item can be a three-dimensional coordinate system displayed on the first scene component, allowing the player to adjust the anchor point position corresponding to the first scene component by dragging the position of the three-dimensional coordinate system.
[0065] Figure 3 shows a schematic diagram of anchor point setting in a scene component according to an embodiment of this disclosure. Figure 3 is a schematic diagram displayed after triggering the anchor point setting control in Figure 2. The circular component and hexagonal component connected to the rope component in Figure 3 are the first scene component and the second scene component associated with the rope component. Figure 3 is a schematic diagram of setting the anchor point of the hexagonal component, thereby displaying a three-dimensional coordinate system on the hexagonal component. The origin of this three-dimensional coordinate system is also the anchor point position. The anchor point position of the hexagonal component can be adjusted by dragging the three-dimensional coordinate system. In addition, when the player triggers the anchor point setting control, an anchor point editing window will be displayed in the graphical user interface. This anchor point editing window includes coordinate input controls corresponding to the three axes of the unit coordinate system. The player can determine the coordinate value of the anchor point position on the corresponding axis by entering coordinate values in the coordinate input controls, or adjust the coordinate value of the anchor point position on the corresponding axis by sliding the slider on the value bar. As shown in Figure 3, the coordinate value of the anchor point position in the X-axis direction is -0.5, the coordinate value in the Y-axis direction is 0, and the coordinate value in the Z-axis direction is -0.5.
[0066] In an optional embodiment, the first scene component and the second scene component associated with the target constraint component include a main component and a target component. Of the two component selection controls included in the parameter setting panel, one is used to determine the main component, and the other is used to determine the target component. The main component is the reference component; that is, the target constraint component constrains the movement relationship of the target component relative to the main component based on component attribute parameters. Therefore, when the first scene component is selected as the main component associated with the target constraint component from the game editing scene, a main component identifier will be displayed on the first scene component. When the second scene component is selected as the target component associated with the target constraint component from the game editing scene, a target component identifier will be displayed on the second scene component. The display style of the main component identifier and the target component identifier can be determined according to development needs. For example, different labels, letters, or characters can be used to represent the main component identifier and the target component identifier. For example, in Figure 3, the identifier containing the number 1 within a circle on the hexagonal component is the main component identifier, and the identifier containing the number 2 within a circle on the circular component is the target component identifier.
[0067] In its implementation, the graphical user interface (GUI) displays the target constraint component, the first scene component, and the second scene component in a first display mode, which is also the normal display mode for components in the game editing scene. Based on this, in response to a selection operation on the target constraint component, the GUI displays the target constraint component in a selected state, and displays the first and second scene components associated with the target constraint component in a second display mode. That is, when the target constraint component in the game editing scene is associated with two scene components, selecting the target constraint component displays the target constraint component in a constrained state in the GUI, and the two scene components associated with the target constraint component are displayed in the second display mode. This allows players to easily understand which scene components have established connections with the target constraint component, facilitating subsequent editing or adjustment operations.
[0068] When a target constraint component is connected to only one scene component, the graphical user interface (GUI) displays the target constraint component as selected in response to a selection operation on the target constraint component. That is, if the player only sets a scene component corresponding to a component selection control in the parameter settings panel, the GUI will show the target constraint component connected to a scene component. However, this connection is invalid; that is, constraint components typically constrain the movement relationship between two scene components and cannot constrain a single scene component. Therefore, when the player reselects the target constraint component, it will be displayed as selected in the GUI, but the display of the scene component connected to the target constraint component will not change.
[0069] In an optional embodiment, at least some component attribute parameters corresponding to the aforementioned target constraint component are configured with indicator icons. Based on this, in response to a selection operation on the target constraint component, the indicator icons determined by the component attribute parameters corresponding to the target constraint component are displayed in the graphical user interface. The aforementioned selection operation on the target constraint component can be a selection operation performed by the player when editing the target constraint component, or a selection operation performed by the player when wanting to view the constraint effect of the target constraint component. By displaying the indicator icons determined by the component attribute parameters corresponding to the target constraint component in the graphical user interface, players can easily understand the scene components constrained by the current target constraint component, as well as the motion relationships between the constrained scene components. Typically, the indicator icons displayed in the graphical user interface differ for constraint components with different constraint effects, and the specific indicators can be determined according to development needs. The following will describe in detail the indicator icons displayed in the graphical user interface using examples of component attribute parameters.
[0070] In an optional embodiment, the aforementioned component attribute parameters may include a movement direction parameter, which is used to control the movement direction of the first scene component and / or the second scene component connected to the target constraint component. In a specific implementation, the movement direction parameter is configured with a movement direction indicator. The specific shape corresponding to this movement direction indicator can be determined according to development needs; for example, the movement direction indicator may be a line segment with an arrow or a vertical bar indicator whose direction can be adjusted.
[0071] In an optional embodiment, the movement direction indicator can be set on the scene component directly constrained by the movement direction parameter. For example, if the movement direction parameter is used to control the movement direction of the second scene component, then the movement direction indicator is displayed on the second scene component; if the movement direction parameter is used to control the movement direction of the first scene component and the second scene component, then the movement direction indicator is displayed on the first scene component and the second scene component.
[0072] In practical implementation, the movement direction parameter is set to match the first axial direction in the model coordinate system corresponding to the target constraint component. The model coordinate system is a Cartesian coordinate system established with the center of the target constraint component as its center. This first axial direction is typically parallel to a model surface of the target constraint component's model. This first axial direction can be the X-axis, Y-axis, or Z-axis, etc. For example, the direction of the first axial direction can be the positive direction of the X-axis or the negative direction of the Y-axis, etc.
[0073] In practical implementation, since the sliding direction of the movement direction parameter is always matched with the first axial direction in the model coordinate system corresponding to the target constraint component, the orientation of the target constraint component in the game editing scene is controlled and adjusted in response to the rotation operation of the target constraint component, and the movement direction parameter corresponding to the target constraint component is adjusted accordingly. The aforementioned rotation operation can be performed by the player using their finger or a control to adjust the position or orientation of the target constraint component.
[0074] In another specific embodiment, in response to an adjustment operation on the movement direction parameter corresponding to the target constraint component, the movement direction parameter is adjusted, and the orientation of the target constraint component is adjusted accordingly. This method ensures that the sliding direction of the movement direction parameter setting always matches the first axial direction in the model coordinate system corresponding to the target constraint component.
[0075] In one optional embodiment, since the graphical user interface includes movement direction indicators corresponding to the movement direction parameters, the direction of the movement direction indicators needs to be adjusted according to the adjusted movement direction parameters. This allows players to accurately understand the movement direction of scene components constrained by the target constraint component based on the movement direction indicators.
[0076] Furthermore, the first scene component and the second scene component associated with the target constraint component include a main component and a target component. The movement direction parameter is used to constrain the movement direction of the target component, which is the movement direction of the target component relative to the main component.
[0077] For example, the virtual model corresponding to the aforementioned target constraint component includes: a virtual slider and a virtual slider that can slide on the virtual slider; wherein, the first scene component is connected to the virtual slider, and the second scene component is connected to the virtual slider; the sliding direction set by the movement direction parameter is used to constrain the sliding direction of the second scene component. Alternatively, the target constraint component can be understood as the aforementioned sliding guide component, which corresponds to a connecting body (equivalent to the aforementioned body component) and a connecting target (equivalent to the aforementioned target component), wherein the connecting body is the scene component connected to the virtual slider, and the connecting target is the scene component connected to the virtual slider. Typically, the scene component connected to the virtual slider moves in the movement direction, while the scene component connected to the virtual slider remains in its position.
[0078] Specifically, after the first scene component and the second scene component are fixed at both ends of the sliding guide rail assembly by virtual sliders and virtual slide bars, the relative positional relationship between the first scene component and the second scene component in the two axial directions outside the first axial direction in the XYZ three-dimensional space is constant. It is impossible to pull one scene component towards the second axial direction and the other scene component towards the third axial direction to separate them. The first scene component and the second scene component can only be separated or pulled closer along the first axial direction (that is, the sliding direction).
[0079] Optionally, the anchor points of scene components connected to the sliding guide component do not need to be set by the player. Usually, the anchor point position of the main component corresponding to the sliding guide component is set to the origin position of the main component's model by default, so that the main component and the anchor point automatically coincide. The anchor point position of the target component corresponding to the sliding guide component is set to the center position of the target component's model by default.
[0080] Furthermore, the aforementioned component attribute parameters also include: a movement distance parameter; wherein, the movement distance parameter is used to constrain the target component to move at least one of the following distances in the movement direction: a minimum movement distance and a maximum movement distance; the specific process of displaying the indicator determined based on the component attribute parameters corresponding to the target constrained component in the graphical user interface includes at least the following steps: obtaining the minimum movement distance from the movement distance parameter, and controlling the display of the distance indicator based on the minimum movement distance; and obtaining the maximum movement distance from the movement distance parameter, and controlling the display of the distance indicator based on the maximum movement distance. In a specific implementation, the distance indicator can be used to indicate either the minimum movement distance or the maximum movement distance, and the length of the distance indicator matches the minimum movement distance and / or the maximum movement distance.
[0081] In one specific embodiment, the distance indicator is determined based on the maximum travel distance, and the length of the distance indicator increases as the maximum travel distance increases.
[0082] In an optional embodiment, if the response distance parameter includes a parameter value that meets a first preset condition, the distance indicator is controlled to be displayed in a first form; if the response distance parameter does not include a parameter value that meets the first preset condition, the distance indicator is controlled to be displayed in a second form. The first and second forms are different display forms, and the specific forms corresponding to the first and second forms can be determined according to research and development needs.
[0083] In specific implementation, the first preset condition can be determined according to the research and development needs. For example, the first preset condition can be that the movement distance parameter includes a specified parameter value, or the first preset condition can include enabling the maximum movement distance limit. When the maximum movement distance limit is enabled, the maximum movement distance and / or minimum movement distance need to be set through the second editing operation. When the maximum movement distance limit is not enabled, the movement distance of the target component is not limited, that is, the movement distance of the target component can be arbitrarily large.
[0084] For example, the aforementioned movement distance parameters include whether movement distance restrictions are enabled. When movement distance restrictions are enabled, the movement distance parameters also include minimum movement distance parameters and maximum movement distance parameters. When the player enables the movement distance restriction of the target constraint component, editable controls corresponding to the minimum and maximum movement distance parameters will be displayed in the parameter setting panel, allowing the player to set the maximum and minimum movement distances. After setting, a distance indicator will be displayed in a second form. When the player does not enable the movement distance restriction of the target constraint component, a distance indicator will be displayed in a first form in the graphical user interface. This distance indicator is used not only to indicate whether the movement distance restriction of the target constraint component is enabled, but also to indicate the movement direction of the target component connected to the target constraint component. Optionally, when the player enables the sliding distance restriction, the length of the distance indicator displayed in the first form will increase as the set maximum sliding distance increases.
[0085] In an optional embodiment, the orientation of the distance indicator in the graphical user interface matches the movement direction indicated by the movement direction parameter. Figure 4 shows a schematic diagram of a distance indicator display provided in an embodiment of this disclosure. In Figure 4, the hexagonal component marked with '1' is the main component associated with the target constraint component, the circular component marked with '2' is the target component associated with the target constraint component, and the component connected to both the main component and the target component is the target constraint component. Since the movement direction parameter set by the target constraint component is used to constrain the movement direction of the target component, a distance indicator is displayed on the target component, which is also a black indicator displayed on the target component. The target component in the left image of Figure 4 displays the first type of distance indicator, which is the distance indicator displayed when the player activates the movement distance limit of the target constraint component. This distance indicator is a face with endpoints, and its length varies with the maximum movement distance. The target component in the right image of Figure 4 displays the second type of distance indicator, which is the distance indicator displayed when the player does not activate the movement distance limit of the target constraint component. This distance indicator is a face with arrows, and its length is fixed. Furthermore, the orientation of the distance indicator in Figure 4 indicates the movement direction of the target component; that is, this orientation matches the direction parameter set in the movement direction parameter and also matches the orientation of the target constraint component.
[0086] In an optional embodiment, the aforementioned component attribute parameters include position-driven parameters and / or velocity-driven parameters; wherein, the position-driven parameters are used to constrain the target constraint component to move toward a preset target position, and the velocity-driven parameters are used to constrain the movement speed of the target constraint component when moving toward the target position; during game execution, based on the position-driven parameters and / or velocity-driven parameters corresponding to the target constraint component, the force exerted by the target constraint component on the first scene component model and / or the second scene component model can be determined. Based on this, displaying an indicator determined based on the component attribute parameters corresponding to the target constraint component in the graphical user interface includes at least one of the following steps: obtaining the target position from the position-driven parameters, and controlling the display of a position indicator based on the target position; and obtaining the movement speed from the velocity-driven parameters, and controlling the display of a speed indicator based on the movement speed.
[0087] In practical implementation, within the game editing scene, when the player enables the position-driven mechanism of the target constraint component, editable controls corresponding to the target position and position-driven strength will be displayed in the parameter settings panel. This allows the player to set the target position and position-driven strength. When the player does not enable the position-driven mechanism of the target constraint component, both the target position and position-driven strength are invalid. Similarly, when the player enables the velocity-driven mechanism of the target constraint component, editable controls corresponding to the target velocity and velocity-driven strength will be displayed in the parameter settings panel. This allows the player to set the target velocity and velocity-driven strength. When the player does not enable the velocity-driven mechanism of the target constraint component, both the target velocity and velocity-driven strength are invalid.
[0088] In practical implementation, when component attribute parameters include position-driven and velocity-driven parameters, in the game editing scene, players can enable the position-driven parameters, which will display a position indicator on the graphical user interface. The display style of this position indicator can be determined according to development requirements. If players enable the velocity-driven parameters, a velocity indicator will be displayed on the graphical user interface. The display style of this velocity indicator can also be determined according to development requirements. Specifically, players can choose whether to enable either the velocity-driven or position-driven parameters. If players enable both velocity-driven and position-driven parameters simultaneously, the graphical user interface can display both position and velocity indicators at the same time, or it can prioritize displaying either the position or velocity indicator.
[0089] In one specific embodiment, the position indicator includes an endpoint and a line segment, with the endpoint located at the target position; the speed indicator includes an arrow and a line segment, with the arrow direction indicating the direction of the movement speed in the speed driving parameters, and the line segment length indicating the magnitude of the movement speed. Optionally, the mapping relationship between the line segment length and the speed magnitude can be 1:1.
[0090] Figure 5 shows a schematic diagram of the position indicator and speed indicator corresponding to the sliding guide rail assembly provided in this embodiment. The target constraint component in Figure 5 is the same as that in Figure 4, and both can represent the sliding guide rail assembly. The line segment with endpoints displayed in the distance indicator in the left image of Figure 5 is the position indicator. The line segment is the line connecting the initial position to the target position. The endpoint position represents the target position, and the starting point of the line segment represents the initial position. The line segment with arrows displayed in the distance indicator in the right image of Figure 5 is the speed indicator.
[0091] In one specific embodiment, the component attribute parameters corresponding to the sliding guide rail component may include movement direction parameters, movement distance parameters, position drive parameters, speed drive parameters, default drive activation, event-enabled drive, and event-disabled drive. Specifically, the movement distance parameter includes whether movement distance limitation is enabled; if enabled, it also includes maximum and minimum movement distance parameters. The position drive parameter includes whether position drive is enabled; if enabled, it also includes target position parameters and position drive intensity. The speed drive parameter includes whether speed drive is enabled; if enabled, it also includes target speed parameters and speed drive intensity. "Default drive activation" indicates whether position and speed drives are enabled when the constraint component is created. "Event-enabled drive" indicates that speed and position drives begin upon receiving a specified event. "Event-disabled drive" indicates that speed and position drives are disabled upon receiving a specified event.
[0092] In an optional embodiment, the aforementioned component attribute parameters include a rotation axis direction parameter, which controls the rotation direction of the first scene component and / or the second scene component connected to the target constraint component. In a specific implementation, the rotation axis direction parameter is configured with a rotation axis indicator. The specific shape of this rotation axis indicator can be determined according to development requirements. For example, the rotation axis indicator can be a line segment with an arrow or a vertical bar with adjustable direction, etc. This rotation axis indicator is used to indicate around which axis the scene component can rotate.
[0093] Specifically, the rotation direction set by the aforementioned rotation axis direction parameter matches the second axial direction in the model coordinate system corresponding to the target constraint component. The model coordinate system is a Cartesian coordinate system established with the center of the target constraint component as its center. This second axial direction is typically parallel to a model face of the target constraint component's model and can be an X-axis, Y-axis, or Z-axis, etc. For example, the direction of the second axial direction can be the positive direction of the X-axis or the negative direction of the Y-axis. Since the rotation direction set by the rotation axis direction parameter always matches the second axial direction in the model coordinate system corresponding to the target constraint component, in response to rotation operations on the target constraint component, the orientation of the target constraint component in the game editing scene is controlled and adjusted, and the rotation axis direction parameter corresponding to the target constraint component is adjusted accordingly to follow the adjustment of the target constraint component's orientation.
[0094] Furthermore, in response to adjustments to the rotation axis direction parameters corresponding to the target constraint component, the system controls the adjustment of these parameters and adjusts the orientation of the target constraint component accordingly. This ensures that the rotation direction set by the rotation axis direction parameters always matches the second axial direction in the model coordinate system corresponding to the target constraint component.
[0095] In an optional embodiment, the graphical user interface includes a rotation axis indicator corresponding to the rotation axis direction parameter. Therefore, the direction of the indicator can be adjusted according to the adjusted rotation axis direction parameter. In specific implementations, the rotation axis indicator can be set on a scene component directly constrained by the rotation axis parameter, or it can be set on a target component associated with the target constraint component.
[0096] Furthermore, the aforementioned component attribute parameters also include: rotation angle parameters; wherein, the rotation angle is used to constrain the first scene component and / or the second scene component to have at least one of the following rotation angles in the rotation direction: a minimum rotation angle and a maximum rotation angle; based on this, the specific process of displaying the indicator determined by the component attribute parameters corresponding to the target constrained component in the graphical user interface may include at least the following steps: obtaining the minimum rotation angle in the rotation angle parameters, and controlling the display of the rotation angle indicator based on the minimum rotation angle; and obtaining the maximum rotation angle in the rotation angle parameters, and controlling the display of the rotation angle indicator based on the maximum rotation angle. In specific implementation, the rotation angle indicator can be used to indicate either the minimum rotation angle or the maximum rotation angle.
[0097] In an alternative embodiment, the rotation indicator can be represented by a sector, and the size of the sector area is positively correlated with the maximum rotation angle.
[0098] In an optional embodiment, if the rotation angle parameter includes a parameter value that meets the second preset condition, the rotation angle indicator is controlled to be displayed in a third form; if the rotation angle parameter does not include a parameter value that meets the second preset condition, the rotation angle indicator is controlled to be displayed in a fourth form. The third and fourth forms are different display forms, and the specific forms corresponding to the third and fourth forms can be determined according to research and development needs.
[0099] Specifically, the aforementioned second preset condition can be determined according to R&D needs. For example, the second preset condition may include an indicator parameter value in the conversion angle parameter, or it may include enabling the maximum rotation angle limit. When the maximum rotation angle limit is enabled, the maximum rotation angle and / or minimum rotation angle are set through the second editing operation. When the maximum rotation angle limit is not enabled, the rotation angle of the first scene component and / or the second scene component in the rotation direction is not limited, that is, the rotation angle can be any angle.
[0100] For example, the aforementioned rotation angle parameters include whether rotation angle distance restrictions are enabled. When rotation angle restrictions are enabled, there are corresponding minimum and maximum rotation angle parameters. When the player enables the rotation angle restriction of the target constraint component, editable controls corresponding to the minimum and maximum rotation angle parameters will be displayed in the parameter setting panel. The player can then set the maximum and minimum rotation angles, and a rotation angle indicator will be displayed in a third form after the settings are completed. When the player does not enable the rotation angle restriction of the target constraint component, a rotation angle indicator will be displayed in a fourth form in the graphical user interface. This rotation angle indicator is used not only to indicate whether the rotation angle restriction of the target constraint component is enabled, but also to indicate whether the scene components connected to the target constraint component can rotate along the rotation direction without angular restrictions.
[0101] Optionally, the first scene component and the second scene component associated with the target constraint component include a main component and a target component. Typically, the main component is fixed, while the target component can rotate along the rotation direction or rotate around the rotation center.
[0102] Figure 6 shows a schematic diagram of a rotation axis indicator and a rotation angle indicator provided in an embodiment of this disclosure. In Figure 6, the hexagonal component marked with "1" is the main component associated with the target constraint component, the circular component marked with "2" is the target component associated with the target constraint component, and the component connected to both the main component and the target component is the target constraint component, which is the aforementioned hinge component. The line segment with an arrow shown on the main component in Figure 6 is the rotation axis indicator, with the arrow indicating the direction of the rotation axis. The length of the rotation angle indicator is a fixed value. The rotation axis indicator shown on the main component in the left image of Figure 6 displays a fourth type of rotation angle indicator, which is the rotation angle indicator displayed when the player has not activated the rotation angle distance limit of the target constraint component. This rotation angle indicator is a gray ellipse. The main component in the right image of Figure 6 displays a third type of rotation angle indicator, which is the rotation angle indicator displayed when the player has activated the rotation angle limit of the target constraint component. This rotation angle indicator is a fan-shaped indicator, with the size of the fan indicating the maximum rotation angle.
[0103] In practical implementation, the component attribute parameters corresponding to the aforementioned hinge component can also include position-driven parameters and speed-driven parameters. The position-driven parameters constrain the target constraint component to rotate towards a preset target position (or target angle), while the speed-driven parameters constrain the rotational speed of the target constraint component when rotating towards the target position. In the game editing scene, players can enable the position-driven parameters, which will display a position indicator on the graphical user interface. The display style of this position indicator can be determined according to development requirements. If players enable the speed-driven parameters, a speed indicator will be displayed on the graphical user interface. The display style of this speed indicator can also be determined according to development requirements.
[0104] Figure 7 shows a schematic diagram of the position indicator and speed indicator corresponding to the hinge component provided in this embodiment. The line segment with endpoints displayed in the rotation angle indicator in the left image of Figure 7 is the position indicator. The endpoint position represents the target position, or the barricade can represent the position of the target angle. The curved segment with arrows displayed in the rotation angle indicator in the right image of Figure 7 is the speed indicator. The arrow direction represents the speed direction, and the length of the curved segment represents the speed magnitude. The mapping relationship between the length and the speed magnitude can be 1:1.
[0105] In one specific embodiment, the component attribute parameters corresponding to the hinge component may include rotation axis direction parameters, rotation angle parameters, position drive parameters, speed drive parameters, default drive activation, drive enabled by event, and drive disabled by event.
[0106] In an optional embodiment, the component attribute parameters further include: a swing angle parameter; wherein the swing angle is used to constrain the maximum swing angle of the target component associated with the target constraint component in the rotation direction; the specific process of displaying the indicator determined based on the component attribute parameters corresponding to the target constraint component in the graphical user interface may include: obtaining the maximum swing angle in the swing angle parameter, and controlling the display of the swing angle indicator according to the maximum swing angle. Specifically, the display style of the swing angle indicator can be determined according to R&D needs; for example, the swing angle indicator can be represented by a cone, and the size of the cone is used to indicate the size of the maximum swing angle.
[0107] In one specific embodiment, the component attribute parameters corresponding to the ball-and-socket assembly may include rotation axis direction parameters, rotation angle parameters, swing angle parameters, and return strength. The rotation angle parameter is the same as that corresponding to the hinge assembly. The swing angle parameter includes whether the maximum swing angle limit is enabled; if so, it also includes the maximum swing angle parameter. The return strength can be understood as the ball-and-socket assembly having a default enabled soft actuation mechanism. Its driving target orientation is (0,0,0) based on the model coordinate system corresponding to the ball-and-socket assembly, and the driving target angular velocity is (0,0,0). Soft actuation stiffness = return strength, and soft actuation damping = return strength.
[0108] Figure 8 shows a schematic diagram of the indicator display corresponding to a ball-holding assembly. In Figure 8, the hexagonal component marked with "1" is the main component associated with the target constraint component, the circular component marked with "2" is the target component associated with the target constraint component, and the component connected to both the main component and the target component is the target constraint component, which is the aforementioned ball-holding assembly. The line segment with arrows shown on the main component in Figure 8 is the rotation axis indicator, with the arrow pointing in the direction of the rotation axis. Below the rotation axis indicator on the main component in the left image of Figure 8 is a fourth type of rotation angle indicator, which is the rotation angle indicator displayed when the player has not activated the rotation angle distance limit of the ball-holding assembly. This rotation angle indicator is a gray ellipse. The main component in the right image of Figure 8 displays a third type of rotation angle indicator, which is the rotation angle indicator displayed when the player has activated the rotation angle limit of the ball-holding assembly. This rotation angle indicator is a fan-shaped indicator, with the size of the fan indicating the maximum rotation angle. The cone shown below the rotation angle indicator in Figure 8 is the swing angle indicator, which is the swing angle indicator displayed when the maximum swing angle limit is enabled. If the maximum swing angle limit is not enabled, the swing angle indicator will not be displayed in the graphical user interface.
[0109] In another optional embodiment, the aforementioned component attribute parameters further include at least one of the following parameters: stiffness parameter, damping parameter, tension parameter, and component size parameter. The specific process of displaying the indicator determined based on the component attribute parameters corresponding to the target constraint component in the graphical user interface may include: determining the current tension state of the target constraint component based on the component attribute parameters corresponding to the target constraint component, and displaying an indicator on the target constraint component to indicate the tension state. Specifically, the larger the value of the stiffness parameter, the greater the force with which the target constraint component pulls its associated scene component back to the origin; the larger the value of the damping parameter, the more likely the target constraint component is to maintain its current speed. The stiffness parameter and damping parameter jointly affect the final performance of the target constraint component. The tension parameter indicates the length and strength to which the target constraint component can be stretched. The aforementioned component size parameters include, but are not limited to, the length and thickness of the target constraint component.
[0110] In one specific embodiment, the component attribute parameters corresponding to the aforementioned spring assembly may include stiffness parameters, damping parameters, size parameters, maximum spring force limit, maximum spring length, minimum spring length, and acceleration spring. The size parameter includes an editable free length option, which is checked and defaults to false. When the value is false, the length is determined by the distance between the two scene components at the time of spring creation; when the value is true, the length is determined by the parameter value set in the free length parameter. This free length is used to configure the default length of the spring assembly, and the length is determined at its creation, not by the default distance between the two scene components associated with the spring assembly. An acceleration spring can be roughly understood as ensuring that, when the stiffness and damping parameters are equal, the moment of inertia of scene components of different masses is the same, thus making objects of different masses behave consistently under spring force.
[0111] Figure 9 shows a schematic diagram of the indicator display corresponding to a spring assembly. The square component marked with '1' in Figure 9 is the main component associated with the target constraint component, and the square component marked with '2' is the target component associated with the target constraint component. The component connected to both the main component and the target component is the target constraint component, which is the aforementioned spring assembly. The spring assembly shown in Figure 9 displays indicator marks numbered 3 and 4, which are used to indicate the tension state of the spring assembly. These indicator marks are represented by line segments with arrows, where the length of the line segment indicates the free length of the spring assembly. When the distance between the two anchor points corresponding to the main component and the target component is greater than or equal to the free length, the graphical user interface displays the indicator mark corresponding to mark 3, indicating inward force application (i.e., the arrow pointing inward). When the distance between the two anchor points corresponding to the main component and the target component is less than the free length, the graphical user interface displays the indicator mark corresponding to mark 4, indicating outward force application (i.e., the arrow pointing outward).
[0112] Optionally, if both ends of the spring component are connected to scene components, the virtual model of the spring component will stretch and deform in real time according to the position and rotation of the anchor points at both ends in world space. The spring component itself does not have physical collision. If either end of the spring component is not connected to a scene component, the spring component displays the default model, which can move normally but cannot be scaled or rotated.
[0113] In one specific embodiment, the component attribute parameters corresponding to the rope component may include size parameters and tension parameters. The size parameters may include rope length and rope thickness; the tension parameters include whether the rope is stretchable, and if so, a tension strength parameter needs to be set. If both ends of the rope component are connected to scene components, the rope component will connect the anchor points of the two scene components in a straight line or a hanging line according to its free length. In this case, the rope component cannot be moved, scaled, or rotated. If either end of the spring component is not connected to a scene component, a virtual model (e.g., a vertical rope model) will be displayed, which can move normally but still cannot be scaled or rotated. Figure 2 shows the virtual model corresponding to the rope component. The rope component will also display its current tension status through an indicator. This indicator describes the free length of the rope component. If the distance between the anchor points of the two scene components connected to the rope component is greater than the free length of the rope component, the same indicator as indicator 3 in Figure 9 will be displayed; otherwise, no indicator will be displayed.
[0114] In an optional embodiment, when both ends of the rigid component are connected to scene components, a virtual model resembling a threaded steel bar / stone pillar will connect the center points of the two scene component models.
[0115] In an optional embodiment, the aforementioned component attribute parameters include component display parameters; wherein, the component display parameters include one or more of the following parameters: component color parameters and component size parameters; based on this, a virtual model of the target constraint component is displayed in the game editing scene based on the component display parameters corresponding to the target constraint component. That is, the display appearance of the virtual model of the target constraint component in the game editing scene matches the component display parameters set for the target constraint component, so that players can arbitrarily set the appearance of the model according to their needs and aesthetics.
[0116] In an optional embodiment, the above-mentioned game running scenario also includes a virtual model of the target constraint component generated based on the component display parameters.
[0117] Specifically, the aforementioned component attribute parameters also include runtime visibility parameters. These parameters control the visibility of the target constraint component in the game runtime scene during startup. When the target constraint component is visible in the game runtime scene, it displays a virtual model of itself based on the component display parameters. In practice, since not all types of constraint components are suitable for display in the game runtime scene, not all types of constraint components have runtime visibility parameters in their component attribute parameters; only some constraint components, such as spring components and rope components, have them set.
[0118] In an optional embodiment, the component attribute parameters mentioned above further include collision parameters, which indicate whether physical collisions between the first scene component and the second scene component associated with the target constraint component during motion are ignored. When the collision parameters are enabled, physical collisions between the first scene component and the second scene component associated with the target constraint component during motion can be ignored during component operation.
[0119] In another possible embodiment, the aforementioned component attribute parameters also include a collision-free parameter within the entire machine. This parameter is used to determine whether all scene components associated with the constrained component will not experience physical collisions. That is, within a mechanical body composed of scene components connected by constrained joints in the game's running scene, as long as one constrained component within the mechanical body has this option selected (i.e., the collision-free parameter within the entire machine is enabled), it will ignore collisions with other scene components connected by constrained components during movement, thereby increasing the structural stability of the mechanical body.
[0120] The following examples are used to describe the movement of scene components in a game running scene.
[0121] Specifically, in response to the force applied to the target scene component model, the motion state of the target scene component model is determined based on the component attribute parameters corresponding to the target constraint component associated with the target scene component model, and the motion of the target scene component model in the game running scene is controlled based on the motion state; wherein, the target scene component model is either the first scene component model or the second scene component model.
[0122] In practice, the aforementioned forces are applied in the following ways: the target scene component model is subjected to an initial force generated by environmental parameters (e.g., gravity); the target scene component model is subjected to an initial force preset by the system (e.g., the force generated in the case of automatic movement); and the forces generated by the interaction between the target scene component model and the player character (e.g., the player character pushes the target scene component model, the player character collides with the target scene component model, or the player character casts a skill, etc.).
[0123] Optionally, the target constraint component is associated with a scene component that enables physical collision, allowing the scene component to move upon collision with other objects. In specific implementations, since the target constraint component can constrain the motion relationship between the first and / or second scene components based on component attribute parameters, it can determine the motion state of the target scene component model when it is subjected to a force. This motion state is typically the motion state generated by external forces while maintaining the relative motion relationship between the target scene component model and the other scene component model. For example, the target constraint component could be a spring component connected to both the first and second scene components. The first scene component is located on the ground, and the second scene component is located above the ground. When the player character jumps onto the second scene component, the second scene component moves downwards, causing the spring component to shorten. Due to the elasticity of the spring component, after the spring reaches its shortest length, it rebounds, causing the second scene component to move upwards.
[0124] For example, a sliding guide component can allow a virtual slider to move up to 5 meters along the direction of a virtual slider. When a target scene component connected to the virtual slider is pushed by a player character, the target scene component can move up to 5 meters in the sliding direction.
[0125] In an optional embodiment, the aforementioned component attribute parameters include position-driven parameters and / or velocity-driven parameters; wherein, the position-driven parameters are used to limit the movement of the target constraint component toward a preset target position, and the velocity-driven parameters are used to limit the movement speed of the target constraint component when moving toward the target position; based on this, the specific process of determining the motion state of the target scene component model based on the component attribute parameters corresponding to the target constraint component associated with the target scene component model may include: determining the force applied by the target constraint component to the target scene component model based on the position-driven parameters and / or velocity-driven parameters corresponding to the target constraint component, and the current position and / or current velocity of the target constraint component; and determining the motion state of the target scene component model based on the force. Specifically, the motion state of the target scene component can be determined by the force applied by the target constraint component to the target scene component model and the force generated due to the collision between the player character and the target scene component model.
[0126] In a specific implementation, the aforementioned position driving parameters include the target position and position driving intensity, and the velocity driving parameters include the target velocity and velocity driving intensity. Based on this, the specific process of determining the force applied by the target constraint component to the target scene component model can include the following:
[0127] The first method, when only position-driven parameters are included, subtracts the target position from the current position to obtain the first subtraction result; multiplies the first subtraction result by the position-driven intensity to obtain the first multiplication result; and determines the first multiplication result as the force exerted by the target constraint component on the target scene component model.
[0128] The second method involves subtracting the target speed from the current speed when only the speed-driven parameters are included, obtaining a second subtraction result; multiplying the second subtraction result by the speed-driven intensity, obtaining a second multiplication result; and determining the second multiplication result as the force exerted by the target constraint component on the target scene component model.
[0129] The third approach, when including position-driven parameters and velocity-driven parameters, is to determine the sum of the first multiplication result and the second multiplication result as the force exerted by the target constraint component on the target scene component model.
[0130] For example, two scene components can be connected together using a spring assembly. One scene component is fixed, while the other is movable. When the player character pushes the movable scene component, the reaction force provided by the spring assembly is the force described above. Generally, the shorter the spring assembly is, the greater the force.
[0131] Based on the above method embodiments, this disclosure also provides a component editing device for games, as shown in FIG10, the device comprising:
[0132] The interface display module 90 is configured to display a graphical user interface by running a game program. The graphical user interface includes a game editing scene, which includes multiple scene components.
[0133] The component generation module 91 is configured to perform a response to the first editing operation and generate a target constraint component in the game editing scene. The target constraint component is configured with a virtual model that matches the target constraint effect corresponding to the constraint component.
[0134] The component editing module 92 is configured to perform a second editing operation in response to the target constraint component, determine the component attribute parameters corresponding to the target constraint component, and the first scene component and the second scene component associated with the target constraint component; wherein the first scene component and the second scene component are scene components among multiple scene components, and the target constraint component is configured to constrain the motion relationship between the first scene component and / or the second scene component according to the component attribute parameters.
[0135] The game running module 93 is configured to execute response game running instructions and generate a game running scene in the graphical user interface that corresponds to the game editing scene. The game running scene includes a first scene component model corresponding to the first scene component and a second scene component model corresponding to the second scene component.
[0136] The component editing device in the aforementioned game allows players to generate constraint components with a certain model shape in the game editing scene, and edit the component attribute parameters of the constraint components, making the use of constraint components with constraint effects more intuitive and usable; at the same time, this editing method conforms to the player's operating habits and reduces the learning cost.
[0137] In practical implementation, the above motion relationship includes at least one of the following: positional relationship, direction of movement, and direction of rotation.
[0138] In an optional embodiment, at least some component attribute parameters corresponding to the target constraint component are configured with indicator labels; based on this, the device further includes an indicator display module, configured to perform: in response to a selection operation on the target constraint component, displaying an indicator label determined based on the component attribute parameters corresponding to the target constraint component in a graphical user interface.
[0139] Furthermore, the aforementioned component attribute parameters include a movement direction parameter, which is used to control the sliding direction of the first scene component and / or the second scene component connected to the target constraint component.
[0140] Furthermore, the aforementioned device also includes a direction parameter adjustment module, configured to: respond to a rotation operation on the target constraint component, control and adjust the orientation of the target constraint component in the game editing scene, and control the movement direction parameter corresponding to the target constraint component to adjust in accordance with the adjustment of the orientation of the target constraint component.
[0141] Furthermore, the aforementioned direction parameter adjustment module is also configured to: respond to the adjustment operation of the movement direction parameter corresponding to the target constraint component, control the adjustment of the movement direction parameter, and control the orientation of the target constraint component to adjust in accordance with the adjustment of the movement direction parameter.
[0142] In a specific implementation, the graphical user interface includes a movement direction indicator corresponding to the movement direction parameters. Based on this, the device also includes an indicator adjustment module, which is configured to perform: adjusting the indication direction corresponding to the movement direction indicator according to the adjusted movement direction parameters.
[0143] In a specific implementation, the first scene component and the second scene component associated with the target constraint component include a main component and a target component. The movement direction parameter is used to constrain the movement direction of the target component, which is the movement direction of the target component relative to the main component.
[0144] Furthermore, the aforementioned component attribute parameters also include: movement distance parameters; wherein, the movement distance parameters are used to constrain the target component to move at least one of the following distances in the movement direction: minimum movement distance and maximum movement distance; based on this, the aforementioned identification display module is used to: obtain the minimum movement distance in the movement distance parameters, and control the display of a distance indicator based on the minimum movement distance; and / or, obtain the maximum movement distance in the movement distance parameters, and control the display of a distance indicator based on the maximum movement distance.
[0145] Furthermore, the aforementioned identification display module is also configured to: respond to a movement distance parameter including a parameter value that meets a first preset condition, control the display of a distance indication identifier in a first form; and respond to a movement distance parameter not including a parameter value that meets the first preset condition, control the display of a distance indication identifier in a second form.
[0146] In specific implementation, the first preset condition includes enabling the maximum movement distance limit; when the maximum movement distance limit is enabled, the maximum movement distance and / or minimum movement distance are set through the second editing operation; when the maximum movement distance limit is not enabled, the movement distance of the target component is not limited.
[0147] Furthermore, the orientation of the aforementioned distance indicator in the graphical user interface matches the movement direction indicated by the movement direction parameter.
[0148] In an optional embodiment, the above-mentioned component attribute parameters include position-driven parameters and / or velocity-driven parameters; wherein, the position-driven parameters are used to constrain the target constraint component to move toward a preset target position, and the velocity-driven parameters are used to constrain the movement speed of the target constraint component when moving toward the target position; during game execution, based on the position-driven parameters and / or velocity-driven parameters corresponding to the target constraint component, the force exerted by the target constraint component on the first scene component model and / or the second scene component model can be determined.
[0149] Furthermore, the aforementioned identification display module is also configured to perform: acquiring the target position from the position driving parameters, and controlling the display of a position indicator based on the target position; and / or acquiring the movement speed from the speed driving parameters, and controlling the display of a speed indicator based on the movement speed.
[0150] In a specific implementation, the aforementioned position indicator includes an endpoint and a line segment, with the endpoint of the position indicator located at the target position; the speed indicator includes an arrow and a line segment, with the arrow direction used to indicate the speed direction of the movement speed in the speed drive parameters, and the line segment length used to indicate the speed magnitude of the movement speed.
[0151] Furthermore, the aforementioned component attribute parameters include rotation axis direction parameters, which are used to control the rotation direction of the first scene component and / or the second scene component connected to the target constraint component. The rotation direction set by the rotation axis direction parameters matches the second axial direction in the model coordinate system corresponding to the target constraint component. Based on this, the aforementioned direction parameter adjustment module is also configured to perform: responding to the adjustment operation of the rotation axis direction parameters corresponding to the target constraint component, controlling the adjustment of the rotation axis direction parameters, and controlling the orientation of the target constraint component to adjust in accordance with the adjustment of the rotation axis direction parameters.
[0152] Furthermore, the aforementioned orientation adjustment parameters are also configured to: respond to an adjustment operation of the rotation axis orientation parameter corresponding to the target constraint component, control the adjustment of the rotation axis orientation parameter, and control the orientation of the target constraint component to adjust in accordance with the adjustment of the rotation axis orientation parameter.
[0153] Furthermore, the graphical user interface includes a rotation axis indicator corresponding to the rotation axis direction parameter, and the indicator adjustment module is also used to: adjust the indication direction corresponding to the rotation axis indicator according to the adjusted rotation axis direction parameter.
[0154] In a specific implementation, the aforementioned component attribute parameters also include: rotation angle parameters; wherein, the rotation angle is used to constrain the first scene component and / or the second scene component to have at least one of the following rotation angles in the rotation direction: minimum rotation angle and maximum rotation angle; based on this, the aforementioned identification display module is further configured to perform: obtaining the minimum rotation angle in the rotation angle parameters, and controlling the display of the rotation angle indicator based on the minimum rotation angle; and / or, obtaining the maximum rotation angle in the rotation angle parameters, and controlling the display of the rotation angle indicator based on the maximum rotation angle.
[0155] In a specific implementation, the aforementioned indicator display module is further configured to: respond to a rotation angle parameter that includes a parameter value that meets the second preset condition, and control the display of the rotation angle indicator in a third form; respond to a rotation angle parameter that does not include a parameter value that meets the second preset condition, and control the display of the rotation angle indicator in a fourth form.
[0156] In specific implementation, the above-mentioned second preset condition includes enabling the maximum rotation angle limit; when the maximum rotation angle limit is enabled, the maximum rotation angle and / or minimum rotation angle are set through the second editing operation; when the maximum rotation angle limit is not enabled, the rotation angle of the first scene component and / or the second scene component in the rotation direction is not limited.
[0157] Furthermore, the aforementioned component attribute parameters also include: swing angle parameters; wherein, the swing angle is used to constrain the maximum swing angle of the target component associated with the target constraint component in the rotation direction; based on this, the aforementioned identification display module is configured to perform: obtaining the maximum swing angle in the swing angle parameters, and controlling the display of the swing angle indicator based on the maximum swing angle.
[0158] Furthermore, the aforementioned component attribute parameters also include at least one of the following parameters: stiffness parameter, damping parameter, tension parameter, and component size parameter; based on this, the aforementioned display module is configured to perform: determining the current tension state of the target constraint component based on the component attribute parameters corresponding to the target constraint component, and displaying an index identifier on the target constraint component to indicate the tension state.
[0159] Furthermore, the aforementioned component attribute parameters include component display parameters; wherein, the component display parameters include one or more of the following parameters: component color parameters and component size parameters; the aforementioned device also includes a model display module, configured to perform: displaying a virtual model of the target constraint component in the game editing scene based on the component display parameters corresponding to the target constraint component.
[0160] In practical implementation, the above game running scenario also includes a virtual model of the target constraint component generated based on the component display parameters.
[0161] In an optional embodiment, the above-mentioned device further includes a model motion module, configured to perform: in response to the target scene component model being subjected to a force, determining the motion state of the target scene component model based on the component attribute parameters corresponding to the target constraint component associated with the target scene component model, and controlling the movement of the target scene component model in the game running scene based on the motion state; wherein, the target scene component model is a first scene component model or a second scene component model.
[0162] In specific implementation, the aforementioned component attribute parameters include position-driven parameters and / or velocity-driven parameters; wherein, the position-driven parameters are used to limit the movement of the target constraint component toward a preset target position, and the velocity-driven parameters are used to limit the movement speed of the target constraint component when moving toward the target position; based on this, the aforementioned model motion module is configured to perform: determining the force applied by the target constraint component to the target scene component model based on the position-driven parameters and / or velocity-driven parameters corresponding to the target constraint component, and the current position and / or current velocity of the target constraint component; and determining the motion state of the target scene component model based on the force.
[0163] In an optional embodiment, the position driving parameters include the target position and the position driving intensity, and the velocity driving parameters include the target velocity and the velocity driving intensity. The model motion module is configured to perform the following: subtracting the target position from the current position to obtain a first subtraction result; multiplying the first subtraction result by the position driving intensity to obtain a first multiplication result; determining the first multiplication result as the force applied by the target constraint component to the target scene component model; or, subtracting the target velocity from the current velocity to obtain a second subtraction result; multiplying the second subtraction result by the velocity driving intensity to obtain a second multiplication result; determining the second multiplication result as the force applied by the target constraint component to the target scene component model; or, determining the sum of the first multiplication result and the second multiplication result as the force applied by the target constraint component to the target scene component model.
[0164] Furthermore, the aforementioned component editing module 92 is configured to: respond to a second editing operation on the target constraint component, and control the display of a parameter setting panel corresponding to the target constraint component in the graphical user interface; wherein the parameter setting panel includes multiple editable controls and multiple component selection controls; respond to a first setting operation on the multiple editable controls, and determine the component attribute parameters corresponding to the target constraint component based on the first setting operation; respond to a second setting operation on the multiple component selection controls, and determine a first scene component and a second scene component from the game editing scene based on the second setting operation, so as to connect the first scene component and the second scene component to the target constraint component respectively.
[0165] Furthermore, the aforementioned component editing module 92 is configured to: respond to a trigger operation on the first component selection control among multiple component selection controls, and control the display of a first identifier in the graphical user interface; wherein the first identifier is used to indicate that the current state is in the selection of scene components; and respond to a selection operation on the target scene component in the game editing scene, determine the target scene component as the first scene component associated with the target constraint component, and deselect the first identifier in the graphical user interface.
[0166] Furthermore, the aforementioned component editing module 92 is also configured to: respond to a selection operation for a target scene component in the game editing scene, identify whether the component type of the target scene component belongs to a preset component type; if it does, control the graphical user interface to display a first prompt message, the first prompt message being used to indicate that the target scene component cannot be associated with the target constraint component; if it does not belong, determine the target scene component as the first scene component associated with the target constraint component.
[0167] Furthermore, the aforementioned device also includes a component hiding module, configured to perform: responding to a trigger operation on a first component selection control among a plurality of component selection controls, determining a scene component of a preset component type in the game editing scene, and hiding or displaying the scene component of the preset component type; wherein, the preset component type is the component type corresponding to a scene component that cannot be associated with a target constraint component.
[0168] In an optional embodiment, the first component selection control in the parameter setting panel corresponds to an anchor point setting control; based on this, the device further includes an anchor point setting module, configured to perform: after determining the target scene component as a first scene component associated with the target constraint component in response to a selection operation for a target scene component in the game editing scene, controlling the display of anchor point editing items in the graphical user interface in response to a trigger operation for the anchor point setting control; and determining the position of the first anchor point in the first scene component in response to a setting operation for the anchor point editing item; wherein the first anchor point is used to connect the first scene component with the target constraint component.
[0169] In an optional embodiment, the component generation module 91 is configured to: display a component editing window in a graphical user interface; wherein the component editing window includes multiple constraint component controls and multiple scene component controls; and respond to a selection operation on the target constraint component control in the component editing window, control the generation of a target constraint component in the game editing scene corresponding to the target constraint component control.
[0170] Furthermore, the aforementioned graphical user interface displays the target constraint component, the first scene component, and the second scene component in a first display mode; furthermore, the aforementioned device also includes a component selection module, configured to perform: in response to a selection operation on the target constraint component, display the target constraint component in a selected state in the graphical user interface, and display the first scene component and the second scene component associated with the target constraint component in a second display mode.
[0171] Furthermore, the aforementioned component selection module is also configured to perform the following: when the target constraint component is connected to only one scene component, respond to the selection operation for the target constraint component and display the target constraint component in a selected state in the graphical user interface.
[0172] The component editing device in the game provided in this disclosure has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.
[0173] This disclosure also provides an electronic device, as shown in FIG11, which includes 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 editing method in the above-mentioned game.
[0174] Specifically, the component editing method in the aforementioned game includes: displaying a graphical user interface by running the game program, the graphical user interface including a game editing scene; wherein the game editing scene includes multiple scene components; generating a target constraint component in the game editing scene in response to a first editing operation, wherein the target constraint component is configured with a virtual model that matches the target constraint effect corresponding to the constraint component; determining the component attribute parameters corresponding to the target constraint component, as well as a first scene component and a second scene component associated with the target constraint component in response to a second editing operation on the target constraint component; wherein the first scene component and the second scene component are scene components among multiple scene components, and the target constraint component is configured to constrain the motion relationship between the first scene component and / or the second scene component according to the component attribute parameters; and generating a game running scene corresponding to the game editing scene in the graphical user interface in response to a game running command, the game running scene including a first scene component model corresponding to the first scene component and a second scene component model corresponding to the second scene component.
[0175] The component editing method described above allows players to generate constraint components with model shapes in the game editing scene and edit the component attribute parameters of the constraint components, making the use of constraint components with constraint effects more intuitive and usable; at the same time, this editing method conforms to the player's operating habits and reduces the learning cost.
[0176] In an optional embodiment, the above-mentioned motion relationship includes at least one of the following: positional relationship, direction of movement, and direction of rotation.
[0177] In an optional embodiment, at least some component attribute parameters corresponding to the target constraint component are configured with indicator labels; the method further includes: in response to a selection operation on the target constraint component, displaying an indicator label determined based on the component attribute parameters corresponding to the target constraint component in a graphical user interface.
[0178] In an optional embodiment, the component attribute parameters include a movement direction parameter, which is used to control the movement direction of the first scene component and / or the second scene component connected to the target constraint component.
[0179] In an optional embodiment, the method further includes: responding to a rotation operation on the target constraint component, controlling and adjusting the orientation of the target constraint component in the game editing scene, and controlling the movement direction parameter corresponding to the target constraint component to adjust in accordance with the adjustment of the orientation of the target constraint component.
[0180] In an optional embodiment, the method further includes: responding to an adjustment operation on the movement direction parameter corresponding to the target constraint component, controlling the adjustment of the movement direction parameter, and controlling the orientation of the target constraint component to adjust in accordance with the adjustment of the movement direction parameter.
[0181] In an optional embodiment, the graphical user interface includes a movement direction indicator corresponding to the movement direction parameter, and the method further includes: adjusting the indication direction corresponding to the movement direction indicator according to the adjusted movement direction parameter.
[0182] In an optional embodiment, the first scene component and the second scene component associated with the target constraint component include a main component and a target component. The movement direction parameter is used to constrain the movement direction of the target component, and the movement direction is the movement direction of the target component relative to the main component.
[0183] In an optional embodiment, the component attribute parameters further include: a movement distance parameter; wherein the movement distance parameter is used to constrain the target component to move at least one of the following distances in the movement direction: a minimum movement distance and a maximum movement distance; displaying an indicator determined based on the component attribute parameters corresponding to the target constrained component in the graphical user interface includes at least one of the following steps: obtaining the minimum movement distance in the movement distance parameters, and controlling the display of the distance indicator based on the minimum movement distance; and obtaining the maximum movement distance in the movement distance parameters, and controlling the display of the distance indicator based on the maximum movement distance.
[0184] In an optional embodiment, the method further includes: responding to a parameter value in the movement distance parameter that meets a first preset condition, controlling the display of a distance indicator in a first form; and responding to a parameter value in the movement distance parameter that does not meet the first preset condition, controlling the display of a distance indicator in a second form.
[0185] In an optional embodiment, the first preset condition includes enabling the maximum movement distance limit; when the maximum movement distance limit is enabled, the maximum movement distance and / or minimum movement distance are set through the second editing operation; when the maximum movement distance limit is not enabled, the movement distance of the target component is not limited.
[0186] In an optional embodiment, the orientation of the distance indicator in the graphical user interface matches the movement direction indicated by the movement direction parameter.
[0187] In an optional embodiment, the above-mentioned component attribute parameters include position-driven parameters and / or velocity-driven parameters; wherein, the position-driven parameters are used to constrain the target constraint component to move toward a preset target position, and the velocity-driven parameters are used to constrain the movement speed of the target constraint component when moving toward the target position; during game execution, based on the position-driven parameters and / or velocity-driven parameters corresponding to the target constraint component, the force exerted by the target constraint component on the first scene component model and / or the second scene component model can be determined.
[0188] In an optional embodiment, displaying an indicator based on the component attribute parameters corresponding to the target constraint component in the graphical user interface includes at least one of the following steps: obtaining the target position in the position driving parameters and controlling the display of the position indicator according to the target position; and obtaining the movement speed in the speed driving parameters and controlling the display of the speed indicator according to the movement speed.
[0189] In an optional embodiment, the position indicator includes an endpoint and a line segment, with the endpoint of the position indicator located at the target position; the speed indicator includes an arrow and a line segment, with the arrow direction used to indicate the speed direction of the movement speed in the speed drive parameters, and the line segment length used to indicate the speed magnitude of the movement speed.
[0190] In an optional embodiment, the component attribute parameters include rotation axis direction parameters, which are used to control the rotation direction of the first scene component and / or the second scene component connected to the target constraint component; the method further includes: responding to an adjustment operation of the rotation axis direction parameter corresponding to the target constraint component, controlling the adjustment of the rotation axis direction parameter, and controlling the orientation of the target constraint component to adjust in accordance with the adjustment of the rotation axis direction parameter.
[0191] In an optional embodiment, the method further includes: responding to a rotation operation on the target constraint component, controlling and adjusting the orientation of the target constraint component in the game editing scene, and controlling the rotation axis direction parameter corresponding to the target constraint component to adjust in accordance with the adjustment of the orientation of the target constraint component.
[0192] In an optional embodiment, the graphical user interface includes a rotation axis indicator corresponding to the rotation axis direction parameter, and the method further includes: adjusting the indication direction corresponding to the rotation axis indicator according to the adjusted rotation axis direction parameter.
[0193] In an optional embodiment, the component attribute parameters further include: rotation angle parameters; wherein, the rotation angle is used to constrain the first scene component and / or the second scene component to have at least one of the following rotation angles in the rotation direction: minimum rotation angle and maximum rotation angle; displaying an indicator determined based on the component attribute parameters corresponding to the target constrained component in the graphical user interface includes at least one of the following steps: obtaining the minimum rotation angle in the rotation angle parameters, and controlling the display of the rotation angle indicator based on the minimum rotation angle; and obtaining the maximum rotation angle in the rotation angle parameters, and controlling the display of the rotation angle indicator based on the maximum rotation angle.
[0194] In an optional embodiment, the method further includes: responding to a rotation angle parameter including a parameter value that meets a second preset condition, controlling the display of the rotation angle indicator in a third form; and responding to a rotation angle parameter not including a parameter value that meets the second preset condition, controlling the display of the rotation angle indicator in a fourth form.
[0195] In an optional embodiment, the second preset condition includes enabling the maximum rotation angle limit; when the maximum rotation angle limit is enabled, the maximum rotation angle and / or minimum rotation angle are set through the second editing operation; when the maximum rotation angle limit is not enabled, the rotation angle of the first scene component and / or the second scene component in the rotation direction is not limited.
[0196] In an optional embodiment, the above component attribute parameters further include: a swing angle parameter; wherein the swing angle is used to constrain the maximum swing angle of the target component associated with the target constraint component in the rotation direction; the step of displaying an indicator determined based on the component attribute parameters corresponding to the target constraint component in the graphical user interface includes: obtaining the maximum swing angle in the swing angle parameter, and controlling the display of the swing angle indicator according to the maximum swing angle.
[0197] In an optional embodiment, the above-mentioned component attribute parameters include at least one of the following parameters: stiffness parameter, damping parameter, tension parameter, and component size parameter; the step of displaying an indicator determined based on the component attribute parameters corresponding to the target constraint component in the graphical user interface includes: determining the current tension state of the target constraint component based on the component attribute parameters corresponding to the target constraint component, and displaying an indicator on the target constraint component to indicate the tension state.
[0198] In an optional embodiment, the component attribute parameters include component display parameters; wherein, the component display parameters include one or more of the following parameters: component color parameters and component size parameters; the method further includes: displaying a virtual model of the target constraint component in the game editing scene based on the component display parameters corresponding to the target constraint component.
[0199] In an optional embodiment, the above-mentioned game running scenario also includes a virtual model of the target constraint component generated based on the component display parameters.
[0200] In an optional embodiment, the method further includes: in response to the target scene component model being subjected to a force, determining the motion state of the target scene component model based on the component attribute parameters corresponding to the target constraint component associated with the target scene component model, and controlling the movement of the target scene component model in the game running scene based on the motion state; wherein, the target scene component model is a first scene component model or a second scene component model.
[0201] In an optional embodiment, the aforementioned component attribute parameters include position-driven parameters and / or velocity-driven parameters; wherein, the position-driven parameters are used to limit the movement of the target constraint component toward a preset target position, and the velocity-driven parameters are used to limit the movement speed of the target constraint component when moving toward the target position; the step of determining the motion state of the target scene component model based on the component attribute parameters corresponding to the target constraint component associated with the target scene component model includes: determining the force applied by the target constraint component to the target scene component model based on the position-driven parameters and / or velocity-driven parameters corresponding to the target constraint component, and the current position and / or current velocity of the target constraint component; and determining the motion state of the target scene component model based on the force.
[0202] In an optional embodiment, the position driving parameters include the target position and the position driving intensity, and the velocity driving parameters include the target velocity and the velocity driving intensity. The step of determining the force exerted by the target constraint component on the target scene component model includes the following: subtracting the target position from the current position to obtain a first subtraction result; multiplying the first subtraction result by the position driving intensity to obtain a first multiplication result; determining the first multiplication result as the force exerted by the target constraint component on the target scene component model; subtracting the target velocity from the current velocity to obtain a second subtraction result; multiplying the second subtraction result by the velocity driving intensity to obtain a second multiplication result; determining the second multiplication result as the force exerted by the target constraint component on the target scene component model; and determining the sum of the first multiplication result and the second multiplication result as the force exerted by the target constraint component on the target scene component model.
[0203] In an optional embodiment, the steps of responding to the second editing operation on the target constraint component and determining the component attribute parameters corresponding to the target constraint component, as well as the first scene component and the second scene component associated with the target constraint component, include: responding to the second editing operation on the target constraint component and controlling the display of a parameter setting panel corresponding to the target constraint component in the graphical user interface; wherein the parameter setting panel includes multiple editable controls and multiple component selection controls; responding to the first setting operation on the multiple editable controls and determining the component attribute parameters corresponding to the target constraint component based on the first setting operation; responding to the second setting operation on the multiple component selection controls and determining the first scene component and the second scene component from the game editing scene based on the second setting operation, so as to connect the first scene component and the second scene component to the target constraint component respectively.
[0204] In an optional embodiment, the above-mentioned response to the second setting operation of the multiple component selection controls, and the step of determining the first scene component and the second scene component from the game editing scene based on the second setting operation, so as to connect the first scene component and the second scene component to the target constraint component respectively, includes: responding to the trigger operation of the first component selection control among the multiple component selection controls, controlling the display of the first identifier in the graphical user interface; wherein, the first identifier is used to indicate that the current state is selecting a scene component; responding to the selection operation of the target scene component in the game editing scene, determining the target scene component as the first scene component associated with the target constraint component, and canceling the display of the first identifier in the graphical user interface.
[0205] In an optional embodiment, the step of determining the target scene component as a first scene component associated with the target constraint component in response to the selection operation of the target scene component in the game editing scene includes: in response to the selection operation of the target scene component in the game editing scene, identifying whether the component type of the target scene component belongs to a preset component type; if it belongs, controlling the graphical user interface to display a first prompt message, the first prompt message being used to indicate that the target scene component cannot be associated with the target constraint component; if it does not belong, determining the target scene component as a first scene component associated with the target constraint component.
[0206] In an optional embodiment, the method further includes: responding to a trigger operation on a first component selection control among a plurality of component selection controls, determining a scene component of a preset component type in the game editing scene, and hiding or displaying the scene component of the preset component type; wherein, the preset component type is the component type corresponding to a scene component that cannot be associated with a target constraint component.
[0207] In an optional embodiment, the first component selection control in the parameter setting panel corresponds to an anchor point setting control; after determining the target scene component as the first scene component associated with the target constraint component in response to the selection operation of the target scene component in the game editing scene, the method further includes: controlling the display of anchor point editing items in the graphical user interface in response to the trigger operation of the anchor point setting control; determining the position of the first anchor point in the first scene component in response to the setting operation of the anchor point editing item; wherein the first anchor point is used to connect the first scene component with the target constraint component.
[0208] In an optional embodiment, the step of generating a target constraint component in the game editing scene in response to the first editing operation includes: displaying a component editing window in a graphical user interface; wherein the component editing window includes multiple constraint component controls and multiple scene component controls; and controlling the generation of a target constraint component corresponding to the target constraint component control in the game editing scene in response to a selection operation of the target constraint component control in the component editing window.
[0209] In an optional embodiment, the target constraint component, the first scene component, and the second scene component are displayed in the graphical user interface in a first display mode; the method further includes: in response to a selection operation on the target constraint component, displaying the target constraint component in a selected state in the graphical user interface, and displaying the first scene component and the second scene component associated with the target constraint component in a second display mode.
[0210] In an optional embodiment, the method further includes: when the target constraint component is connected to only one scene component, responding to a selection operation on the target constraint component, displaying the target constraint component in a selected state in the graphical user interface.
[0211] Furthermore, the electronic device shown in FIG11 also includes a bus 102 and a communication interface 103, and the processor 101, the communication interface 103 and the memory 100 are connected through the bus 102.
[0212] The memory 100 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 illustration, only a single bidirectional arrow is used in Figure 11, but this does not indicate that there is only one bus or one type of bus.
[0213] Processor 101 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 101 or by instructions in software form. The processor 101 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 disclosure. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 100, and processor 101 reads information from memory 100 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0214] This disclosure also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are invoked and executed by a processor, they cause the processor to implement the component editing method in the game described above. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0215] Specifically, the component editing method in the aforementioned game includes: displaying a graphical user interface by running the game program, the graphical user interface including a game editing scene; wherein the game editing scene includes multiple scene components; generating a target constraint component in the game editing scene in response to a first editing operation, wherein the target constraint component is configured with a virtual model that matches the target constraint effect corresponding to the constraint component; determining the component attribute parameters corresponding to the target constraint component, as well as a first scene component and a second scene component associated with the target constraint component in response to a second editing operation on the target constraint component; wherein the first scene component and the second scene component are scene components among multiple scene components, and the target constraint component is configured to constrain the motion relationship between the first scene component and / or the second scene component according to the component attribute parameters; and generating a game running scene corresponding to the game editing scene in the graphical user interface in response to a game running command, the game running scene including a first scene component model corresponding to the first scene component and a second scene component model corresponding to the second scene component.
[0216] The component editing method described above allows players to generate constraint components with model shapes in the game editing scene and edit the component attribute parameters of the constraint components, making the use of constraint components with constraint effects more intuitive and usable; at the same time, this editing method conforms to the player's operating habits and reduces the learning cost.
[0217] In an optional embodiment, the above-mentioned motion relationship includes at least one of the following: positional relationship, direction of movement, and direction of rotation.
[0218] In an optional embodiment, at least some component attribute parameters corresponding to the target constraint component are configured with indicator labels; the method further includes: in response to a selection operation on the target constraint component, displaying an indicator label determined based on the component attribute parameters corresponding to the target constraint component in a graphical user interface.
[0219] In an optional embodiment, the component attribute parameters include a movement direction parameter, which is used to control the movement direction of the first scene component and / or the second scene component connected to the target constraint component.
[0220] In an optional embodiment, the method further includes: responding to a rotation operation on the target constraint component, controlling and adjusting the orientation of the target constraint component in the game editing scene, and controlling the movement direction parameter corresponding to the target constraint component to adjust in accordance with the adjustment of the orientation of the target constraint component.
[0221] In an optional embodiment, the method further includes: responding to an adjustment operation on the movement direction parameter corresponding to the target constraint component, controlling the adjustment of the movement direction parameter, and controlling the orientation of the target constraint component to adjust in accordance with the adjustment of the movement direction parameter.
[0222] In an optional embodiment, the graphical user interface includes a movement direction indicator corresponding to the movement direction parameter, and the method further includes: adjusting the indication direction corresponding to the movement direction indicator according to the adjusted movement direction parameter.
[0223] In an optional embodiment, the first scene component and the second scene component associated with the target constraint component include a main component and a target component. The movement direction parameter is used to constrain the movement direction of the target component, and the movement direction is the movement direction of the target component relative to the main component.
[0224] In an optional embodiment, the component attribute parameters further include: a movement distance parameter; wherein the movement distance parameter is used to constrain the target component to move at least one of the following distances in the movement direction: a minimum movement distance and a maximum movement distance; displaying an indicator determined based on the component attribute parameters corresponding to the target constrained component in the graphical user interface includes at least one of the following steps: obtaining the minimum movement distance in the movement distance parameters, and controlling the display of the distance indicator based on the minimum movement distance; and obtaining the maximum movement distance in the movement distance parameters, and controlling the display of the distance indicator based on the maximum movement distance.
[0225] In an optional embodiment, the method further includes: responding to a parameter value in the movement distance parameter that meets a first preset condition, controlling the display of a distance indicator in a first form; and responding to a parameter value in the movement distance parameter that does not meet the first preset condition, controlling the display of a distance indicator in a second form.
[0226] In an optional embodiment, the first preset condition includes enabling the maximum movement distance limit; when the maximum movement distance limit is enabled, the maximum movement distance and / or minimum movement distance are set through the second editing operation; when the maximum movement distance limit is not enabled, the movement distance of the target component is not limited.
[0227] In an optional embodiment, the orientation of the distance indicator in the graphical user interface matches the movement direction indicated by the movement direction parameter.
[0228] In an optional embodiment, the above-mentioned component attribute parameters include position-driven parameters and / or velocity-driven parameters; wherein, the position-driven parameters are used to constrain the target constraint component to move toward a preset target position, and the velocity-driven parameters are used to constrain the movement speed of the target constraint component when moving toward the target position; during game execution, based on the position-driven parameters and / or velocity-driven parameters corresponding to the target constraint component, the force exerted by the target constraint component on the first scene component model and / or the second scene component model can be determined.
[0229] In an optional embodiment, displaying an indicator based on the component attribute parameters corresponding to the target constraint component in the graphical user interface includes at least one of the following steps: obtaining the target position in the position driving parameters and controlling the display of the position indicator according to the target position; and obtaining the movement speed in the speed driving parameters and controlling the display of the speed indicator according to the movement speed.
[0230] In an optional embodiment, the position indicator includes an endpoint and a line segment, with the endpoint of the position indicator located at the target position; the speed indicator includes an arrow and a line segment, with the arrow direction used to indicate the speed direction of the movement speed in the speed drive parameters, and the line segment length used to indicate the speed magnitude of the movement speed.
[0231] In an optional embodiment, the component attribute parameters include rotation axis direction parameters, which are used to control the rotation direction of the first scene component and / or the second scene component connected to the target constraint component; the method further includes: responding to an adjustment operation of the rotation axis direction parameter corresponding to the target constraint component, controlling the adjustment of the rotation axis direction parameter, and controlling the orientation of the target constraint component to adjust in accordance with the adjustment of the rotation axis direction parameter.
[0232] In an optional embodiment, the method further includes: responding to a rotation operation on the target constraint component, controlling and adjusting the orientation of the target constraint component in the game editing scene, and controlling the rotation axis direction parameter corresponding to the target constraint component to adjust in accordance with the adjustment of the orientation of the target constraint component.
[0233] In an optional embodiment, the graphical user interface includes a rotation axis indicator corresponding to the rotation axis direction parameter, and the method further includes: adjusting the indication direction corresponding to the rotation axis indicator according to the adjusted rotation axis direction parameter.
[0234] In an optional embodiment, the component attribute parameters further include: rotation angle parameters; wherein, the rotation angle is used to constrain the first scene component and / or the second scene component to have at least one of the following rotation angles in the rotation direction: minimum rotation angle and maximum rotation angle; displaying an indicator determined based on the component attribute parameters corresponding to the target constrained component in the graphical user interface includes at least one of the following steps: obtaining the minimum rotation angle in the rotation angle parameters, and controlling the display of the rotation angle indicator based on the minimum rotation angle; and obtaining the maximum rotation angle in the rotation angle parameters, and controlling the display of the rotation angle indicator based on the maximum rotation angle.
[0235] In an optional embodiment, the method further includes: responding to a rotation angle parameter including a parameter value that meets a second preset condition, controlling the display of the rotation angle indicator in a third form; and responding to a rotation angle parameter not including a parameter value that meets the second preset condition, controlling the display of the rotation angle indicator in a fourth form.
[0236] In an optional embodiment, the second preset condition includes enabling the maximum rotation angle limit; when the maximum rotation angle limit is enabled, the maximum rotation angle and / or minimum rotation angle are set through the second editing operation; when the maximum rotation angle limit is not enabled, the rotation angle of the first scene component and / or the second scene component in the rotation direction is not limited.
[0237] In an optional embodiment, the above component attribute parameters further include: a swing angle parameter; wherein the swing angle is used to constrain the maximum swing angle of the target component associated with the target constraint component in the rotation direction; the step of displaying an indicator determined based on the component attribute parameters corresponding to the target constraint component in the graphical user interface includes: obtaining the maximum swing angle in the swing angle parameter, and controlling the display of the swing angle indicator according to the maximum swing angle.
[0238] In an optional embodiment, the above-mentioned component attribute parameters include at least one of the following parameters: stiffness parameter, damping parameter, tension parameter, and component size parameter; the step of displaying an indicator determined based on the component attribute parameters corresponding to the target constraint component in the graphical user interface includes: determining the current tension state of the target constraint component based on the component attribute parameters corresponding to the target constraint component, and displaying an indicator on the target constraint component to indicate the tension state.
[0239] In an optional embodiment, the component attribute parameters include component display parameters; wherein, the component display parameters include one or more of the following parameters: component color parameters and component size parameters; the method further includes: displaying a virtual model of the target constraint component in the game editing scene based on the component display parameters corresponding to the target constraint component.
[0240] In an optional embodiment, the above-mentioned game running scenario also includes a virtual model of the target constraint component generated based on the component display parameters.
[0241] In an optional embodiment, the method further includes: in response to the target scene component model being subjected to a force, determining the motion state of the target scene component model based on the component attribute parameters corresponding to the target constraint component associated with the target scene component model, and controlling the movement of the target scene component model in the game running scene based on the motion state; wherein, the target scene component model is a first scene component model or a second scene component model.
[0242] In an optional embodiment, the aforementioned component attribute parameters include position-driven parameters and / or velocity-driven parameters; wherein, the position-driven parameters are used to limit the movement of the target constraint component toward a preset target position, and the velocity-driven parameters are used to limit the movement speed of the target constraint component when moving toward the target position; the step of determining the motion state of the target scene component model based on the component attribute parameters corresponding to the target constraint component associated with the target scene component model includes: determining the force applied by the target constraint component to the target scene component model based on the position-driven parameters and / or velocity-driven parameters corresponding to the target constraint component, and the current position and / or current velocity of the target constraint component; and determining the motion state of the target scene component model based on the force.
[0243] In an optional embodiment, the position driving parameters include the target position and the position driving intensity, and the velocity driving parameters include the target velocity and the velocity driving intensity. The step of determining the force exerted by the target constraint component on the target scene component model includes the following: subtracting the target position from the current position to obtain a first subtraction result; multiplying the first subtraction result by the position driving intensity to obtain a first multiplication result; determining the first multiplication result as the force exerted by the target constraint component on the target scene component model; subtracting the target velocity from the current velocity to obtain a second subtraction result; multiplying the second subtraction result by the velocity driving intensity to obtain a second multiplication result; determining the second multiplication result as the force exerted by the target constraint component on the target scene component model; and determining the sum of the first multiplication result and the second multiplication result as the force exerted by the target constraint component on the target scene component model.
[0244] In an optional embodiment, the steps of responding to the second editing operation on the target constraint component and determining the component attribute parameters corresponding to the target constraint component, as well as the first scene component and the second scene component associated with the target constraint component, include: responding to the second editing operation on the target constraint component and controlling the display of a parameter setting panel corresponding to the target constraint component in the graphical user interface; wherein the parameter setting panel includes multiple editable controls and multiple component selection controls; responding to the first setting operation on the multiple editable controls and determining the component attribute parameters corresponding to the target constraint component based on the first setting operation; responding to the second setting operation on the multiple component selection controls and determining the first scene component and the second scene component from the game editing scene based on the second setting operation, so as to connect the first scene component and the second scene component to the target constraint component respectively.
[0245] In an optional embodiment, the above-mentioned response to the second setting operation of the multiple component selection controls, and the step of determining the first scene component and the second scene component from the game editing scene based on the second setting operation, so as to connect the first scene component and the second scene component to the target constraint component respectively, includes: responding to the trigger operation of the first component selection control among the multiple component selection controls, controlling the display of the first identifier in the graphical user interface; wherein, the first identifier is used to indicate that the current state is selecting a scene component; responding to the selection operation of the target scene component in the game editing scene, determining the target scene component as the first scene component associated with the target constraint component, and canceling the display of the first identifier in the graphical user interface.
[0246] In an optional embodiment, the step of determining the target scene component as a first scene component associated with the target constraint component in response to the selection operation of the target scene component in the game editing scene includes: in response to the selection operation of the target scene component in the game editing scene, identifying whether the component type of the target scene component belongs to a preset component type; if it belongs, controlling the graphical user interface to display a first prompt message, the first prompt message being used to indicate that the target scene component cannot be associated with the target constraint component; if it does not belong, determining the target scene component as a first scene component associated with the target constraint component.
[0247] In an optional embodiment, the method further includes: responding to a trigger operation on a first component selection control among a plurality of component selection controls, determining a scene component of a preset component type in the game editing scene, and hiding or displaying the scene component of the preset component type; wherein, the preset component type is the component type corresponding to a scene component that cannot be associated with a target constraint component.
[0248] In an optional embodiment, the first component selection control in the parameter setting panel corresponds to an anchor point setting control; after determining the target scene component as the first scene component associated with the target constraint component in response to the selection operation of the target scene component in the game editing scene, the method further includes: controlling the display of anchor point editing items in the graphical user interface in response to the trigger operation of the anchor point setting control; determining the position of the first anchor point in the first scene component in response to the setting operation of the anchor point editing item; wherein the first anchor point is used to connect the first scene component with the target constraint component.
[0249] In an optional embodiment, the step of generating a target constraint component in the game editing scene in response to the first editing operation includes: displaying a component editing window in a graphical user interface; wherein the component editing window includes multiple constraint component controls and multiple scene component controls; and controlling the generation of a target constraint component corresponding to the target constraint component control in the game editing scene in response to a selection operation of the target constraint component control in the component editing window.
[0250] In an optional embodiment, the target constraint component, the first scene component, and the second scene component are displayed in the graphical user interface in a first display mode; the method further includes: in response to a selection operation on the target constraint component, displaying the target constraint component in a selected state in the graphical user interface, and displaying the first scene component and the second scene component associated with the target constraint component in a second display mode.
[0251] In an optional embodiment, the method further includes: when the target constraint component is connected to only one scene component, responding to a selection operation on the target constraint component, displaying the target constraint component in a selected state in the graphical user interface.
[0252] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, or the part that contributes to related technologies, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, terminal device, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0253] In the description of this disclosure, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0254] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A component editing method in a game, the method comprising: displaying a graphical user interface by running a game program, the graphical user interface comprising a game editing scene; wherein the game editing scene comprises a plurality of scene components; generating a target constraint component in the game editing scene in response to a first editing operation, wherein the target constraint component is configured with a virtual model matching a target constraint effect corresponding to the target constraint component; determining a component attribute parameter corresponding to the target constraint component and a first scene component and a second scene component associated with the target constraint component in response to a second editing operation on the target constraint component; wherein the first scene component and the second scene component are scene components in the plurality of scene components, and the target constraint component is configured to constrain a motion relationship of the first scene component and / or the second scene component according to the component attribute parameter; generating a game running scene corresponding to the game editing scene in the graphical user interface in response to a game running instruction, the game running scene comprising a first scene component model corresponding to the first scene component and a second scene component model corresponding to the second scene component.
2. The method of claim 1, wherein, The motion relationship comprises at least one of the following: a position relationship, a moving direction, and a rotating direction.
3. The method of claim 1, wherein, At least part of the component attribute parameter corresponding to the target constraint component is configured with an indication identifier; the method further comprises: displaying the indication identifier determined based on the component attribute parameter corresponding to the target constraint component in the graphical user interface in response to a selection operation on the target constraint component.
4. The method of claim 3, wherein, The component attribute parameter comprises a moving direction parameter for controlling a moving direction of the first scene component and / or the second scene component connected to the target constraint component.
5. The method of claim 4, wherein, The method further comprises: controlling to adjust an orientation of the target constraint component in the game editing scene in response to a rotating operation on the target constraint component, and controlling to adjust a moving direction parameter corresponding to the target constraint component to follow the adjustment of the orientation of the target constraint component.
6. The method of claim 4, wherein, The method further comprises: controlling to adjust the moving direction parameter in response to an adjustment operation on the moving direction parameter corresponding to the target constraint component, and controlling to adjust the orientation of the target constraint component to follow the adjustment of the moving direction parameter.
7. The method of claim 5 or 6, wherein, The graphical user interface comprises a moving direction indication identifier corresponding to the moving direction parameter, and the method further comprises: adjusting an indication direction corresponding to the moving direction indication identifier according to the adjusted moving direction parameter.
8. The method of claim 4, wherein, The first scene component and the second scene component associated with the target constraint component comprise a subject component and a target component, and the moving direction parameter is used to constrain a moving direction of the target component, and the moving direction is a moving direction of the target component relative to the subject component.
9. The method of claim 8, wherein, The component attribute parameter further comprises a moving distance parameter; wherein the moving distance parameter is used to constrain at least one of the following moving distances of the target component in the moving direction: a minimum moving distance and a maximum moving distance. The displaying, in the graphical user interface, of the indication mark determined based on the component attribute parameter corresponding to the target constraint component comprises at least one of the following steps: acquiring a minimum movement distance in the movement distance parameter, and controlling display of the distance indication mark according to the minimum movement distance; and acquiring a maximum movement distance in the movement distance parameter, and controlling display of the distance indication mark according to the maximum movement distance.
10. The method of claim 9, wherein, The method further comprises: in response to the movement distance parameter including a parameter value meeting a first preset condition, controlling display of the distance indication mark in a first form; in response to the movement distance parameter not including a parameter value meeting the first preset condition, controlling display of the distance indication mark in a second form.
11. The method of claim 10, wherein, The first preset condition comprises starting the maximum movement distance limit; when the maximum movement distance limit is started, the maximum movement distance and / or the minimum movement distance is set through the second editing operation; when the maximum movement distance limit is not started, the movement distance of the target component is not limited.
12. The method of claim 10, wherein, The orientation of the distance indication mark in the graphical user interface matches the movement direction indicated by the movement direction parameter.
13. The method of claim 3, wherein, The component attribute parameter comprises a position driving parameter and / or a speed driving parameter; the position driving parameter is used to constrain the target constraint component to move towards a preset target position, and the speed driving parameter is used to constrain the movement speed of the target constraint component when moving towards the target position; during the game running, the force applied by the target constraint component to the first scene component model and / or the second scene component model can be determined based on the position driving parameter and / or the speed driving parameter corresponding to the target constraint component.
14. The method of claim 13, wherein, The displaying, in the graphical user interface, of the indication mark determined based on the component attribute parameter corresponding to the target constraint component comprises at least one of the following steps: acquiring a target position in the position driving parameter, and controlling display of a position indication mark according to the target position; and acquiring a movement speed in the speed driving parameter, and controlling display of a speed indication mark according to the movement speed.
15. The method of claim 14, wherein, The position indication mark comprises an endpoint and a line segment, and the endpoint of the position indication mark is located at the target position. The speed indication mark comprises an arrow and a line segment, the direction of the arrow is used to indicate the speed direction of the movement speed in the speed driving parameter, and the length of the line segment is used to indicate the speed size of the movement speed.
16. The method of claim 3, wherein, The component attribute parameter comprises a rotation axis direction parameter, the rotation axis direction parameter is used to control the rotation direction of the first scene component and / or the second scene component connected to the target constraint component; the method further comprises: in response to an adjustment operation on the rotation axis direction parameter corresponding to the target constraint component, controlling adjustment of the rotation axis direction parameter and controlling the orientation of the target constraint component to follow the adjustment of the rotation axis direction parameter.
17. The method of claim 16, wherein, The method further comprises In response to a rotation operation on the target constraint component, the orientation of the target constraint component in the game editing scene is adjusted, and a corresponding rotation axis direction parameter of the target constraint component is adjusted to follow the adjustment of the orientation of the target constraint component.
18. The method of claim 16, wherein, The graphical user interface comprises a rotation axis indication corresponding to the rotation axis direction parameter, and the method further comprises: The indication direction of the rotation axis indication is adjusted according to the adjusted rotation axis direction parameter.
19. The method of claim 16, wherein, The component attribute parameter further comprises a rotation angle parameter, wherein the rotation angle is used to constrain the first scene component and / or the second scene component in the rotation direction to at least one rotation angle, i.e., a minimum rotation angle and a maximum rotation angle. The step of displaying, in the graphical user interface, the indication determined based on the component attribute parameter corresponding to the target constraint component comprises at least one of the following steps: The minimum rotation angle in the rotation angle parameter is obtained, and a rotation angle indication is displayed according to the minimum rotation angle; and The maximum rotation angle in the rotation angle parameter is obtained, and the rotation angle indication is displayed according to the maximum rotation angle.
20. The method of claim 19, wherein, The method further comprises: In response to the rotation angle parameter comprising a parameter value meeting a second preset condition, the rotation angle indication is displayed in a third form; In response to the rotation angle parameter not comprising a parameter value meeting the second preset condition, the rotation angle indication is displayed in a fourth form.
21. The method of claim 20, wherein, The second preset condition comprises enabling the maximum rotation angle limitation, and the maximum rotation angle and / or the minimum rotation angle are set through the second editing operation when the maximum rotation angle limitation is enabled; and the rotation angle of the first scene component and / or the second scene component in the rotation direction is not limited when the maximum rotation angle limitation is not enabled.
22. The method of claim 19, wherein, The component attribute parameter further comprises a swing angle parameter, wherein the swing angle is used to constrain the maximum swing angle of a target component associated with the target constraint component in the rotation direction; The step of displaying, in the graphical user interface, the indication determined based on the component attribute parameter corresponding to the target constraint component comprises: The maximum swing angle in the swing angle parameter is obtained, and a swing angle indication is displayed according to the maximum swing angle.
23. The method of claim 3, wherein, The component attribute parameter comprises at least one of the following parameters: a stiffness parameter, a damping parameter, a stretching parameter, and a component size parameter; The step of displaying, in the graphical user interface, the indication determined based on the component attribute parameter corresponding to the target constraint component comprises: Based on the component attribute parameter corresponding to the target constraint component, a stretching state of the target constraint component is determined, and an index indication for indicating the stretching state is displayed on the target constraint component.
24. The method of claim 1, wherein, The component attribute parameter comprises a component display parameter, wherein the component display parameter comprises one or more of the following parameters: a component color parameter and a component size parameter; The method further comprises: displaying a virtual model of the target constraint component in the game editing scene based on the component display parameter corresponding to the target constraint component.
25. The method of claim 24, wherein, The game running scene further comprises the virtual model of the target constraint component generated according to the component display parameter.
26. The method of claim 1, wherein, The method further comprises: In response to the target scene component model being subjected to a force, determining a motion state of the target scene component model based on the component attribute parameter corresponding to the target constraint component associated with the target scene component model, and controlling the motion of the target scene component model in the game running scene based on the motion state; The target scene component model is the first scene component model or the second scene component model.
27. The method of claim 26, wherein, The component attribute parameter comprises a position driving parameter and / or a speed driving parameter; wherein the position driving parameter is used to limit the movement of the target constraint component towards a preset target position, and the speed driving parameter is used to limit the moving speed of the target constraint component when moving towards the target position; The step of determining the motion state of the target scene component model based on the component attribute parameter corresponding to the target constraint component associated with the target scene component model comprises: Determining the force applied by the target constraint component to the target scene component model based on the position driving parameter and / or the speed driving parameter corresponding to the target constraint component, and the current position and / or current speed of the target constraint component; Determining the motion state of the target scene component model based on the force.
28. The method of claim 27, wherein, The position driving parameter comprises a target position and a position driving intensity, and the speed driving parameter comprises a target speed and a speed driving intensity; The step of determining the force applied by the target constraint component to the target scene component model comprises one of the following: Subtracting the target position from the current position to obtain a first subtraction result, multiplying the first subtraction result by the position driving intensity to obtain a first multiplication result, and determining the first multiplication result as the force applied by the target constraint component to the target scene component model; Subtracting the target speed from the current speed to obtain a second subtraction result, multiplying the second subtraction result by the speed driving intensity to obtain a second multiplication result, and determining the second multiplication result as the force applied by the target constraint component to the target scene component model; Determining the sum of the first multiplication result and the second multiplication result as the force applied by the target constraint component to the target scene component model.
29. The method of claim 1, wherein, The step of determining the component attribute parameter corresponding to the target constraint component, and the first scene component and the second scene component associated with the target constraint component in response to the second editing operation on the target constraint component comprises: In response to the second editing operation on the target constraint component, controlling the display of a parameter setting panel corresponding to the target constraint component in the graphical user interface; wherein the parameter setting panel comprises a plurality of editable controls and a plurality of component selection controls. In response to a first setting operation for the plurality of editable controls, determining a component attribute parameter corresponding to the target constraint component based on the first setting operation; In response to a second setting operation for the plurality of component selection controls, determining the first scene component and the second scene component from the game editing scene based on the second setting operation, so as to connect the first scene component and the second scene component to the target constraint component respectively.
30. The method of claim 29, wherein, The step of determining the first scene component and the second scene component from the game editing scene based on the second setting operation, so as to connect the first scene component and the second scene component to the target constraint component respectively, in response to a second setting operation for the plurality of component selection controls, comprises: In response to a triggering operation for a first component selection control in the plurality of component selection controls, controlling the first identification to be displayed in the graphical user interface; wherein the first identification is used to prompt that the current state is in the selection of a scene component; In response to a selection operation for a target scene component in the game editing scene, determining the target scene component as the first scene component associated with the target constraint component, and canceling the display of the first identification in the graphical user interface.
31. The method of claim 30, wherein, The step of determining the target scene component as the first scene component associated with the target constraint component in response to a selection operation for a target scene component in the game editing scene, comprises: In response to a selection operation for a target scene component in the game editing scene, identifying whether the component type of the target scene component belongs to a preset component type; If it belongs, controlling the first prompt information to be displayed in the graphical user interface, wherein the first prompt information is used to indicate that the target scene component cannot be associated with the target constraint component; If it does not belong, determining the target scene component as the first scene component associated with the target constraint component.
32. The method of claim 30, wherein, The method further comprises: In response to a triggering operation for a first component selection control in the plurality of component selection controls, determining a scene component of a preset component type in the game editing scene, and hiding the scene component of the preset component type; wherein the preset component type is a component type corresponding to a scene component that cannot be associated with the target constraint component.
33. The method of claim 30, wherein, The first component selection control in the parameter setting panel corresponds to an anchor point setting control; After the step of determining the target scene component as the first scene component associated with the target constraint component in response to a selection operation for a target scene component in the game editing scene, the method further comprises: In response to a triggering operation for the anchor point setting control, controlling the anchor point editing item to be displayed in the graphical user interface; In response to a setting operation for the anchor point editing item, determining the position of a first anchor point in the first scene component; wherein the first anchor point is used to connect the first scene component to the target constraint component.
34. The method of claim 1, wherein, The step of generating the target constraint component in the game editing scene in response to the first editing operation, comprises: displaying a component editing window in the graphical user interface; wherein the component editing window comprises a plurality of constraint component controls and a plurality of scene component controls; in response to a selection operation on a target constraint component control in the component editing window, controlling generation of a target constraint component corresponding to the target constraint component control in the game editing scene.
35. The method of claim 1, wherein, displaying the target constraint component, the first scene component and the second scene component in the graphical user interface in a first display manner; the method further comprises: in response to a selection operation on the target constraint component, displaying the target constraint component in a selected state in the graphical user interface, and displaying the first scene component and the second scene component associated with the target constraint component in a second display manner.
36. The method of claim 35, wherein, the method further comprises: in response to a selection operation on the target constraint component, displaying the target constraint component in a selected state in the graphical user interface when the target constraint component is connected to only one of the scene components.
37. An apparatus for component editing in a game, the apparatus comprising: an interface display module configured to display a graphical user interface by running a game program, the graphical user interface comprising a game editing scene; wherein the game editing scene comprises a plurality of scene components; a component generation module configured to generate a target constraint component in the game editing scene in response to a first editing operation, wherein the target constraint component is configured with a virtual model matching a target constraint effect corresponding to the target constraint component; a component editing module configured to determine component attribute parameters corresponding to the target constraint component and a first scene component and a second scene component associated with the target constraint component in response to a second editing operation on the target constraint component; wherein the first scene component and the second scene component are scene components in the plurality of scene components, and the target constraint component is configured to constrain a motion relationship of the first scene component and / or the second scene component according to the component attribute parameters; a game running module configured to generate a game running scene corresponding to the game editing scene in the graphical user interface in response to a game running instruction, the game running scene comprising a first scene component model corresponding to the first scene component and a second scene component model corresponding to the second scene component.
38. An electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor, the processor executing the machine executable instructions to implement the method for component editing in a game according to any one of claims 1 to 36.
39. A computer readable storage medium storing computer executable instructions, the computer executable instructions, when invoked and executed by a processor, causing the processor to implement the method for component editing in a game according to any one of claims 1 to 36.
Citation Information
Patent Citations
Real-time game skill debugging method, equipment, device and system
CN109876448A
Physical effect simulation method and device, storage medium, processor and electronic device
CN110694276A
Component generation method and device in game scene, storage medium and electronic equipment
CN116672719A
Interaction control method and device in game and electronic equipment
CN116899217A
Game scene component generation method and device, storage medium and electronic equipment
CN117717784A