Game element variable setting method and device, equipment, storage medium and product

By using the relationship curve editing interface in game development to adjust the control point attribute value of game elements and configure game element control variables and target variables, the problem of inconvenient setting of game element variables is solved, and the diversified performance effect of game elements is achieved. Improvement of development efficiency.

CN119406057APending Publication Date: 2025-02-11SANDBOX NETWORK TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411371185.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

During the game development process, it is difficult for the prior art to set variables of game elements in a simple and efficient manner, resulting in limited game effects complexity.

Method used

By displaying the editing interface, including at least one relationship curve, and adjusting instructions and variable configuration instructions according to the curve, adjusting the attribute value of the target control point, and generating a game element variable relationship curve, thereby determining the change with the change of the attribute value of the game element control variable. The target attribute value of the game element target variable.

Benefits of technology

It realizes efficient and simple setting of game element variables, enhances the game's expressiveness and experience effect, and improves development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119406057A_ABST
    Figure CN119406057A_ABST
Patent Text Reader

Abstract

The invention provides a game element variable setting method and device, equipment, a storage medium and a product, and the method comprises the steps: displaying an editing interface which comprises at least one relation curve; the relation curve comprises at least one control point; according to the first curve adjusting instruction, adjusting the attribute value of the target control point so as to adjust the curve pattern of the relation curve where the target control point is located; and according to a variable configuration instruction, performing game element control variable and game element target variable configuration on the adjusted relation curve to obtain a game element variable relation curve so as to determine a target attribute value of the game element target variable which changes along with the change of the attribute value of the game element control variable. Visual editing of the relation curve can be achieved, developers can efficiently, simply and conveniently set the variables of the game elements, the diversified expression effect of the game elements is achieved, the expressive force and the experience effect of the game are enhanced, and the game development efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of game technology, and in particular to a method, device, equipment, storage medium and product for setting game element variables. Background Art

[0002] In the process of game development, it is often necessary to set one or more attributes of a game element to change with changes in other variables in order to achieve various complex game effects.

[0003] For example, in a game scene with a day-night cycle, set the sun's brightness, height, size, position and other attributes to change over time; set the character's skeleton transition trajectory between two key frames of the skeletal animation; set the movement speed that changes over time after a rigid body collision, etc.

[0004] In this context, how to easily and efficiently set the variables of game elements is an urgent problem that needs to be solved. Summary of the invention

[0005] The present invention provides a method, device, equipment, storage medium and product for setting game element variables, so as to solve the defect of inconvenient setting of game element variables in the prior art, realize efficient and simple setting of game element variables, and realize diversified performance effects of game elements.

[0006] The present invention provides a method for setting game element variables, comprising: Displaying an editing interface, wherein the editing interface includes at least one relationship curve; the relationship curve includes at least one control point; According to the first curve adjustment instruction, the attribute value of the target control point is adjusted to adjust the curve style of the relationship curve where the target control point is located; According to the variable configuration instruction, the game element control variable and the game element target variable are configured for the adjusted relationship curve to obtain the game element variable relationship curve, so as to determine the target attribute value of the game element target variable that changes with the attribute value of the game element control variable according to at least one game element variable relationship curve.

[0007] According to a method for setting a game element variable provided by the present invention, the attribute value of the target control point includes at least one of a coordinate value, an in-tangent slope value, and an out-tangent slope value; and adjusting the attribute value of the target control point according to the first curve adjustment instruction includes: If the adjustment information carried by the first curve adjustment instruction is to move to a target position, a first in-tangent slope value and a first out-tangent slope value are calculated according to the coordinate value of the target position, and the attribute value of the target control point is adjusted according to the coordinate value of the target position, the first in-tangent slope value, and the first out-tangent slope value; If the adjustment information carried by the first curve adjustment instruction is a rotation preset angle, the second in-tangent slope value and the second out-tangent slope value are calculated according to the preset angle, and the attribute value of the target control point is adjusted according to the second in-tangent slope value and the second out-tangent slope value.

[0008] According to a method for setting game element variables provided by the present invention, before configuring the game element control variables and the game element target variables on the adjusted relationship curve according to the variable configuration instruction to obtain the game element variable relationship curve, the method further includes: According to the second curve adjustment instruction, the target control point is moved to the target area of ​​the editing interface according to the current zoom ratio; Calculating an offset according to an initial coordinate value of the target control point and a coordinate value of the target control point after movement; According to the current scaling ratio and the offset, the relationship curve where the target control point is located is moved to the target area.

[0009] According to a method for setting game element variables provided by the present invention, before configuring the game element control variables and the game element target variables on the adjusted relationship curve according to the variable configuration instruction to obtain the game element variable relationship curve, the method further includes: According to the third curve adjustment instruction, the attribute value of the curve endpoint is adjusted to adjust the curve style of the relationship curve where the curve endpoint is located; According to the fourth curve adjustment instruction, the target curve segment between the two curve intersections is deleted, and new curve endpoints are re-determined to adjust the start and end positions of the relationship curve where the new curve endpoints are located.

[0010] According to a method for setting game element variables provided by the present invention, the game element variable relationship curve is also obtained by the following method: Obtaining description information for a target variable of a game element; the description information carries an identifier of a control variable of the game element; Input the description information into the trained AI model to obtain a curve generation instruction returned by the AI ​​model; According to the curve generation instruction, a game element variable relationship curve for characterizing the relationship between the game element control variable and the game element target variable is generated in the editing interface.

