Game terrain conversion method, electronic device, and storage medium
By receiving terrain transformation requests from clients, determining voxel information, and replacing terrain, the problem of limited terrain switching in 3D online games is solved, enabling real-time transformation and synchronized display of game terrain, thus improving the game's freedom and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 珠海剑心互动娱乐有限公司
- Filing Date
- 2023-01-16
- Publication Date
- 2026-04-10
AI Technical Summary
In existing 3D online games, the scene terrain is mostly static or only supports dynamic land terrain, and the switching between land and water is not possible, which limits the freedom of the game and the player's experience.
By receiving terrain transformation requests from clients, determining voxel information for designated areas, and replacing the terrain, the game's terrain can be transformed and displayed in real time, enhancing the game's flexibility and playability.
It enables real-time changes in game terrain, enhancing the game's freedom and user experience, and enriching the user's gaming experience.
Smart Images

Figure CN115957508B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a game terrain conversion method, an electronic device and a storage medium. BACKGROUND
[0002] In a multiplayer online network game, the movement of a character is based on the scene terrain, and the game character can only move correctly in places where movement is allowed. For example, there is a wall on a flat ground, and the character will be blocked by the wall when moving and cannot penetrate the wall. For another example, a character can swim or dive in water, but cannot swim on land and can only walk or jump. Among them, real-time water is to allow the player to change the existing terrain structure during game running, to change the land into water and to swim and dive in the water, and the player can also change the water back to land during running.
[0003] In a 3D network game, the scene terrain often uses a voxelized terrain structure, and the movement logic of a character in a 3D scene is realized by obtaining voxel information at different positions in the terrain. At present, some 3D network games on the market only support static terrain, and some can only support dynamic terrain on land but do not support the switching between land and water, thereby causing the game terrain to be unable to be changed during running, limiting the freedom and play of the game, and greatly reducing the playability of the game and the experience of the player. SUMMARY
[0004] The following is a summary of the subject matter described in detail herein.
[0005] The embodiments of the present application provide a game terrain conversion method, an electronic device and a storage medium, which can realize real-time conversion of game terrain and improve the freedom of the game.
[0006] In a first aspect, the embodiments of the present application provide a game terrain conversion method applied to a server, and the method comprises:
[0007] receiving a terrain conversion request sent by a client, the terrain conversion request being used to represent conversion of a first terrain of a specified area into a second terrain, wherein a virtual character has different action performances on the first terrain and the second terrain;
[0008] determining, according to the terrain conversion request, second voxel information corresponding to the second terrain and first voxel information corresponding to the first terrain from a preset ground model;
[0009] performing terrain replacement on the first voxel information in the specified area according to the second voxel information to obtain a replacement result;
[0010] sending the replacement result to the client, so that the client performs voxel terrain replacement according to the replacement result to obtain a replacement terrain, performs terrain representation on the replacement terrain to obtain target terrain information, and displays the target terrain information to a user.
[0011] The game terrain conversion method provided by the embodiments of the present application has at least the following beneficial effects: first, terrain conversion requests sent by a client are received, so that a specified area that needs to be converted can be determined according to the terrain conversion requests, and different action performances of a virtual character on a first terrain and a second terrain are determined, thereby increasing the flexibility of a game; then, second voxel information corresponding to the second terrain and first voxel information corresponding to the first terrain are determined from preset ground models according to the terrain conversion requests, thereby facilitating subsequent terrain conversion; third, first voxel information in the specified area is replaced according to the second voxel information to obtain a replacement result, thereby realizing real-time conversion of a game terrain, scene switching, and an increase in the degree of freedom of the game; finally, the replacement result is sent to the client, so that the client performs voxel terrain replacement according to the replacement result to obtain a replacement terrain, thereby realizing terrain replacement at the client, terrain synchronization between a server and the client, visualization of the replacement result, obtaining of target terrain information, and display of the target terrain information to a user, thereby increasing user experience and enriching user experience.
[0012] In some embodiments, the replacing, according to the second voxel information, the first voxel information in the specified area to obtain a replacement result comprises:
[0013] generating a region replacement condition according to the terrain conversion request;
[0014] comparing the first voxel information with the region replacement condition;
[0015] in a case where the first voxel information meets the region replacement condition, performing voxel adjustment on the first voxel information in the specified area according to the second voxel information to obtain a region voxel block;
[0016] linking the region voxel block to the first voxel information to obtain the replacement result, thereby realizing real-time conversion of the terrain.
[0017] In some embodiments, the method further comprises:
[0018] in a case where the first voxel information does not meet the region replacement condition, retaining the first voxel information in the specified area, thereby realizing accurate judgment of the specified area.
[0019] In a second aspect, the embodiments of the present application further provide a game terrain conversion method applied to a client, and the method comprises:
[0020] receiving a terrain conversion request sent by a user, the terrain conversion request being used to represent a conversion of a first terrain of a specified area to a second terrain, wherein a virtual character has different action performances on the first terrain and the second terrain;
[0021] sending the terrain conversion request to a server, so that the server determines second voxel information corresponding to the second terrain and first voxel information corresponding to the first terrain from a preset ground model according to the terrain conversion request, and performs terrain replacement on the first voxel information in the specified area according to the second voxel information to obtain a replacement result;
[0022] receiving the replacement result sent by the server, and performing voxel terrain replacement according to the replacement result to obtain a replacement terrain;
[0023] performing terrain representation on the replacement terrain to obtain target terrain information;
[0024] displaying the target terrain information to the user to realize visualization of the replacement result.
[0025] In some embodiments, the method further comprises:
[0026] setting a preset sample patch under a ground surface of the game terrain to obtain a target game terrain, thereby improving rendering performance and reducing complexity of a display process.
[0027] In some embodiments, the performing terrain representation on the replacement terrain to obtain target terrain information comprises:
[0028] determining a region state of the second terrain in the target game terrain according to the replacement terrain;
[0029] performing pixel processing on the ground model according to the region state to obtain the target terrain information, thereby realizing accurate conversion of the second terrain.
[0030] In some embodiments, the performing pixel processing on the ground model according to the region state to obtain the target terrain information comprises:
[0031] performing coordinate setting on the target game terrain according to the second terrain to obtain an effective range region;
[0032] performing pixel mapping on the effective range region;
[0033] performing rendering processing on the pixel after pixel mapping according to the region state to obtain the target terrain information, thereby realizing transparent processing on the ground model.
[0034] In some embodiments, the region state comprises a ground surface display state and a ground surface hiding state; and rendering the pixel after the pixel map according to the region state to obtain the target terrain information comprises:
[0035] In a case where the region state is the ground surface display state, the pixel is reserved to display the ground surface of the effective range region, and the target terrain information is obtained according to the effective range region;
[0036] In a case where the region state is the ground surface hiding state, the pixel is discarded to transparentize the ground surface of the effective range region, and the target terrain information is obtained according to the effective range region, improving the efficiency of transparentization.
[0037] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the game terrain conversion method according to the first aspect when executing the computer program.
[0038] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, which stores computer executable instructions for causing a computer to execute the game terrain conversion method according to the first aspect.
[0039] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent from the description, or can be learned by practice of the present application. The objects and other advantages of the present application will be realized and achieved by means of the structures particularly pointed out in the description and appended claims. BRIEF DESCRIPTION OF DRAWINGS
[0040] The accompanying drawings are included to provide a further understanding of the technical solutions of the present application, and constitute a part of the specification, and are used together with the examples of the present application to explain the technical solutions of the present application, and do not constitute a limitation on the technical solutions of the present application.
[0041] Figure 1 is the overall flowchart of the game terrain conversion method provided by an embodiment of the present application;
[0042] Figure 2 is the specific method flowchart of step S103 in Figure 1
[0043] Figure 3 is the flowchart of the game terrain conversion method provided by another embodiment of the present application;
[0044] Figure 4 is the flowchart of the game terrain conversion method provided by another embodiment of the present application;
[0045] Figure 5 is a flow chart of a game terrain conversion method provided by another embodiment of the present application;
[0046] Figure 6 is a specific method flow chart of step S404 in Figure 4
[0047] Figure 7 is a specific method flow chart of step S602 in Figure 6
[0048] Figure 8 is a hardware structure schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0050] The embodiments of the present application provide a game terrain conversion method, an electronic device and a storage medium. First, a terrain conversion request sent by a client is received, so that a specified area that needs to be converted can be determined according to the terrain conversion request, and different action performances of a virtual character on a first terrain and a second terrain are determined, so as to add flexibility to the game. Then, second voxel information corresponding to the second terrain and first voxel information corresponding to the first terrain are determined from a preset ground model according to the terrain conversion request, so as to facilitate subsequent terrain conversion. Then, the first voxel information in the specified area is replaced according to the second voxel information to obtain a replacement result, so as to realize real-time conversion of the game terrain, realize scene switching, and improve the freedom of the game. Finally, the replacement result is sent to the client, so that the client replaces the voxel terrain according to the replacement result to obtain a replacement terrain, so that the replacement of the terrain can be realized on the client, the terrain of the server and the client is synchronized, the replacement terrain is represented, the visualization of the replacement result is realized, target terrain information is obtained, and the target terrain information is displayed to the user, so as to increase the user experience and enrich the user experience.
[0051] With reference to Figure 1 , the embodiments of the present application provide a game terrain conversion method applied to a server. The game terrain conversion method includes but is not limited to the following steps S101 to S104.
[0052] Step S101, receiving a terrain conversion request sent by a client, the terrain conversion request being used to represent conversion of a first terrain of a specified area into a second terrain;
[0053] It should be noted that the virtual character has different action performances on the first terrain and the second terrain.
[0054] In some embodiments, the terrain conversion request sent by the client is received, so that the specified area that the user wants to modify can be obtained, and the conversion type of the terrain conversion of the specified area is determined, wherein the first terrain is the original terrain type of the specified area, and the second terrain is the terrain type that the user wants to convert.
[0055] It should be noted that the terrain conversion request is triggered by the user, wherein the client can be a mobile phone, a computer, a tablet computer, or the like. The embodiment is not limited specifically.
[0056] It should be noted that the first terrain and the second terrain can be water area, fire area, land, or grassland, etc. When the first terrain is land or grassland, the corresponding action performance of the virtual character is walking or running, etc. When the first terrain is water area or fire area, the corresponding action performance of the virtual character is swimming or diving, etc. Similarly, the action performance of the virtual character in the second terrain is the same as that in the first terrain, and will not be repeated here.
[0057] In step S102, the second voxel information corresponding to the second terrain and the first voxel information corresponding to the first terrain are determined from the preset ground model according to the terrain conversion request.
[0058] In some embodiments, the second voxel information corresponding to the second terrain and the first voxel information corresponding to the first terrain are determined from the preset ground model according to the terrain conversion request, so as to facilitate subsequent terrain conversion and realize scene conversion in the game.
[0059] It should be noted that the ground model stores various types of voxel data in a specific scene, which can be set by the user as needed, such as land voxel data, water voxel data, grass voxel data, etc. The embodiment is not limited.
[0060] In step S103, the first voxel information in the specified area is replaced according to the second voxel information to obtain a replacement result.
[0061] In some embodiments, the first voxel information in the specified area is replaced according to the second voxel information to obtain a replacement result, so as to realize real-time replacement of the terrain of the specified area and improve the degree of freedom of the game.
[0062] It should be noted that in the process of replacing the first voxel information in the specified region according to the second voxel information, the action performance corresponding to the virtual character will also be replaced. For example, the first voxel information is land information, the second voxel information is water information, the action performance of the virtual character on land is walking, and the action performance in the water is swimming. In the process of replacing the land information according to the water information, the action performance of the virtual character needs to be changed from walking to swimming, so as to complete the replacement of the scene and improve the experience of the user.
[0063] In step S104, the replacement result is sent to the client, so that the client performs voxel terrain replacement according to the replacement result, obtains a replacement terrain, performs terrain representation on the replacement terrain, obtains target terrain information, and displays the target terrain information to the user.
[0064] In some embodiments, the replacement result is sent to the client, so that the client performs voxel terrain replacement on the replacement result again, thereby realizing the synchronization of the terrain replacement of the server and the client, performing terrain representation on the replacement terrain, realizing the visualization of the replacement terrain by the user, obtaining target terrain information, and displaying the target terrain information to the user, thereby increasing the user experience and enriching the user experience.
[0065] It can be understood that the client and the server share a set of terrain system and movement logic, so the client and the server will have the same terrain replacement process in the processing of terrain logic, that is, the client will perform voxel terrain replacement again, replace the first voxel information in the specified region according to the second voxel information, and obtain a replacement terrain.
[0066] Reference Figure 2 In some embodiments, step S103 can include but is not limited to steps S201 to S204:
[0067] In step S201, the region replacement condition is generated according to the terrain conversion request.
[0068] In some embodiments, the region replacement condition is generated according to the terrain conversion request, thereby realizing the overall replacement of the terrain, improving the terrain conversion efficiency, and increasing the realism of the terrain conversion.
[0069] It should be noted that the region replacement condition includes but is not limited to judging whether the region terrain belongs to a dynamic terrain, judging the terrain type of the current region terrain, judging the voxel top height and voxel bottom height of the current region terrain, and the like.
[0070] In step S202, the first voxel information is compared with the region replacement condition.
[0071] In some embodiments, the first voxel information is compared with the region replacement condition, so as to determine whether the first voxel information meets the region replacement condition and whether terrain conversion is needed.
[0072] In step S203, in the case where the first voxel information meets the region replacement condition, the first voxel information of the specified region is voxel adjusted according to the second voxel information, so as to obtain a region voxel block.
[0073] In some embodiments, in the case where the first voxel information meets the region replacement condition, it is indicated that terrain conversion is needed, and the first voxel information is not the terrain type required by the user, so the first voxel information of the specified region needs to be voxel adjusted according to the second voxel information, so as to obtain a region voxel block, thereby realizing replacement of the terrain.
[0074] In step S204, the region voxel block is linked to the first voxel information, so as to obtain a replacement result.
[0075] In some embodiments, the region voxel block is linked to the first voxel information, so as to obtain a replacement result, so that the region voxel block becomes the next voxel of the first voxel information, so as to obtain a replacement result, thereby realizing conversion of the terrain.
[0076] Referring to Figure 3 , Figure 3 Another embodiment of the present application provides a game terrain conversion method, which includes but is not limited to the following step S301:
[0077] In step S301, in the case where the first voxel information does not meet the region replacement condition, the first voxel information of the specified region is retained.
[0078] In some embodiments, in the case where the first voxel information does not meet the region replacement condition, it is indicated that the first voxel information is the terrain type required by the user, so terrain conversion is not needed, and the first voxel information of the specified region can be directly retained.
[0079] It should be noted that, in the case that the first terrain is land and the second terrain is water, the region replacement condition is that the specified region belongs to the dynamic terrain region, the terrain region is land information, and the voxel information is second voxel information; therefore, in the process of terrain replacement, it is first determined whether the specified region belongs to the dynamic terrain region, if yes, it is further determined whether the first voxel information is land information, if yes, terrain conversion can be performed, and the first voxel information is replaced according to the voxel top height and the voxel bottom height set in the second voxel information, that is, the top height of the land voxel is lowered to obtain a region voxel block, and then the region voxel block is linked to the first voxel information to obtain the final replacement result; if the specified region does not belong to the dynamic terrain region, it means that the specified region is a fixed object such as a wall or a box, and terrain conversion cannot be performed; in the case that the specified region belongs to the dynamic terrain region, if the first voxel information is not land information, subsequent terrain conversion cannot be performed.
[0080] It can be understood that, in the case that the first terrain is water and the second terrain is land, the region replacement condition is that the specified region belongs to the dynamic terrain region, the terrain region is water information, and the voxel information is required to be second voxel information, and the specific terrain replacement process is the same as that in the case that the first terrain is land and the second terrain is water, and only the top height of the water voxel needs to be raised, which will not be described here.
[0081] Reference Figure 4 , Figure 4 Another embodiment of the present application provides a game terrain conversion method applied to a client, which includes but is not limited to steps S401 to S405:
[0082] Step S401, receiving a terrain conversion request sent by a user, the terrain conversion request being used to represent conversion of a first terrain of a specified region into a second terrain;
[0083] It should be noted that the virtual character has different action performances on the first terrain and the second terrain.
[0084] In some embodiments, the terrain conversion request sent by the user is received, and the terrain conversion request is used to represent conversion of the first terrain of the specified region into the second terrain, thereby facilitating the server to determine whether to perform terrain replacement.
[0085] Step S402, sending the terrain conversion request to the server, so that the server determines second voxel information corresponding to the second terrain and first voxel information corresponding to the first terrain from a preset ground model according to the terrain conversion request, and performs terrain replacement on the first voxel information in the specified region according to the second voxel information to obtain a replacement result;
[0086] In some embodiments, a terrain conversion request is sent to the server, so that the server determines second voxel information corresponding to the second terrain and first voxel information corresponding to the first terrain from a preset ground surface model according to the terrain conversion request, and performs terrain replacement on the first voxel information in the specified area according to the second voxel information to obtain a replacement result, thereby realizing terrain replacement and being able to transform the terrain according to the user's demand, improving the freedom and playability of the game.
[0087] In step S403, the replacement result sent by the server is received, and voxel terrain replacement is performed according to the replacement result to obtain a replacement terrain.
[0088] In some embodiments, the replacement result sent by the server is received, and voxel terrain replacement is performed according to the replacement result to realize the synchronization of terrain replacement of the client and the server, and obtain a replacement terrain.
[0089] In step S404, the replacement terrain is represented to obtain target terrain information.
[0090] In some embodiments, the replacement terrain is represented to obtain target terrain information, thereby realizing the visualization of the replacement terrain, reducing the complexity of model rendering, and improving the game performance.
[0091] In step S405, the target terrain information is displayed to the user.
[0092] In some embodiments, the target terrain information is displayed to the user, thereby improving the user's game experience.
[0093] Reference Figure 5 , Figure 5 Another embodiment of the present application provides a game terrain conversion method, which includes but is not limited to the following steps S501:
[0094] In step S501, a preset sample patch is arranged under the ground surface of the game terrain to obtain a target game terrain.
[0095] In some embodiments, the sample patch needs to be arranged under the ground surface of the game terrain to obtain a target game terrain, thereby reducing the game performance overhead and avoiding the situation of reducing the rendering performance.
[0096] It should be noted that since the water surface performance or the swamp performance and other fluid performances occupy a certain performance overhead, too many water surfaces will greatly reduce the rendering performance. Therefore, the present embodiment further optimizes the above basis, and a large water surface patch is prearranged under the ground surface to replace multiple small water surfaces, that is, the sample patch in the present embodiment. When the ground surface of a certain area is visible, the water surface under the ground surface will be blocked and invisible, and when the ground surface of a certain area is invisible, the water surface under the ground surface can be exposed. This way meets the existing demand and improves the rendering performance.
[0097] Referring to Figure 6 In some embodiments, step S404 can include but is not limited to steps S601-S602:
[0098] Step S601, determining the region state of the second terrain in the target game terrain according to the replacement terrain;
[0099] In some embodiments, the region state of the second terrain in the target game terrain is determined according to the replacement result, so as to facilitate subsequent transparentization processing of the ground model according to whether the region state needs to be processed.
[0100] Step S602, performing pixel processing on the ground model according to the region state to obtain target terrain information.
[0101] In some embodiments, the ground model is processed according to the region state to obtain target terrain information, avoiding the impact of model replacement, reducing the complexity of model rendering, and improving rendering performance.
[0102] Referring to Figure 7 In some embodiments, step S602 can include but is not limited to steps S701-S703:
[0103] Step S701, setting coordinates of the target game terrain according to the second terrain to obtain an effective range region;
[0104] In some embodiments, coordinates of the target game terrain are set according to the second terrain to obtain an effective range region, facilitating subsequent determination of whether the model pixel in the effective range region needs to be discarded.
[0105] Step S702, performing pixel mapping on the effective range region;
[0106] In some embodiments, the effective range region is pixel mapped, so as to realize identification of the effective range region and determine the state of the pixel in the region, facilitating subsequent determination of whether the pixel needs to be transparentized.
[0107] Step S703, performing rendering processing on the pixel after pixel mapping according to the region state to obtain target terrain information.
[0108] In some embodiments, the pixel after pixel mapping is rendered according to the region state, so as to determine whether the pixel needs to be discarded, obtain target terrain information, and realize transparentization processing of the specified region.
[0109] In some embodiments, the region state includes a ground display state and a ground hidden state; and step S703 includes the following two cases:
[0110] The first case: in the case of the region state being the ground display state, it is explained that the second terrain is in the land type, the pixel is retained to make the ground display of the effective range region, the target terrain information is obtained according to the effective range region, and thus the terrain type of the specified region can be converted into the land type.
[0111] The second case: in the case of the region state being the ground hiding state, it is explained that the second terrain is in the water type, the rendering operation is not needed, the pixel can be directly discarded to make the ground of the effective range region transparent, and the target terrain information is obtained according to the effective range region, and thus the terrain type of the specified region can be converted into the water type.
[0112] In some embodiments, when the user controls to place or delete the water in the specified region, the performance of the land and the water changes, for example, when the user places the water on the specified land, the land disappears and becomes the water; when the user deletes the specified water, the water disappears and becomes the land, so as to realize the real-time switching of the terrain.
[0113] It should be noted that the client identifies the display and hiding states of different regions by means of a two-dimensional pixel map, if the display state, the pixel rendering of the model at the position is retained, otherwise the pixel rendering at the position is discarded, so that the position becomes transparent to display the water surface below. The correspondence between the rendering position and the two-dimensional pixel map can be linked through the world coordinate conversion, for example, the minimum point of the entire terrain conversion region is Min(0, 0, 0), the maximum point is Max(100, 0, 80), the minimum water grid is set to 0.5*0.5, each two-dimensional pixel represents a small water grid, and the size of the two-dimensional pixel map is Texture2D((100-0) / 0.5, (80-0) / 0.5). When the ground is rendered, the world coordinate of the rendering position is P(1, 0, 0), and the index of the point P in the two-dimensional pixel map is calculated according to the coordinate, which is Index((1-0) / 0.5, 0), that is, (2, 0). At this time, it is determined whether the pixel blue color value of the index is greater than 0 to determine whether the pixel of the region is discarded, wherein the default 0 indicates that the pixel of the region is retained.
[0114] Please refer to Figure 8 , Figure 8 The hardware structure of the electronic device of another embodiment is illustrated, and the electronic device comprises:
[0115] The processor 901 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is configured to execute related programs to implement the technical solutions provided by the embodiments of the present application.
[0116] The memory 902 can be implemented by a ROM (Read Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory), etc. The memory 902 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 902 and are called and executed by the processor 901 to implement the game terrain conversion method of the embodiments of the present application.
[0117] The input / output interface 903 is configured to implement information input and output.
[0118] The communication interface 904 is configured to implement the communication interaction between the device and other devices. The communication can be implemented by a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).
[0119] The bus 905 is configured to transmit information between the components (for example, the processor 901, the memory 902, the input / output interface 903, and the communication interface 904) of the device.
[0120] The processor 901, the memory 902, the input / output interface 903, and the communication interface 904 are connected to each other by the bus 905 to realize the communication connection between the components in the device.
[0121] The embodiments of the present application further provide a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the game terrain conversion method.
[0122] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include high-speed random access memory and can also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include memory that is remotely located with respect to the processor, which can be connected to the processor through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0123] The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0124] Those skilled in the art can understand that, Figures 1-7 The technical solutions shown in the above figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than those shown in the figures, or combine certain steps, or different steps.
[0125] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the functions of the modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.
[0126] The terms "first", "second", "third", "fourth" and the like used in the specification of the present application and the above figures, if any, are used to distinguish similar objects, and do not necessarily have to be used to describe a particular order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0127] It should be understood that, in the application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases of only A, only B and A and B existing at the same time, wherein A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear associated objects. "At least one of the following" or the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can represent a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b and c can be single or multiple.
[0128] In several embodiments provided in the application, it should be understood that the disclosed system and method can be implemented in other ways. For example, the system embodiments described above are only illustrative, for example, the division of the above units is only a logical function division, and actual implementation can have another division mode, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be through some interface, indirect coupling or communication connection between systems or units, which can be electrical, mechanical or other forms.
[0129] The units described above as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the embodiment.
[0130] In addition, each functional unit in each embodiment of the application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0131] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.
[0132] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not limited to the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.
Claims
1. A method for transforming game terrain, characterized in that, Applied to the server side, the method includes: Receive a terrain transformation request sent by the client. The terrain transformation request is used to represent the transformation of a first terrain in a specified area into a second terrain, wherein the virtual character has different action behaviors on the first terrain and the second terrain. Based on the terrain transformation request, determine the second voxel information corresponding to the second terrain and the first voxel information corresponding to the first terrain from the preset surface model; Generate region replacement conditions based on the terrain transformation request; Compare the first voxel information with the region replacement conditions; If the first voxel information satisfies the region replacement condition, the first voxel information of the specified region is voxel-adjusted according to the second voxel information to obtain a region voxel block. Link the region voxel block to the first voxel information to obtain the replacement result; The replacement result is sent to the client, so that the client performs voxel terrain replacement according to the replacement result, obtains the replacement terrain, performs terrain representation on the replacement terrain, obtains the target terrain information, and displays the target terrain information to the user.
2. The game terrain transformation method according to claim 1, characterized in that, Also includes: If the first voxel information does not meet the region replacement condition, the first voxel information of the specified region is retained.
3. A method for transforming game terrain, characterized in that, Applied to a client, the method includes: Receive a terrain transformation request sent by a user, the terrain transformation request being used to represent the transformation of a first terrain of a specified area into a second terrain, wherein the virtual character has different action behaviors on the first terrain and the second terrain; The terrain transformation request is sent to the server, so that the server determines the second voxel information corresponding to the second terrain and the first voxel information corresponding to the first terrain from a preset surface model based on the terrain transformation request. Generate region replacement conditions based on the terrain transformation request. The first voxel information is compared with the region replacement conditions. If the first voxel information satisfies the region replacement condition, the first voxel information of the specified region is voxel-adjusted according to the second voxel information to obtain a region voxel block. Link the region voxel block to the first voxel information to obtain the replacement result; Receive the replacement result sent by the server, and perform voxel terrain replacement according to the replacement result to obtain the replaced terrain; The replacement terrain is represented to obtain the target terrain information; The target terrain information is displayed to the user.
4. The game terrain transformation method according to claim 3, characterized in that, Also includes: The target game terrain is obtained by setting a preset sample patch below the surface of the game terrain.
5. The game terrain transformation method according to claim 4, characterized in that, The step of representing the replaced terrain to obtain target terrain information includes: The regional state of the second terrain in the target game terrain is determined based on the replaced terrain; The surface model is processed pixel by pixel based on the state of the region to obtain the target terrain information.
6. The game terrain transformation method according to claim 5, characterized in that, The step of performing pixel processing on the surface model based on the region status to obtain the target terrain information includes: The target game terrain is set with coordinates based on the second terrain to obtain the effective range area; Pixel mapping is performed on the effective range area; The pixels after pixel mapping are rendered according to the region status to obtain the target terrain information.
7. The game terrain transformation method according to claim 6, characterized in that, The region state includes a surface display state and a surface hidden state; the rendering process of pixels after pixel mapping based on the region state to obtain the target terrain information includes: When the area state is the surface display state, the pixels are retained to display the surface of the effective range area, and the target terrain information is obtained based on the effective range area; When the area is in the surface-hidden state, the pixels are discarded to make the surface of the effective range transparent, and the target terrain information is obtained based on the effective range.
8. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the game terrain transformation method as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the game terrain transformation method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Game scene conversion method and system, server and computer readable storage medium
CN113877210A
Scene map generation method and device, storage medium and computer equipment
CN115006842A
Method, system and device for refreshing virtual object and environment object in game and medium
CN115518381A