Path generation method and device in game, electronic equipment and storage medium
By generating component clones and controlling their movement trajectories during the game editing stage, the problem of cumbersome game path construction steps is solved, and efficient game path construction is achieved.
Patent Information
- Application Number
- CN202512039406.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-14
AI Technical Summary
The existing steps for building game paths in games are cumbersome, and the existing component structures cannot be flexibly arranged, resulting in low efficiency in building game paths in game scenes.
By displaying the path editing mode of the game editing stage on the graphical user interface, component clones are generated and controlled to follow the movement trajectory. The component clones are fixed in the game scene in response to placement events, and the game path is generated.
It improves the efficiency of game path construction in game scenes, avoids the tedious operation of players adding and adjusting existing components, and improves the flexibility and efficiency of path generation.
Smart Images

Figure CN121846674A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of game technology, and specifically to a method, apparatus, electronic device, and storage medium for generating paths in games. Background Technology
[0002] The rise of the internet and the continuous development and evolution of hardware and software technologies have spurred the emergence of smart devices and software. Simultaneously, a large number of games of various themes have sprung up to meet user needs, and with the booming development of various technologies in the gaming industry, people are placing greater emphasis on the gaming experience.
[0003] Currently, in games, if players want to construct game paths such as roads, bridges, and tracks in the game scene, they can only do so by gradually adding components with different structural styles to the scene and splicing the added components together to automatically generate game paths through position snapping and attribute inheritance.
[0004] In response, the current method of constructing game paths requires adding multiple existing components and then piecing them together, which is quite cumbersome. Furthermore, since the structure of existing components cannot be flexibly arranged to create the path shape expected by the player, a lot of time is sometimes spent adjusting the placement of existing components, resulting in low efficiency in constructing game paths in the game scene. Summary of the Invention
[0005] This application provides a method, apparatus, electronic device, and storage medium for generating paths in games, which can improve the efficiency of constructing game paths in game scenes.
[0006] In a first aspect, embodiments of this application provide a path generation method in a game, which provides a graphical user interface via an electronic device. The game includes a game editing stage and a game running stage. The method includes: During the game editing stage, the first game scene corresponding to the game editing stage is displayed on the graphical user interface. The first game scene is in path editing mode and includes at least one target component for generating a path. In response to a movement operation starting at the target component, a component clone of the target component is generated in the first game scene, and the component clone is controlled to move along the trajectory of the movement operation. In response to a placement event for a component clone, fix the component clone in the first game scene; In response to a movement operation starting at the component clone, a new component clone corresponding to the component clone is generated in the first game scene, and based on the new component clone, the steps of controlling the component clone to move along the operation trajectory of the movement operation are continued. In response to the path completion event, a game path is generated based on the component clone in the first game scene and the target component, so as to present the game path in the second game scene corresponding to the game running phase.
[0007] Secondly, embodiments of this application provide a path generation device for a game, which provides a graphical user interface via an electronic device. The game includes a game editing stage and a game running stage. The device includes: The interface display module is used to display the first game scene corresponding to the game editing stage on the graphical user interface during the game editing stage. The first game scene is in path editing mode and includes at least one target component for generating a path. The first clone generation module is used to generate a clone of the target component in the first game scene in response to a movement operation with the starting position located at the target component, and control the component clone to move along the operation trajectory of the movement operation; The clone fixing module is used to fix the component clone in the first game scene in response to the placement event of the component clone; The second clone generation module is used to respond to the movement operation of the component clone at the starting position, generate a new component clone corresponding to the component clone in the first game scene, and continue to execute the steps of controlling the component clone to move along the operation trajectory of the movement operation based on the new component clone; The path generation module is used to respond to the path trajectory completion event, generate a game path based on the component clones in the first game scene and the target component, and present the game path in the second game scene corresponding to the game running phase.
[0008] Thirdly, embodiments of this application also provide an electronic device, including a memory storing multiple instructions; a processor loads instructions from the memory to execute the steps of any of the path generation methods in a game provided in embodiments of this application.
[0009] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute the steps of any of the path generation methods in a game provided in embodiments of this application.
[0010] Fifthly, embodiments of this application also provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps in any of the path generation methods in a game provided in embodiments of this application.
[0011] The solution adopted in this application embodiment can provide a graphical user interface through an electronic device. The game includes a game editing stage and a game running stage. In the game editing stage, a first game scene corresponding to the game editing stage is displayed on the graphical user interface. The first game scene is in path editing mode and includes at least one target component for generating a path. In response to a movement operation with the starting position located at the target component, a component clone of the target component is generated in the first game scene, and the component clone is controlled to move along the operation trajectory of the movement operation. In response to a placement event for the component clone, the component clone is fixed in the first game scene. In response to a movement operation with the starting position located at the component clone, in the first... In the game scene, a new component clone corresponding to the component clone is generated. Based on the new component clone, the steps of controlling the component clone to follow the movement trajectory are continued. In response to the path trajectory completion event, a game path is generated based on the component clone in the first game scene and the target component. The game path is presented in the second game scene corresponding to the game running stage. Thus, the component clone is automatically generated through the movement operation, and the component clone is controlled to follow the movement. The corresponding game path is generated based on the component clone generated in the game scene as the path point. This avoids the time spent by the player adding multiple existing components and adjusting the placement of existing components, thus improving the efficiency of game path construction in the game scene. Attached Figure Description To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a schematic flowchart of an embodiment of the path generation method in a game provided in this application. Figure 2 This is a schematic diagram of a game path provided in the embodiments of this application; Figure 3 This is a schematic diagram of a component clone provided in the embodiments of this application; Figure 4 This is another schematic diagram of a component clone provided in the embodiments of this application; Figure 5 This is a schematic diagram of the rotating scene of the component clone provided in the embodiments of this application; Figure 6 This is a schematic diagram of a scaling scenario of component clones provided in the embodiments of this application; Figure 7 This is a schematic diagram of a new component clone provided in the embodiments of this application; Figure 8 This is another game path diagram provided in the embodiments of this application; Figure 9 This is a schematic diagram of the game path generation scenario provided in the embodiments of this application; Figure 10 This is a schematic diagram of the structure of the path generation device in the game provided in the embodiments of this application; Figure 11 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. At the same time, in the description of the embodiments of this application, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0014] Before providing a detailed explanation of the embodiments of this application, some terms involved in the embodiments of this application will be explained.
[0015] The graphical user interface (GUI) is a graphical user interface obtained by executing software applications on the processor of a mobile terminal or other terminal and rendering them on a display screen. It can be the display screen interface of the terminal device. The GUI can include a UI interface and game screen for player interaction. The UI interface can include game controls (e.g., skill controls, movement controls, function controls), indicators (e.g., direction indicators, character indicators), information display areas (e.g., kill count, match time), or game setting controls (e.g., system settings, shop, coins). In an optional implementation, the game screen is the display screen corresponding to the virtual scene shown on the terminal device. This game screen presents the entire virtual scene, or only a part of the virtual scene can be presented when the virtual scene is large. The virtual scene includes multiple static virtual objects, specifically including ground, mountains, rocks, vegetation, buildings, etc., and also multiple dynamic virtual objects, such as game characters, NPC characters, AI characters, etc., that execute game logic within the virtual scene.
[0016] The game scene refers to the virtual scene displayed (or provided) by the application when it runs on a terminal or server. Optionally, the game scene can be a simulation of the real world, a semi-simulated / semi-fictional virtual environment, or a purely fictional virtual environment. The game scene can be any of a two-dimensional, 2.5-dimensional, or three-dimensional virtual scene; this application embodiment does not limit the dimension of the game scene. For example, the game scene may include the sky, land, ocean, etc., and the land may include environmental elements such as deserts and cities. The user can control the game character to move within the game scene.
[0017] This application provides a path generation method, apparatus, electronic device, and computer-readable storage medium in a game.
[0018] Specifically, this embodiment will be described from the perspective of a path generation device in a game. This path generation device can be integrated into an electronic device, meaning that the path generation method in the game of this application embodiment can be executed by an electronic device. Optionally, the electronic device may include a terminal device. The terminal device may be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, game console, or personal computer (PC), etc.
[0019] The path generation method in games provided in this application can be applied to path generation systems in games. This path generation system can include a player terminal device and a server. The terminal can be a device that includes both receiving and transmitting hardware, i.e., a device with receiving and transmitting hardware capable of performing bidirectional communication over a bidirectional communication link. The player terminal device and the server can communicate bidirectionally via a network.
[0020] Optionally, the server can be a standalone server, or a server network or server cluster, including but not limited to computers, network hosts, single network servers, multiple network server sets, or cloud servers composed of multiple servers. Cloud servers consist of a large number of computers or network servers based on cloud computing.
[0021] In one embodiment of this disclosure, the path generation method in the game can run on a local terminal device or a server. When the game interaction method 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.
[0022] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separated. The storage and execution of in-game interaction 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 path generation 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.
[0023] 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.
[0024] The following detailed description is provided in conjunction with the accompanying drawings. In this embodiment, the execution subject is a terminal device as an example. It should be noted that the order of description in the following embodiments is not intended to limit the preferred order of the embodiments. Although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than that shown in the accompanying drawings.
[0025] The path generation method in this embodiment provides a graphical user interface through an electronic device. The game includes a game editing stage and a game running stage. In the game editing stage, a first game scene corresponding to the game editing stage is displayed on the graphical user interface. The first game scene is in path editing mode and includes at least one target component for generating a path. In response to a movement operation starting at the target component, a component clone of the target component is generated in the first game scene, and the component clone is controlled to move along the operation trajectory of the movement operation. In response to a placement event for the component clone, the component clone is fixed in the first game scene. In response to a movement operation starting at the component clone, a new component clone corresponding to the component clone is generated in the first game scene, and based on the new component clone, the step of controlling the component clone to move along the operation trajectory of the movement operation continues. In response to a path trajectory completion event, a game path is generated based on the component clone in the first game scene and the target component, so as to present the game path in the second game scene corresponding to the game running stage, which can improve the efficiency of constructing game paths in the game scene.
[0026] Please refer to Figure 1 Taking a terminal as an example, this embodiment provides a path generation method in a game. This method provides a graphical user interface through an electronic device. The game includes a game editing stage and a game running stage. The specific flow of the path generation method in this game can be summarized in steps 101-105, wherein: Step 101: In the game editing stage, the first game scene corresponding to the game editing stage is displayed on the graphical user interface. The first game scene is in path editing mode and includes at least one target component for generating a path.
[0027] The aforementioned game editing stage is a stage where the current user can edit certain components in the game scene, such as editing the component's skin, attributes, and other component information, adjusting the placement of components, or generating new scene objects based on at least one component. The specific settings can be configured according to needs and are not limited here.
[0028] Accordingly, the first game scene corresponding to the above game editing stage is a virtual scene where components can be edited. Users can edit components in this first game scene to generate corresponding scene objects, such as game paths.
[0029] The target component mentioned above is a scene object in the virtual scene. The target component includes, but is not limited to, an initial component with a basic shape, an adjusted component, or a new component generated from the initial component.
[0030] It should be noted that the target components mentioned above can be two-dimensional planar components or three-dimensional solid components, and the structure of the game path generated by target components with different structures will also be different.
[0031] In some embodiments, during the game editing phase, an initial first game scene corresponding to the game editing phase is displayed on the graphical user interface. The initial first game scene includes at least one scene component. In response to a path generation trigger event for a target component in the scene component, the first game scene is controlled to be in path editing mode. That is, some path editing controls configured in path editing mode can be displayed on the graphical user interface so that the user can perform path generation operations through the path editing controls. At the same time, the target component can be identified as the component used to generate the path. That is, if the target component is operated in path editing mode, the terminal can be prompted to respond to functions that match the path editing mode, such as path generation function, path point setting function, etc.
[0032] The path editing control includes, but is not limited to, at least one of the following: component transformation icon, component confirmation control, component deletion control, component addition control, path generation control, etc. The component transformation icon includes, but is not limited to, at least one of the following: position icon, rotation icon, and scaling icon, etc.
[0033] For example, a path trigger control is displayed on the graphical user interface. The user can select an initial component in the first game scene as the target component. Then, by triggering the path trigger control (such as a click operation, a toggle operation, etc.), the user can control the first game scene to enter the path editing mode and use the selected target component as the component for generating the path.
[0034] In some embodiments, the path generation method in the game described above can be applied to a user-generated content (UGC) platform. This UGC platform offers a variety of different types of components, allowing users to create map scenes that meet their needs through the corresponding components. This reduces the barrier to scene creation for users and improves their ease of use.
[0035] For example, a user can access a UGC platform by triggering an entry within a game client, and then enter the corresponding editing interface by clicking "Start Creation." On this interface, they can create map scenes, such as using target components to generate path components within the map scene to serve as game paths, adapting to different game styles and scenarios. Figure 2 As shown, Figure 2 Area 'a' in the image shows a bridge. Figure 2 The b area in the image shows a road. Figure 2 The middle c and d areas display tracks with different styles.
[0036] Correspondingly, the UGC platform also has a sharing function, allowing users to save and publish their created map scenes to other users for play, browsing, and other operations, or to share them to a group to receive corresponding rewards, such as likes, comments, tips from other users, and official incentives.
[0037] Step 102: In response to a movement operation starting at the target component, generate a component clone of the target component in the first game scene, and control the component clone to move along the operation trajectory of the movement operation.
[0038] In this embodiment, the user moves from the location of the target component to the terminal, which then responds to the user's movement. Based on the target component at the starting position of the user's movement, a component clone of the target component is generated in the first game scene. This clone serves as a path point adjacent to the path point of the target component. The user moves by manipulating the component clone, which is equivalent to the user changing the position of the path point represented by the component clone. At least a partial path segment of the game path is formed between the target component and the component clone.
[0039] The component clone of the target component is generated based on the geometric parameters of the target component. These geometric parameters include, but are not limited to, component position, component scaling information, component rotation information, and component size. For example, the geometric parameters of the target component can be used to generate an identifier that is consistent with or inconsistent with the target component in the first game scene. This identifier is the aforementioned component clone. It is understandable that if the generated identifier is consistent with the target component, it means that the component clone can be equivalent to a copy of the target component; if the generated identifier is inconsistent with the target component, it means that the component clone is only an identifier representing the corresponding path point.
[0040] The clone of the target component can have a style that is consistent with the visual appearance of the target component or a style that is inconsistent with the visual appearance of the target component. The specific style can be set according to the requirements and is not limited here.
[0041] For example, a clone of a target component can be displayed using the target component's shadow style, a style with a different display color than the target component, or a style that outlines the target component.
[0042] It should be noted that a move operation starting at the target component can be understood as a move operation on the target component's clone, in order to change the distance between the target component and its clone.
[0043] Understandably, during the continuous movement operation, the component clone of the target component can move away from the target component or move closer to the target component. The specific movement can be set according to the requirements and is not limited here.
[0044] Optionally, a movement indicator can be displayed on the graphical user interface, such as on a component, to indicate the direction of movement of the movement operation.
[0045] For example, such as Figure 3 As shown, Figure 3 The "initial component 1" in the three-dimensional structure is the target component. Figure 3 In this game, "Component Clone A1" is a clone of "Initial Component 1". Players can adjust the position of "Component Clone A1" in the first game scene by moving it, thereby changing the distance between "Component Clone A1" and "Initial Component 1". Figure 3 The coordinate axis on "Component A1" is used to indicate the direction of movement of "Component A1" when its position changes. It can be seen that "Component A1" moves away from "Initial Component 1".
[0046] in, Figure 3 The control displayed is a path editing control, which will not be described in detail in this example.
[0047] For example, such as Figure 4 As shown, Figure 4 The "initial component 2," which has a two-dimensional planar structure, is the target component. Figure 4 In this game, "Component Clone A2" is a component clone of "Initial Component 2". Players can adjust the position of "Component Clone A2" in the first game scene by moving it, thereby changing the distance between "Component Clone A2" and "Initial Component 2". Figure 4 The coordinate axis on "Component A2" is used to indicate the direction of movement of "Component A2" when its position changes. It can be seen that "Component A2" moves towards "Initial Component 2".
[0048] in, Figure 4 The displayed control is a path editing control, which will not be described in detail in this example.
[0049] In an optional implementation, the clone of the target component can be generated at the target component's original position, meaning that the clone of the target component overlaps with the target component after it is generated, so that the distance between the clone and the target component can be gradually changed through continuous movement operations.
[0050] Specifically, a component clone of the target component can be generated at the initial moment of the movement operation (i.e., the moment of contact with the starting position). That is, when contacting the starting position, a component clone of the target component is generated at the starting position based on the target component at the starting position. At this time, the target component and the component clone of the target component overlap in the first game scene. Then, as the movement operation continues from the starting position, the position of the component clone of the target component is adjusted, thereby causing the distance between the component clone of the target component and the target component at the starting position to change.
[0051] In an optional implementation, the location where the clone of the target component is generated can be a location adjacent to the target component, and the adjacent location can match the movement direction of the movement operation, that is, a clone of the target component is generated in the movement direction of the movement operation.
[0052] Specifically, a component clone of the target component can be generated within a certain period of the movement operation (i.e., the time it takes to contact the starting position and move). That is, after contacting the starting position and moving, a component clone of the target component is generated at an adjacent position of the target component based on the target component at the starting position and the movement direction of the movement operation. At this time, the target component and the component clone of the target component are adjacent in the first game scene. Then, as the movement operation continues from the starting position, the position of the component clone of the target component is adjusted, thereby causing the distance between the component clone of the target component and the target component at the starting position to change.
[0053] In some embodiments, during the process of a user moving a component clone to generate a path, in order to create specific changes to the path more flexibly and to improve the scalability of the path editing process, the terminal can transform the component clone based on the user's operation, so that the transformed component clone can serve as a path point to better represent the path shape expected by the user.
[0054] Component transformations include, but are not limited to, component movement, component rotation, and component scaling. The specific transformations can be set according to requirements and are not limited here.
[0055] Specifically, the path generation method in the above game also includes: displaying a component transformation control on the component clone in response to a component transformation trigger event for the component clone; and performing component transformation on the component clone in response to a trigger operation for the component transformation control in the first game scene.
[0056] Among them, the component transformation trigger event is the event that triggers the component clone to transform. The component transformation trigger event can be triggered by the user's direct shortcut gesture operation on the graphical user interface, or by the user's operation of the controls on the graphical user interface, or by performing a specific operation on the external input device associated with the electronic device (the terminal in this embodiment) to which the graphical user interface belongs, etc. The specific settings can be set according to the needs, and are not limited here.
[0057] In this embodiment, a component transformation control is displayed on the component clone so that the user can directly operate on the component transformation control. The terminal can perform component transformation on the component clone in the first game scene by using the component transformation information indicated by the user's operation on the component transformation control.
[0058] It should be noted that since there are many different ways to transform components in a component clone, the component transformation controls corresponding to different component transformation methods are different. If there is a situation where at least two component transformation controls can be displayed at the same time, the terminal can display at least two component transformation controls in different areas of the component clone on the graphical user interface. Alternatively, the terminal can display at least two component transformation controls overlapping on the graphical user interface. The specific implementation can be determined according to the requirements and is not limited here.
[0059] In some embodiments, the graphical user interface further includes at least two component transformation icons, and in response to a component transformation trigger event for a component clone, a component transformation control is displayed on the component clone, including: in response to a trigger operation on a target component transformation icon among the component transformation icons, displaying a component transformation control corresponding to the target component transformation icon on the component clone.
[0060] For example, such as Figure 3 As shown, Figure 3 The display shows three component transformation icons: "Position," "Rotation," and "Scale," which are the position, rotation, and scale icons in the aforementioned path editing control.
[0061] Therefore, if the user triggers the "location" icon, a position change control corresponding to the position change can be displayed on the component, such as... Figure 3 The "component clone A1" in the text has a coordinate axis that indicates the direction of movement. Users can directly move the component clone or manipulate the position change control to change the position of the component clone.
[0062] If the user triggers the "rotate" icon, a rotation control can be displayed on the component clone for the component clone to rotate.
[0063] If the user triggers the "zoom" icon, a zoom control can be displayed on the component clone for the component clone to zoom in and out.
[0064] It should be noted that after a component clone is generated, a position change control is displayed on the clone by default to indicate the current operation on the clone and to adjust its position. Other component transformation operations need to be displayed by triggering the corresponding component transformation icon. After the clone has undergone other transformations, such as rotation or scaling, if the clone needs to be moved again, the user needs to trigger the position icon to display the position change control on the clone, indicating that the user's current operation on the clone is adjusting its position.
[0065] In some embodiments, the component transformation control includes a rotation control. In response to a trigger operation on the component transformation control, the component clone is transformed in a first game scene, including: in response to a rotation operation on the rotation control, the component clone is rotated in the first game scene based on rotation information indicated by the rotation operation.
[0066] In this embodiment, the user controls the rotation of the component clone by applying a rotation operation. The rotation operation is to rotate the rotation control and control the rotation of the component clone by the rotation information generated by the rotation operation. The rotation information includes, but is not limited to, the rotation direction and rotation angle.
[0067] Specifically, the rotation control can be a geometric structure that the user can rotate (such as a sphere), or it can be a rotation sub-control containing multiple rotation directions. By setting the rotation angle on the rotation sub-control, the rotation direction and the rotation angle in the corresponding direction can be specified. The specific settings can be made according to the requirements and are not limited here.
[0068] For example, such as Figure 5 As shown, Figure 5 The "initial component 3" in the three-dimensional structure is the target component. Figure 5 The "Component Clone A3" is a component clone of "Initial Component 3," which players can trigger. Figure 5 The "rotate" icon in the middle, to... Figure 5 The "Component A3" in the document displays a rotating control with a three-dimensional spherical structure. By rotating this rotating control, the "Component A3" is rotated. The rotation direction, rotation angle, and other rotation information of the rotating control serve as the basis for the rotation of the component clone.
[0069] In some embodiments, the component transformation control includes at least two scaling controls, each scaling control corresponding to a component scaling direction. In response to a trigger operation on the component transformation control, the component clone is transformed in the first game scene, including: in response to a sliding operation on the target scaling control in the scaling control, determining the sliding position on the target scaling control; and scaling the component clone in the first game scene based on the component scaling direction corresponding to the target scaling control and the sliding position.
[0070] In this embodiment, the user controls the scaling of the target scaling control in a specific scaling direction by sliding on the target scaling control. This controls the scaling of the component clone. The sliding operation is a sliding operation on the target scaling control. The corresponding scaling scale is determined by the sliding position of the sliding operation, so that the component clone is scaled in the corresponding scaling direction with the corresponding scaling scale.
[0071] Specifically, the scaling control can be presented as a slider with a slider that allows the user to perform a sliding operation. Alternatively, it can be presented as a directional axis with one end of different directional axes connected to each other and the other end of each directional axis having a movable endpoint. The user can adjust the length of the directional axis by sliding on it to shorten or enlarge the endpoint. The position of the endpoint on the directional axis after sliding is the sliding position. The specific settings can be configured according to requirements and are not limited here.
[0072] For example, such as Figure 6 As shown, Figure 6 The "initial component 4" in the three-dimensional structure is the target component. Figure 6 The "Component Clone A4" is a component clone of "Initial Component 4," which players can trigger. Figure 6 The "zoom" icon in the image allows you to zoom in. Figure 6 The “Component Clone A4” shows three directional axes indicating the x, y, and z directions. The ends of the directional axes are provided with endpoints. The position of the endpoints of the directional axes can be adjusted by sliding on at least one directional axis, so that the “Component Clone A4” can be scaled based on the position of the endpoints.
[0073] Step 103: In response to the placement event for the component clone, fix the component clone in the first game scene.
[0074] In this embodiment, when the user adjusts the position, posture, or size of the component clone to meet the user's needs, the user can fix the component clone in the first game scene by triggering the placement event of the component clone, so as to realize the setting of path points in the first game scene.
[0075] It is understandable that after the path points of the component clone are set, the previous path point of the component clone is the object corresponding to the starting position of the movement operation that triggers the generation of the component clone, such as the target component. Since the path editing starts from the target component, the target component is the initial position of the game path.
[0076] The placement event of this component clone can be triggered by the user's behavior. The methods may include, but are not limited to: the current user performing a specific operation on the graphical user interface, such as operating the trigger control provided on the graphical user interface; the current user performing a specific operation on an external input device associated with the electronic device (in this embodiment, the terminal) to which the graphical user interface belongs, such as a mouse or keyboard; or the current user not performing any operation within a preset time period. The specific settings can be configured according to the requirements and are not limited here.
[0077] Specifically, the aforementioned graphical user interface also includes component identification controls, such as... Figure 3 The "OK" control allows users to trigger the placement event of the component clone by performing a triggering operation on the "OK" control, thereby fixing the component clone in the first game scene.
[0078] Step 104: In response to the movement operation of the component clone at the starting position, generate a new component clone corresponding to the component clone in the first game scene, and based on the new component clone, continue to execute the step of controlling the component clone to move along the operation trajectory of the movement operation.
[0079] In this embodiment, since a game path can be composed of multiple path points, after setting the component clone of the target component in the first game scene, new component clones can be generated to serve as new path points. That is, by having the user continue to move from the component clone, a new component clone corresponding to the component clone at the starting position of the movement operation is generated.
[0080] It should be noted that the new component clone is a path point adjacent to the path point to which the component clone belongs. When the user moves the new component clone, it is equivalent to the user changing the position of the path point represented by the new component clone. The component clone and the new component clone form at least a part of the game path.
[0081] The new component clone is generated based on the geometric parameters of the component clone at the starting position. A new component clone that is consistent with the component clone at the starting position in space can be generated using the geometric parameters of the component clone at the starting position.
[0082] Understandably, based on the new component clone, the steps of controlling the component clone to follow the movement trajectory are essentially based on the movement operation that triggers the generation of the new component clone to control the new component clone to follow the movement.
[0083] For example, such as Figure 7 As shown, Figure 7 The "initial component 5," which has a three-dimensional structure, is the target component. Figure 7 In this context, "Component Clone A5" is a clone of "Initial Component 5". After "Component Clone A5" is set in the first game scene, the user can generate a new component clone corresponding to "Component Clone A5" in the first game scene by moving the user from the starting position of "Component Clone A5". Figure 7 "Component clone B" in the text.
[0084] In some embodiments, a preview path segment is formed between adjacent target objects in the first game scene, and the target objects include component clones and target components in the first game scene.
[0085] Among them, adjacent target objects are those set sequentially according to the operation trajectory of at least one move operation, that is, the object at the starting position of the move operation and the object generated by the move operation.
[0086] The component clones in the first game scene can be all component clones generated in the first game scene in path editing mode, or all component clones fixed in the first game scene generated in the first game scene in path editing mode.
[0087] For example, such as Figure 7 As shown, Figure 7 The dashed-frame-like path segment formed between "Component A5" and "Initial Component 5" is a preview path segment, and the dashed-frame-like path segment formed between "Component A5" and "Component B" is also a preview path segment, used to indicate the path trajectory between "Component A5" and "Initial Component 5", and between "Component A5" and "Component B".
[0088] In an alternative implementation, the preview path segment between adjacent target objects can be generated based on the operation trajectory of the movement operation.
[0089] In an alternative implementation, the preview path segment between adjacent target objects can be generated as a smoothly transitioning path segment based on the geometric parameters of the adjacent target objects.
[0090] In some embodiments, after a user has fixed a component clone, that is, after the preview path segment is fixed, there may be situations where the user is not satisfied with the shape of the preview path segment and needs to add a new component clone on the preview path segment to adjust the shape of the preview path segment.
[0091] In this regard, the path generation method in the above game may also include: adding a target component clone on the preview path segment in response to a clone addition event for the preview path segment; obtaining the transformed target component clone in response to a component transformation operation for the target component clone; and reforming the preview path segments between the transformed target component clone and the adjacent target objects based on the transformed target component clone.
[0092] In this embodiment, a new event can be added to the preview path segment to add a target component clone. Then, the user can adjust the target component clone to change the path segment between the target component clone and the target objects at both ends of the component preview path segment. This will replace the currently operated preview path segment with the path segment between the component clone and the target objects at both ends of the component preview path segment, making the final generated game path more in line with the user's needs.
[0093] Specifically, in response to a new clone event for a preview path segment, adding a new clone of the target component on the preview path segment may include: in response to a selection operation on a target object, selecting the target object to be operated on, and then, in response to a component on the graphical user interface, adding a control (such as...) Figure 3 The "Add" control in the program triggers an operation that overlays a target component clone corresponding to the selected target object onto the selected target object. Then, in response to the operation of moving the target component clone to the preview path segment associated with the selected target object, the target component clone is displayed on the preview path segment to achieve the addition of a target component clone on the preview path segment.
[0094] In some embodiments, since a user may not want to add a component clone before pinning it, then if the user has not pinned the component clone they want to delete, i.e., the component clone is the one the user is currently interacting with, the user can delete controls (such as...) on the graphical user interface. Figure 3The system can trigger the "Delete" control in the graphical user interface to cause the terminal to respond to the trigger operation of the component delete control on the graphical user interface and delete the currently operated unpinned component clone; if the user has pinned the component clone they want to delete, the user can select a component clone to cause the terminal to respond to the selection operation of a target object, put the target object to be operated on into a selected state, and then, respond to the trigger operation of the component delete control on the graphical user interface, delete the selected target object.
[0095] Step 105: In response to the path completion event, generate a game path based on the component clone in the first game scene and the target component, so as to present the game path in the second game scene corresponding to the game running phase.
[0096] In this embodiment, if the target component and component clone set in the first game scene have met the user's needs, the user can generate the corresponding game path by triggering the path trajectory completion event, so as to be presented in the second game scene during the actual game operation phase.
[0097] Understandably, the user can generate corresponding component clones through their movement, allowing the user to set path points using these clones. The clones then automatically align and extend based on the set path points to generate the corresponding game path. The operation is simple, avoiding the time cost of adding existing components and splicing them together multiple times. This enables users to flexibly and conveniently create game paths that meet their expected path shapes.
[0098] Furthermore, by automatically generating path segments between component clones and target components to obtain the game path, the generated game path can be made smoother, avoiding abrupt joints caused by splicing components.
[0099] The path completion event can be triggered by the user's actions, and the methods may include, but are not limited to: the current user performing a specific operation on the graphical user interface, such as operating the trigger control provided on the graphical user interface; the current user performing a specific operation on an external input device associated with the electronic device (in this embodiment, the terminal) to which the graphical user interface belongs, such as a mouse or keyboard; or the current user not performing any operation within a preset time period, etc. The specific settings can be configured according to the requirements and are not limited here.
[0100] Specifically, based on Figure 7 The example shown also includes a path generation control on the graphical user interface, such as... Figure 7 The "Path" control allows users to trigger a path completion event by interacting with the control, thus generating a path completion message. Figure 8 The game path shown starts from... Figure 8 As can be seen, adjacent target objects form corresponding path segments, which are composed of path segments between target objects. Figure 8 The game path within.
[0101] In some embodiments, after the game path is generated, a save control can be displayed on the graphical user interface, and the game path can be saved in response to a triggering operation on the save control; or, if the user does not save the game path but exits directly, a path save prompt window is displayed in response to the exit event of the path editing mode.
[0102] The path saving prompt window displays corresponding prompts, such as "There are still operations not saved, do you want to save?". The path saving prompt window can also display save controls, such as "Save and Exit" controls, and non-save controls, such as "Do Not Save and Exit" controls. Users can save the game path by triggering the save control, and delete the game path by triggering the non-save control. Users can also close the path saving prompt window by performing the window closing operation, and continue to be in path editing mode.
[0103] In some embodiments, in response to a path completion event, generating a game path based on a component clone in a first game scene and a target component includes: in response to a path completion event, determining a target path segment between adjacent target objects in the first game scene, the target objects including the component clone in the first game scene and the target component; and combining the component clone in the first game scene, the target component, and the target path segment between adjacent target objects to obtain a game path.
[0104] Among them, adjacent target objects are those set sequentially according to the operation trajectory of at least one move operation, that is, the object at the starting position of the move operation and the object generated by the move operation.
[0105] The component clones in the first game scene can be all component clones generated in the first game scene in path editing mode, or all component clones fixed in the first game scene generated in the first game scene in path editing mode.
[0106] For example, such as Figure 8 The game path shown starts from... Figure 8 As can be seen, adjacent target objects form corresponding path segments, which are composed of path segments between target objects. Figure 8 The game path within.
[0107] Optionally, before triggering the "Path" control, a preview path segment can be formed between adjacent target objects. Triggering the "Path" control can be a confirmation operation of the preview path segment formed between the adjacent target objects, generating a physical path segment (the target path segment) between the adjacent target objects. This physical path segment constitutes... Figure 8 The game path within.
[0108] It should be noted that when determining the target path segment between adjacent target objects in the first game scene in response to the path trajectory completion event, the target path segment between adjacent target objects in the first game scene includes, but is not limited to: generating the target path segment between adjacent target objects in response to the path trajectory completion event; generating the target path segment between the fixed target object and its adjacent target objects after a target object is fixed in the first game scene; and generating the target path segment between the changed target object and its adjacent target objects in real time as a target object changes in the first game scene.
[0109] In an alternative implementation, the target path segment between adjacent target objects can be generated based on the operation trajectory of the movement operation.
[0110] In an alternative implementation, the target path segments between adjacent target objects can be generated as smoothly transitioning path segments based on the geometric parameters of the adjacent target objects. Specifically, in response to a path completion event, determining a target path segment between adjacent target objects in a first game scene includes: in response to a path completion event, determining the geometric parameters of each target object in the first game scene; based on the geometric parameters of adjacent target objects in the first game scene, determining the geometric parameters of at least one interpolation object located between adjacent target objects; and generating a target path segment between adjacent target objects based on the geometric parameters of the interpolation object.
[0111] The geometric parameters include, but are not limited to, component position, component scaling information, component rotation information, and component size.
[0112] It is understandable that if the target object is used as a path point in the component's game path, then the interpolation object is the interpolation point between the path points.
[0113] Specifically, based on a preset interpolation algorithm, the geometric parameters of adjacent target objects can be interpolated to obtain the geometric parameters of at least one interpolated object between adjacent target objects. Based on the geometric parameters of the interpolated object, a smoother target path segment can be generated, thereby automatically and smoothly connecting the path points on the path to generate a relatively smooth game path.
[0114] Interpolation algorithms include, but are not limited to, cubic spline algorithms, Bézier curve algorithms, B-spline algorithms, minimum energy algorithms, and Catmull-Rom spline algorithms.
[0115] Among them, the Catmull-Rom spline algorithm can calculate in real time according to path changes (real-time changes of path points) to generate corresponding game paths in response to path changes. For example, after the component clone is fixed, the path segment between the fixed component clone and the target object adjacent to the component clone is determined.
[0116] It should be noted that the cubic spline algorithm can be applied to scenarios where paths are generated precisely from path points; the Bézier curve algorithm can be applied to scenarios where paths are generated smoothly and simply; the B-spline algorithm can be applied to scenarios where paths of complex shapes are generated; the minimum energy algorithm can be applied to scenarios where paths are generated from path points approximated by physical simulation; and the Catmull-Rom spline algorithm can be applied to real-time animation scenarios where partial path segments in the game path are generated in real time from set path points.
[0117] For example, such as Figure 9 As shown, Figure 9 Curves 1 and 3 in the diagram are paths generated without interpolation processing, while... Figure 9 Curves 2 and 4 in the image are paths generated using an interpolation algorithm, from... Figure 9 As can be seen, curve 2 is smoother than curve 1, and curve 4 is smoother than curve 3. This shows that the game path generated after interpolation is more in line with the real scene and the path effect is better.
[0118] Specifically, based on the geometric parameters of adjacent target objects in the first game scene, the geometric parameters of at least one interpolation object between adjacent target objects are determined, including: based on the geometric parameters of adjacent target objects, the geometric parameters of at least two interpolation reference objects are determined; based on the geometric parameters of at least two interpolation reference objects and the weights corresponding to the interpolation reference objects, interpolation processing is performed between adjacent target objects to obtain the geometric parameters of at least one interpolation object between adjacent target objects.
[0119] The weights of the interpolation reference objects are different for different interpolation objects.
[0120] Optionally, determining the geometric parameters of at least two interpolation reference objects based on the geometric parameters of adjacent target objects may include: directly using adjacent target objects as interpolation reference objects, and using the geometric parameters of the adjacent target objects as the geometric parameters of the two interpolation reference objects.
[0121] Optionally, based on the geometric parameters of adjacent target objects, the geometric parameters of at least two interpolation reference objects are determined. This may include: using two adjacent target objects that make up the target path segment as interpolation reference objects, and using two target objects adjacent to the left and right ends of the target path segment as interpolation reference objects, thus obtaining four interpolation reference objects. In other words, the interpolation reference objects include the previous point, the start point, the end point, and the next point of the target path segment, thereby ensuring the continuity of the curve.
[0122] Since some target path segments are located in edge regions, it is necessary to create two virtual objects adjacent to the two adjacent target objects that make up the target path segment as interpolation reference objects.
[0123] For example, the path points arranged in path order include p0, p1, p2, and p3, and these path points are all target objects in the first game scene.
[0124] Therefore, for the target path segment between P1 and P2, p0, p1, p2, and p3 should all be used as interpolation reference objects.
[0125] Therefore, for the target path segment between p0 and p1, virtual path points p4 and p5 need to be introduced. Here, p4 is the symmetrical point of p1 when p0 is the center point, and p5 is the symmetrical point of p0 when p1 is the center point.
[0126] The geometric parameters of p0, p1, p2, and p3 can be recorded in the form of "[P(xyz), R(x°), S(x%)]", where P(xyz) can be the center point position of the object, R(x°) can be the rotation information, and S(x%) can be the scaling information.
[0127] Specifically, based on the geometric parameters of at least two interpolation reference objects and the weights corresponding to the interpolation reference objects, interpolation is performed between adjacent target objects to obtain the geometric parameters of at least one interpolation object located between adjacent target objects. This may include: determining the target weights corresponding to the interpolation reference objects when solving for the target interpolation object in the interpolation objects based on the weights corresponding to the interpolation reference objects; and performing a weighted summation based on the geometric parameters of at least two interpolation reference objects and the target weights corresponding to the interpolation reference objects to obtain the geometric parameters of the target interpolation object.
[0128] For example, if we define four interpolation objects as p0, p1, p2, and p3, where the weight corresponding to p0 is m0, the weight corresponding to p1 is m1, the weight corresponding to p2 is m2, and the weight corresponding to p3 is m3, then the geometric parameters of the target interpolation object are: Q(t) = m0*p0 + m1*p1 + m2*p2 + m3*p3.
[0129] The step of obtaining the target weight corresponding to the interpolation reference object when solving for the target interpolation object may include: obtaining a preset tension parameter, which is used to indicate the number of interpolation objects on the target path segment; and determining the target weight corresponding to the interpolation reference object when solving for the target interpolation object based on the tension parameter.
[0130] For example, the tension parameter can be a value in the range of 0 to 1. If the tension parameter is 0, it means that the path is relatively tight and a large number of interpolation objects are required. If the tension parameter is 1, it means that the path is relatively loose and a small number of interpolation objects are required. The tension parameter can be set according to the needs and is not limited here. For example, a value of 0.5 can be used.
[0131] For example, the formulas for determining m0, m1, m2, and m3 are as follows: m0 = -self.tension * t3 + 2 * self.tension * t2 - self.tension * t m1 = (2 - self.tension) * t3 + (self.tension - 3) * t2 + 1 m2 = (self.tension - 2) * t3 + (3 - 2 * self.tension) * t2 +self.tension * t m3 = self.tension * t3 - self.tension * t2 Here, self.tension is used to indicate the tension parameter of the current instance; t2 = t * t; t3 = t2 * t; t is a local parameter that takes a value in the range of 0 to 1, where 0 represents the starting point of the target path segment and 1 represents the ending point of the target path segment.
[0132] As can be seen from the above, an electronic device provides a graphical user interface. The game includes a game editing stage and a game running stage. During the game editing stage, a first game scene corresponding to the game editing stage is displayed on the graphical user interface. This first game scene is in path editing mode and includes at least one target component for generating a path. In response to a movement operation starting at the target component, a component clone of the target component is generated in the first game scene, and the component clone is controlled to move along the trajectory of the movement operation. In response to a placement event for the component clone, the component clone is fixed in the first game scene. In response to a movement operation starting at the component clone, the first game... The system generates new component clones corresponding to the existing component clones in the scene, and continues to execute the steps of controlling the component clones to follow the movement trajectory based on the new component clones. In response to the path trajectory completion event, the system generates a game path based on the component clones in the first game scene and the target component, so as to present the game path in the second game scene corresponding to the game running phase. Thus, the system automatically generates component clones through movement operations and controls the component clones to follow the movement. The system uses the component clones generated in the game scene as path points to generate the corresponding game path, thereby avoiding the time spent by players adding multiple existing components and adjusting the placement of existing components, and improving the efficiency of game path construction in the game scene.
[0133] This embodiment also provides a path generation device in a game. Specifically, this device can provide a graphical user interface via an electronic device. The game includes a game editing stage and a game running stage. For example, such as... Figure 10 As shown, the path generation device in this game may include: The interface display module 1001 is used to display the first game scene corresponding to the game editing stage on the graphical user interface during the game editing stage. The first game scene is in path editing mode and includes at least one target component for generating a path. The first clone generation module 1002 is used to generate a component clone of the target component in the first game scene in response to a movement operation with the starting position located at the target component, and control the component clone to move along the operation trajectory of the movement operation. The clone fixing module 1003 is used to fix the component clone in the first game scene in response to the placement event for the component clone; The second clone generation module 1004 is used to respond to the movement operation of the component clone at the starting position, generate a new component clone corresponding to the component clone in the first game scene, and continue to execute the step of controlling the component clone to move along the operation trajectory of the movement operation based on the new component clone. The path generation module 1005 is used to respond to the path trajectory completion event, generate a game path based on the component clone in the first game scene and the target component, so as to present the game path in the second game scene corresponding to the game running phase.
[0134] In some embodiments, the path generation device in the game further includes a component transformation module, which is specifically used for: In response to a component transformation event triggered by a component clone, display a component transformation control on the component clone; In response to a trigger operation on the component transformation control, the component clone is transformed in the first game scene.
[0135] In some embodiments, the component transformation control includes a rotation control, and the component transformation module is specifically used for: In response to a rotation operation on the rotation control, in the first game scene, the component clone is rotated based on the rotation information indicated by the rotation operation.
[0136] In some embodiments, the component transformation control includes at least two scaling controls, each scaling control corresponding to a component scaling direction, and the component transformation module is specifically used for: In response to a sliding action on the target zoom control within the zoom control, determine the sliding position on the target zoom control; In the first game scene, the component clone is scaled based on the scaling direction and sliding position of the component corresponding to the target scaling control.
[0137] In some embodiments, the graphical user interface also includes at least two component transformation icons, and the component transformation module is specifically used for: In response to a trigger operation on the target component transformation icon in the component transformation icons, display the component transformation control corresponding to the target component transformation icon on the component clone.
[0138] In some embodiments, a preview path segment is formed between adjacent target objects in the first game scene, and the target objects include component clones and target components in the first game scene.
[0139] In some embodiments, the path generation device in the game further includes a path segment forming module, which is specifically used for: In response to the new clone event for the preview path segment, a new clone of the target component is added to the preview path segment; In response to a component transformation operation targeting the cloned target component, the transformed cloned target component is obtained; Based on the transformed target component clone, preview path segments are re-formed between the transformed target component clone and the adjacent target objects.
[0140] In some embodiments, the path generation module 1005 is specifically used for: In response to the path completion event, determine the target path segment between adjacent target objects in the first game scene, including component clones and target components in the first game scene; The game path is obtained by combining the component clones, target components, and target path segments between adjacent target objects in the first game scene.
[0141] In some embodiments, the path generation module 1005 is specifically used for: In response to the path completion event, determine the geometric parameters of each target object in the first game scene; Based on the geometric parameters of adjacent target objects in the first game scene, determine the geometric parameters of at least one interpolation object located between adjacent target objects; Based on the geometric parameters of the interpolation object, target path segments are generated between adjacent target objects.
[0142] In some embodiments, the path generation module 1005 is specifically used for: Based on the geometric parameters of adjacent target objects, determine the geometric parameters of at least two interpolation reference objects; Based on the geometric parameters of at least two interpolation reference objects and the weights corresponding to the interpolation reference objects, interpolation is performed between adjacent target objects to obtain the geometric parameters of at least one interpolation object between the adjacent target objects.
[0143] As can be seen from the above, an electronic device provides a graphical user interface. The game includes a game editing stage and a game running stage. During the game editing stage, a first game scene corresponding to the game editing stage is displayed on the graphical user interface. This first game scene is in path editing mode and includes at least one target component for generating a path. In response to a movement operation starting at the target component, a component clone of the target component is generated in the first game scene, and the component clone is controlled to move along the trajectory of the movement operation. In response to a placement event for the component clone, the component clone is fixed in the first game scene. In response to a movement operation starting at the component clone, the first game... The system generates new component clones corresponding to the existing component clones in the scene, and continues to execute the steps of controlling the component clones to follow the movement trajectory based on the new component clones. In response to the path trajectory completion event, the system generates a game path based on the component clones in the first game scene and the target component, so as to present the game path in the second game scene corresponding to the game running phase. Thus, the system automatically generates component clones through movement operations and controls the component clones to follow the movement. The system uses the component clones generated in the game scene as path points to generate the corresponding game path, thereby avoiding the time spent by players adding multiple existing components and adjusting the placement of existing components, and improving the efficiency of game path construction in the game scene.
[0144] Accordingly, this application also provides an electronic device, which can be a terminal, such as a smartphone, tablet computer, laptop computer, touch screen, game console, personal computer (PC), personal digital assistant (PDA), or other terminal device. Alternatively, the electronic device can be a server.
[0145] like Figure 11 As shown, Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 1100 includes a processor 1101 with one or more processing cores, a memory 1102 with one or more computer-readable storage media, and a computer program stored on the memory 1102 and executable on the processor. The processor 1101 and the memory 1102 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0146] The processor 1101 is the control center of the electronic device 1100. It connects various parts of the electronic device 1100 via various interfaces and lines. By running or loading software programs and / or units stored in the memory 1102, and by calling data stored in the memory 1102, it executes various functions of the electronic device 1100 and processes data, thereby providing overall monitoring of the electronic device 1100. The processor 1101 can be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc., and can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0147] In this embodiment, the processor 1101 in the electronic device 1100 loads the instructions corresponding to the processes of one or more applications into the memory 1102 according to the following steps, and the processor 1101 runs the applications stored in the memory 1102 to realize various functions, such as: During the game editing stage, the first game scene corresponding to the game editing stage is displayed on the graphical user interface. The first game scene is in path editing mode and includes at least one target component for generating a path. In response to a movement operation starting at the target component, a component clone of the target component is generated in the first game scene, and the component clone is controlled to move along the trajectory of the movement operation. In response to a placement event for a component clone, fix the component clone in the first game scene; In response to a movement operation starting at the component clone, a new component clone corresponding to the component clone is generated in the first game scene, and based on the new component clone, the steps of controlling the component clone to move along the operation trajectory of the movement operation are continued. In response to the path completion event, a game path is generated based on the component clone in the first game scene and the target component, so as to present the game path in the second game scene corresponding to the game running phase.
[0148] In some embodiments, the method further includes: In response to a component transformation event triggered by a component clone, display a component transformation control on the component clone; In response to a trigger operation on the component transformation control, the component clone is transformed in the first game scene.
[0149] In some embodiments, the component transformation control includes a rotation control, and in response to a trigger operation on the component transformation control, the component clone is transformed in the first game scene, including: In response to a rotation operation on the rotation control, in the first game scene, the component clone is rotated based on the rotation information indicated by the rotation operation.
[0150] In some embodiments, the component transformation control includes at least two scaling controls, each scaling control corresponding to a component scaling direction. In response to a trigger operation on the component transformation control, component transformation is performed on the component clone in the first game scene, including: In response to a sliding action on the target zoom control within the zoom control, determine the sliding position on the target zoom control; In the first game scene, the component clone is scaled based on the scaling direction and sliding position of the component corresponding to the target scaling control.
[0151] In some embodiments, the graphical user interface further includes at least two component transformation icons, which, in response to a component transformation trigger event for a component clone, display component transformation controls on the component clone, including: In response to a trigger operation on the target component transformation icon in the component transformation icons, display the component transformation control corresponding to the target component transformation icon on the component clone.
[0152] In some embodiments, a preview path segment is formed between adjacent target objects in the first game scene, and the target objects include component clones and target components in the first game scene.
[0153] In some embodiments, the method further includes: In response to the new clone event for the preview path segment, a new clone of the target component is added to the preview path segment; In response to a component transformation operation targeting the cloned target component, the transformed cloned target component is obtained; Based on the transformed target component clone, preview path segments are re-formed between the transformed target component clone and the adjacent target objects.
[0154] In some embodiments, in response to a path completion event, a game path is generated based on the component clone in the first game scene and the target component, including: In response to the path completion event, determine the target path segment between adjacent target objects in the first game scene, including component clones and target components in the first game scene; The game path is obtained by combining the component clones, target components, and target path segments between adjacent target objects in the first game scene.
[0155] In some embodiments, in response to a path completion event, determining a target path segment between adjacent target objects in a first game scene includes: In response to the path completion event, determine the geometric parameters of each target object in the first game scene; Based on the geometric parameters of adjacent target objects in the first game scene, determine the geometric parameters of at least one interpolation object located between adjacent target objects; Based on the geometric parameters of the interpolation object, target path segments are generated between adjacent target objects.
[0156] In some embodiments, determining the geometric parameters of at least one interpolation object located between adjacent target objects based on the geometric parameters of adjacent target objects in a first game scene includes: Based on the geometric parameters of adjacent target objects, determine the geometric parameters of at least two interpolation reference objects; Based on the geometric parameters of at least two interpolation reference objects and the weights corresponding to the interpolation reference objects, interpolation is performed between adjacent target objects to obtain the geometric parameters of at least one interpolation object between the adjacent target objects.
[0157] Therefore, the electronic device 1100 provided in this embodiment can bring the following technical effects: improve the efficiency of constructing game paths in game scenes.
[0158] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0159] Optional, such as Figure 11 As shown, the electronic device 1100 also includes: a touch display screen 1103, a radio frequency circuit 1104, an audio circuit 1105, an input unit 1106, and a power supply 1107. The processor 1101 is electrically connected to the touch display screen 1103, the radio frequency circuit 1104, the audio circuit 1105, the input unit 1106, and the power supply 1107. Those skilled in the art will understand that... Figure 11 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0160] The touch display screen 1103 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 1103 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 1101. It can also receive and execute commands from the processor 1101. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 1101 to determine the type of touch event. Subsequently, the processor 1101 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the touch display screen 1103 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 1103 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 1103 can also be used as part of the input unit 1106 to achieve input functions.
[0161] The radio frequency circuit 1104 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other electronic devices, and to transmit and receive signals with network devices or other electronic devices.
[0162] Audio circuit 1105 can be used to provide an audio interface between a user and an electronic device via a speaker and a microphone. Audio circuit 1105 can convert received audio data into electrical signals and transmit them to the speaker, where the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuit 1105, converted back into audio data, and then processed by processor 1101 before being transmitted via radio frequency circuit 1104 to, for example, another electronic device, or output to memory 1102 for further processing. Audio circuit 1105 may also include an earphone jack to provide communication between peripheral headphones and electronic devices.
[0163] The input unit 1106 can be used to receive input numbers, characters, or user characteristic information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
[0164] Power supply 1107 is used to supply power to various components of electronic device 1100. Optionally, power supply 1107 can be logically connected to processor 1101 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 1107 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0165] although Figure 11 As not shown in the diagram, the electronic device 1100 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.
[0166] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0167] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0168] Therefore, embodiments of this application provide a computer-readable storage medium storing multiple computer programs that can be loaded by a processor to execute any of the path generation methods in a game provided in embodiments of this application. The computer program can execute the steps of the path generation method in the following game: During the game editing stage, the first game scene corresponding to the game editing stage is displayed on the graphical user interface. The first game scene is in path editing mode and includes at least one target component for generating a path. In response to a movement operation starting at the target component, a component clone of the target component is generated in the first game scene, and the component clone is controlled to move along the trajectory of the movement operation. In response to a placement event for a component clone, fix the component clone in the first game scene; In response to a movement operation starting at the component clone, a new component clone corresponding to the component clone is generated in the first game scene, and based on the new component clone, the steps of controlling the component clone to move along the operation trajectory of the movement operation are continued. In response to the path completion event, a game path is generated based on the component clone in the first game scene and the target component, so as to present the game path in the second game scene corresponding to the game running phase.
[0169] As can be seen, the computer program can be loaded by the processor to execute any of the path generation methods in the game provided in the embodiments of this application, thereby bringing the following technical effects: improving the efficiency of constructing game paths in the game scene.
[0170] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0171] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0172] Since the computer program stored in the computer-readable storage medium can execute any of the path generation methods in the game provided in the embodiments of this application, the beneficial effects that the path generation methods in the game provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0173] According to one aspect of this application, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various optional implementations of the above embodiments.
[0174] In the above embodiments of the path generation device, computer-readable storage medium, electronic device, and computer program product in the game, the descriptions of each embodiment have different focuses. Parts not described in detail in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process and beneficial effects of the path generation device, computer-readable storage medium, computer program product, electronic device, and their corresponding units in the game described above can be referred to the description of the path generation method in the game as shown in the above embodiments, and will not be repeated here.
[0175] The foregoing has provided a detailed description of a path generation method, apparatus, electronic device, computer-readable storage medium, and computer program product in a game, as provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A path generation method in a game, characterized in that, The method includes providing a graphical user interface via an electronic device, wherein the game includes a game editing phase and a game running phase, and the method comprises: During the game editing stage, a first game scene corresponding to the game editing stage is displayed on the graphical user interface, wherein the first game scene is in path editing mode and the first game scene includes at least one target component for generating a path; In response to a movement operation starting at the target component, a component clone of the target component is generated in the first game scene, and the component clone is controlled to move along the operation trajectory of the movement operation; In response to a placement event for the component clone, the component clone is fixed in the first game scene; In response to a movement operation starting at the component clone, a new component clone corresponding to the component clone is generated in the first game scene, and based on the new component clone, the step of controlling the component clone to move along the operation trajectory of the movement operation is continued; In response to the path completion event, a game path is generated based on the component clone in the first game scene and the target component, so as to present the game path in the second game scene corresponding to the game running stage.
2. The path generation method in the game as described in claim 1, characterized in that, The method further includes: In response to a component transformation trigger event for the component clone, a component transformation control is displayed on the component clone; In response to a trigger operation on the component transformation control, the component clone is transformed in the first game scene.
3. The path generation method in the game as described in claim 2, characterized in that, The component transformation control includes a rotation control. The step of transforming the component clone in the first game scene in response to a trigger operation on the component transformation control includes: In response to a rotation operation on the rotation control, in the first game scene, the component clone is rotated based on the rotation information indicated by the rotation operation.
4. The path generation method in the game as described in claim 2, characterized in that, The component transformation control includes at least two scaling controls, each scaling control corresponding to a component scaling direction. The step of transforming the component clone in the first game scene in response to a trigger operation on the component transformation control includes: In response to a sliding operation on a target zoom control within the zoom control, determine the sliding position on the target zoom control; In the first game scene, the component clone is scaled based on the component scaling direction corresponding to the target scaling control and the sliding position.
5. The path generation method in the game as described in claim 2, characterized in that, The graphical user interface also includes at least two component transformation icons, and the component transformation control is displayed on the component clone in response to a component transformation trigger event for the component clone, including: In response to a trigger operation on the target component transformation icon in the component transformation icons, the component transformation control corresponding to the target component transformation icon is displayed on the component.
6. The path generation method in a game as described in any one of claims 1 to 5, characterized in that, In the first game scene, a preview path segment is formed between adjacent target objects, and the target objects include component clones in the first game scene and the target components.
7. The path generation method in a game as described in claim 6, characterized in that, The method further includes: In response to the clone addition event for the preview path segment, a new clone of the target component is added on the preview path segment; In response to a component transformation operation on the target component clone, a transformed target component clone is obtained; Based on the transformed target component clone, preview path segments are re-formed between the transformed target component clone and the adjacent target objects.
8. The path generation method in a game as described in any one of claims 1 to 5, characterized in that, The step of generating a game path in response to a path completion event, based on the component clones in the first game scene and the target component, includes: In response to a path completion event, a target path segment between adjacent target objects in the first game scene is determined, wherein the target objects include component clones in the first game scene and the target component; The game path is obtained by combining the component clones in the first game scene, the target component, and the target path segments between the adjacent target objects.
9. The path generation method in a game as described in claim 8, characterized in that, The step of determining the target path segment between adjacent target objects in the first game scene in response to the path completion event includes: In response to the path completion event, determine the geometric parameters of each target object in the first game scene; Based on the geometric parameters of adjacent target objects in the first game scene, determine the geometric parameters of at least one interpolation object located between the adjacent target objects; Based on the geometric parameters of the interpolation object, a target path segment is generated between the adjacent target objects.
10. The path generation method in a game as described in claim 9, characterized in that, The step of determining the geometric parameters of at least one interpolation object located between adjacent target objects based on their geometric parameters in the first game scene includes: Based on the geometric parameters of the adjacent target objects, determine the geometric parameters of at least two interpolation reference objects; Based on the geometric parameters of at least two interpolation reference objects and the weights corresponding to the interpolation reference objects, interpolation is performed between the adjacent target objects to obtain the geometric parameters of at least one interpolation object located between the adjacent target objects.
11. A path generation device for a game, characterized in that, The device provides a graphical user interface via an electronic device, the game including a game editing stage and a game running stage, the device comprising: An interface display module is used to display a first game scene corresponding to the game editing stage on the graphical user interface during the game editing stage, wherein the first game scene is in path editing mode and the first game scene includes at least one target component for generating a path. The first clone generation module is used to generate a component clone of the target component in the first game scene in response to a movement operation with the starting position located at the target component, and control the component clone to move along the operation trajectory of the movement operation; The clone fixing module is used to fix the component clone in the first game scene in response to a placement event for the component clone; The second clone generation module is used to respond to the movement operation of the component clone whose starting position is located in the component clone, generate a new component clone corresponding to the component clone in the first game scene, and continue to execute the step of controlling the component clone to move along the operation trajectory of the movement operation based on the new component clone; A path generation module is used to generate a game path based on the component clone in the first game scene and the target component in response to a path trajectory completion event, so as to present the game path in the second game scene corresponding to the game running stage.
12. An electronic device, characterized in that, The system includes a processor and a memory, the memory storing multiple instructions; the processor loads instructions from the memory to perform the steps of the path generation method in the game as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the path generation method in a game as described in any one of claims 1 to 10.