[0011] According to a method for setting a game element variable provided by the present invention, the method of determining a target attribute value of a game element target variable that changes with a change in an attribute value of a game element control variable according to at least one game element variable relationship curve comprises: If the current attribute value of the game element control variable corresponds to a game element variable relationship curve, then on the game element variable relationship curve, determine the target attribute value of the game element target variable corresponding to the current attribute value of the game element control variable; If the current attribute value of the game element control variable corresponds to multiple game element variable relationship curves, then on the multiple game element variable relationship curves, multiple attribute values ​​corresponding to the current attribute value of the game element control variable are determined, and the target attribute value of the game element target variable is selected from the range interval composed of the multiple attribute values.

[0012] The present invention also provides a device for setting game element variables, comprising: A display module, used for displaying an editing interface, wherein the editing interface includes at least one relationship curve; and the relationship curve includes at least one control point; A first adjustment module, configured to adjust the attribute value of the target control point according to the first curve adjustment instruction, so as to adjust the curve style of the relationship curve where the target control point is located; The configuration module is used to configure the game element control variable and the game element target variable on the adjusted relationship curve according to the variable configuration instruction, and obtain the game element variable relationship curve, so as to determine the target attribute value of the game element target variable that changes with the attribute value of the game element control variable according to at least one game element variable relationship curve.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a method for setting game element variables as described in any one of the above is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for setting game element variables as described in any one of the above is implemented.

[0015] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for setting game element variables as described in any one of the above is implemented.

[0016] The method, device, equipment, storage medium and product for setting game element variables provided by the present invention adjust the attribute value of the target control point on the relationship curve in the editing interface according to the first curve adjustment instruction to adjust the curve style of the relationship curve where the target control point is located; configure the game element control variable and the game element target variable on the adjusted relationship curve according to the variable configuration instruction to obtain the game element variable relationship curve, so as to determine the target attribute value of the game element target variable that changes with the attribute value of the game element control variable according to at least one game element variable relationship curve, and realize visual editing of the game element variable relationship curve, so that developers can efficiently and easily set the variables of the game elements, realize diversified performance effects of the game elements, enhance the expressiveness and experience effect of the game, and help improve development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a flowchart of a method for setting game element variables provided by an embodiment of the present invention.

[0019] Figure 2 It is a schematic diagram of generating a relationship curve in an editing interface provided by an embodiment of the present invention.

[0020] Figure 3 It is a schematic diagram of selecting target attribute values ​​provided by an embodiment of the present invention.

[0021] Figure 4 It is a structural diagram of a device for setting game element variables provided by an embodiment of the present invention.

[0022] Figure 5 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] Figure 1 1 is a flow chart of a method for setting game element variables provided by an embodiment of the present invention. Figure 1 The embodiment of the present invention provides a method for setting game element variables, which may specifically include the following steps: Step 101: display an editing interface, wherein the editing interface includes at least one relationship curve; and the relationship curve includes at least one control point.

[0025] It should be noted that the execution subject of the method for setting game element variables provided in the embodiment of the present invention may be a game engine, a game editor corresponding to the game engine, an electronic device running the game engine, a component in an electronic device, an integrated circuit or a chip. The electronic device may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc., and the non-mobile electronic device may be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., and the embodiment of the present invention does not specifically limit this. The following embodiment of the present invention is described with the game engine as the execution subject.

[0026] A game engine is a software framework used to help developers create, design and run games. It can integrate a series of components for implementing different functions and provide a series of tools and functions, including graphics rendering, physics simulation, collision detection, audio management, scene management and animation, etc. Game engines can provide developers with a large number of reusable code libraries and game development tools to improve development efficiency and speed up the game development process.

[0027] The game engine may include a corresponding game editor. The game editor may be a tool for editing various functions provided by the game engine, and may provide a visual editing interface, allowing developers to define objects, scenes, materials, animations, logic, and other content in the game world through operations such as dragging and setting parameters. The game editor may also provide tools such as script writing, previewing, and debugging to help developers make games more efficiently.

[0028] The execution subject of the method for setting game element variables provided in the embodiment of the present invention may be a game engine. The visual interface provided by the game editor may display an editing interface, and the editing interface may include at least one relationship curve generated according to preset key points.

[0029] The preset key point may include at least one control point. The control point may refer to a point used to control the curve style, and the properties of the control point may include an x-axis coordinate, a y-axis coordinate, an in-tangent slope, and an out-tangent slope.

[0030] Specifically, a curve database may be pre-set, and the curve database may be used to store a variety of key point combinations for generating relationship curves. Different key point combinations may be used to generate relationship curves of different styles, such as straight lines, oblique straight lines, sine curves, etc. A straight line may refer to a special curve with a curvature of 0.

[0031] In an embodiment of the present invention, when an event for setting a game element variable is triggered, the corresponding interface resource can be read, an editing interface can be generated according to a preset layout, and at least one relationship curve can be generated in the editing interface according to a preset key point combination.

[0032] In some embodiments, the relationship curve may be generated according to a default key point combination, which may be a combination specified in advance by a user or a combination ranked at the top in the curve database.

[0033] In some embodiments, an instruction to generate a relationship curve in an editing interface may be received and responded to, a key point combination corresponding to the relationship curve pointed to by the instruction may be determined, and the relationship curve pointed to by the instruction may be generated in the editing interface according to the key point combination.

[0034] Figure 2 Schematic diagram of generating a relationship curve in an editing interface provided by an embodiment of the present invention. Figure 2 After the editing interface is generated, the user can select any relationship curve from the curve database displayed in the lower area of ​​the editing interface; for the relationship curve selected by the user, the relationship curve can be generated in the editing interface according to the corresponding key point combination. In this way, multiple curves can be generated or the relationship curve desired by the user can be generated.

