Water area editing method and device for home scene in game, electronic equipment and storage medium
Through user terrain transformation, the water storage area is generated and the water volume is determined, which solves the problem of limited water editing functions in the existing technology, and achieves more flexible and realistic water editing, improving the gaming experience.
Patent Information
- Application Number
- CN202311197398.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-15
- Publication Date
- 2025-01-10
AI Technical Summary
The water editing function of home scenes in the existing MMORPG is limited by the replacement of terrain lattice units, and the water shape and water level cannot be customized, and the landscaping effect is highly limited.
The water storage area is generated through user terrain transformation, and the water volume is determined according to user operations, real water editing is realized, allowing users to customize the water shape and water level.
It improves the flexibility and freedom of water editing, forms a realistic water body effect, and enhances the user's gaming experience.
Smart Images

Figure CN119280832A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method, device, electronic device and storage medium for editing water areas in a home scene in a game. Background Art
[0002] In massively multiplayer online role-playing games (MMORPGs), the home system is an indispensable part, and is a social system where users can edit the space and objects in the space. In existing MMORPG home scenes, users can freely set water areas, such as creating lakes, rivers, and so on.
[0003] However, the lake creation in existing MMORPGs is actually based on "terrain grids" (cubes), replacing the objects in each "terrain grid". In other words, each lake is equivalent to embedding n unit cubes of water tanks in the ground, which is not a real terrain transformation. In addition, existing MMORPGs can only replace objects in the "terrain grid" with water tanks of fixed shape, depth, and style. The shape of the water tank cannot be customized, nor can the height of the water level be customized, and the landscaping effect is very limited. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present application provide a method, device, electronic device and storage medium for editing water areas in a home scene in a game.
[0005] According to one aspect of an embodiment of the present application, a method for editing a water area of a home scene in a game is provided, comprising:
[0006] After entering the water area editing mode in the home scene, determining a target water storage area according to a first operation of the user; wherein the target water storage area includes an area generated according to the control operation of the user on the terrain editing control;
[0007] determining the water storage capacity of the target water storage area according to a second operation of the user;
[0008] A water body is generated in the target water storage area according to the water storage volume.
[0009] According to another aspect of an embodiment of the present application, a water area editing device for a home scene in a game is provided, comprising: an area determination module, configured to determine a target water storage area according to a first operation of a user after entering a water area editing mode in the home scene; wherein the target water storage area includes an area generated according to a control operation of the user on a terrain editing control;
[0010] A volume determination module, used to determine the water storage volume of the target water storage area according to a second operation of the user;
[0011] A generation module is used to generate a water body in the target water storage area according to the water storage volume.
[0012] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above steps are executed when the program is run.
[0013] According to another aspect of the embodiment of the present application, there is provided an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0014] The memory is used to store computer programs;
[0015] The processor is used to implement the above method steps when executing a computer program.
[0016] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method steps are implemented.
[0017] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:
[0018] By transforming the terrain, an area that can actually store water is generated in the home scene. By determining the water storage capacity, users can determine the amount of water in the water storage area, that is, the water surface height, making water area editing more flexible and free. Users can quickly and conveniently edit water areas in the home scene, and the final water effect is realistic, giving users a high gaming experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 A schematic diagram of a flow chart of a method for editing water areas in a home scene in a game provided by an embodiment of the present application;
[0022] Figure 2A flowchart of a method for editing a water area in a home scene in a game provided by another embodiment of the present application;
[0023] Figure 3 A flowchart of a method for editing a water area in a home scene in a game provided by another embodiment of the present application;
[0024] Figure 4 A flowchart of a method for editing a water area in a home scene in a game provided by another embodiment of the present application;
[0025] Figure 5 A flowchart of a method for editing a water area in a home scene in a game provided by another embodiment of the present application;
[0026] Figure 6 A flowchart of a method for editing a water area in a home scene in a game provided by another embodiment of the present application;
[0027] Figure 7 A flowchart of a method for editing a water area in a home scene in a game provided by another embodiment of the present application;
[0028] Figure 8 A block diagram of a water area editing device for a home scene in a game provided by an embodiment of the present application;
[0029] Fig. 9 A schematic diagram of a terrain editing control excavation shape provided in an embodiment of the present application;
[0030] Fig.10 A schematic diagram of candidate water storage areas and non-candidate water storage areas provided in an embodiment of the present application;
[0031] Fig.11 A schematic diagram of a preset area indication rendered for the highest water storage surface of a candidate water storage area provided in an embodiment of the present application;
[0032] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0034] The water area editing technology of the embodiment of the present application is to form a terrain that can store water in the home scene through the user's terrain transformation, and then determine the amount of water in the water storage area through volume calculation, so as to generate water in the water storage area. In this way, the user has a high degree of freedom in editing the water area in the home scene, and can generate the corresponding water area according to the user's terrain transformation operation, so that the user can make richer landscaping designs for the home scene.
[0035] The following first introduces a method for editing water areas in a home scene in a game provided by an embodiment of the present invention.
[0036] Figure 1 This is a flow chart of a method for editing a water area in a home scene in a game provided by an embodiment of the present application. Figure 1 As shown, the method includes the following steps S11-S13:
[0037] Step S11, after entering the water area editing mode in the home scene, determining a target water storage area according to a first operation of the user; wherein the target water storage area includes an area generated according to the control operation of the user on the terrain editing control;
[0038] Step S12, determining the water storage capacity of the target water storage area according to the second operation of the user;
[0039] Step S13: generating a water body in the target water storage area according to the water storage volume.
[0040] In this embodiment, the user generates an area in the home scene that can actually store water through terrain transformation, and then by determining the water storage volume, the user can determine the amount of water in the water storage area, that is, the water surface height, thereby making the water area editing more flexible and free. The user can quickly and conveniently edit the water area in the home scene, and the final water effect is realistic, and the user has a high gaming experience.
[0041] Figure 2 This is a flow chart of a method for editing a water area in a home scene in a game provided by another embodiment of the present application. Figure 2 As shown, the method further comprises the following steps S21-S22:
[0042] Step S21, obtaining first control information corresponding to the terrain editing control;
[0043] Step S22: generating the target water storage area according to the user's control operation on the terrain editing control and the first control information.
[0044] Optionally, the terrain editing control may be a control displayed in the form of an icon such as a brush or a shovel. The user edits the terrain by dragging or clicking the control such as the brush or the shovel. The user may select a display form corresponding to the terrain editing control.
[0045] In an optional embodiment, the user can set the first control information corresponding to the terrain editing control according to the editing needs. The first control information includes at least one of the following terrain editing parameters corresponding to the terrain editing control: editing shape, editing depth, editing area, editing volume, etc.
[0046] The edited shape may include the terrain shape edited by the user using the terrain editing control for one operation. For example, if the terrain editing form is that the user operates the terrain editing control to dig, the edited shape may be the shape of each digging, such as Fig. 9 As shown, the shape of the excavation can be linear (square, trapezoidal, etc.) or smooth (semicircular, semi-elliptical, etc.) shape.
[0047] The editing depth is the depth involved in each terrain editing, such as the depth of the object dug each time the user operates the terrain editing control.
[0048] The editing area can be the area involved in each terrain editing, such as the area of the object dug each time the user operates the terrain editing control.
[0049] The editing volume is the volume involved in each terrain editing, such as the volume of objects excavated each time the user operates the terrain editing control.
[0050] Optionally, in order to improve the randomness of terrain editing, the terrain editing parameters can also be set to a parameter range instead of a fixed value. For example, the depth of each excavation can be set to 1-5 meters; the volume of each excavation can be set to 1-100 cubic meters; and so on. When the user operates the terrain editing control to dig, the system randomly selects the corresponding parameters for each excavation within the preset parameter range, so that the effect of the terrain excavation performed by the user is different each time.
[0051] In an optional embodiment, the method further includes: determining the first control information corresponding to the terrain editing control according to the configuration operation of the terrain editing control by the user, wherein the first control information includes underwater terrain information of the target water storage area;
[0052] The above-mentioned step S22 may specifically include: determining the water area shape, water area depth and underwater topography corresponding to the target water storage area according to the control operation and the first control information; determining the target water storage area according to the water area shape, water area depth and underwater topography.
[0053] Among them, the underwater terrain can include flat bottom, wavy bottom, mountain bottom and other types. The terrain parameters corresponding to different underwater terrains can also be provided for users to edit. For example, users can set the amplitude and period of terrain fluctuations, the type of mountains and so on.
[0054] In an optional embodiment, the user may also be supported to directly draw the surface shape of the water area by operating the terrain editing control, and provide methods for selecting, setting or drawing water features such as the underwater depth, underwater shape, and underwater terrain of the water area, so that the user can edit the water area in the home scene more freely, quickly and conveniently.
[0055] In the above step S22, when the user completes the terrain editing and saves the terrain editing result, the water storage area is obtained.
[0056] The home scene may include multiple blocks, and the ownership attributes of each block may be defined by the user who first enters the home scene; alternatively, the ownership attributes of all blocks may be set to public, allowing users to apply for ownership of the blocks. After the user applies, the block becomes a private block; blocks that have not been applied for are public blocks.
[0057] Different users have different editing permissions in different blocks. For example, a block owner can edit water areas in a private block, and the block owner can also share the water area editing permission of the private block with his friends, or a visitor can apply to the block owner for the water area editing permission of the private block. The block owner can set different water area editing permissions for friends, visitors, etc., such as users can create new water areas, or users can edit existing water areas.
[0058] In an optional embodiment, based on the user's position in the home scene, it can be determined whether the current block is a private block or a public block. If it is a private block, whether the user has the water area editing authority for the private block. Only when it is determined that the current user has the water area editing authority for the current block can the water area editing mode of the block be entered. Otherwise, the client can prompt the user that he does not have the water area editing authority and cannot edit the water area of the block.
[0059] After the terrain editing is completed, in order to perform subsequent water body generation operations more accurately, the user can select candidate water storage areas from all water storage areas in the home scene. All water storage areas here can be only areas generated based on the user's control operation on the terrain editing control, or can also include other water storage areas in the scene. In an optional embodiment, if Figure 3 As shown, the above step S11 determines the target water storage area according to the first operation of the user, including steps S31 and S32:
[0060] Step S31, detecting areas in the home scene that meet preset water storage conditions as candidate water storage areas;
[0061] Step S32: determining the target water storage area according to the user's selection operation on the candidate water storage area.
[0062] The preset water storage conditions can be set to satisfy the terrain conditions that can store water, such as Fig.10 As shown in , the outer surface of the terrain can form a continuous and sealed shape and is connected to the bottom surface. The area that meets this condition can be used as a candidate water storage area. Figure 4 As shown, the above step S31 includes the following steps S41-S43:
[0063] Step S41, detecting the surface information of the home scene;
[0064] Step S42, according to the surface information, taking the area satisfying the preset water storage terrain as the initial candidate water storage area;
[0065] Step S43: determining the candidate water storage area according to the initial candidate water storage area.
[0066] After the user completes terrain editing and saves the results, the program can detect all terrain information in the home scene and select all areas in the home scene that can form continuous sealed shapes and have connected bottom surfaces as initial candidate water storage areas.
[0067] These initial candidate water storage areas may include areas obtained after the current user edits and saves the terrain, or may include water storage areas obtained after other users edit and save the terrain, or may include water storage areas pre-set in the home scene. Based on the different permissions of different users to the home scene as a whole or each block, the editing permissions for different water storage areas may also be different. For example, for the owner of the home scene, all water storage areas in the home can be used as candidate water storage areas, and the owner can edit them; the owner of a block in the home scene has editing permissions for the water storage areas in the block, but for the water storage areas in other blocks, they may not be edited and can only be viewed; the public area in the home scene can open the editing permissions of the water storage area to all users; for private blocks, the block owner can give other users, such as friends, the editing permissions of the water storage areas in the block; and so on. Regarding the editing permissions of different users to the water storage areas in the home scene, there can be many situations, which will not be repeated again.
[0068] After the initial subsequent area is determined, the initial subsequent area can also be screened to avoid small terrain fluctuations from being identified as candidate water storage areas. Figure 5As shown, the above step S43 includes steps S51-S53:
[0069] Step S51, obtaining the maximum water storage height and / or the highest water storage surface area corresponding to the initial candidate water storage area;
[0070] Step S52, when the maximum water storage height meets the preset water storage height condition, and / or the highest water storage surface area meets the preset water storage area condition, the initial candidate water storage area is determined as the candidate water storage area.
[0071] Specifically, for each initial candidate water storage area, all vertices are detected and the maximum value of the Z axis coordinate among all vertices is selected. max and the minimum value Z min , thereby calculating the water storage height value h of the initial candidate area max =Z max -Z min In addition, the highest water storage surface area of the initial candidate water storage area is obtained, that is, the height is Z max The cross-sectional area S Zmax Only when h max and / or S Zmax When all are above a certain value, the initial candidate water storage area will be identified as a candidate water storage area.
[0072] After determining the candidate water storage area, the user can select the target water storage area for subsequent water area editing. In an optional embodiment, the above step S11, determining the target water storage area according to the user's first operation, also includes: rendering a preset area indication at the highest water storage surface of the candidate water storage area. The above step S22 includes: determining the target water storage area according to the user's selection operation on the preset area indication.
[0073] In order to facilitate users to clearly identify each candidate water storage area, a preset area indicator, such as a blue semi-transparent map, can be rendered at the highest water storage surface of the candidate water storage area. Fig.11 As shown, the user can click on the blue semi-transparent map to select the corresponding candidate water storage area as the target water storage area for subsequent water area editing. Optionally, the preset area indication is not limited to the map, and other forms of identification can also be used, such as rendering an indication sign at the highest water storage surface, etc., which will not be repeated here.
[0074] After the user selects the target water storage area, the water storage height of the target water storage area can also be edited and set. Figure 6 As shown, the above step S12 includes steps S61-S62:
[0075] Step S61, determining the water storage height of the water storage area according to the second operation of the user;
[0076] Step S62, calculating the water storage volume of the water storage area according to the water storage height.
[0077] In step S61, the second operation of the user may include any of the following:
[0078] The water storage height, i.e., the water level, is adjusted by dragging the water level adjustment control, and the water level adjustment control may be a slider, the above-mentioned preset area indicator, or an arrow for indicating the water level, etc.;
[0079] After clicking on the preset area indicator, the user can adjust the water storage height by touch sliding operation or sliding the mouse wheel;
[0080] In an optional embodiment, the water storage height can also be adjusted by providing a water level adjustment box, which includes a water level adjustment slider and / or a water level input box. The user can drag the slider to adjust the water storage height, and the water level input box will display the adjusted water storage height value / height percentage in real time. Alternatively, the user can directly enter a number / percentage in the water level input box to directly set the water storage height.
[0081] In the process of adjusting the water storage height by the user, in order to facilitate the user to view the water level change, the method further includes: obtaining the current water storage surface corresponding to the water storage height; and rendering a preset water surface material map on the current water storage surface. At this time, although a real water body has not yet been generated in the target water storage area, the user can clearly view the water level change through the preset water surface material map rendered on the current water storage surface, so that the water storage height can be accurately adjusted.
[0082] After the user completes the water storage height adjustment and clicks Save, the water storage volume of the closed area formed by the adjusted water storage surface and the bottom and sides of the target water storage area can be calculated, and a water body is generated in the target water storage area based on the water storage volume. This enables the editing of the target water storage area in the home scene.
[0083] During the water area editing process, the program needs to render the water area editing results in real time based on the user's editing operations, and also needs to support users to view from various perspectives, which causes the water area editing process to occupy too much system resources, easily causing freezes, and affecting editing efficiency and editing effect display. Therefore, during the water area editing process, the user's perspective can be locked from the 3D mode under normal conditions to a non-3D mode. After determining the target water storage area in step S11, the method also includes: setting the perspective of the home scene to a first preset mode, which is a non-3D mode perspective mode; when the user completes the water area editing, the method also includes: according to the user's third operation, restoring the perspective of the home scene to 3D mode. Among them, non-3D modes may include 2D, 2.5D perspective modes, etc.
[0084] By locking the user's perspective and limiting the user's viewable range of the water area editing effects, the amount of data to be rendered during the water area editing process can be greatly reduced, thereby reducing the system resource usage of water area editing, avoiding jams during the editing process, and improving water area editing efficiency and the display effect during the editing process.
[0085] During the user's water area editing process, in order to facilitate the backup and recovery of the edited data, a snapshot of the water area information of the target water storage area is also taken. In an optional embodiment, the method further includes: after each editing action on the target water storage area is completed, a snapshot of the target water storage area is taken to obtain snapshot data including at least one of the following information: the ID, location information and water area information of the target water storage area; and the snapshot data is locally saved. The water area information may include but is not limited to at least one of the following information: the shape of the target water storage area, the size of the outer surface of the terrain, the depth, the underwater terrain, the water storage height, etc.
[0086] After each modification action of the user is completed, the snapshot data of the target water storage area can be recorded and saved locally.
[0087] Optionally, in order to avoid frequent storage caused by frequent snapshots due to frequent editing operations by users, especially during terrain mining, where the number of mining operations is large and frequent snapshots will cause system resource usage, snapshots can be taken at regular intervals, such as every 10 seconds or 1 minute; or after the editing operation is completed, wait for a period of time without receiving any new editing operations from the user, and then take a snapshot.
[0088] Through the snapshot method, if the user wants to cancel the modification of the most recent action or multiple actions during the editing process, he can quickly go back through the locally stored snapshot data. At the same time, since the snapshot only records the water area information of the target water storage area, rather than the image data of the entire target water storage area, the amount that needs to be stored locally is not large, and it will not occupy a large amount of storage capacity of the terminal where the game client is located.
[0089] In the embodiment of the present application, the game server side also stores the water area editing records of each user for the home scene. In an optional embodiment, the method further includes: when the water area editing result is saved, uploading the water area editing record corresponding to the home scene to the game server for storage, and the water area editing record includes at least one of the following information: the editing time of executing the water area editing, user information, and the corresponding configuration information before and after the water area editing of the target water storage area.
[0090] When the water area editing result is uploaded to the game server, the game server adds a water area editing record to the corresponding water area editing home scene, or the server can generate a water area editing record for each user. The server can also record the blocks of the home scene corresponding to the target water storage area and generate a water area editing record for each block.
[0091] Optionally, based on the user's water area editing authority within the home scene block, the user can be provided with all or part of the water area editing records within the home scene block, so that the user can confirm which water area edits were performed by other users and when. For example, the block owner can view all water area editing records, while users who only have water area editing authority for the block can only view their own water area editing records.
[0092] In an optional embodiment, the user can also backtrack the water area editing record. For example, the user can view the water area editing record on his client, and there is a backtrack operation button after each water area editing record. The method also includes: according to the backtracking operation of the water area editing record, obtaining the configuration information of the target water storage area before modification; and rendering the target water storage area in the home scene according to the configuration information.
[0093] When the user selects any water area editing record to trace back, the client will restore it to the state when the record was generated based on the content of each edit.
[0094] Optionally, different users have different permissions for the home scene block, and the water area edit records that can be traced back are different, and even whether the traceback results are effective is different. For example, the block owner can trace back every water area edit record of the home scene block, and the traceback is not only for viewing, but can be directly effective for the home scene block; while non-block owners, users who only have water area edit permissions for the block, can also view all water area edit records and trace back, but only their own water area edit records can be effective after traceback, and other users' water area edit records can only view the traceback results but the traceback results are not effective.
[0095] The following is a detailed description of a specific water area editing process in an embodiment of the present application.
[0096] like Figure 7 As shown in the figure, the water area editing process of the home scene in the game is as follows:
[0097] Step S701, when the game is running, enter the water area editing mode according to the user operation;
[0098] In this step, it can be determined based on the user ID whether the user has the permission to edit the water area of the home scene block. If the user has the permission, the user can enter the water area editing mode;
[0099] Step S702, according to the terrain mining operation of the brush by the user, rendering the terrain mining result in real time in the game; wherein the brush can be configured by default or by user customization;
[0100] Step S703, based on the user's terrain editing end operation or saving operation, saving the terrain mining result;
[0101] Step S704, locking the viewing angle of the home scene to 2.5D mode;
[0102] Step S705, detecting the surface information of the home scene, and taking the area that forms a continuous sealed shape and has a connected bottom surface as a candidate water storage area (A);
[0103] Step S706, detecting the maximum water storage height and the highest water storage surface area of each candidate water storage area (A);
[0104] Detect the maximum value of the Z axis coordinate of all vertices in each water storage candidate area (A) max and the minimum value Z min Calculate the water storage height h of the initial candidate area max =Z max -Z min, In addition, the highest water storage surface area of the initial candidate water storage area is obtained, that is, the height is Z max The cross-sectional area S Zmax ;
[0105] Step S707, determining whether the maximum water storage height and the maximum water storage surface area exceed the preset values respectively, if yes, executing step S708, if no, ending;
[0106] Step S708, identifying the water storage candidate area (A) as a water storage area (B), and rendering a blue semi-transparent map for the highest water storage surface of each water storage area (B);
[0107] Step S709, when the user clicks on the blue semi-transparent map, the water storage area (B) is selected as the target water storage area;
[0108] Step S710, adjusting the current water storage height h of the target water storage area according to the user's dragging operation on the water level adjustment slider corresponding to the target water storage area;
[0109] Step S711, rendering a water surface material map S at the current water storage height h;
[0110] Step S712, based on the user's water storage editing end operation or water storage editing save operation, the water storage volume of the target water storage area is calculated according to the current water storage height h;
[0111] Step S713, generating a water body in the target water storage area based on the water storage volume;
[0112] Step S714, based on the user's water area editing end operation or water area editing save operation, the home scene perspective is restored to 3D mode.
[0113] It can be seen from the above-mentioned water area editing process that the method of the embodiment of the present application does not replace the terrain based on the terrain grid, but rather transforms the terrain through user terrain editing and excavation to form a recessed area that can truly store water. Through water level adjustment, users can freely control the water level of the water area, thereby making water area editing more flexible and free. Users can quickly and conveniently edit water areas in the home scene, and the final water body effect is realistic, and users have a high gaming experience.
[0114] The following are device embodiments of the present application, which can be used to execute method embodiments of the present application.
[0115] Figure 8 This is a block diagram of a water area editing device for a home scene in a game provided by an embodiment of the present application. The device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 8 As shown, the water area editing device of the home scene in the game includes:
[0116] The area determination module 81 is used to determine the target water storage area according to the first operation of the user after entering the water area editing mode in the home scene; wherein the target water storage area includes the area generated according to the control operation of the user on the terrain editing control;
[0117] A volume determination module 82, configured to determine the water storage volume of the target water storage area according to a second operation of the user;
[0118] The generating module 83 is used to generate a water body in the target water storage area according to the water storage volume.
[0119] Optionally, the device further includes: a control information acquisition module, which is used to acquire first control information corresponding to the terrain editing control after entering the water area editing mode in the home scene; a water storage area generation module, which is used to generate the target water storage area according to the user's control operation on the terrain editing control and the first control information
[0120] Optionally, the device also includes: a configuration module, used to determine first control information corresponding to the terrain editing control according to the user's configuration operation on the terrain editing control, the first control information including underwater terrain information of the target water storage area; a water storage area generation module, used to determine the water area shape, water area depth and underwater terrain corresponding to the target water storage area according to the control operation and the first control information; determine the target water storage area according to the water area shape, water area depth and underwater terrain.
[0121] Optionally, the area determination module 81 is used to detect areas in the home scene that meet preset water storage conditions as candidate water storage areas; and determine the target water storage area based on the user's selection operation on the candidate water storage area.
[0122] Optionally, the area determination module 81 is used to detect the surface information of the home scene; based on the surface information, take the area that meets the preset water storage terrain as the initial candidate water storage area; and determine the candidate water storage area based on the initial candidate water storage area.
[0123] Optionally, an area determination module 81 is used to obtain the maximum water storage height and / or the highest water storage surface area corresponding to the initial candidate water storage area; when the maximum water storage height meets the preset water storage height condition, and / or the highest water storage surface area meets the preset water storage area condition, the initial candidate water storage area is determined as the candidate water storage area.
[0124] Optionally, the area determination module 81 is further configured to render a preset area indication at the highest water storage surface of the candidate water storage area; and determine the target water storage area according to the user's selection operation on the preset area indication.
[0125] Optionally, the volume determination module 72 is used to determine the water storage height of the water storage area according to the second operation of the user; and calculate the water storage volume of the water storage area according to the water storage height.
[0126] Optionally, the device further includes: a texture rendering module, used for acquiring a current water storage surface corresponding to the water storage height; and rendering a preset water surface material texture on the current water storage surface.
[0127] Optionally, the device further comprises: a viewing angle locking module, configured to set the viewing angle of the home scene to a first preset mode after the target water storage area is determined, wherein the first preset mode is a viewing angle mode of a non-3D mode;
[0128] A perspective restoration module is used to restore the perspective of the home scene to 3D mode according to the user's third operation when the user completes the water area editing.
[0129] The present application also provides an electronic device, such as Fig.12 As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .
[0130] Memory 1503, used for storing computer programs;
[0131] The processor 1501 is used to implement the steps of the following embodiment of the water area editing method for the home scene in the above-mentioned game when executing the computer program stored in the memory 1503.
[0132] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0133] The communication interface is used for communication between the above electronic device and other devices.
[0134] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0135] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0136] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of an embodiment of a method for editing water areas of a home scene in the above-mentioned game.
[0137] It should be noted that, for the above-mentioned device, electronic device and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0138] It should be further noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0139] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for editing water areas in a home scene in a game, characterized in that: include: After entering the water area editing mode in the home scene, determining a target water storage area according to a first operation of the user; wherein the target water storage area includes an area generated according to the control operation of the user on the terrain editing control; determining the water storage capacity of the target water storage area according to a second operation of the user; A water body is generated in the target water storage area according to the water storage volume.
2. The method according to claim 1, characterized in that After entering the water area editing mode in the home scene, the method further includes: Obtaining first control information corresponding to the terrain editing control; The target water storage area is generated according to the user's control operation on the terrain editing control and the first control information.
3. The method according to claim 2, characterized in that The method further comprises: Determining first control information corresponding to the terrain editing control according to the configuration operation of the terrain editing control by the user, wherein the first control information includes underwater terrain information of the target water storage area; The generating the target water storage area according to the user's control operation on the terrain editing control and the first control information includes: Determine the water area shape, water area depth and bottom topography corresponding to the target water storage area according to the control operation and the first control information; The target water storage area is determined according to the shape of the water area, the depth of the water area and the underwater topography.
4. The method according to claim 1, characterized in that: The step of determining the target water storage area according to the first operation of the user includes: Detecting areas in the home scene that meet preset water storage conditions as candidate water storage areas; The target water storage area is determined according to the user's selection operation on the candidate water storage area.
5. The method according to claim 4, characterized in that The detecting area in the home scene that meets the preset water storage condition as a candidate water storage area includes: Detecting surface information of the home scene; According to the surface information, an area satisfying a preset water storage topography is taken as an initial candidate water storage area; The candidate water storage area is determined according to the initial candidate water storage area.
6. The method according to claim 5, characterized in that The step of determining the candidate water storage area according to the initial candidate water storage area comprises: Obtaining the maximum water storage height and / or the highest water storage surface area corresponding to the initial candidate water storage area; When the maximum water storage height satisfies a preset water storage height condition, and / or the highest water storage surface area satisfies a preset water storage area condition, the initial candidate water storage area is determined as the candidate water storage area.
7. The method according to claim 4, characterized in that The step of determining the target water storage area according to the first operation of the user further includes: Rendering a preset area indication at the highest water storage surface of the candidate water storage area; The step of determining the target water storage area according to the user's selection operation on the candidate water storage area comprises: The target water storage area is determined according to the user's selection operation on the preset area indication.
8. The method according to claim 1, characterized in that The determining the water storage capacity of the water storage area according to the second operation of the user includes: Determining the water storage height of the water storage area according to the second operation of the user; The water storage capacity of the water storage area is calculated according to the water storage height.
9. A water area editing device for a home scene in a game, characterized in that: include: An area determination module, used to determine a target water storage area according to a first operation of a user after entering a water area editing mode in a home scene; wherein the target water storage area includes an area generated according to a control operation of the user on a terrain editing control; A volume determination module, used to determine the water storage volume of the target water storage area according to a second operation of the user; A generation module is used to generate a water body in the target water storage area according to the water storage volume.
10. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to implement the method steps described in any one of claims 1-8 when executing the computer program.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method steps described in any one of claims 1 to 8 are implemented.