Game scene editing method and apparatus, device, and storage medium
Patent Information
- Application Number
- PCT/CN2026/073929
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-02-19
- Filing Date
- 2026-01-21
- Publication Date
- 2026-08-27
Smart Images

Figure CN2026073929_27082026_PF_FP_ABST
Abstract
Description
Game scene editing methods, devices, equipment and storage media
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese Patent Application No. 202510186707.4, filed on February 19, 2025, entitled “Game Scene Editing Method, Apparatus, Device and Storage Medium”, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This disclosure relates to the field of game technology, and more specifically, to a game scene editing method, apparatus, device, and storage medium. Background Technology
[0004] In building games, grid snapping is a useful feature. Its main function is to help players place and align scene components in the game more accurately. A good grid snapping system can greatly improve the gaming experience.
[0005] However, in current building games, players can only attach scene components based on a single fixed grid system in the scene, through fixed grid positions. This limits the player's creative freedom and affects the player's gaming experience. Summary of the Invention
[0006] This disclosure addresses the shortcomings of the aforementioned related technologies by providing a game scene editing method, apparatus, device, and storage medium to resolve the problems existing in the related technologies.
[0007] The technical solution adopted in the embodiments of this disclosure is as follows:
[0008] In a first aspect, embodiments of this disclosure provide a game scene editing method, which provides a graphical user interface through a terminal device, the method comprising:
[0009] The graphical user interface displays a game editing interface, which includes a game scene to be edited.
[0010] Identify the first scene component;
[0011] Based on the first component size of the first scene component or based on the first component size of the first scene component and a preset grid multiple, multiple first grids are generated in the game scene to be edited, wherein the first grid is configured with a first grid size, and the first grid size corresponds to the first component size;
[0012] In response to a movement command for the first scene component, control the first scene component to move within the game scene to be edited;
[0013] The first target grid is determined from the plurality of first grids based on the location information of the first scene component;
[0014] The first scene component is attached to the first target mesh.
[0015] Secondly, embodiments of this disclosure provide a game scene editing device that provides a graphical user interface via a terminal device, the device comprising:
[0016] The display module is configured to display a game editing interface in the graphical user interface, the game editing interface including a game scene to be edited;
[0017] The first determining module is configured to execute the determining first scenario component;
[0018] The generation module is configured to generate multiple first grids in the game scene to be edited based on the first component size of the first scene component or based on the first component size of the first scene component and a preset grid multiple, wherein the first grid is configured with a first grid size, and the first grid size corresponds to the first component size;
[0019] The control module is configured to execute a response to a movement command for the first scene component, controlling the first scene component to move within the game scene to be edited;
[0020] The second determining module is configured to determine a first target grid from the plurality of first grids based on the position information of the first scene component;
[0021] The adsorption module is configured to adsorb the first scene component onto the first target mesh.
[0022] Thirdly, this disclosure provides an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to implement the game scene editing method described in the above embodiments.
[0023] Fourthly, this disclosure provides a readable storage medium storing program instructions, which, when executed by a processor, implement the game scene editing method described in the above embodiments.
[0024] The beneficial effects of this disclosure are as follows: This disclosure provides a game scene editing method, including: displaying a game editing interface in a graphical user interface, the game editing interface including a game scene to be edited; determining a first scene component; generating multiple first grids in the game scene to be edited according to the first component size of the first scene component or according to the first component size of the first scene component and a preset grid multiple, wherein the first grid is configured with a first grid size, the first grid size corresponding to the first component size; responding to a movement command for the first scene component, controlling the first scene component to move in the game scene to be edited; determining a first target grid from the multiple first grids according to the position information of the first scene component; and attaching the first scene component to the first target grid.
[0025] The size of the first grid corresponds to the size of the first component of the first scene component. Players can quickly snap the first scene component to any first grid without having to repeatedly adjust its position to align it, which improves editing efficiency, creative freedom, and the player's gaming experience. Attached Figure Description
[0026] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this disclosure and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 is a flowchart illustrating one of the game scene editing methods provided in this embodiment of the present disclosure;
[0028] Figure 2 is a schematic diagram of one of the game editing interfaces provided in the embodiments of this disclosure;
[0029] Figure 3 is a second schematic diagram of the game editing interface provided in this embodiment of the present disclosure;
[0030] Figure 4 is a third schematic diagram of the game editing interface provided in this embodiment of the present disclosure;
[0031] Figure 5 is a schematic diagram of one of the first grids provided in the embodiments of this disclosure;
[0032] Figure 6 is a second flowchart illustrating the game scene editing method provided in this embodiment of the present disclosure;
[0033] Figure 7 is a flowchart of the game scene editing method provided in this embodiment of the present disclosure (third one).
[0034] Figure 8(a) shows a first grid before updating, as provided in one of the embodiments of this disclosure;
[0035] Figure 8(b) shows one of the updated first grids provided in an embodiment of this disclosure;
[0036] Figure 9 is a flowchart of the game scene editing method provided in this embodiment of the present disclosure;
[0037] Figure 10 is a fifth flowchart illustrating the game scene editing method provided in this embodiment of the present disclosure;
[0038] Figure 11(a) shows a first mesh before rotation, provided in one of the embodiments of this disclosure;
[0039] Figure 11(b) shows one of the rotated first meshes provided in an embodiment of this disclosure;
[0040] Figure 12 is a flowchart of the game scene editing method provided in this embodiment of the present disclosure;
[0041] Figure 13 is a schematic diagram of one of the second grids provided in the embodiments of this disclosure;
[0042] Figure 14 is a flowchart of the game scene editing method provided in this embodiment of the present disclosure (the seventh one).
[0043] Figure 15 is a schematic diagram of one of the target location points provided in the embodiments of this disclosure;
[0044] Figure 16 is a schematic diagram of one of the vertical ray models provided in the embodiments of this disclosure;
[0045] Figure 17 is a projection diagram of one of the scene components provided in the embodiments of this disclosure;
[0046] Figure 18 is a flowchart of the game scene editing method provided in this embodiment of the present disclosure (the eighth one).
[0047] Figure 19 is a flowchart of the game scene editing method provided in this embodiment of the present disclosure;
[0048] Figure 20 is one of the schematic diagrams of the game scene to be edited provided in the embodiments of this disclosure;
[0049] Figure 21 is a second schematic diagram of the game scene to be edited provided in an embodiment of this disclosure;
[0050] Figure 22 is a flowchart of the game scene editing method provided in this embodiment of the present disclosure;
[0051] Figure 23 is a schematic diagram of one of the mesh configuration interfaces provided in the embodiments of this disclosure;
[0052] Figure 24 is a second schematic diagram of the mesh configuration interface provided in an embodiment of this disclosure;
[0053] Figure 25 is a third schematic diagram of the mesh configuration interface provided in the embodiments of this disclosure;
[0054] Figure 26 is a schematic diagram of one of the grids provided in an embodiment of this disclosure;
[0055] Figure 27 is an eleventh flowchart illustrating the game scene editing method provided in this embodiment of the present disclosure;
[0056] Figure 28 is a fourth schematic diagram of the game editing interface provided in the embodiments of this disclosure;
[0057] Figure 29 is a structural schematic diagram of one of the game scene editing devices provided in the embodiments of this disclosure;
[0058] Figure 30 is a schematic diagram of the structure of one of the electronic devices provided in the embodiments of this disclosure. Detailed Implementation
[0059] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this disclosure, but not all embodiments.
[0060] Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely to illustrate selected embodiments of the disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0061] Furthermore, the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0062] It should be noted that, where there is no conflict, the features in the embodiments of this disclosure can be combined with each other.
[0063] In building games, grid snapping is a very useful feature. In addition to helping players place and align scene components in the game more accurately, it also improves building efficiency, reduces the difficulty of operation, enhances visual effects and game experience.
[0064] In relevant grid-based snapping schemes, component sizes are required to be integer multiples of the grid size. This rule has significant limitations in practical applications. For example, when building a scene, if the grid size is fixed at 1m*1m*1m, game developers cannot provide a 1.5m*1.5m*1.5m component. Due to the grid limitation, when placing a 1.5m*1.5m*1.5m component, it must either be embedded 0.5m into the previous grid area or maintain a 0.5m distance from the previous grid. This severely restricts the layout and combination of components, making it difficult to meet diverse scene building needs.
[0065] At the same time, this size limitation also means that players cannot scale components. In actual use, players may need to adjust the size of components according to different scenario requirements to achieve richer creativity and personalized designs, but the relevant technology cannot meet this need, greatly limiting the player's operating experience and creative space. Because, when the grid is snapped together, players cannot scale freely and are limited by the grid size, only able to control scaling to the grid.
[0066] In summary, the existing mesh-attachment technology has limitations in terms of component size, and a new technical solution is urgently needed to solve these problems, so as to improve the freedom of developers in providing components and the flexibility of players in manipulating components.
[0067] To address the aforementioned issues, this disclosure provides a method for editing game scenes. This method can be generated by any electronic device with computing and processing capabilities. The electronic device can be, for example, a computer device facing the terminal or a backend server.
[0068] The following examples, in conjunction with the accompanying drawings, provide specific illustrations of the game scene editing methods provided in this disclosure.
[0069] Figure 1 is a flowchart illustrating one of the game scene editing methods provided in this disclosure. As shown in Figure 1, the method of this disclosure provides a graphical user interface through a terminal device, and the method includes:
[0070] S101. Display the game editing interface in the graphical user interface.
[0071] A graphical user interface (GUI) is a user interface that displays application software programs in a visual way. For example, a game editing interface can be displayed on a graphical user interface. The game editing interface is a specific area or window used to create, modify, and design game content. It may include editing functions for various elements such as game scenes, characters, props, and plot. Game developers or players can use various tools and operations in the game editing interface to personalize and adjust the game.
[0072] In this embodiment, the game editing interface includes a game scene to be edited, as shown in Figure 2. In this game scene, players can control a virtual character to perform game actions. For example, using the controls on the right, the player can control the character to lunge forward, and the blank area on the left can control the character's movement and / or rotation. A virtual camera capturing the virtual scene is bound to the virtual character, and the camera moves synchronously while the virtual character moves. During this synchronous movement, the virtual camera captures the virtual scene to form the image of the virtual scene presented in the graphical user interface. Simultaneously, players can control the virtual character to create and edit scene components within the game scene. For example, users can experience the map layout, the operation of mechanisms, and the difficulty of the terrain from a first-person perspective, more intuitively identifying potential problems in the map.
[0073] In other embodiments, the game editing interface includes a game scene to be edited as shown in Figure 3. In this game scene, the virtual scene does not include a virtual character that can be controlled by the player. The player cannot directly control the virtual character to experience the game. Instead, the player builds the map by placing and adjusting various components. In terms of game perspective, the player can observe and operate the map from a third-person perspective or an editing perspective. The player can use various editing tools (such as the "combine", "delete", "bind", "move", "zoom", and "rotate" controls at the bottom of Figure 3) to move, rotate, and scale components, arrange terrain, mechanisms, decorations, and other elements, and plan the overall structure and gameplay rules of the map.
[0074] S102. Determine the first scene component.
[0075] As shown in Figure 2, the game editing interface also displays multiple component controls (i.e., the component controls at the bottom of Figure 2 used to generate multiple scene components of different shapes). These component controls are used to generate multiple preset scene components. For example, the controls shown in Figure 2 are used to generate multiple scene components of blocks, rings, frustums, cones, and sectors, respectively. When a player wants to add a certain scene component to the game scene to be edited, the player can select the component control corresponding to that scene component. Then, a new scene component will be added to the game scene to be edited. The newly added scene component is the first scene component.
[0076] For example, if a selection operation is performed on any target component control among multiple component controls (the selection operation can be, for example, a click operation on the target component control), a new scene component corresponding to the target component control will be added to the game scene to be edited. In an optional implementation, the scene component corresponding to the newly added target component control can be determined as the first scene component.
[0077] S103. Generate multiple first grids in the game scene to be edited based on the size of the first component of the first scene component, or based on the size of the first component of the first scene component and the preset grid multiple.
[0078] In an optional implementation, the first scene component is a 3D scene component in the game scene to be edited. Therefore, the first size information of the first scene component refers to the length x, width y, and height z of a component in a 3D space scene in three mutually perpendicular directions. For example, the three-dimensional dimensions of a cuboid component are the specific values of its length, width, and height, which determine the size and shape of the component in 3D space.
[0079] In an optional implementation, the first scene component is a two-dimensional scene component in the game scene to be edited. For example, as shown in Figure 4, in an interface editing scene where the game scene to be edited is an interface editing scene for editing the game's interactive interface, the first scene component is a two-dimensional control component created in the interface editing scene.
[0080] After determining the first scene component, multiple first grids can be generated in the game scene to be edited based on the first component size of the first scene component. That is, the game scene to be edited is divided into multiple first grids of equal size, as shown in Figure 5.
[0081] The first grid is configured with a first grid size. In an optional implementation, multiple first grids are generated in the game scene to be edited according to the first component size of the first scene component. That is, the size of the first grid is equal to the size of the first scene component, and the first scene component can be directly attached to the position of any first grid. When the size of the newly added first scene component is different, the size of the generated first grid also changes accordingly.
[0082] In an optional implementation, multiple first grids are generated in the game scene to be edited based on the size of the first component of the first scene component and a preset grid multiple, as shown in Figure 6:
[0083] S201. Calculate the target unit grid size based on the size of the first component of the first scene component and the preset grid multiplier.
[0084] The preset mesh ratio is a manually set parameter used to determine the level of mesh refinement. It represents the proportional relationship between the target unit mesh size and a certain base or reference size. For example, a preset mesh ratio of 2 means that the target unit mesh size is twice the size of the first component. If the first component size is length x, width y, and height z, then the target unit mesh size is length 2x, width 2y, and height 2z. If the preset mesh ratio is 0.5, it means that the target unit mesh size is half the size of the first component, resulting in a finer mesh. For example, if the first component size is length x, width y, and height z, then the target unit mesh size is length 0.5x, width 0.5y, and height 0.5z.
[0085] S202. Based on the target unit mesh size, the virtual three-dimensional space is divided into meshes to obtain multiple first meshes.
[0086] Once the target element mesh size is obtained, the virtual 3D space can be meshed according to the target element mesh size to obtain multiple first meshes. For example, a mapping method can be used, where the coordinates of the mesh nodes are determined in the parameter domain based on the target element mesh size, and these nodes are mapped to the virtual 3D space through coordinate transformation, thereby obtaining a structured first mesh.
[0087] S104. Respond to the movement command for the first scene component and control the first scene component to move within the game scene to be edited.
[0088] Once the first scene component is determined, in response to the player's movement commands for the first scene component, it can be moved within the game scene to be edited, thereby changing its position. These movement commands can be triggered by the player directly dragging the first scene component on the touchscreen with their finger, or by dragging it using a mouse, keyboard, or other devices. Alternatively, the first scene component can be indirectly moved by controlling the movement of a virtual character within the game scene.
[0089] S105. Determine the first target grid from multiple first grids based on the position information of the first scene component.
[0090] During the process of controlling the first scene component to move in the game scene to be edited, the position information of the first scene component is obtained in real time, and the distance between the first scene component and multiple first grids is obtained based on the position information of the first scene component (for example, the distance between the first scene component and the grid lines of multiple first grids can be detected). When the distance is close enough, the nearest first grid is determined as the first target grid.
[0091] Specifically, based on the position information of the first scene component, the distance between the first scene component and multiple first meshes is obtained. The principle is as follows: First, component position detection is performed. The software monitors the key positions of the first scene component in real time. In a two-dimensional plane, the key positions of the component can be, for example, the vertices, center points, and boundaries of the component. In a three-dimensional scene, the center points, vertices, and geometric centers of the model of each face of the component are also considered. By obtaining the coordinate information of these positions, the software can determine the relative position of the element and the snapped meshes, thereby determining the first target mesh.
[0092] S106. Attach the first scene component to the first target mesh.
[0093] Once the first target mesh is determined, the first scene component can be snapped to the first target mesh to fix the first scene component at the position of the first target mesh in the game scene to be edited. The basic principle of snapping is as follows:
[0094] When the distance between a key position of a first scene component and a grid line or intersection is less than a preset threshold, a snapping action is triggered. This threshold can usually be set in the software or has a default value. For example, when the distance between a component's vertex and a grid line is less than 3 pixels, the software will snap that vertex to the nearest grid line. The snapping method may be to directly adjust the component's position coordinates to coincide with the grid line or intersection, or to gradually move the element closer to and align it with the grid in a smooth manner. The specific snapping method depends on the software's algorithm and settings.
[0095] In summary, the embodiments of this disclosure provide a game scene editing method. The first grid size of the first grid corresponds to the first component size of the first scene component. Players can quickly snap the first scene component to any first grid without repeatedly fine-tuning its position for alignment, which improves editing efficiency, creative freedom, and the player's gaming experience.
[0096] Figure 7 is a third flowchart illustrating the game scene editing method provided in this embodiment. As shown in Figure 7, in another embodiment, the game scene editing method may further include:
[0097] S301, Determine the second scene component.
[0098] After the first scene component is snapped to the first target grid, the player can also add a second scene component of a different type to the game scene to be edited through multiple component controls of the scene component. The size of the second component of the second scene component is different from the size of the first component of the first scene component.
[0099] For example, among the multiple component controls corresponding to multiple scene components, clicking the component control corresponding to the second scene component will add a second scene component to the game scene to be edited.
[0100] S302, Update multiple first grids according to the size of the second component.
[0101] Once the size of the second component is determined, multiple first grids can be updated according to the size of the second component. The updated multiple first grids are configured with a second grid size that is different from the size of the first grid, and the second grid size corresponds to the size of the second component.
[0102] In this embodiment, when a second scene component is added, the first grid is updated according to the size of the second scene component. This ensures that no matter what type of second scene component the player adds through the component control of the scene component, the added second scene component can be adapted to the updated first grid. This allows the second scene component to be quickly snapped into any updated first grid, improving editing efficiency and further ensuring creative freedom and the player's gaming experience.
[0103] For example, as shown in Figures 8(a) and 8(b), Figure 8(a) is the first grid before the update and Figure 8(b) is the first grid after the update. It can be seen that the first grid before the update is configured with a first grid size, and the first grid after the update is configured with a second grid size, and the sizes of the first grid size and the second grid size are different.
[0104] Figure 9 is a flowchart of the game scene editing method provided in this embodiment of the present disclosure. As shown in Figure 9, the method of this disclosure further includes:
[0105] S401. Respond to the component scaling instruction for the first scene component and update the size of the first component.
[0106] For any existing first scene component in the game scene to be edited, the player can also issue component scaling commands to these existing scene components. Component scaling commands are commands issued by the player to change the size of scene components. This command can be triggered in a variety of ways, such as the player using the mouse to drag the edge of the component to scale it in the graphical user interface, or sending the scaling command in the code through a specific function or method call.
[0107] In response to a received component scaling instruction, the width, height, or other size-related properties of the first scene component are adjusted to update the display size of the first scene component on the graphical user interface.
[0108] S402, Update multiple first grids based on the updated first component size.
[0109] After the size of the first component is updated, multiple first grids can also be updated according to the updated size of the first component. The updated multiple first grids are configured with a third grid size that is different from the size of the first grid, and the third grid size corresponds to the updated size of the first component.
[0110] In this embodiment, multiple first grids are updated according to the updated size of the first component. This snapping and grid size update mechanism reduces the difficulty of operation for players, making the construction process smoother and more natural. Players do not need to spend too much effort adjusting the position and size of components, and can focus more on creativity and design, which enhances the fun and immersion of the game.
[0111] Referring again to Figures 8(a) and 8(b), Figure 8(a) shows the first grid before the update and Figure 8(b) shows the first grid after the update. It can be seen that the first grid before the update is configured with a first grid size, and the first grid after the update is configured with a third grid size, and the sizes of the first grid size and the third grid size are different.
[0112] Furthermore, updating the grid size according to the component size can prevent components from being placed in a messy, overlapping or intersecting manner, making the game scene look cleaner and more standardized, and enhancing visual comfort. For example, in city building games, it can make the layout of streets, building groups and other structures more reasonable and beautiful.
[0113] In another embodiment, at least one scene component is already displayed in the game scene to be edited. In this case, as shown in FIG10, the step of determining the first scene component in S102 may include at least one of the following:
[0114] S501, respond to the selection operation for the first scene component, and determine the first scene component based on the selection operation.
[0115] Players can click on any of the at least one displayed scene components to select one. This selected component becomes the first scene component, and multiple first grids are then generated in the game scene to be edited based on its dimensions. In other words, when a player selects a scene component (without moving it), multiple first grids are created based on that component's size.
[0116] S502, respond to a movement operation for the first scene component, and determine the first scene component based on the movement operation.
[0117] Players can also move any scene component among at least one displayed scene component, designating the moved component as the first scene component. Then, based on the first component's dimensions, multiple first grids are generated in the game scene to be edited. In other words, when a player moves a scene component, multiple first grids are created based on that component's dimensions.
[0118] It should be noted that S501 and S502 are only used to illustrate the method of determining the first scene component and do not represent a restriction on the order of steps. In fact, the move operation of S502 can be a continuous operation with the selection operation of S501. For example, for at least one scene component that has been displayed in the game scene to be edited, a scene component can be selected and then moved. Alternatively, the move operation of S502 and the selection operation of S501 can also be two independent operations. For example, a scene component can be moved directly.
[0119] In practice, players can also rotate the first scene component within the game scene to be edited to change its spatial orientation, lighting and shadow information, and visual presentation. In response to rotation commands for the first scene component, the system controls the rotation of the first scene component and multiple first grids. For example, Figure 11(a) shows the first grid before rotation, and Figure 11(b) shows the first grid after rotation. The difference between Figure 11(b) and Figure 11(a) is that the spatial orientation of the first scene component 14 within the game scene to be edited is different.
[0120] Specifically, in response to a rotation command for the first scene component, the first scene component can be rotated around a preset grid reference point, and multiple first grids can be rotated. The preset grid reference point is the grid zero point, which is the point that coincides with the scene zero point of the game scene to be edited. That is, the preset grid reference point is a specific position in the game coordinate system, which is used as the center of rotation. All rotation operations will be calculated and executed around this point.
[0121] The principle behind rotation is as follows:
[0122] Players input rotation commands via touch screen, mouse (e.g., clicking the rotation button, dragging the rotation handle), keyboard (specific rotation shortcuts), or other interactive devices. The rotation of the first scene component and the first mesh is achieved by constructing a rotation matrix. For example, based on the coordinates of a preset mesh reference point and parameters such as the rotation angle, a corresponding rotation matrix is calculated. Then, the vertex coordinates of the first scene component and the first mesh are multiplied by the rotation matrix to obtain the rotated coordinates, thus achieving the rotation effect. It's important to note that the first mesh only rotates with the rotation of the first scene component; it does not move with the movement of the first scene component.
[0123] In another embodiment, as shown in FIG12, the method of this disclosure may further include:
[0124] S601. Determine the first plane where the controlled virtual object in the game scene to be edited is located.
[0125] As shown in Figure 13, the game scene to be edited also displays a controlled virtual object 12. In this embodiment, it is first necessary to determine the first two-dimensional plane where the feet of the controlled virtual object are located. The method for determining the first plane may include, for example:
[0126] The game's physics engine is used to simulate the interaction between virtual controlled objects and the scene. The physics engine performs physical calculations on the controlled virtual objects, including gravity and collision. When a controlled virtual object collides with the ground or other supporting surfaces, the physics engine can determine the contact points between the virtual object's feet and the supporting surface through collision detection and response mechanisms. The plane containing these contact points is the first plane on which the controlled virtual object's feet are located.
[0127] Alternatively, the first plane can be determined based on a height map: A height map is a two-dimensional image or data structure used to represent the height information of terrain or scene surfaces. By querying the height map data corresponding to the coordinate position of the controlled virtual object in the scene, the ground height at that position can be obtained. Then, based on the standing point of the controlled virtual object, combined with certain rules (such as horizontal vectors), a two-dimensional plane parallel to the ground is determined as the first plane where the feet of the controlled virtual object are located.
[0128] S602. While maintaining multiple first grids, control the generation of second grids on the first plane.
[0129] Continuing with reference to Figure 13, after determining the first plane, a two-dimensional second grid can be generated on the first plane while maintaining multiple three-dimensional first grids (the first grid exists in the game scene to be edited, but can be in a hidden state, so only the second grid is shown in Figure 13, and the first grid is not shown). The second grid will also trigger scene component snapping, so that the player can quickly snap scene components onto the first plane under the feet of the controlled virtual object.
[0130] The zero point of the second grid is also the zero point of the game scene to be edited. The second grid does not move with the horizontal movement of the controlled virtual object, but it will move with the vertical movement of the controlled virtual object. For example, in response to the movement operation of the controlled virtual object in the target direction perpendicular to the first plane, the second grid is controlled to move in the target direction. That is, the second grid is always under the feet of the controlled virtual object.
[0131] The size of the second grid is determined based on the size of the first grid. In order to establish the connection between different dimensions, the xy dimensions of the second grid are usually made equal to the xy dimensions of the first grid on the corresponding plane. For example, in a virtual building scene, the xy dimensions of a two-dimensional map or marker must be consistent with the xy dimensions of the corresponding plane position in the three-dimensional scene so that users can have an accurate sense of space and positional relationships when operating and observing.
[0132] In this disclosure, the controlled virtual object can be configured, under a first control model, to respond to movement commands and control the controlled virtual object to hover and move within the game scene to be edited. For example, the player controls the controlled virtual object to hover and move to a specific location to obtain items at a high place or trigger mechanisms to solve puzzles. The controlled virtual object can also be configured, under a second control model, to respond to movement commands and control the controlled virtual object to move on the surface of scene components in the game scene to be edited. For example, the virtual character controlled by the player needs to move quickly on various terrains and building surfaces, such as performing parkour on the surface of scene components like city rooftops and canyon cliffs, to avoid obstacles and collect items.
[0133] Figure 14 is a flowchart of the game scene editing method provided in this embodiment of the present disclosure, and as shown in Figure 14, the method of this disclosure further includes:
[0134] S701. Determine the target location point on the first plane based on the position information of the first scene component and the reference point of the first scene component.
[0135] The reference point of the first scene component can be, for example, the geometric center point of the first scene component, or a corner point on the first scene component. Based on the position information of the first scene component and the reference point of the first scene component, the position of the reference point of the first scene component in the game scene to be edited is first determined. Then, based on the position of the reference point of the first scene component in the game scene to be edited, the projection point of the reference point of the first scene component on the first plane is determined as the target position point on the first plane. The target position point can be, for example, point A as shown in Figure 15, where point A is the geometric center point of the first scene component. In Figure 15, the first scene component is represented by a trapezoid.
[0136] S702. Starting from the target location point, generate a vertical ray model in the game scene to be edited along the target direction perpendicular to the first plane and towards the first scene component, and display multiple scale lines in the target direction on the vertical ray model.
[0137] Referring to Figure 15, starting from the target location point A, a vertical ray model is generated in the game scene to be edited along the target direction perpendicular to the first plane and towards the first scene component. The generated vertical ray model is shown in Figure 16. The distance between each pair of adjacent tick marks displayed on the vertical ray model is the size of the first grid in the target direction, that is, the size of the first grid in the height z direction. With this setting, the player can quickly obtain the distance between the first scene component and the first plane in the target direction.
[0138] Specifically, a method for generating a vertical ray model could be, for example, determining the 3D coordinates of the target point A in the game scene to be edited, assuming it to be (x0, y0, z0); determining the equation of the first plane, for example, the general form Ax + By + Cz + D = 0, and the normal vector of the first plane. Finally, use a unit vector. To represent the target direction, this vector needs to be parallel to the normal vector of the first plane. Vertical, that is, satisfying
[0139] The game scene to be edited also displays the projection graphic of the first scene component in the target direction. The projection graphic can be displayed in the following ways: if there is no occlusion component between the first scene component and the first plane, the projection graphic is displayed directly on the first plane, as shown in Figures 15 and 16; or, if there is an occlusion component between the first scene component and the first plane, the occluded part of the projection graphic is displayed on the occlusion component, and the unoccluded part of the projection graphic is displayed on the first plane, as shown in Figure 17.
[0140] In one embodiment, in addition to the first grid, the game scene to be edited may also include multiple third grids. The multiple third grids are three-dimensional grids obtained by dividing the virtual three-dimensional space based on a preset grid size. The preset grid size is a fixed value set by the player. That is, the size of the third grid is fixed and will not change with the size of the scene components.
[0141] It should be noted that the first grid is an invisible grid, which players cannot see. The second and third grids are visible grids, which players can see in the game scene to be edited.
[0142] In one embodiment, the game scene to be edited includes one or more scene components, wherein the scene components are configured to generate corresponding scene component models during the game runtime phase.
[0143] Based on this, Figure 18 is the eighth flowchart of the game scene editing method provided in this embodiment of the present disclosure. As shown in Figure 18, the method of this disclosure further includes:
[0144] S801, in response to the game run command, runs the target game scene to display the game scene to be edited in the graphical user interface.
[0145] The target game scene is generated based on the basic game scene. The basic game scene does not load scene components according to the edited parameters, nor does it contain any controllable virtual objects that the player can control.
[0146] The target game scene includes one or more scene components. The game scene to be edited displayed in the target game scene includes controlled virtual objects and one or more scene component models corresponding to one or more scene components. That is, the game scene to be edited loads a game map and has controlled virtual objects in which players can perform game actions. When the component to be edited is selected, the association between the controlled virtual object and the component is established, so that when the controlled virtual object moves, the component moves; when the controlled virtual object rotates, the component rotates.
[0147] S802, responding to control commands, controls the controlled virtual object to perform corresponding game behaviors in the game scene to be edited.
[0148] Then, responding to the control commands input by the player, it controls the controlled virtual object to perform corresponding game behaviors in the game scene to be edited, such as moving, running, jumping, etc.
[0149] As shown in Figure 19, based on Figure 18, the step of determining the first scene component in S102 includes:
[0150] S901. Display a selection marker in the graphical user interface, and align the scene component model to be edited from the scene component model in the game scene to be edited according to the aiming direction of the selection marker.
[0151] The selection indicator can be a control related to the crosshair orientation of the controlled virtual object, such as "move," "edit," "delete," "rotate," or "add path" controls. Players can use these controls to adjust the crosshair orientation of the controlled virtual object so that it aligns with the scene component model to be edited among multiple scene component models in the game scene to be edited.
[0152] As shown in Figure 20, the graphical user interface displays selection icons such as "Move", "Edit", "Delete", "Copy", and "Add Path". The following describes the function of the interactive controls and selection icons in the interface of Figure 20.
[0153] The crosshair is used to select target components in the scene. When the crosshair is aimed at a component, that component is selected, and only then can the controls on the right be used to manipulate it. For example, moving the crosshair to the "Small Floor 15" component in the scene will highlight the component, indicating that it has been selected, and subsequent operations can then be performed using the controls on the right.
[0154] After selecting a component, click the "Move" button on the right. The crosshair will then be linked to the component's movement. Players can use actions such as dragging the screen to change the component's position in three-dimensional space, using the crosshair as a reference. This includes moving the component forward, backward, left, or right, or raising or lowering its height.
[0155] After clicking the "Edit" button, the selected component pointed to by the crosshair will enter the edit mode. Players can make detailed adjustments to the component pointed to by the crosshair, such as modifying the component's size, rotation angle, and other attribute settings to meet the needs of map editing.
[0156] Once the crosshair selects a component, clicking the "Delete" button will remove the component that the crosshair is pointing to and remove it from the current map scene.
[0157] After selecting a component with the crosshair, click the "Copy" button to copy the component pointed to by the crosshair. Then, perform the same operation again in a suitable location (such as clicking on a blank area of the screen) to paste the same component, making it easy to quickly create multiple identical components.
[0158] After selecting a component with a configurable path using the crosshair, click the "Add Path" button. You can then set multiple waypoints in the scene (click the crosshair to confirm the waypoint location) to plan a movement path for the component, allowing it to move along the set path.
[0159] S902. In response to the determination command, the scene component model to be edited aligned with the selection identifier is determined as the first scene component, and the association between the first scene component and the controlled virtual object is established.
[0160] Once the crosshair of the controlled virtual object is aligned with a scene component model to be edited, the scene component model to be edited is identified as the first scene component, and an association relationship is established between the first scene component and the controlled virtual object. The association relationship can be a state influence relationship: the state of the scene component can be affected by the controlled virtual object. For example, when the position of the controlled virtual object changes, the position of the scene component also changes accordingly.
[0161] It should also be noted that, based on the established association between the first scene component and the controlled virtual object, this disclosure can control the first scene component 14 to move in the game scene to be edited by controlling the position of the controlled virtual object 12; or, by controlling the distance between the first scene component and the controlled virtual object through the "distance" control shown in Figure 21, the first scene component can be controlled to move in the game scene to be edited.
[0162] Based on the established association between the first scene component and the controlled virtual object, the rotation of the first scene component can be controlled by controlling the orientation of the controlled virtual object; or the rotation of the first scene component can be controlled by the preset rotation control shown in Figure 21.
[0163] The following is a description of the interface in Figure 21 in conjunction with the solution disclosed herein.
[0164] When a player clicks the "Move" button in Figure 20, the player character is associated with the selected component. The player can then manipulate the component's position to move and adjust it.
[0165] Distance control: Clicking the "Distance" button will bring up a corresponding progress bar (Figure 21 shows "Drag to push and pull component: 25.4"). Players can drag the progress bar to control the distance between the component and the character, making the component move closer to or further away from the character, thus achieving precise position adjustment.
[0166] Rotation Control: Clicking the "Rotate" button allows players to rotate the component in three-dimensional space, using the character as a reference point, by sliding their fingers across the screen. This changes the component's orientation and angle. In an optional implementation, after clicking the "Rotate" button, when the player slides their fingers across the screen, the component will change its orientation and angle in three-dimensional space, using the character as a relative reference standard. For example, if the character is facing due east, and the player rotates a block component, the block will rotate in space based on the character's current orientation, potentially changing from a horizontal to a vertical position, rather than performing a circular motion around the character. The character here primarily provides a reference point for angle and position, helping the player determine the component's orientation and posture after rotation.
[0167] Zoom Controls: By clicking the "Zoom" button, players can pinch or spread their fingers on the screen to zoom in or out on the component and adjust its size.
[0168] Possession Mode Controls: Clicking the "Possession Mode" button will transform the player character into the selected component, allowing them to freely move from the component's perspective and experience the component's actual effects and suitability for its position on the map. Clicking again will exit Possession Mode.
[0169] Confirm (√) and Cancel (×) controls: The "√" button is used to confirm the current operation on the component, such as adjustments to distance, rotation, scaling, etc., and the operation takes effect after clicking; the "×" button is used to cancel the current operation and restore the component to its state before the operation.
[0170] The following description, in conjunction with Figures 22-27, explains the various grid mode switching methods provided in this disclosure.
[0171] Figure 22 is a flowchart of the game scene editing method provided in this embodiment of the present disclosure. As shown in Figure 22, the method of this disclosure further includes:
[0172] S1001, Respond to the grid configuration trigger operation of the game scene to be edited and display the grid configuration interface.
[0173] When a player wants to configure or modify the grid mode, the player can click on the grid configuration control (such as the "gear" shaped control displayed in the upper left corner of the game scene to be edited) in the game scene to be edited, thereby displaying the grid configuration interface 13 shown in Figure 23. The grid configuration interface displays a variety of different grid mode configuration controls, such as configuration controls for the first grid mode, configuration controls for the third grid, and configuration controls for no grid (the second grid is directly under the feet of the controlled virtual object when the player moves scene components, so it is not displayed on the grid configuration interface).
[0174] S1002. Based on the grid mode configuration operation entered in the grid configuration interface, configure the grid mode of the game scene to be edited as the first grid mode and / or the third grid mode.
[0175] Players can configure the grid mode of the game scene to be edited as the first grid mode and / or the third grid mode by entering grid mode settings in the grid configuration interface. For example, clicking the first grid mode configuration control will configure the grid mode of the game scene to be edited as the first grid mode; or clicking the third grid mode configuration control will configure the grid mode of the game scene to be edited as the third grid mode; or clicking the no grid configuration control will turn off all grids in the game scene to be edited.
[0176] After configuring the grid mode of the game scene to be edited as the first grid mode, players can also configure the preset grid multiplier in the first grid mode according to the grid multiplier configuration operation entered in the grid configuration interface, as shown in Figure 24. The grid multiplier configuration operation can include, for example, 0.5x, 1.0x, and 2.0x, which respectively represent that the size of the first grid is 0.5 times the size of the scene component, 1.0 times the size of the scene component, and 2.0 times the size of the scene component.
[0177] Alternatively, after configuring the grid mode of the game scene to be edited as the third grid mode, players can also configure the preset grid size in the third grid mode according to the grid size configuration operation entered in the grid configuration interface. As shown in Figure 25, the grid size configuration operation can include, for example, 0.5-meter grid, 1.0-meter grid, and 2.0-meter grid, which respectively represent the size of the third grid as 0.5 meters, 1.0 meters, and 2.0 meters.
[0178] As shown in Figure 26, the solid line represents the first grid and the dashed line represents the third grid. The first grid and the third grid can coexist in the scene to be edited. The scene component will be attracted to the grid that it is closer to.
[0179] Figure 27 is a flowchart of the game scene editing method provided in this embodiment of the present disclosure. As shown in Figure 27, the method of this disclosure may further include:
[0180] S1101, Display mode switching control in the game scene to be edited.
[0181] As shown in Figure 28, the game scene to be edited also displays a mode switching control, which is used to quickly switch between grid modes. The switchable grid modes may include, for example, the first grid mode, the third grid mode, and the no-grid mode. Clicking the mode switching control will allow you to switch between these grid modes in turn.
[0182] S1102, The mode switching operation of the response mode switching control is used to switch the grid mode of the game scene to be edited.
[0183] When a player clicks the mode switching control, it is considered that the mode switching operation input through the mode switching control has been received, and the grid mode of the game scene to be edited is switched. That is, without opening the grid configuration interface, this embodiment can directly switch between the first grid mode, the third grid mode and the gridless mode in the game scene to be edited through the mode switching control.
[0184] In summary, this disclosure provides a method for editing game scenes, which has the following advantages:
[0185] 1. A first grid is provided, and the grid size of the first grid is adaptively adjusted according to the size of the scene components. Players can quickly snap the first scene components to any first grid. It is not required that all scene components must be an integer multiple of the grid size. There is no need to repeatedly fine-tune the position to align them, which improves editing efficiency, creative freedom and the player's game experience.
[0186] 2. A second grid is provided, which is set on the first two-dimensional plane to allow players to quickly attach scene components to the first plane under the feet of the controlled virtual object.
[0187] 3. A third grid is provided. The size of the third grid is fixed. The third grid, together with the first grid, helps players edit the game scene.
[0188] 4. Generate a vertical ray model between the scene component and the first plane so that players can quickly obtain the vertical distance between the scene component and the first plane.
[0189] The following will continue to explain the apparatus, device, and storage medium for implementing the game scene editing method provided in any of the above embodiments of this disclosure. The specific implementation process and the resulting technical effects are the same as those in the corresponding method embodiments. For the sake of brevity, the parts not mentioned in the following embodiments can be referred to the corresponding content in the method embodiments.
[0190] As shown in Figure 29, this disclosure also provides a game scene editing device that provides a graphical user interface through a terminal device. The device includes:
[0191] Display module 10 is configured to display a game editing interface in a graphical user interface, the game editing interface including the game scene to be edited.
[0192] The first determining module 20 is configured to perform the determination of the first scene component.
[0193] The generation module 30 is configured to generate multiple first grids in the game scene to be edited based on the size of the first component of the first scene component or based on the size of the first component of the first scene component and a preset grid multiple. The first grid is configured with a first grid size, which corresponds to the size of the first component.
[0194] The control module 40 is configured to execute response to movement commands for the first scene component, controlling the first scene component to move within the game scene to be edited.
[0195] The second determining module 50 is configured to determine the first target grid from multiple first grids based on the position information of the first scene component.
[0196] The adsorption module 60 is configured to adsorb the first scene component onto the first target mesh.
[0197] Optionally, the size can be a two-dimensional or a three-dimensional size.
[0198] Optionally, the game scene editing device further includes an update module configured to perform: determining a second scene component, wherein the second component size of the second scene component is different from the first component size of the first scene component; updating a plurality of first grids according to the second component size, wherein the updated plurality of first grids are configured with a second grid size different from the first grid size, the second grid size corresponding to the second component size.
[0199] Optionally, the game scene editing device further includes an update module configured to execute a component scaling instruction in response to a first scene component, update the size of the first component, and update a plurality of first grids according to the updated first component size, wherein the updated plurality of first grids are configured with a third grid size different from the first grid size, and the third grid size corresponds to the updated first component size.
[0200] Optionally, the update module is also configured to execute a response to a component scaling instruction for the first scene component, update the size of the first component, and update multiple first grids according to the updated size of the first component, wherein the updated multiple first grids are configured with a third grid size that is different from the size of the first grid, and the third grid size corresponds to the updated size of the first component.
[0201] Optionally, the game editing interface also displays: multiple component controls, which are controls used to generate multiple preset scene components;
[0202] The first determining module 20 is also configured to perform a response to the selection operation of the target component control, and determine the scene component corresponding to the target component control as the first scene component.
[0203] Optionally, the game scene to be edited displays at least one scene component;
[0204] The first determining module 20 is also configured to perform a response to a selection operation for a first scene component, and determine the first scene component based on the selection operation; and to respond to a movement operation for a first scene component, and determine the first scene component based on the movement operation.
[0205] Optionally, the control module 40 is also configured to execute a rotation command in response to a first scene component, control the rotation of the first scene component, and control the rotation of multiple first grids.
[0206] Optionally, the control module 40 is also configured to execute a rotation command in response to the first scene component, controlling the rotation of the first scene component with a preset grid reference point as the center, and controlling the rotation of multiple first grids.
[0207] Optionally, the generation module 30 is further configured to perform the following: calculate the target unit grid size based on the first component size of the first scene component and a preset grid multiple; and divide the virtual three-dimensional space corresponding to the game scene to be edited into multiple first grids based on the target unit grid size.
[0208] Optionally, the generation module 30 is also configured to determine the first plane in which the controlled virtual object in the game scene to be edited is located; and to control the generation of a second grid on the first plane while maintaining multiple first grids.
[0209] Optionally, the control module 40 is also configured to execute a movement command to control the controlled virtual object to float and move in the game scene to be edited; or to control the controlled virtual object to move on the surface of a scene component in the game scene to be edited.
[0210] Optionally, the generation module 30 is further configured to perform the following actions: determine a target position point on the first plane based on the position information of the first scene component and the reference point of the first scene component; generate a vertical ray model in the game scene to be edited, starting from the target position point and along a target direction perpendicular to the first plane and towards the first scene component; and display multiple tick marks in the target direction on the vertical ray model, wherein the distance between adjacent tick marks is the size of the first grid in the target direction.
[0211] Optionally, the generation module 30 is also configured to perform the display of a projection graphic of a first scene component in the target direction within the game scene to be edited.
[0212] Optionally, the generation module 30 is further configured to perform the following actions: if there is no occlusion component between the first scene component and the first plane, the projected graphic is directly displayed on the first plane; or, if there is an occlusion component between the first scene component and the first plane, the occluded part of the projected graphic is displayed on the occlusion component, and the unoccluded part of the projected graphic is displayed on the first plane.
[0213] Optionally, the display module 10 is further configured to execute a game running command in response to run a target game scene to display the game scene to be edited in a graphical user interface; the target game scene includes one or more scene components; the game scene to be edited includes a controlled virtual object and one or more scene component models corresponding to the one or more scene components; the control module 40 is configured to execute a control command in response to control the controlled virtual object to perform corresponding game behaviors in the game scene to be edited.
[0214] Optionally, the first determining module 20 is further configured to display a selection marker in the graphical user interface, align the scene component model to be edited from the scene component model of the game scene to be edited according to the aiming direction of the selection marker; in response to the determining instruction, determine the scene component model to be edited aligned with the selection marker as the first scene component, and establish the association between the first scene component and the controlled virtual object.
[0215] Optionally, the control module 40 is further configured to control the movement of the first scene component in the game scene to be edited by controlling the position of the controlled virtual object; or, to control the movement of the first scene component in the game scene to be edited by a preset movement control.
[0216] Optionally, the control module 40 is also configured to control the rotation of the first scene component by controlling the orientation of the controlled virtual object; or, to control the rotation of the first scene component by using a preset rotation control.
[0217] Optionally, the control module 40 is also configured to perform a movement operation of the controlled virtual object in a target direction perpendicular to the first plane, controlling the second grid to move in the target direction.
[0218] Optionally, the apparatus of this embodiment further includes a configuration module, configured to perform a grid configuration trigger operation in response to the game scene to be edited, display a grid configuration interface, and configure the grid mode of the game scene to be edited as a first grid mode and / or a third grid mode according to the grid mode configuration operation input in the grid configuration interface.
[0219] Optionally, the configuration module is also configured to perform a grid multiplier configuration operation based on the grid configuration interface input, configuring a preset grid multiplier in the first grid mode.
[0220] Optionally, the configuration module is also configured to perform a grid size configuration operation based on the grid size input from the grid configuration interface, configuring a preset grid size in the third grid mode.
[0221] Optionally, the device in this embodiment further includes a switching module, configured to execute a mode switching control for displaying the game scene to be edited; and to switch the grid mode of the game scene to be edited in response to a mode switching operation input by the mode switching control.
[0222] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.
[0223] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).
[0224] This disclosure also provides an electronic device, as shown in FIG30, including a processor 100, a storage medium 200, and a bus 300. The storage medium stores program instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions. The method for this execution is as follows:
[0225] The graphical user interface displays the game editing interface, which includes the game scene to be edited.
[0226] Identify the first scene component;
[0227] Based on the size of the first component of the first scene component or based on the size of the first component of the first scene component and a preset grid multiple, multiple first grids are generated in the game scene to be edited. Each first grid is configured with a first grid size, which corresponds to the size of the first component.
[0228] Responding to movement commands for the first scene component, control the movement of the first scene component within the game scene to be edited;
[0229] The first target grid is determined from multiple first grids based on the location information of the first scene component;
[0230] The first scene component is attached to the first target mesh.
[0231] Optionally, the size can be a two-dimensional or a three-dimensional size.
[0232] Optionally, the method further includes:
[0233] Determine a second scene component, wherein the size of the second component of the second scene component is different from the size of the first component of the first scene component;
[0234] Multiple first grids are updated according to the size of the second component, wherein the updated multiple first grids are configured with a second grid size that is different from the size of the first grid, and the second grid size corresponds to the size of the second component.
[0235] Optionally, the method further includes:
[0236] In response to a component scaling instruction for the first scene component, update the size of the first component;
[0237] Multiple first grids are updated based on the updated first component size, wherein the updated multiple first grids are configured with a third grid size that is different from the first grid size, and the third grid size corresponds to the updated first component size.
[0238] Optionally, the game editing interface also displays: multiple component controls, which are controls used to generate multiple preset scene components;
[0239] The first scene components are determined, including:
[0240] In response to a selection operation on the target component control, determine the scene component corresponding to the target component control as the first scene component.
[0241] Optionally, the game scene to be edited displays at least one scene component;
[0242] The steps to determine the first scene component include at least one of the following:
[0243] Respond to the selection operation for the first scene component, and determine the first scene component based on the selection operation;
[0244] Respond to a movement operation targeting the first scene component, and determine the first scene component based on the movement operation.
[0245] Optionally, the method further includes:
[0246] In response to a rotation command for a first scene component, control the rotation of the first scene component and control the rotation of multiple first meshes.
[0247] Optionally, in response to a rotation command for a first scene component, the first scene component is rotated, and multiple first meshes are rotated, including:
[0248] In response to a rotation command for the first scene component, the first scene component is rotated around a preset grid reference point, and multiple first grids are rotated as well.
[0249] Optionally, based on the size of the first component of the first scene component and a preset grid multiple, multiple first grids are generated in the game scene to be edited, including:
[0250] Calculate the target unit grid size based on the size of the first component of the first scene component and the preset grid multiplier;
[0251] Based on the target unit mesh size, the virtual 3D space corresponding to the game scene to be edited is divided into meshes to obtain multiple first meshes.
[0252] Optionally, the method further includes:
[0253] Determine the first plane containing the controlled virtual object in the game scene to be edited;
[0254] While maintaining multiple first grids, control the generation of second grids on the first plane.
[0255] Optionally, the controlled virtual object is configured to float and move in the game scene to be edited in response to a movement command under a first control model; or the controlled virtual object is configured to move on the surface of a scene component in the game scene to be edited in response to a movement command under a second control model.
[0256] Optionally, the method further includes:
[0257] Based on the position information of the first scene component and the reference point of the first scene component, determine the target position point on the first plane;
[0258] Starting from the target location point, a vertical ray model is generated in the game scene to be edited along the target direction perpendicular to the first plane and towards the first scene component. Multiple tick marks in the target direction are displayed on the vertical ray model, and the distance between adjacent tick marks is the size of the first grid in the target direction.
[0259] Optionally, the method further includes:
[0260] Display the projection of the first scene component in the target direction within the game scene to be edited.
[0261] Optionally, the method further includes:
[0262] If there is no occlusion component between the first scene component and the first plane, the projected graphic is displayed directly on the first plane; or,
[0263] If there is an occlusion component between the first scene component and the first plane, the occluded part of the projected graphic will be displayed on the occlusion component, and the unoccluded part of the projected graphic will be displayed on the first plane.
[0264] Optionally, the game scene to be edited includes one or more scene components, wherein the scene components are configured to generate corresponding scene component models during the game runtime phase.
[0265] Optionally, the method further includes:
[0266] In response to a game run command, the target game scene is run to display the game scene to be edited in the graphical user interface; the target game scene includes one or more scene components; the game scene to be edited includes controlled virtual objects and one or more scene component models corresponding to one or more scene components;
[0267] In response to control commands, control the controlled virtual objects to perform corresponding game behaviors in the game scene to be edited.
[0268] Optionally, the steps for determining the first scene component include:
[0269] Display a selection marker in the graphical user interface, and align the scene component model to be edited from the scene component model of the game scene to be edited according to the aiming direction of the selection marker;
[0270] In response to the confirmation command, the scene component model to be edited aligned with the selection identifier is identified as the first scene component, and the association between the first scene component and the controlled virtual object is established.
[0271] Optionally, the method further includes:
[0272] The first scene component can be moved within the game scene to be edited by controlling the position of the controlled virtual object; or, the first scene component can be moved within the game scene to be edited by using preset movement controls.
[0273] The rotation of the first scene component can be controlled by controlling the orientation of the controlled virtual object; or, the rotation of the first scene component can be controlled by a preset rotation control.
[0274] Optionally, the method further includes:
[0275] In response to the movement of the controlled virtual object in the target direction perpendicular to the first plane, control the movement of the second mesh in the target direction.
[0276] Optionally, the game scene to be edited may also include: multiple third grids, which are three-dimensional grids obtained by dividing the virtual three-dimensional space based on preset grid sizes.
[0277] Optionally, the method further includes:
[0278] Responding to the mesh configuration trigger operation of the game scene to be edited, the mesh configuration interface is displayed;
[0279] Based on the grid mode configuration operation entered in the grid configuration interface, configure the grid mode of the game scene to be edited as the first grid mode and / or the third grid mode.
[0280] Optionally, after configuring the grid mode of the game scene to be edited as the first grid mode, the method further includes:
[0281] Configure the preset grid multiplier in the first grid mode based on the grid multiplier configuration operation entered in the grid configuration interface.
[0282] Optionally, after configuring the grid mode of the game scene to be edited to the third grid mode, the method further includes:
[0283] Configure the preset grid size in the third grid mode based on the grid size configuration operation entered in the grid configuration interface.
[0284] Optionally, the method further includes:
[0285] Display mode switching controls in the game scene to be edited;
[0286] The response mode switching control allows you to switch the grid mode of the game scene being edited.
[0287] In the above steps, the size of the first grid corresponds to the size of the first component of the first scene component. Players can quickly snap the first scene component to any first grid without repeatedly adjusting its position for alignment, which improves editing efficiency, creative freedom, and the player's gaming experience.
[0288] This disclosure also provides a readable storage medium storing program instructions, which are implemented by a processor during execution as follows:
[0289] The graphical user interface displays the game editing interface, which includes the game scene to be edited.
[0290] Identify the first scene component;
[0291] Based on the size of the first component of the first scene component or based on the size of the first component of the first scene component and a preset grid multiple, multiple first grids are generated in the game scene to be edited. Each first grid is configured with a first grid size, which corresponds to the size of the first component.
[0292] Responding to movement commands for the first scene component, control the movement of the first scene component within the game scene to be edited;
[0293] The first target grid is determined from multiple first grids based on the location information of the first scene component;
[0294] The first scene component is attached to the first target mesh.
[0295] Optionally, the size can be a two-dimensional or a three-dimensional size.
[0296] Optionally, the method further includes:
[0297] Determine a second scene component, wherein the size of the second component of the second scene component is different from the size of the first component of the first scene component;
[0298] Multiple first grids are updated according to the size of the second component, wherein the updated multiple first grids are configured with a second grid size that is different from the size of the first grid, and the second grid size corresponds to the size of the second component.
[0299] Optionally, the method further includes:
[0300] In response to a component scaling instruction for the first scene component, update the size of the first component;
[0301] Multiple first grids are updated based on the updated first component size, wherein the updated multiple first grids are configured with a third grid size that is different from the first grid size, and the third grid size corresponds to the updated first component size.
[0302] Optionally, the game editing interface also displays: multiple component controls, which are controls used to generate multiple preset scene components;
[0303] The first scene components are determined, including:
[0304] In response to a selection operation on the target component control, determine the scene component corresponding to the target component control as the first scene component.
[0305] Optionally, the game scene to be edited displays at least one scene component;
[0306] The steps to determine the first scene component include at least one of the following:
[0307] Respond to the selection operation for the first scene component, and determine the first scene component based on the selection operation;
[0308] Respond to a movement operation targeting the first scene component, and determine the first scene component based on the movement operation.
[0309] Optionally, the method further includes:
[0310] In response to a rotation command for a first scene component, control the rotation of the first scene component and control the rotation of multiple first meshes.
[0311] Optionally, in response to a rotation command for a first scene component, the first scene component is rotated, and multiple first meshes are rotated, including:
[0312] In response to a rotation command for the first scene component, the first scene component is rotated around a preset grid reference point, and multiple first grids are rotated as well.
[0313] Optionally, based on the size of the first component of the first scene component and a preset grid multiple, multiple first grids are generated in the game scene to be edited, including:
[0314] Calculate the target unit grid size based on the size of the first component of the first scene component and the preset grid multiplier;
[0315] Based on the target unit mesh size, the virtual 3D space corresponding to the game scene to be edited is divided into meshes to obtain multiple first meshes.
[0316] Optionally, the method further includes:
[0317] Determine the first plane containing the controlled virtual object in the game scene to be edited;
[0318] While maintaining multiple first grids, control the generation of second grids on the first plane.
[0319] Optionally, the controlled virtual object is configured to float and move in the game scene to be edited in response to a movement command under a first control model; or the controlled virtual object is configured to move on the surface of a scene component in the game scene to be edited in response to a movement command under a second control model.
[0320] Optionally, the method further includes:
[0321] Based on the position information of the first scene component and the reference point of the first scene component, determine the target position point on the first plane;
[0322] Starting from the target location point, a vertical ray model is generated in the game scene to be edited along the target direction perpendicular to the first plane and towards the first scene component. Multiple tick marks in the target direction are displayed on the vertical ray model, and the distance between adjacent tick marks is the size of the first grid in the target direction.
[0323] Optionally, the method further includes:
[0324] Display the projection of the first scene component in the target direction within the game scene to be edited.
[0325] Optionally, the method further includes:
[0326] If there is no occlusion component between the first scene component and the first plane, the projected graphic is displayed directly on the first plane; or,
[0327] If there is an occlusion component between the first scene component and the first plane, the occluded part of the projected graphic will be displayed on the occlusion component, and the unoccluded part of the projected graphic will be displayed on the first plane.
[0328] Optionally, the game scene to be edited includes one or more scene components, wherein the scene components are configured to generate corresponding scene component models during the game runtime phase.
[0329] Optionally, the method further includes:
[0330] In response to a game run command, the target game scene is run to display the game scene to be edited in the graphical user interface; the target game scene includes one or more scene components; the game scene to be edited includes controlled virtual objects and one or more scene component models corresponding to one or more scene components;
[0331] In response to control commands, control the controlled virtual objects to perform corresponding game behaviors in the game scene to be edited.
[0332] Optionally, the steps for determining the first scene component include:
[0333] Display a selection marker in the graphical user interface, and align the scene component model to be edited from the scene component model of the game scene to be edited according to the aiming direction of the selection marker;
[0334] In response to the confirmation command, the scene component model to be edited aligned with the selection identifier is identified as the first scene component, and the association between the first scene component and the controlled virtual object is established.
[0335] Optionally, the method further includes:
[0336] The first scene component can be moved within the game scene to be edited by controlling the position of the controlled virtual object; or, the first scene component can be moved within the game scene to be edited by using preset movement controls.
[0337] The rotation of the first scene component can be controlled by controlling the orientation of the controlled virtual object; or, the rotation of the first scene component can be controlled by a preset rotation control.
[0338] Optionally, the method further includes:
[0339] In response to the movement of the controlled virtual object in the target direction perpendicular to the first plane, control the movement of the second mesh in the target direction.
[0340] Optionally, the game scene to be edited may also include: multiple third grids, which are three-dimensional grids obtained by dividing the virtual three-dimensional space based on preset grid sizes.
[0341] Optionally, the method further includes:
[0342] Responding to the mesh configuration trigger operation of the game scene to be edited, the mesh configuration interface is displayed;
[0343] Based on the grid mode configuration operation entered in the grid configuration interface, configure the grid mode of the game scene to be edited as the first grid mode and / or the third grid mode.
[0344] Optionally, after configuring the grid mode of the game scene to be edited as the first grid mode, the method further includes:
[0345] Configure the preset grid multiplier in the first grid mode based on the grid multiplier configuration operation entered in the grid configuration interface.
[0346] Optionally, after configuring the grid mode of the game scene to be edited to the third grid mode, the method further includes:
[0347] Configure the preset grid size in the third grid mode based on the grid size configuration operation entered in the grid configuration interface.
[0348] Optionally, the method further includes:
[0349] Display mode switching controls in the game scene to be edited;
[0350] The response mode switching control allows you to switch the grid mode of the game scene being edited.
[0351] In the above steps, the size of the first grid corresponds to the size of the first component of the first scene component. Players can quickly snap the first scene component to any first grid without repeatedly adjusting its position for alignment, which improves editing efficiency, creative freedom, and the player's gaming experience.
[0352] In the several embodiments provided in this disclosure, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0353] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple grid units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0354] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0355] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or grid device, etc.) or processor to execute some steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0356] The above are merely specific embodiments of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A method for editing a game scene, providing a graphical user interface through a terminal device, the method comprising: The graphical user interface displays a game editing interface, which includes a game scene to be edited. Identify the first scene component; Based on the first component size of the first scene component or based on the first component size of the first scene component and a preset grid multiple, multiple first grids are generated in the game scene to be edited, wherein the first grid is configured with a first grid size, and the first grid size corresponds to the first component size; In response to a movement command for the first scene component, control the first scene component to move within the game scene to be edited; The first target grid is determined from the plurality of first grids based on the location information of the first scene component; The first scene component is attached to the first target mesh.
2. The method according to claim 1, wherein, The dimensions can be two-dimensional or three-dimensional.
3. The method according to claim 1, wherein, The method further includes: A second scene component is determined, wherein the size of the second scene component is different from the size of the first scene component; The plurality of first grids are updated according to the second component size, wherein the updated plurality of first grids are configured with a second grid size different from the first grid size, and the second grid size corresponds to the second component size.
4. The method according to claim 1, wherein, The method further includes: In response to a component scaling instruction for the first scene component, update the size of the first component; The plurality of first grids are updated according to the updated first component size, wherein the updated plurality of first grids are configured with a third grid size different from the first grid size, the third grid size corresponding to the updated first component size.
5. The method according to claim 1, wherein, The game editing interface also displays: multiple component controls, which are controls used to generate multiple preset scene components; The determination of the first scene component includes: In response to a selection operation on a target component control, the scene component corresponding to the target component control is determined to be the first scene component.
6. The method according to claim 1, wherein, The game scene to be edited displays at least one scene component; The step of determining the first scene component includes at least one of the following: In response to a selection operation for the first scene component, the first scene component is determined based on the selection operation; In response to a movement operation targeting the first scene component, the first scene component is determined based on the movement operation.
7. The method according to claim 1, wherein, The method further includes: In response to a rotation command for the first scene component, the first scene component is rotated, and the plurality of first grids are rotated.
8. The method according to claim 7, wherein, The step of controlling the rotation of the first scene component and the rotation of the plurality of first grids in response to a rotation command for the first scene component includes: In response to a rotation command for the first scene component, the first scene component is rotated with a preset grid reference point as the center, and the plurality of first grids are also rotated.
9. The method according to claim 1, wherein, The step of generating multiple first grids in the game scene to be edited based on the first component size of the first scene component and a preset grid multiple includes: Calculate the target unit grid size based on the first component size of the first scene component and the preset grid multiplier; Based on the target unit grid size, the virtual 3D space corresponding to the game scene to be edited is divided into grids to obtain the plurality of first grids.
10. The method according to claim 1, wherein, The method further includes: Determine the first plane where the controlled virtual object in the game scene to be edited is located; While maintaining the plurality of first grids, control the generation of a second grid on the first plane.
11. The method according to claim 10, wherein, The controlled virtual object is configured to, under a first control model, respond to a movement command and control the controlled virtual object to float and move in the game scene to be edited; or the controlled virtual object is configured to, under a second control model, respond to a movement command and control the controlled virtual object to move on the surface of the scene component in the game scene to be edited.
12. The method according to claim 10, wherein, The method further includes: Based on the position information of the first scene component and the reference point of the first scene component, determine the target position point on the first plane; Starting from the target location point, a vertical ray model is generated in the game scene to be edited along a target direction perpendicular to the first plane and toward the first scene component. Multiple scale lines in the target direction are displayed on the vertical ray model, and the distance between adjacent scale lines is the size of the first grid in the target direction.
13. The method according to claim 12, wherein, The method further includes: The projection graphic of the first scene component in the target direction is displayed in the game scene to be edited.
14. The method according to claim 13, wherein, The method further includes: If there is no occlusion component between the first scene component and the first plane, the projected graphic is displayed directly on the first plane; or, If there is an occlusion component between the first scene component and the first plane, the occluded part of the projected graphic is displayed on the occlusion component, and the unoccluded part of the projected graphic is displayed on the first plane.
15. The method according to claim 1, wherein, The game scene to be edited includes one or more scene components, wherein the scene components are configured to generate corresponding scene component models during the game runtime phase.
16. The method according to claim 15, wherein, The method further includes: In response to a game run command, a target game scene is run to display the game scene to be edited in a graphical user interface; the target game scene includes one or more scene components; the game scene to be edited includes controlled virtual objects and one or more scene component models corresponding to the one or more scene components; In response to control commands, the controlled virtual object is controlled to perform corresponding game behaviors in the game scene to be edited.
17. The method according to claim 16, wherein, The step of determining the first scene component includes: A selection marker is displayed in the graphical user interface, and the scene component model to be edited is aligned with the scene component model of the game scene to be edited according to the aiming direction of the selection marker. In response to the determination command, the scene component model to be edited aligned with the selection identifier is determined as the first scene component, and an association relationship is established between the first scene component and the controlled virtual object.
18. The method according to claim 17, wherein, The method further includes: The first scene component can be moved within the game scene to be edited by controlling the position of the controlled virtual object; or, the first scene component can be moved within the game scene to be edited by using a preset movement control. The rotation of the first scene component can be controlled by controlling the orientation of the controlled virtual object; or, the rotation of the first scene component can be controlled by a preset rotation control.
19. The method according to claim 10, wherein, The method further includes: In response to the movement of the controlled virtual object in a target direction perpendicular to the first plane, the second mesh is controlled to move in the target direction.
20. The method according to claim 1, wherein, The game scene to be edited also includes: multiple third grids, which are three-dimensional grids obtained by dividing the virtual three-dimensional space based on a preset grid size.
21. The method according to claim 20, wherein, The method further includes: In response to the grid configuration trigger operation of the game scene to be edited, the grid configuration interface is displayed; Based on the grid mode configuration operation entered in the grid configuration interface, the grid mode of the game scene to be edited is configured as the first grid mode and / or the third grid mode.
22. The method according to claim 21, wherein, After configuring the grid mode of the game scene to be edited to the first grid mode, the method further includes: Configure the preset grid multiplier in the first grid mode according to the grid multiplier configuration operation entered in the grid configuration interface.
23. The method according to claim 21, wherein, After configuring the grid mode of the game scene to be edited to the third grid mode, the method further includes: Configure the preset grid size in the third grid mode according to the grid size configuration operation entered in the grid configuration interface.
24. The method according to claim 1, wherein, The method further includes: Display mode switching control for the game scene to be edited; In response to the mode switching operation input by the mode switching control, the grid mode of the game scene to be edited is switched.
25. A game scene editing device, providing a graphical user interface via a terminal device, the device comprising: The display module is configured to display a game editing interface in the graphical user interface, the game editing interface including a game scene to be edited; The first determining module is configured to execute the determining first scenario component; The generation module is configured to generate multiple first grids in the game scene to be edited based on the first component size of the first scene component or based on the first component size of the first scene component and a preset grid multiple, wherein the first grid is configured with a first grid size, and the first grid size corresponds to the first component size; The control module is configured to execute a response to a movement command for the first scene component, controlling the first scene component to move within the game scene to be edited; The second determining module is configured to determine a first target grid from the plurality of first grids based on the position information of the first scene component; The adsorption module is configured to adsorb the first scene component onto the first target mesh.
26. An electronic device, comprising: The device includes a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to implement the game scene editing method according to any one of claims 1 to 24.
27. A readable storage medium storing program instructions that, when executed by a processor, implement the game scene editing method according to any one of claims 1 to 24.