[0035] Interface resources may refer to resources required for drawing an editing interface, such as UI (User Interface) controls, images, etc. A preset layout may refer to a style layout of an editing interface, which may be defined by a developer.

[0036] The editing interface in the embodiment of the present invention may include an x-axis and a y-axis, each representing two different game element variables. The quadrants obtained by dividing the x-axis and the y-axis are display areas, and a relationship curve may be generated in the display area to represent the relationship between the two game element variables.

[0037] Step 102: According to the first curve adjustment instruction, the attribute value of the target control point is adjusted to adjust the curve style of the relationship curve where the target control point is located.

[0038] In some optional embodiments, a control point determination instruction can be received to determine whether the distance between the first coordinate input in the control point determination instruction and the relationship curve is within a specified range; if within the specified range, the target control point can be determined on the relationship curve based on the first coordinate value of the first coordinate.

[0039] The control point determination instruction may be generated when a selection operation such as a click or touch on the relationship curve is detected. Specifically, the first coordinate input by the control point determination instruction may be received, a second coordinate value located on the relationship curve may be determined according to the first coordinate value of the first coordinate, and a second coordinate (i.e., a coordinate on the relationship curve; the first coordinate value is an x-axis coordinate value, and the second coordinate value is a y-axis coordinate value) may be determined according to the first coordinate value and the second coordinate value, and the distance value between the first coordinate and the second coordinate may be calculated to determine whether the distance value is within a preset range.

[0040] If it is within the preset range, a control point can be generated on the relationship curve according to the second coordinate. If the distances between the first coordinate and multiple relationship curves are all within the specified range, the target control point can be determined on the relationship curve with the smallest distance value.

[0041] Exemplarily, the coordinates P1 (X1, Y1) input by a click operation can be received, Y2 located on the relationship curve can be determined based on X1, and point P2 (X1, Y2) can be determined based on X1 and Y2, and then it can be determined whether the distance value between points P1 and P2 is within a specified range (for example, 10 pixel units); if it is within the specified range, it can be determined that the coordinates P1 input by the click operation are located on the relationship curve.

[0042] Since the line thickness of the relationship curve is usually small, the embodiment of the present invention can facilitate the user to operate the relationship curve by judging whether the distance value between the coordinates of the control point determination instruction input and the relationship curve is within a specified range.

[0043] In the embodiment of the present invention, a first curve adjustment instruction may be received, and at least one attribute value of the target control point may be updated and adjusted according to the first curve adjustment instruction, thereby updating and adjusting the curve style of the relationship curve where the target control point is located according to the updated and adjusted target control point.

[0044] The first curve adjustment instruction may be generated when a trigger operation for a preset control corresponding to a target control point is detected. Specifically, after the target control point is determined, a preset control may be displayed for the target control point; the user may adjust at least one attribute value of the target control point by performing touch operations such as moving or rotating the preset control corresponding to the target control point, thereby adjusting the curve style of the relationship curve to which the target control point is located according to the updated target control point.

[0045] Step 103, according to the variable configuration instruction, configure the game element control variable and the game element target variable of the adjusted relationship curve to obtain the game element variable relationship curve, so as to determine the target attribute value of the game element target variable that changes with the attribute value of the game element control variable according to at least one game element variable relationship curve.

[0046] In some optional embodiments, before the game element control variables and the game element target variables are configured for the adjusted relationship curve according to the variable configuration instruction and the game element variable relationship curve is obtained (i.e., after the editing is completed and the final relationship curve is obtained), a curve saving instruction for the target relationship curve can be received and responded to, and a key point combination can be determined from the target relationship curve and stored in a curve database. The key point combination can include all the control points of the target relationship curve, and the target relationship curve is added to the curve database, thereby facilitating the reuse of the edited relationship curve and helping to improve development efficiency.

[0047] The curve save instruction may be generated when a trigger operation for a preset save control is detected. The preset save control may be used to add a target relationship curve selected by a user to a database. The curve save instruction may also be generated when a trigger operation for a shortcut key is detected.

[0048] The user can select the target relationship curve to be added to the database, thereby triggering the operation of the preset control. In response to the trigger operation, the computer can determine the key point combination from the selected target relationship curve and write it into the curve database.

[0049] The variable configuration command can be used to configure the game element control variables and game element target variables for all relationship curves in the editing interface. The game element target variable is the variable of the attribute of the game element. The game element control variable can be time or the variable of the attribute of other game elements.

[0050] The variable configuration instruction can be a code instruction. The developer can specify the game element control variable and the game element target variable of the relationship curve by writing code, and the computer executes the code instruction to configure the control variable and the target variable represented by the relationship curve. After the configuration is completed, the game element variable relationship curve can be obtained.

[0051] The variable configuration instruction may also be generated when an associated operation on other game element attribute items is detected, and the present invention does not impose any specific limitation thereto.

[0052] Game elements can include various simulation effects and virtual objects used to build the game world and provide interactivity. Simulation effects can include special effects, sound effects, animations, etc. Virtual objects can include characters, props, objects, terrain, and all other entities in the game scene.

[0053] Specifically, it can receive variable configuration instructions carrying game element control variable identifiers and game element target variable identifiers, and respond to variable configuration instructions. According to the game element variable identifiers carried in the instructions, the game element control variables and game element target variables of all relationship curves in the editing interface are configured. After the configuration is completed, the game element variable relationship curve can be obtained.

[0054] After editing the game element variable relationship curve (i.e. setting the game element variables) during the game development process, the game element variable relationship curve can be used to control the changes of the game elements during the game execution.

[0055] Game execution can refer to the process of displaying, operating and interacting with the game scene and the virtual objects and two-dimensional objects contained therein through programming languages ​​or instructions. When the game is executed, the computer can load the game scene resources and render them according to the relevant instructions in the program code, and detect the player's operation events, such as clicks, slides, etc.; then execute the corresponding functions or trigger the corresponding events according to the player's operation response, so as to realize the interaction between the player and the game world.

[0056] Game execution can occur during the game process or during the game editing process. For example, when editing a game, the game operation is often simulated in real time to show the developer a real-time preview of the game's effects and operation status, making it easier to debug and optimize various aspects of the game.

[0057] In an embodiment of the present invention, after configuring the game element control variables and the game element target variables on the adjusted relationship curve, a game element variable relationship curve representing the relationship data between the game element target variables and the game element control variables can be obtained, and the game element variable relationship data can be saved at this time.

[0058] Specifically, a set of key points of all game element variable relationship curves may be saved. Before the game is executed, the game element variable relationship curve may be regenerated based on the saved set of key points, and then during the game execution, the target attribute value of the game element target variable that changes with the attribute value of the game element control variable may be determined on the game element variable relationship curve based on the game element control variable.

[0059] The key point set may refer to a set of key points of all game element variable relationship curves in the editing interface. The key points may include control points, starting points, and end points.

[0060] Currently, single curve editing and hyperbola editing are separate. Either only a single curve or a hyperbola can be used to set variables. The embodiment of the present invention combines the single curve and the hyperbola. The single curve and the hyperbola (at least one relationship curve) can be edited at the same time to set the variables of the game elements. Compared with the prior art, the embodiment of the present invention can set more complex and diverse performance effects for the game element effects.

[0061] The embodiment of the present invention adjusts the attribute value of the target control point on the relationship curve in the editing interface according to the first curve adjustment instruction to adjust the curve style of the relationship curve where the target control point is located; configures the game element control variable and the game element target variable on the adjusted relationship curve according to the variable configuration instruction to obtain the game element variable relationship curve, so as to determine the target attribute value of the game element target variable that changes with the attribute value of the game element control variable according to at least one game element variable relationship curve, and can realize visual editing of the game element variable relationship curve, so that developers can efficiently and easily set the variables of the game elements, realize diversified performance effects of the game elements, enhance the expressiveness and experience effect of the game, and help improve development efficiency.

[0062] Based on any of the above embodiments, the attribute value of the target control point includes at least one of a coordinate value, an in-tangent slope value, and an out-tangent slope value; and adjusting the attribute value of the target control point according to the first curve adjustment instruction may specifically include: Step S11, if the adjustment information carried by the first curve adjustment instruction is to move to a target position, a first in-tangent slope value and a first out-tangent slope value are calculated according to the coordinate value of the target position, and the attribute value of the target control point is adjusted according to the coordinate value of the target position, the first in-tangent slope value, and the first out-tangent slope value; Step S12, if the adjustment information carried by the first curve adjustment instruction is a rotation preset angle, the second in-tangent slope value and the second out-tangent slope value are calculated according to the preset angle, and the attribute value of the target control point is adjusted according to the second in-tangent slope value and the second out-tangent slope value.

[0063] When a touch operation of a preset control corresponding to a target control point is detected, a first curve adjustment instruction may be generated to adjust the coordinate value, the in-tangent slope value, the out-tangent slope value and other attribute values ​​of the target control point. In an embodiment of the present invention, when the first curve adjustment instruction is received, the control point may be updated according to the target attribute value pointed to by the first curve adjustment instruction, and then the relationship curve where the target control point is located may be updated according to the updated target control point, so that the user can adjust the curve style of the relationship curve.

[0064] Specifically, if the adjustment information carried by the first curve adjustment instruction is to move from position a to position b, the xy coordinate value of the target control point can be updated to the xy coordinate value of position b, and the new first in-tangent slope value and the first out-tangent slope value are calculated based on the updated xy coordinate value, and the in-tangent slope value and the out-tangent slope value of the target control point are updated to the first in-tangent slope value and the first out-tangent slope value, respectively.

[0065] Specifically, if the adjustment information carried by the first curve adjustment instruction is the rotation angle a, the second in-tangent slope value and the second out-tangent slope value pointed to by the first curve adjustment instruction can be calculated according to the rotation angle a, and then the in-tangent slope value and the out-tangent slope value of the target control point can be updated to the calculated second in-tangent slope value and the second out-tangent slope value.

[0066] The embodiment of the present invention can update and adjust the attribute values ​​such as the coordinate value, the in-tangent slope value and the out-tangent slope value of the target control point on the relationship curve through the first curve adjustment instruction, thereby adjusting the curve style of the relationship curve where the target control point is located, and realizing visual editing of the game element variable relationship curve, so that developers can efficiently and easily set the variables of the game elements, which is conducive to improving development efficiency.

[0067] Based on any of the above embodiments, before configuring the game element control variables and the game element target variables for the adjusted relationship curve according to the variable configuration instruction to obtain the game element variable relationship curve, the following may also be included: Step S21, according to the second curve adjustment instruction, the target control point is moved to the target area of ​​the editing interface according to the current zoom ratio; Step S22, calculating an offset according to the initial coordinate value of the target control point and the coordinate value of the target control point after movement; Step S23: moving the relationship curve where the target control point is located to the target area according to the current scaling ratio and the offset.

[0068] Before configuring the game element control variables and the game element target variables of the adjusted relationship curve according to the variable configuration instruction to obtain the game element variable relationship curve, it is also possible to receive and respond to a second curve adjustment instruction to scale the relationship curve where the target control point is located to the target area in the editing interface (for example, the central area of ​​the editing interface).

[0069] In the embodiment of the present invention, in order to facilitate editing of the relationship curve, the user may move the curve portion to be edited to the central area of ​​the editing interface.

[0070] The second curve adjustment instruction may be generated when a trigger operation for a preset display control is detected, and the preset display control may refer to a control for displaying the target control point in a preset area. The second curve adjustment instruction may also be generated when a trigger operation for a preset shortcut key is detected.

[0071] Specifically, the user can select a target control point to trigger the operation of the preset display control or preset shortcut key. At this time, the computer can respond to the second curve adjustment instruction to move the relationship curve where the target control point is located to the central area of ​​the editing interface and scale it.

[0072] Specifically, the target control point can be translated to the center of the central area (i.e., the center point in the editing interface) according to the current zoom ratio, the offset can be calculated based on the initial coordinate value of the target control point and the coordinates of the center point, and the entire relationship curve where the target control point is located can be translated according to the offset, so that the relationship curve where the target control point is located is translated to coincide with the translated target control point.

[0073] If the translated relationship curve exceeds the display area specified by the editing interface or does not cover the display area, the relationship curve can be scaled according to the current scaling ratio to cover the display area and not exceed the display area. The current scaling ratio may refer to the current scaling ratio of the editing interface / display area.

[0074] The embodiment of the present invention can translate the relationship curve where the target control point is located by means of the second curve adjustment instruction. It can also automatically scale the relationship curve where the target control point is located when the translated relationship curve exceeds the display area specified by the editing interface or does not fill the display area, so that the relationship curve fills the display area and does not exceed the display area, thereby allowing developers to efficiently and conveniently set variables of game elements, which is conducive to improving development efficiency.

[0075] Based on any of the above embodiments, before configuring the game element control variables and the game element target variables for the adjusted relationship curve according to the variable configuration instruction to obtain the game element variable relationship curve, the following may also be included: Step S31, adjusting the attribute value of the curve endpoint according to the third curve adjustment instruction, so as to adjust the curve style of the relationship curve where the curve endpoint is located.

[0076] The key points may include the endpoints (i.e., the starting point and the end point) of the relationship curve. Before configuring the game element control variables and the game element target variables for the adjusted relationship curve according to the variable configuration instruction to obtain the game element variable relationship curve, a third curve adjustment instruction may be received and responded to, at least one attribute value of the curve start point / end point may be updated based on the third curve adjustment instruction, and the relationship curve may be updated according to the updated start point or end point.

[0077] The attribute value of the starting point of the curve may include the x-coordinate value, the y-coordinate value, and the outgoing tangent slope value. The attribute value of the end point of the curve may include the x-coordinate value, the y-coordinate value, and the incoming tangent slope value.

[0078] The third curve adjustment instruction may be generated when a trigger operation for a preset control corresponding to a curve endpoint is detected. The preset control corresponding to the curve endpoint may be displayed when a start point / end point is selected, and is used to adjust the property value of the start point / end point.

[0079] If there are multiple relationship curves in the editing interface, the user can input the target attribute value of the start point / end point by moving or rotating the preset controls corresponding to the curve endpoints; the computer can respond to the instruction, update the attribute value of the start point / end point to the target attribute value, and update the relationship curve where the start point or end point is located according to the updated start point or end point. In this way, the user can adjust the start point / end point of at least one relationship curve, thereby adjusting the curve style of the relationship curve where the start point / end point is located.

[0080] Step S32, according to the fourth curve adjustment instruction, the target curve segment between the two curve intersections is deleted, and new curve endpoints are re-determined to adjust the start and end positions of the relationship curve where the new curve endpoints are located.

[0081] The fourth curve adjustment instruction may be generated when a deletion operation on a target curve segment is detected. The target curve segment may be a curve segment selected by the user and located between two intersection points or between an intersection point and an end point. The intersection point may be a point where two relationship curves intersect.

[0082] If there are multiple relationship curves in the editing interface, the user can select the target curve segment between the two intersection points and delete it. After deleting the target curve segment in response to the fourth curve adjustment instruction, a new start / end point can be re-determined and the relationship curve can be updated according to the new start / end point.

[0083] The embodiment of the present invention can adjust the attribute values ​​of the curve endpoints and delete the target curve segment located between the intersection points of two curves through curve adjustment instructions, thereby adjusting the curve style of the relationship curve, allowing developers to use single curves and hyperbolas together to control the variables of game elements, bringing more diverse performance effects to the game.

[0084] In an application scenario example, a single curve can be set to control the brightness of the sun during the rising phase, so that it changes in a relatively fixed regular pattern; in the middle phase, a hyperbola can be used to control the brightness of the sun, thus presenting a rich and varied effect; a single curve can be used to control the brightness of the sun during the setting phase, so that it changes in a relatively fixed regular pattern, and the combination of single and hyperbolas can be used to set the variables of game elements, giving players a better gaming experience.

[0085] Based on any of the above embodiments, the game element variable relationship curve is also obtained in the following manner: Step S41, obtaining description information for a game element target variable; the description information carries an identifier of a game element control variable; Step S42, inputting the description information into the trained AI model to obtain a curve generation instruction returned by the AI ​​model; Step S43, generating a game element variable relationship curve for characterizing the relationship between the game element control variable and the game element target variable in the editing interface according to the curve generation instruction.

[0086] In an embodiment of the present invention, a game element variable relationship curve for characterizing the relationship between a game element control variable and a game element target variable can be obtained in two ways: (1) a user can perform relevant touch operations on an editing interface, thereby adjusting and configuring the relationship curve displayed in the editing interface through curve adjustment instructions, variable configuration instructions, etc., to obtain a game element variable relationship curve; (2) a user can also input descriptive information for a game element target variable on the editing interface, and generate corresponding curve generation instructions through an AI (Artificial Intelligence) model, thereby obtaining a game element variable relationship curve.

[0087] It should be noted that after obtaining the game element variable relationship curve through the second method, the user can adjust and update the relationship curve displayed in the editing interface through the first method; or after obtaining the game element variable relationship curve through the first method, the user can adjust and update the relationship curve displayed in the editing interface through the second method; or the user can adjust and update the relationship curve displayed in the editing interface through both methods at the same time.

[0088] In an embodiment of the present invention, description information for a game element target variable input by a user may be received, and the description information may be input into a trained AI model to obtain a curve generation instruction returned by the AI ​​model. The curve generation instruction may be used to generate a game element variable relationship curve representing the relationship between the game element target variable and the game element control variable. The description information input by the user may carry an identifier of the game element control variable.

[0089] The description information input by the user may be text information or voice information. The description information may be natural language input by the user, that is, input in a non-preset format.

[0090] The data model (i.e., AI model) can be a complex large model or a model chain composed of multiple models, and the present invention does not impose any specific restrictions. Since AI models are usually large in size, the AI ​​models can be set in the cloud, and the game engine / game editor can establish remote communication with the cloud AI model, thereby sending the description information input by the user to the cloud AI model and receiving the curve generation instruction returned by the cloud AI model.

[0091] The data model is pre-trained and can obtain a curve generation instruction that carries the target information required to generate a relationship curve based on the description information input by the user in natural language. The AI ​​model can return the curve generation instruction that carries the target information to the game engine or game editor, and the game engine or game editor can generate a relationship curve based on this information.

[0092] The training samples of the data model can include two parts: input data, i.e., various forms of sample natural language descriptions input by the user; and output data corresponding to the input data, i.e., sample instruction data used to generate the relationship curve. The AI ​​model to be trained can be trained according to the training samples to obtain a trained AI model.

[0093] In order to enable the AI ​​model to output instructions that can be used by the game engine to generate a relationship curve, training instruction data for training the AI ​​model can be generated based on the parameters required by the game engine to generate the relationship curve.

[0094] In an embodiment of the present invention, a relationship curve representing the change relationship between the game element control variable and the game element target variable can be generated in the editing interface according to the curve generation instruction returned by the AI ​​model.

[0095] In some embodiments, the curve generation instruction returned by the AI ​​model may carry an identifier for a key point combination, and the target key point combination may be determined based on the key point combination identifier, and at least one relationship curve for the game element control variable and the game element target variable may be generated in the editing interface. The key point combination may be a key point combination in a preset curve database.

[0096] In some embodiments, the curve generation instruction returned by the AI ​​model may carry multiple key point data, and at least one relationship curve for the game element control variable and the game element target variable may be generated based on these key points in the editing interface. Among them, the key point data may include all attribute values ​​of the key point (x coordinate value, y coordinate value, outgoing tangent slope value, incoming tangent slope value), and the key point may include the starting point, end point, and control point.

[0097] When a preset relationship curve is generated by using a preset key point combination, the style of the curve is relatively fixed, and the user usually needs to make further manual adjustments to obtain a desired game element variable relationship curve. However, when multiple key points are directly generated based on the user's description information and a relationship curve is generated based on the key points, it can be said that the game element variable relationship curve is generated based on the user's expectations, and the user does not need to make adjustments or only needs a small amount of simple adjustments to obtain a curve that meets the expectations.

[0098] By combining the AI ​​model, the embodiment of the present invention allows users to set the variables of game elements by simply inputting simple natural language descriptions, thereby achieving diversified performance effects of game elements, enhancing the expressiveness and experience of the game, and helping to further reduce the workload of developers and improve development efficiency.

[0099] Based on any of the above embodiments, determining the target attribute value of the game element target variable that changes with the attribute value of the game element control variable according to at least one game element variable relationship curve may specifically include: Step S51, if the current attribute value of the game element control variable corresponds to a game element variable relationship curve, then on the game element variable relationship curve, determine the target attribute value of the game element target variable corresponding to the current attribute value of the game element control variable; Step S52, if the current attribute value of the game element control variable corresponds to multiple game element variable relationship curves, then on the multiple game element variable relationship curves, determine the multiple attribute values ​​corresponding to the current attribute value of the game element control variable, and select the target attribute value of the game element target variable from the range interval composed of the multiple attribute values.

[0100] Specifically, during the execution of the game, if there is only one game element variable relationship curve corresponding to the current attribute value of the game element control variable, the target attribute value (i.e., y coordinate value) of the corresponding target variable can be determined on the game element variable relationship curve according to the current attribute value of the control variable (i.e., x coordinate value). If there are multiple relationship curves, the attribute values ​​of multiple corresponding target variables can be determined on the multiple relationship curves according to the current attribute of the control variable to obtain a range interval, and then the target attribute value of the game element target variable can be determined from the range interval according to the preset value selection strategy.

[0101] Figure 3 Schematic diagram of selecting target attribute values ​​provided by an embodiment of the present invention. Figure 3 If the current attribute value of the game element control variable is 1, and there are two game element variable relationship curves in the direction of the corresponding target variable, then the attribute values ​​can be taken from the two game element variable relationship curves respectively to obtain a range interval of 0~0.38, and then the target attribute value of the target variable can be determined from this range interval.

[0102] The preset value selection strategy may be random selection, or a weighted algorithm, or other algorithms, and the present invention does not impose any specific limitation thereto.

[0103] The following is a description of a device for setting game element variables provided by the present invention. The device for setting game element variables described below and the method for setting game element variables described above can refer to each other.

[0104] Figure 4 Schematic diagram of the structure of the device for setting game element variables provided by an embodiment of the present invention. Figure 4 The embodiment of the present invention provides a device for setting game element variables, and the device may specifically include the following modules: Display module 401, used to display an editing interface, wherein the editing interface includes at least one relationship curve; the relationship curve includes at least one control point; A first adjustment module 402, configured to adjust the attribute value of the target control point according to the first curve adjustment instruction, so as to adjust the curve style of the relationship curve where the target control point is located; Configuration module 403 is used to configure the game element control variables and the game element target variables on the adjusted relationship curve according to the variable configuration instruction, and obtain the game element variable relationship curve, so as to determine the target attribute value of the game element target variable that changes with the attribute value of the game element control variable according to at least one game element variable relationship curve.

[0105] Based on any of the above embodiments, the attribute value of the target control point includes at least one of a coordinate value, an in-tangent slope value, and an out-tangent slope value; and the first adjustment module includes: a control point moving submodule, for calculating a first in-tangent slope value and a first out-tangent slope value according to the coordinate value of the target position if the adjustment information carried by the first curve adjustment instruction is to move to the target position, and adjusting the attribute value of the target control point according to the coordinate value of the target position, the first in-tangent slope value and the first out-tangent slope value; The control point rotation submodule is used to calculate the second in-tangent slope value and the second out-tangent slope value according to the preset angle if the adjustment information carried by the first curve adjustment instruction is a rotation preset angle, and adjust the attribute value of the target control point according to the second in-tangent slope value and the second out-tangent slope value.

[0106] Based on any of the above embodiments, before configuring the game element control variables and the game element target variables on the adjusted relationship curve according to the variable configuration instruction to obtain the game element variable relationship curve, the method further includes: A second adjustment module, configured to move the target control point to a target area of ​​the editing interface according to a second curve adjustment instruction and a current zoom ratio; An offset calculation module, used to calculate an offset according to an initial coordinate value of the target control point and a coordinate value of the target control point after movement; A moving module is used to move the relationship curve where the target control point is located to the target area according to the current scaling ratio and the offset.

[0107] Based on any of the above embodiments, before configuring the game element control variables and the game element target variables on the adjusted relationship curve according to the variable configuration instruction to obtain the game element variable relationship curve, the method further includes: A third adjustment module, configured to adjust the attribute value of the curve endpoint according to the third curve adjustment instruction, so as to adjust the curve style of the relationship curve where the curve endpoint is located; The fourth adjustment module is used to delete the target curve segment located between the two curve intersections according to the fourth curve adjustment instruction, and re-determine the new curve endpoints to adjust the start and end positions of the relationship curve where the new curve endpoints are located.

[0108] Based on any of the above embodiments, the game element variable relationship curve is also obtained through the following modules: A description information acquisition module, used to acquire description information for a game element target variable; the description information carries an identifier of a game element control variable; A model input module, used to input the description information into the trained AI model to obtain a curve generation instruction returned by the AI ​​model; The instruction generation module is used to generate instructions according to the curve, and generate a game element variable relationship curve in the editing interface for characterizing the relationship between the game element control variable and the game element target variable.

[0109] Based on any of the above embodiments, the configuration module includes: A first attribute value determination submodule is used to determine, if the current attribute value of the game element control variable corresponds to a game element variable relationship curve, a target attribute value of the game element target variable corresponding to the current attribute value of the game element control variable on the game element variable relationship curve; The second attribute value determination submodule is used to determine multiple attribute values ​​corresponding to the current attribute value of the game element control variable on the multiple game element variable relationship curves if the current attribute value of the game element control variable corresponds to multiple game element variable relationship curves, and select the target attribute value of the game element target variable from the range interval composed of the multiple attribute values.

[0110] The embodiment of the present invention adjusts the attribute value of the target control point on the relationship curve in the editing interface according to the first curve adjustment instruction to adjust the curve style of the relationship curve where the target control point is located; configures the game element control variable and the game element target variable on the adjusted relationship curve according to the variable configuration instruction to obtain the game element variable relationship curve, so as to determine the target attribute value of the game element target variable that changes with the attribute value of the game element control variable according to at least one game element variable relationship curve, and can realize visual editing of the game element variable relationship curve, so that developers can efficiently and easily set the variables of the game elements, realize diversified performance effects of the game elements, enhance the expressiveness and experience effect of the game, and help improve development efficiency.

[0111] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 810 may call the logic instructions in the memory 530 to execute the method for setting game element variables, the method comprising: displaying an editing interface, the editing interface including at least one relationship curve; the relationship curve including at least one control point; adjusting the attribute value of the target control point according to the first curve adjustment instruction to adjust the curve style of the relationship curve where the target control point is located; configuring the game element control variable and the game element target variable on the adjusted relationship curve according to the variable configuration instruction to obtain the game element variable relationship curve, so as to determine the target attribute value of the game element target variable that changes with the attribute value of the game element control variable according to the at least one game element variable relationship curve.

[0112] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0113] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the game element variable setting method provided by the above-mentioned methods, the method including: displaying an editing interface, the editing interface including at least one relationship curve; the relationship curve including at least one control point; according to a first curve adjustment instruction, adjusting the attribute value of the target control point to adjust the curve style of the relationship curve where the target control point is located; according to a variable configuration instruction, configuring the game element control variable and the game element target variable on the adjusted relationship curve to obtain a game element variable relationship curve, so as to determine the target attribute value of the game element target variable that changes with the attribute value of the game element control variable according to at least one game element variable relationship curve.

[0114] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the game element variable setting method provided by the above-mentioned methods, the method comprising: displaying an editing interface, the editing interface including at least one relationship curve; the relationship curve including at least one control point; adjusting the attribute value of the target control point according to a first curve adjustment instruction to adjust the curve style of the relationship curve where the target control point is located; configuring the game element control variable and the game element target variable of the adjusted relationship curve according to the variable configuration instruction to obtain a game element variable relationship curve, so as to determine the target attribute value of the game element target variable that changes with the attribute value of the game element control variable according to at least one game element variable relationship curve.

[0115] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0116] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for setting game element variables, characterized in that: include: Displaying an editing interface, wherein the editing interface includes at least one relationship curve; the relationship curve includes at least one control point; According to the first curve adjustment instruction, the attribute value of the target control point is adjusted to adjust the curve style of the relationship curve where the target control point is located; According to the variable configuration instruction, the game element control variable and the game element target variable are configured for the adjusted relationship curve to obtain the game element variable relationship curve, so as to determine the target attribute value of the game element target variable that changes with the attribute value of the game element control variable according to at least one game element variable relationship curve.

2. The method according to claim 1, characterized in that The attribute value of the target control point includes at least one of a coordinate value, an in-tangent slope value, and an out-tangent slope value; and adjusting the attribute value of the target control point according to the first curve adjustment instruction includes: If the adjustment information carried by the first curve adjustment instruction is to move to a target position, a first in-tangent slope value and a first out-tangent slope value are calculated according to the coordinate value of the target position, and the attribute value of the target control point is adjusted according to the coordinate value of the target position, the first in-tangent slope value, and the first out-tangent slope value; If the adjustment information carried by the first curve adjustment instruction is a rotation preset angle, the second in-tangent slope value and the second out-tangent slope value are calculated according to the preset angle, and the attribute value of the target control point is adjusted according to the second in-tangent slope value and the second out-tangent slope value.

3. The method according to claim 1, characterized in that Before configuring the game element control variables and the game element target variables for the adjusted relationship curve according to the variable configuration instruction to obtain the game element variable relationship curve, the method further includes: According to the second curve adjustment instruction, the target control point is moved to the target area of ​​the editing interface according to the current zoom ratio; Calculating an offset according to an initial coordinate value of the target control point and a coordinate value of the target control point after movement; According to the current scaling ratio and the offset, the relationship curve where the target control point is located is moved to the target area.

4. The method according to claim 1, characterized in that: Before configuring the game element control variables and the game element target variables for the adjusted relationship curve according to the variable configuration instruction to obtain the game element variable relationship curve, the method further includes: According to the third curve adjustment instruction, the attribute value of the curve endpoint is adjusted to adjust the curve style of the relationship curve where the curve endpoint is located; According to the fourth curve adjustment instruction, the target curve segment between the two curve intersections is deleted, and new curve endpoints are re-determined to adjust the start and end positions of the relationship curve where the new curve endpoints are located.

5. The method according to claim 1, characterized in that The game element variable relationship curve is also obtained in the following way: Obtaining description information for a target variable of a game element; the description information carries an identifier of a control variable of the game element; Input the description information into the trained AI model to obtain a curve generation instruction returned by the AI ​​model; According to the curve generation instruction, a game element variable relationship curve for characterizing the relationship between the game element control variable and the game element target variable is generated in the editing interface.

6. The method according to claim 1, characterized in that The step of determining, based on at least one game element variable relationship curve, a target attribute value of a game element target variable that changes with a change in an attribute value of a game element control variable comprises: If the current attribute value of the game element control variable corresponds to a game element variable relationship curve, then on the game element variable relationship curve, determine the target attribute value of the game element target variable corresponding to the current attribute value of the game element control variable; If the current attribute value of the game element control variable corresponds to multiple game element variable relationship curves, then on the multiple game element variable relationship curves, multiple attribute values ​​corresponding to the current attribute value of the game element control variable are determined, and the target attribute value of the game element target variable is selected from the range interval composed of the multiple attribute values.

7. A device for setting game element variables, characterized in that: include: A display module, used for displaying an editing interface, wherein the editing interface includes at least one relationship curve; The relationship curve includes at least one control point; A first adjustment module, configured to adjust the attribute value of the target control point according to the first curve adjustment instruction, so as to adjust the curve style of the relationship curve where the target control point is located; The configuration module is used to configure the game element control variable and the game element target variable on the adjusted relationship curve according to the variable configuration instruction, and obtain the game element variable relationship curve, so as to determine the target attribute value of the game element target variable that changes with the attribute value of the game element control variable according to at least one game element variable relationship curve.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for setting game element variables as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for setting game element variables as described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for setting game element variables as described in any one of claims 1 to 6 is implemented.