Method and apparatus for generating game scene
By using preset construction relationships and rules of terrain components in game scene generation, the problem of monotonous mountain landscape art effects is solved, the generation accuracy is improved and the art effect is enhanced, while saving costs and resources.
Patent Information
- Application Number
- CN202211413026.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-11
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2042-11-11
AI Technical Summary
In existing technologies, when generating outdoor map scenes, the artistic effects of mountain ranges and other landscapes are rigid, lacking the necessary terrain variations and failing to conform to the characteristics of natural landforms, resulting in low accuracy in game scene generation.
Using the preset construction relationships and preset construction rules of terrain components, a preset number of terrain components are generated. The game scene is generated by splicing these components. The preset construction relationships of terrain components include the first-level construction relationship between terrain components and the second-level construction relationship between regions within the components. The preset construction rules are used to characterize the distribution rules of terrain elements.
It improved the accuracy of game scene generation, enhanced the visual effects, conformed to the characteristics of natural terrain, saved costs and time, and reduced the game package size.
Smart Images

Figure CN115624756B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of image processing, and in particular, to a method and apparatus for generating a game scene. BACKGROUND
[0002] At present, in a game including a wild map scene, a plurality of task nodes are usually set in the wild map to prompt a player to complete a corresponding task to obtain a reward. A mountain map that is clear, vivid and consistent with natural topographic features can not only enhance the visual experience of the player, but also enable the player to clearly know the location of the task node, and thus quickly complete the corresponding task. However, in the prior art, when generating a wild map scene, the artistic effect of the mountain topography and the like is very stereotyped, lacks the expected terrain changes, and is inconsistent with the natural topographic features, which leads to low generation accuracy of the game scene.
[0003] No effective solution has been proposed for the above problems. SUMMARY
[0004] Embodiments of the present disclosure provide a method and apparatus for generating a game scene to at least solve the technical problem of low generation accuracy of a game scene in the related art.
[0005] According to an embodiment of the present disclosure, a method for generating a game scene is provided, including: determining a preset construction relationship and a preset construction rule of a terrain component, wherein the preset construction relationship includes a first-level construction relationship between terrain components and a second-level construction relationship between regions within a terrain component, and the preset construction rule is used to represent a rule of a terrain element placed in a construction region, and the terrain element is used to represent a topography in a game scene; generating a preset number of terrain components based on the preset construction relationship and the preset construction rule; and generating a game scene based on at least part of the preset number of terrain components.
[0006] According to an embodiment of the present disclosure, an apparatus for generating a game scene is also provided, including: a determination module configured to determine a preset construction relationship and a preset construction rule of a terrain component, wherein the terrain component is used to represent a topography in a game scene, the preset construction relationship includes a first-level construction relationship between terrain components and a second-level construction relationship within a terrain component, and the preset construction rule is used to represent a distribution rule of a terrain element of a terrain component; a component generation module configured to generate a preset number of terrain components based on the preset construction relationship and the preset construction rule; and a map generation module configured to generate a game scene based on at least part of the preset number of terrain components.
[0007] According to one of the embodiments of the present application, a non-volatile storage medium is provided, which stores a computer program. The computer program is configured to execute the game scene generation method in any of the above embodiments when running.
[0008] According to one of the embodiments of the present application, an electronic device is provided, which comprises a memory and a processor. The memory stores a computer program. The processor is configured to execute the computer program to execute the game scene generation method in any of the above embodiments.
[0009] In at least some embodiments of the present disclosure, a preset construction relationship of the terrain component and a preset construction rule are determined, wherein the preset construction relationship comprises a first-level construction relationship between terrain components and a second-level construction relationship between regions within a terrain component, and the preset construction rule is used to represent a rule of a terrain element placed in a construction region, and the terrain element is used to represent a topography in a game scene; a preset number of terrain components are generated based on the preset construction relationship and the preset construction rule; and a game scene is generated based on at least some of the preset number of terrain components. It is easy to note that the game scene is generated by a plurality of terrain components, and the terrain components are determined by the preset construction relationship and the preset construction rule, wherein the preset construction relationship and the preset construction rule are determined according to the topography in the game scene, which achieves the purpose of accurately generating the game scene, thereby realizing the technical effect of improving the generation accuracy of the game scene, and further solving the technical problem of low generation accuracy of the game scene in the related art. BRIEF DESCRIPTION OF DRAWINGS
[0010] The accompanying drawings, which are included to provide a further understanding of the present disclosure and constitute a part of this application, illustrate certain illustrative embodiments of the present disclosure and are used to explain the present disclosure, but do not limit the present disclosure. In the drawings:
[0011] Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal according to a game scene generation method according to an embodiment of the present disclosure;
[0012] Figure 2 FIG. 2 is a flowchart of a game scene generation method according to an embodiment of the present disclosure;
[0013] Figure 3 FIG. 3 is a structural schematic diagram of an optional terrain element according to an embodiment of the present disclosure;
[0014] Figure 4 FIG. 4 is a schematic diagram of an optional field map according to an embodiment of the present disclosure;
[0015] Figure 5 FIG. 5 is a schematic diagram of an optional terrain component according to an embodiment of the present disclosure;
[0016] Figure 6 is a schematic diagram of an optional linear distribution with no change according to an embodiment of the present disclosure;
[0017] Figure 7 is a schematic diagram of an optional linear distribution with no change according to the related art;
[0018] Figure 8 is a schematic diagram of an optional linear distribution with no change according to the related art;
[0019] Figure 9 is a schematic diagram of an optional nonlinear distribution with change according to an embodiment of the present disclosure;
[0020] Figure 10 is a schematic diagram of an optional nonlinear distribution with change according to an embodiment of the present disclosure;
[0021] Figure 11 is a schematic diagram of an optional preset edge style according to an embodiment of the present disclosure;
[0022] Figure 12 is a schematic diagram of an optional preset number of terrain components according to an embodiment of the present disclosure;
[0023] Figure 13 is a schematic diagram of a mountain terrain design formed by splicing the preset number of terrain components according to an embodiment of the present disclosure;
[0024] Figure 14 is a structural block diagram of a game scene generation apparatus according to an embodiment of the present disclosure;
[0025] Figure 15 is a schematic diagram of an electronic apparatus according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] In order to enable persons skilled in the art to better understand the present disclosure scheme, the technical solutions in the present disclosure embodiments will be described clearly and completely below in conjunction with the drawings in the present disclosure embodiments. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by persons skilled in the art without creative labor should belong to the scope of protection of the present disclosure.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] There are two existing methods for creating outdoor map scenes in games:
[0029] The first method is to create a set of square-shaped scene resource modules and reuse them by repeatedly splicing them together in a continuous four-way manner. The second method is to use terrain software to generate the entire terrain and then manually design and create the entire scene screen by screen.
[0030] However, both existing production methods have significant drawbacks: The first method uses a continuous, square-like approach to create fixed scene components that are repeatedly used and pieced together. This results in game terrain with completely square edges, a monotonous visual effect, and a lack of necessary terrain variation. The final image, besides being overly square, also fails to reflect natural landscape features. The second method, while offering richer visuals, cannot reuse terrain, and the placement of towns and resource points cannot be randomized; it requires screen-by-screen design to complement the terrain. This approach lengthens the development cycle, results in a large game size, low resource reuse, and numerous limitations. It requires significant resources and time to create terrain and even more time and effort for screen-by-screen beautification and design.
[0031] This disclosure provides a set of design blueprints based on visual composition theory, using hexagonal scene components as units. These component blueprints are then used to create scene components tailored to the worldviews and styles of different simulation strategy games (SLGs) with war as the primary gameplay element. This allows for the rapid assembly of numerous well-designed and aesthetically pleasing outdoor landscapes that meet the game's requirements. This approach achieves cost and time savings, reduces game file size, provides excellent visual effects, and allows for a single solution to be applied to projects with various art styles.
[0032] In one possible implementation, the method of using four-way connections to create fixed components in the background of outdoor map scenes in game displays, which is commonly used in the field of image processing, still suffers from the technical problem of monotonous and rigid outdoor map scenes after practice and careful research. Based on this, the game scene applied in this disclosure embodiment can be a scene that requires operation on an outdoor map, and the target game type is generally a game with an outdoor map scene. A method for generating game scenes is proposed, which adopts the method of determining the preset construction relationship and preset construction rules of terrain components. The preset construction relationship includes: the first-level construction relationship between terrain components and the second-level construction relationship between regions within the terrain component. The preset construction rules are used to characterize the rules for placing terrain elements within the construction region, and the terrain elements are used to characterize the terrain in the game scene. Based on the preset construction relationship and preset construction rules, a preset number of terrain components are generated. Based on at least some of the preset number of terrain components, the game scene is generated. It is noteworthy that the game scene is generated through multiple terrain components, which are determined by preset construction relationships and preset construction rules. These preset construction relationships and rules are determined based on the terrain in the game scene, thus achieving the goal of accurately generating the game scene. This improves the accuracy of game scene generation and solves the technical problem of low generation accuracy in related technologies.
[0033] The methods and embodiments described above in this disclosure can be executed on mobile terminals, computer terminals, or similar computing devices. Taking a mobile terminal as an example, the mobile terminal can be a smartphone, tablet computer, PDA, mobile internet device, PAD, game console, or other terminal device. Figure 1 This is a hardware structure block diagram of a mobile terminal for a game scene generation method according to an embodiment of this disclosure. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. Processor 102 (processor 102 may include, but is not limited to, a central processing unit (CPU), graphics processing unit (GPU), digital signal processing (DSP) chip, microprocessor (MCU), programmable logic device (FPGA), neural network processor (NPU), tensor processor (TPU), artificial intelligence (AI) type processor, etc.) and memory 104 for storing data. In one embodiment of this disclosure, it may also include: input / output device 108 and display device 110.
[0034] In some optional embodiments mainly for game scenes, the above device can also provide a human-computer interaction interface with a touch-sensitive surface that can sense finger contact and / or gestures to interact with a graphical user interface (GUI) and the human-computer interaction functions can include creating webpages, drawing, word processing, creating electronic documents, gaming, video conferencing, instant messaging, sending and receiving e-mails, call interfaces, playing digital videos, playing digital music, and / or web browsing, etc., executable instructions for performing the above human-computer interaction functions are configured / stored in one or more computer program products or readable storage media executable by a processor.
[0035] Those skilled in the art can understand that Figure 1 The structure shown is only schematic, and does not limit the structure of the above mobile terminal. For example, the mobile terminal can also include more or less components than those shown, or have a different configuration of components than those shown. Figure 1 The structure shown is only schematic, and does not limit the structure of the above mobile terminal. For example, the mobile terminal can also include more or less components than those shown, or have a different configuration of components than those shown. Figure 1 The structure shown is only schematic, and does not limit the structure of the above mobile terminal. For example, the mobile terminal can also include more or less components than those shown, or have a different configuration of components than those shown.
[0036] According to an embodiment of the present disclosure, an embodiment of a method for generating a game scene is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown.
[0037] In one possible implementation, the embodiment of the present disclosure provides a method for generating a game scene. Figure 2 is a flowchart of a method for generating a game scene according to an embodiment of the present disclosure, as shown in Figure 2 The method comprises the following steps:
[0038] Step S202, determining a preset construction relationship of the terrain components and a preset construction rule, wherein the preset construction relationship comprises a first-level construction relationship between the terrain components and a second-level construction relationship between the regions within the terrain components, and the preset construction rule is used to represent the rule of the terrain elements placed in the construction region, and the terrain elements are used to represent the terrain of the topography in the game scene.
[0039] The terrain component can be a component used to generate a game scene in the game. The game scene can be obtained by splicing at least one component. The game scene can include but is not limited to a map scene. The map scene can include but is not limited to a city map scene and a field map scene. The field map scene can include but is not limited to a mountain and a valley. Further, the terrain component can be set in advance based on the demand of the user for the game scene, but is not limited thereto. By setting the terrain component, the game scene can be quickly generated, and the terrain component can be stored for repeated use.
[0040] The first preset construction relationship can be a construction relationship that can reflect the priority of the terrain components and the attribute information of the terrain elements contained in the terrain components, which is set in advance by the user. The second preset construction relationship can be a construction relationship that can reflect the priority of the regions in the terrain components and the attribute information of the terrain elements placed in the regions, which is set in advance by the user.
[0041] The landform can be a mountain, a valley, a plain, and the like in the terrain component, but is not limited thereto.
[0042] The terrain element can be an element that can reflect the shape of the landform in the game scene in the terrain component. The terrain element can include a peak, a mountain trend, a mountain boundary, a mountain range, and the like, but is not limited thereto. Figure 3 FIG. 1 is a structure diagram of an optional terrain element according to an embodiment of the present disclosure, as shown in FIG. 1, the terrain element can clearly include a peak, a mountain trend, and a mountain boundary. Figure 3
[0043] The preset construction rule can be a rule that can reflect the distribution of the terrain elements placed in the construction region, which is set in advance by the user. For example, the rule can reflect the direction and the change trend of the terrain elements, but is not limited thereto.
[0044] In an optional embodiment, the preset construction relationship and the preset construction rule of the terrain component can be determined first. The preset construction relationship includes a first preset construction relationship and a second preset construction relationship. In this step, the preset construction relationship and the preset construction rule can provide a basis for subsequent generation of the terrain component, so that the user can quickly generate the terrain component.
[0045] Optionally, the first preset construction relationship is used to represent the priority of the terrain component and the attribute information of the terrain elements contained in the terrain component. The attribute information at least includes an element type and a terrain parameter. The number of terrain components with different priorities is different. The second preset construction relationship is used to represent the priority of the regions in the terrain component and the attribute information of the terrain elements placed in the regions. The number of regions with different priorities is different.
[0046] Optionally, the preset construction rule is that the terrain elements have varying directions and non-linear distribution.
[0047] The priority described above can be a priority that can reflect the sequence relationship between the terrain components when generating the game scene. The higher the priority is, the higher the priority of the corresponding terrain component is selected to generate the game scene.
[0048] The element type described above can be a mountain, a peak, a valley, etc., but is not limited thereto.
[0049] The terrain parameter described above can be a parameter that can reflect the terrain element. For example, it can be a parameter that can reflect the height, steepness, complexity, and prominence of a peak, and can also be a parameter that can reflect the height, steepness, load, and prominence of a mountain range, but is not limited thereto.
[0050] In an optional embodiment, the first preset construction relationship can reflect the priority of the terrain component and the attribute information of the terrain element contained in the terrain component, wherein the attribute information at least includes the element type and the terrain parameter. Because the terrain elements contained in each terrain component are different, the priority of each terrain component is different, and thus the number of terrain components with different priorities is different.
[0051] In another optional embodiment, the second preset construction relationship can reflect the priority of the region in the terrain component and the attribute information of the terrain element placed in the region. Each terrain component has at least one region, and each region has at least one terrain element. Because the terrain elements contained in each region are different, the priority of the region in each terrain component is different, and thus the number of regions with different priorities is different.
[0052] Figure 4 is a schematic diagram of an optional field map according to an embodiment of the present disclosure, as Figure 4 shown, the map contains a plurality of peaks, mountain ranges, and valleys. The map can be divided into a plurality of terrain components based on the plurality of peaks. Each terrain component can include but is not limited to a peak, a mountain range, and a valley. Because the peak is the steepest, most prominent, and most complex in the map, the mountain range is the second most prominent in the map, and the valley is the least prominent in the map. Therefore, the first preset construction relationship can be that the priority of the terrain component containing the most peaks is the highest, the priority of the terrain component containing the most mountain ranges is the second highest, and the priority of the terrain component containing the most valleys is the lowest, but is not limited thereto.
[0053] Figure 5 is a schematic diagram of an optional terrain component according to an embodiment of the present disclosure, as Figure 5As shown, the terrain component contains mountains, mountain ranges and valleys. The locations of the mountains, mountain ranges and valleys can be divided into multiple areas. Therefore, the second preset construction relationship can be that the priority of the area where the mountains are located is the highest, the priority of the area where the mountain ranges are located is the second, and the priority of the area where the valleys are located is the lowest, but is not limited thereto.
[0054] Figure 6 is a schematic diagram of an optional embodiment of the first level relationship and the second level relationship according to the present disclosure, as Figure 6 shown, area 1 is the most obvious area in the entire display screen, which is generally represented by the highest and most complex mountains; area 2 is the less obvious place in the entire display screen, which is generally represented by smaller mountains; the mountain range area outside area 1 and area 2 is other areas that are more not obvious, which are mainly represented by mountain ranges, trees, valleys and the like. The contrast relationship of area 1 and area 2 and other areas is the first level relationship. The rule of the first level relationship is that there is one most obvious area such as area 1, several less obvious areas such as area 2, and some more not obvious elements such as other areas. The second level relationship refers to that each scene component also has a similar first level relationship contrast, that is, each scene component has one most obvious area and several less obvious areas, and other areas that are not obvious.
[0055] Figure 7 is a schematic diagram of an optional linear distribution with no change and trend according to the related art, Figure 8 is a schematic diagram of an optional linear distribution with no change and trend according to the related art, as Figure 7 shown, all elements point to a point, as Figure 8 shown, all elements point to the same direction, but Figure 7 and Figure 8 shown, all elements are very average, from strong to weak, and are completely the same, which are linearly distributed.
[0056] Therefore, the present disclosure designs a preset construction rule of nonlinear distribution with change and trend as Figure 9 and Figure 10 shown, which can make the terrain component more consistent with the actual situation.
[0057] In another optional embodiment, Figure 9 is a schematic diagram of an optional nonlinear distribution with change and trend according to the present disclosure, Figure 10 is a schematic diagram of an optional nonlinear distribution with change and trend according to the present disclosure, as Figure 9 , Figure 10 shown, it can be seen that Figure 9 all elements in converge to a point, Figure 10 all elements in are oriented in the same direction, andFigure 9 and Figure 10 The arrangement of all elements in and is not average, but has certain changes, has the most obvious element, and has the less obvious element, and the element arrangement is both changeable and contains order, so the preset construction rule selected by the embodiment of the disclosure is that the terrain elements have a change direction and a nonlinear distribution, which can make the terrain elements in the terrain component more realistic and vivid.
[0058] In step S204, a preset number of terrain components are generated based on the preset construction relationship and the preset construction rule.
[0059] Optionally, the preset number of terrain components can be generated by the following method: determining the priority of the preset number of terrain components; determining the attribute information of the terrain elements contained in the terrain component based on the first preset construction relationship; determining the target area for placing the terrain elements in the terrain component based on the second preset construction relationship and the attribute information of the terrain elements; and generating the terrain component based on the attribute information of the terrain elements, the target area of the terrain elements, and the preset construction rule.
[0060] Optionally, the shape of the terrain component is a regular hexagon, and the preset number is 19.
[0061] The above-mentioned preset number can be the number of terrain components that can generate a game scene with a smaller number of terrain components set by the user in advance, which in this embodiment can be 19, but is not limited to this, and can also be 15, 17, etc.
[0062] In an optional embodiment, first, the priority of the preset number of terrain components can be determined based on the first preset construction relationship; second, the attribute information of the terrain elements contained in the terrain component can also be determined based on the first preset construction relationship, for example, it can be determined whether the terrain element is a mountain peak or a mountain range.
[0063] In another optional embodiment, the target area for placing the terrain elements in the terrain component can also be determined based on the second preset construction relationship and the attribute information of the terrain elements, for example, it can be determined that the area where the mountain peak is located is the target area, and it can also be determined that the area where the mountain range is located is the secondary target area, but is not limited to this.
[0064] In another optional embodiment, as shown in Figure 5 The terrain component contains mountain peaks, mountain ranges, and valleys, wherein the black dots represent mountain peaks, the non-closed curves represent mountain ranges, and the part enclosed by the closed curve represents a valley. It can be seen that these terrain elements are arranged according to the preset construction rule, which is more realistic and vivid compared to the terrain components in the related art.
[0065] In another alternative embodiment, the shape of the terrain component can be a regular hexagon, but it is not limited to this. It can also be any polygon that can be seamlessly stitched and infinitely looped, such as an equilateral triangle or a square, which are standard shapes that loop infinitely in one unit. In this embodiment, a regular hexagon is used as an example for illustration.
[0066] Optionally, a terrain component is generated based on terrain elements, attribute information, a target area, and preset construction rules, including: determining multiple preset edge styles, wherein the preset edge styles are used to characterize the terrain features of the edge points of the terrain component; and generating the terrain component based on at least some of the preset edge styles, terrain elements, attribute information, a target area, and preset construction rules.
[0067] The aforementioned topographic features can be those that reflect the edge points of the terrain, such as the direction, location, and height of a ridge, or the location of the edge points of a mountain, but are not limited to these.
[0068] In one optional embodiment, after determining multiple preset edge styles, a terrain component can be generated based on at least some of the preset edge styles, terrain elements, attribute information, target area, and preset construction rules, such as... Figure 11 As shown, Figure 11 This is a schematic diagram of an optional preset edge style according to an embodiment of the present disclosure, wherein A indicates that the edge of the terrain component has no terrain elements; B indicates that the edge of the terrain component has mountains and mountain ranges, wherein the mountain ranges are relatively small and located on one side of the terrain component, and the mountain ranges run from the edge to the center; C indicates that the edge of the terrain component has mountains and mountain ranges, wherein the mountain ranges are relatively small and located in the middle of the terrain component, and the mountain ranges run from the edge to the center; D indicates that the edge of the terrain component has mountains and mountain ranges, wherein the mountain ranges are relatively large and the mountain ranges run from the edge to the center; E indicates that the entire edge of the terrain component has mountains and mountain ranges, wherein the mountain ranges run from the edge to the center.
[0069] Step S206: Generate a game scene based on at least a portion of the preset number of terrain components.
[0070] Optionally, a game scene can be generated by the following methods: converting a preset number of terrain components into a preset number of scene components based on a preset style and preset terrain corresponding to the game scene; and splicing together at least some of the scene components in the preset number of scene components to generate a game scene.
[0071] The preset style can be determined according to actual development requirements of the game, and can include but is not limited to a cartoon style, a realistic style, and the like. The preset topography can be topography corresponding to the preset style. For example, the preset topography corresponding to the cartoon style can include a mountain range and a plain, and the preset topography corresponding to the realistic style can include a temperate zone topography and a gobi topography, but is not limited thereto.
[0072] In an optional embodiment, a preset number of terrain components can be first converted into a preset number of scene components by a drawing software tool based on a preset style and a preset topography corresponding to a game scene, and at least part of the preset number of scene components can be then spliced based on a preset edge style to generate the game scene. The drawing software tool can be any one or more software tools capable of converting terrain components into scene components, and is not specifically limited in this embodiment.
[0073] Optionally, the scene component can be obtained by the following method: generating a preset component model corresponding to the terrain component; generating a scene model corresponding to the terrain component based on the preset style and the preset topography; and combining the preset component model and the scene model to obtain the preset number of scene components.
[0074] The preset component model can be a component model conforming to a display picture of a corresponding region of the game scene.
[0075] The scene model can be a building model conforming to the display picture of the corresponding region of the game scene. The building model can make the game picture look more abundant and more realistic.
[0076] In an optional embodiment, a preset component model corresponding to the terrain component can be first generated by a drawing software tool; a scene model corresponding to the terrain component can be then generated by the drawing software tool based on the preset style and the preset topography; and finally, the preset component model and the scene model can be combined to obtain the preset number of scene components.
[0077] Figure 12 FIG. 1 is a schematic diagram of a preset number of terrain components according to an embodiment of the present disclosure, as shown in FIG. 1, each terrain component contains different terrain elements, and thus the priority of each terrain component is different. Figure 12
[0078] Figure 13 FIG. 2 is a schematic diagram of a mountain range terrain design obtained by splicing the preset number of terrain components according to an embodiment of the present disclosure, as shown in FIG. 2, the edge connection of each terrain component is connected based on the preset edge style, and thus a continuous, directional, and nonlinear mountain range structure can be obtained. Figure 13
[0079] Optionally, at least some of the scene components from a preset number of scene components are spliced together to generate a game scene, including: splicing at least some of the scene components together to generate a game scene based on the terrain features of the edges of at least some of the scene components.
[0080] In one optional embodiment, after obtaining a preset number of scene components, at least some scene components can be stitched together based on the terrain features of the edges of at least some scene components to generate a game scene. For example, scene components whose edges are all mountain ranges can be stitched together to obtain a game scene containing mountain ranges; scene components whose edges have consistent and continuous mountain range orientations can also be stitched together to obtain a game scene containing continuous mountain ranges; scene components whose edges are all boundary points can also be stitched together, but this is not limited to these methods.
[0081] In another optional embodiment, the screen composition theory of this disclosure is as follows: ① First, consider the contrast relationship within the entire display screen, i.e., the primary relationship; second, consider the contrast relationship within each hexagonal unit, i.e., the secondary relationship; and combine the two relationships to design screen elements. ② Design screen elements according to a trending and changing non-linear distribution rule.
[0082] by Figure 6 For example, according to point ① of the theory of image composition, we first consider the primary relationships within the entire display image. This mountain range has a most prominent peak 1, several secondary prominent peaks 2, 3, 4, 5, 6, and 7, and other less prominent decorative elements. Therefore, we need to design at least one element that can serve as the most prominent element within the entire display image (like...). Figure 6 The scene component design diagram (same as area 1), for example Figure 5 Component A, as shown, features a tall peak that serves as the most prominent point in the entire mountain range. It includes several complex mountain ranges and a valley, making it rich in elements to attract visual attention. Next, consider the secondary relationship of contrast within each hexagonal unit. Each component needs a point that attracts visual attention, typically represented by a peak, a valley, or a unique shape, but none of these can be more visually appealing than the peak in component A.
[0083] According to point 2 of the theory of image composition: when designing image elements based on non-linear distribution rules that have trends and changes, the direction of the mountains and the shape of the mountain areas of each component should always be considered in accordance with certain trends and with a certain degree of change.
[0084] In order to ensure that the components can be seamlessly connected, it is necessary to define the edges of n fixed scene component design drawings. The edges of all components must be consistent with one of these fixed component edge designs. In this embodiment, 19 is used as an example for illustration, but it is not limited to this.
[0085] Among them, the edges of all scene component design drawings must be aligned with... Figure 11 The five edges shown are consistent. Based on the preset construction relationship and preset construction rules, the following can be obtained: Figure 12 The design drawing of the terrain component shown, and then based on the preset edge style, can yield the following: Figure 13 The diagram shows a continuous mountain range topographic design.
[0086] Furthermore, the terrain component can be made into three mountain components with different styles and worldviews. Different styles may include, but are not limited to: cartoon style, realistic style, and the corresponding outdoor maps may include, but are not limited to: temperate landforms, Gobi landforms.
[0087] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this disclosure.
[0088] This embodiment also provides a game scene generation apparatus, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the terms "unit" and "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0089] Figure 14 This is a structural block diagram of a game scene generation device according to an embodiment of the present disclosure, such as... Figure 14 As shown, the device includes: a determining module 1402, used to determine preset construction relationships and preset construction rules for terrain components, wherein the terrain components are used to represent the terrain in the game scene, the preset construction relationships include: first-level construction relationships between terrain components and second-level construction relationships within terrain components, and the preset construction rules are used to represent the distribution rules of terrain elements that construct the terrain components; a component generation module 1404, used to generate a preset number of terrain components based on the preset construction relationships and preset construction rules; and a map generation module 1406, used to generate a game scene based on at least a portion of the preset number of terrain components.
[0090] Optionally, the first preset construction relationship is used to represent a priority of the terrain component and attribute information of the terrain element contained in the terrain component, wherein the attribute information at least includes an element type and a terrain parameter, and the number of terrain components with different priorities is different; and the second preset construction relationship is used to represent a priority of a region in the terrain component and attribute information of the terrain element placed in the region, wherein the number of regions with different priorities is different.
[0091] Optionally, the component generation module comprises: a first determination unit configured to determine priorities of a preset number of terrain components; a second determination unit configured to determine attribute information of terrain elements contained in the terrain components based on the first preset construction relationship; a third determination unit configured to determine target regions for placing the terrain elements in the terrain components based on the second preset construction relationship and the attribute information of the terrain elements; and a component generation unit configured to generate the terrain components based on the attribute information of the terrain elements, the target regions of the terrain elements, and a preset construction rule.
[0092] Optionally, the component generation unit comprises: a first determination subunit configured to determine a plurality of preset edge styles, wherein the preset edge styles are used to represent terrain features of edge points of the terrain components; and a component generation subunit configured to generate the terrain components based on at least part of the plurality of preset edge styles, the terrain elements, the attribute information, the target regions, and the preset construction rule.
[0093] Optionally, the preset construction rule is that the terrain elements have a changing direction and a non-linear distribution.
[0094] Optionally, the map generation module comprises: a conversion unit configured to convert the preset number of terrain components into a preset number of scene components based on a preset style and a preset landscape corresponding to the game scene; and a splicing unit configured to splice at least part of the preset number of scene components to generate the game scene.
[0095] Optionally, the conversion unit comprises: a first generation subunit configured to generate a preset component model corresponding to the terrain component; a second generation subunit configured to generate a scene model corresponding to the terrain component based on the preset style and the preset landscape; and a combination subunit configured to combine the preset component model and the scene model to obtain the preset number of scene components.
[0096] Optionally, the splicing unit comprises: a splicing subunit configured to splice the at least part of the scene components based on terrain features of edges of the at least part of the scene components to generate the game scene.
[0097] Optionally, the shape of the terrain component is a hexagon, and the preset number is 19.
[0098] It should be noted that the above various units and modules can be implemented by software or hardware, and for the latter, the implementation can be achieved by the following ways, but is not limited to: the above units and modules are located in the same processor; or the above various units and modules are located in different processors in any combination.
[0099] Embodiments of the present disclosure also provide a non-volatile storage medium having a computer program stored therein, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.
[0100] Optionally, in the present embodiment, the above non-volatile storage medium can include but is not limited to: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.
[0101] Optionally, in the present embodiment, the above non-volatile storage medium can be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.
[0102] Optionally, in the present embodiment, the above non-volatile storage medium can be configured to store a computer program for executing the following steps:
[0103] Step S1, determining a preset construction relationship of a terrain component and a preset construction rule, wherein the preset construction relationship includes a first-level construction relationship between terrain components and a second-level construction relationship between regions within a terrain component, and the preset construction rule is used to represent a rule of a terrain element placed in a construction region, and the terrain element is used to represent a terrain of a landform in a game scene;
[0104] Step S2, generating a preset number of terrain components based on the preset construction relationship and the preset construction rule;
[0105] Step S3, generating a game scene based on at least part of the preset number of terrain components.
[0106] Optionally, the above non-volatile storage medium is also configured to store program code for executing the following steps: the first preset construction relationship is used to represent a priority of a terrain component and attribute information of a terrain element contained in the terrain component, wherein the attribute information at least includes an element type and a terrain parameter, and the number of terrain components with different priorities is different; and the second preset construction relationship is used to represent a priority of a region within a terrain component and attribute information of a terrain element placed in the region, wherein the number of regions with different priorities is different.
[0107] Optionally, the non-transitory storage medium is further configured to store program code for determining priorities of the preset number of terrain components; determining attribute information of the terrain elements contained in the terrain components based on the first preset construction relationship; determining target regions for placing the terrain elements in the terrain components based on the second preset construction relationship and the attribute information of the terrain elements; and generating the terrain components based on the attribute information of the terrain elements, the target regions of the terrain elements, and the preset construction rule.
[0108] Optionally, the non-transitory storage medium is further configured to store program code for determining a plurality of preset edge styles, wherein the preset edge styles are used to represent terrain features of edge points of the terrain components; and generating the terrain components based on at least part of the plurality of preset edge styles, the terrain elements, the attribute information, the target regions, and the preset construction rule.
[0109] Optionally, the non-transitory storage medium is further configured to store program code for determining that the terrain elements have varying directions and non-linear distribution.
[0110] Optionally, the non-transitory storage medium is further configured to store program code for converting the preset number of terrain components into a preset number of scene components based on a preset style and a preset landscape corresponding to the game scene; and splicing at least part of the preset number of scene components to generate the game scene.
[0111] Optionally, the non-transitory storage medium is further configured to store program code for generating a preset component model corresponding to the terrain components; generating a scene model corresponding to the terrain components based on the preset style and the preset landscape; and combining the preset component model and the scene model to obtain the preset number of scene components.
[0112] Optionally, the non-transitory storage medium is further configured to store program code for splicing at least part of the scene components based on terrain features of edges of the at least part of the scene components to generate the game scene.
[0113] Optionally, the non-transitory storage medium is further configured to store program code for determining that the shape of the terrain components is a hexagon, and the preset number is 19.
[0114] In the non-volatile storage medium of this embodiment, a technical solution of a game scene generation method is provided. A preset construction relationship of a terrain component and a preset construction rule are determined, wherein the preset construction relationship includes a first-level construction relationship between terrain components and a second-level construction relationship between regions within a terrain component, and the preset construction rule is used to represent a rule of a terrain element placed within a construction region, and the terrain element is used to represent a topography in a game scene; a preset number of terrain components are generated based on the preset construction relationship and the preset construction rule; and a game scene is generated based on at least part of the preset number of terrain components. It is easy to note that the game scene is generated by multiple terrain components, and the terrain components are determined by the preset construction relationship and the preset construction rule, wherein the preset construction relationship and the preset construction rule are determined according to the topography in the game scene, so as to achieve the purpose of accurately generating the game scene, thereby realizing the technical effect of improving the generation accuracy of the game scene, and further solving the technical problem of low generation accuracy of the game scene in the related art.
[0115] Through the above description of the embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or a network, and includes a plurality of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
[0116] In the example embodiments of the present application, a program product capable of implementing the above-mentioned method of the embodiment is stored on a non-volatile storage medium. In some possible embodiments, various aspects of the embodiments of the present disclosure can also be implemented in the form of a program product, which includes program code for causing the terminal device to perform the steps described in the “example method” section above according to various example embodiments of the present disclosure when the program product is run on the terminal device.
[0117] The program product for implementing the above-mentioned method according to the embodiments of the present disclosure can adopt a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the embodiments of the present disclosure is not limited to this, and in the embodiments of the present disclosure, the non-volatile storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device, or apparatus.
[0118] The program product can adopt any combination of one or more computer readable media. The non-volatile storage medium may, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any combination thereof. More specific examples (a non-exhaustive list) of the non-volatile storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0119] It should be noted that the program code contained on the non-volatile storage medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0120] Embodiments of the present disclosure also provide an electronic device comprising a memory and a processor, the memory storing a computer program, and the processor being configured to execute the computer program to perform the steps in any of the above method embodiments.
[0121] Optionally, the electronic device described above can further comprise a transmission device and an input and output device, wherein the transmission device is connected to the processor, and the input and output device is connected to the processor.
[0122] Optionally, in the present embodiment, the processor can be configured to execute the following steps through the computer program:
[0123] Step S1, determining a preset construction relationship of the terrain components and a preset construction rule, wherein the preset construction relationship comprises a first-level construction relationship between the terrain components and a second-level construction relationship between regions within the terrain components, and the preset construction rule is used to represent a rule of a terrain element placed in a construction region, and the terrain element is used to represent a terrain of a landscape in a game scene;
[0124] Step S2, generating a preset number of terrain components based on the preset construction relationship and the preset construction rule;
[0125] Step S3, generating a game scene based on at least part of the preset number of terrain components.
[0126] Optionally, the processor can be further configured to execute the following steps by using a computer program: the first preset construction relationship is used to represent the priority of the terrain component and the attribute information of the terrain element contained in the terrain component, wherein the attribute information at least includes: element type and terrain parameter, and the number of terrain components with different priorities is different; and the second preset construction relationship is used to represent the priority of the region in the terrain component and the attribute information of the terrain element placed in the region, wherein the number of regions with different priorities is different.
[0127] Optionally, the processor can be further configured to execute the following steps by using a computer program: determining the priority of a preset number of terrain components; determining the attribute information of the terrain element contained in the terrain component based on the first preset construction relationship; determining the target region for placing the terrain element in the terrain component based on the second preset construction relationship and the attribute information of the terrain element; and generating the terrain component based on the attribute information of the terrain element, the target region of the terrain element, and the preset construction rule.
[0128] Optionally, the processor can be further configured to execute the following steps by using a computer program: determining a plurality of preset edge styles, wherein the preset edge style is used to represent the terrain feature of the edge point of the terrain component; and generating the terrain component based on at least part of the plurality of preset edge styles, the terrain element, the attribute information, the target region, and the preset construction rule.
[0129] Optionally, the processor can be further configured to execute the following steps by using a computer program: the preset construction rule is that the terrain element has a variable direction and a nonlinear distribution.
[0130] Optionally, the processor can be further configured to execute the following steps by using a computer program: converting the preset number of terrain components into a preset number of scene components based on the preset style and the preset topography corresponding to the game scene; and splicing at least part of the preset number of scene components to generate the game scene.
[0131] Optionally, the processor can be further configured to execute the following steps by using a computer program: generating a preset component model corresponding to the terrain component; generating a scene model corresponding to the terrain component based on the preset style and the preset topography; and combining the preset component model and the scene model to obtain the preset number of scene components.
[0132] Optionally, the processor can be further configured to execute the following steps by using a computer program: splicing at least part of the scene components based on the terrain feature of the edge of at least part of the scene components to generate the game scene.
[0133] Optionally, the processor can be further configured to execute the following steps by using a computer program: the shape of the terrain component is a hexagon, and the preset number is 19.
[0134] In the electronic device of this embodiment, a technical solution of a method for generating a game scene is provided. A preset construction relationship of a terrain component and a preset construction rule are determined, wherein the preset construction relationship includes a first-level construction relationship between terrain components and a second-level construction relationship between regions within a terrain component, and the preset construction rule is used to represent a rule of a terrain element placed within a construction region, and the terrain element is used to represent a topography in the game scene; a preset number of terrain components are generated based on the preset construction relationship and the preset construction rule; and a game scene is generated based on at least some of the preset number of terrain components. It is easy to note that the game scene is generated by a plurality of terrain components, and the terrain components are determined by the preset construction relationship and the preset construction rule, wherein the preset construction relationship and the preset construction rule are determined according to the topography in the game scene, so as to accurately generate the game scene, thereby achieving the technical effect of improving the generation accuracy of the game scene, and further solving the technical problem of low generation accuracy of the game scene in the related art.
[0135] Figure 15 FIG. 1 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. As shown in FIG. 1, the electronic device 1500 is only one example and should not be taken as limiting the functionality or use of embodiments of the present disclosure. Figure 15
[0136] As shown in FIG. 1, the electronic device 1500 is in the form of a general computing device. The components of the electronic device 1500 can include, but are not limited to, the at least one processor 1510, the at least one memory 1520, a bus 1530 connecting different system components (including the memory 1520 and the processor 1510), and a display 1540. Figure 15 The memory 1520 stores program codes which can be executed by the processor 1510, so that the processor 1510 performs the steps according to various exemplary embodiments of the present disclosure described in the above method part of the present application.
[0137] The memory 1520 can include a readable medium in the form of a volatile storage unit, such as a random access memory (RAM) 15201 and / or a cache memory 15202, and can further include a read-only memory (ROM) 15203, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories.
[0138]
[0139] In some examples, the memory 1520 can further include program / utility 15204 having a set of programs / modules 15205, each of which is configured to carry out one or more operations consistent with the present disclosure. Each of the programs that can be included in the programs / modules 15205 can include an operating system, one or more applications, other program modules, and program data, each of which or a combination can include implementation of a network environment, as in each of the examples or some combination thereof. The memory 1520 can further include remote memory that is set apart from the processor 1510, which can be connected to the electronic device 1500 through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0140] The bus 1530 can be one or more of several types of bus structures including a memory bus or memory controller, a peripheral bus, a graphics bus, a processor 1510, or a local bus using any of a variety of bus architectures.
[0141] The display 1540 can be, for example, a liquid crystal display (LCD) that is touch screen type, which can enable a user to interact with a user interface of the electronic device 1500.
[0142] Optionally, the electronic device 1500 can also communicate with one or more external devices 1600 such as a keyboard or a pointing device, a Bluetooth device, etc., and can communicate with one or more devices that enable a user to interact with the electronic device 1500 and / or one or more devices (e.g., a router, a modem, etc.) that enable the electronic device 1500 to communicate with one or more other computing devices. Such communication can occur via an input / output (I / O) interface 1550. Still yet, the electronic device 1500 can communicate with one or more networks such as a local area network (LAN), a wide area network (WAN), and / or the public network, e.g., the Internet, via the network adapter 1560. As Figure 15 illustrated, the network adapter 1560 can communicate with the other components of the electronic device 1500 via the bus 1530. It should be appreciated that although the network adapter 1560 is illustrated as a single component in FIG. 15, the network adapter 1560 can include any number of components, which can be distributed across the electronic device 1500, and which can be used to communicate with any number of networks. Figure 15 It should be appreciated that the electronic device 1500 can also be used in connection with other hardware and / or software modules, which can include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, etc., which have not been illustrated in FIG. 15.
[0143] The electronic device 1500 can further include a keyboard, a cursor control device (e.g., a mouse), an input / output interface (I / O interface), a network interface, a power supply, and / or a camera.
[0144] Those of ordinary skill in the art will appreciate that the electronic device 1500 can be used in connection with other devices, systems, and methods, which have not been illustrated or described herein. Figure 15The illustrated structure is merely schematic and does not limit the structure of the electronic device. For example, the electronic device 1500 can further include more or fewer components than those shown, or have a different configuration of components than those shown. Figure 1 The memory 1520 can be used to store computer programs and corresponding data, such as the computer programs and corresponding data of the game scene generation method in the embodiments of the present disclosure. The processor 1510 performs various functional applications and data processing by running the computer programs stored in the memory 1520, that is, implements the game scene generation method described above. The memory 1520 can be used to store computer programs and corresponding data, such as the computer programs and corresponding data of the game scene generation method in the embodiments of the present disclosure. The processor 1510 performs various functional applications and data processing by running the computer programs stored in the memory 1520, that is, implements the game scene generation method described above.
[0145] The serial numbers of the embodiments of the present disclosure are only for description, and do not represent the pros and cons of the embodiments.
[0146] In the above-described embodiments of the present disclosure, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0147] In several embodiments provided in the present application, it should be understood that the disclosed technical contents can be implemented by other means. Among them, the above-described device embodiments are only schematic, for example, the division of the units can be a logical function division, and actual implementation can have another division way, 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 units or modules, which can be electrical or other forms.
[0148] The units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed to multiple units. Part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment scheme.
[0149] In addition, each functional unit in each embodiment of the present disclosure 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 above integrated unit can be realized in the form of hardware or in the form of software functional unit.
[0150] 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 disclosure, 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 several 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 described in the various embodiments of the present disclosure. The aforementioned storage medium includes various media that can store program codes, such as a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, etc.
[0151] The above only describes the preferred embodiments of the present disclosure, and it should be pointed out that, for those skilled in the art, without departing from the principles of the present disclosure, a number of improvements and refinements can be made, and these improvements and refinements should also be considered as the protection scope of the present disclosure.
Claims
1. A method for generating a game scene, characterized in that, The method comprises the following steps: determining preset construction relationships and preset construction rules of terrain components, wherein the preset construction relationships comprise first preset construction relationships between the terrain components and second preset construction relationships between regions in the terrain components, and the preset construction rules are used to represent rules for constructing terrain elements placed in the regions, the terrain elements are used to represent terrains of landscapes in the game scene, the first preset construction relationships are used to represent priorities of the terrain components and attribute information of the terrain elements contained in the terrain components, the attribute information at least comprises element types and terrain parameters, and the number of terrain components with different priorities is different; and the second preset construction relationships are used to represent priorities of the regions in the terrain components and attribute information of the terrain elements placed in the regions, and the number of regions with different priorities is different; generating a preset number of the terrain components based on the preset construction relationships and the preset construction rules; generating the game scene based on at least part of the terrain components in the preset number of the terrain components.
2. The method of claim 1, wherein, The method of generating the preset number of the terrain components based on the preset construction relationships and the preset construction rules comprises: determining priorities of the terrain components in the preset number; determining attribute information of the terrain elements contained in the terrain components based on the first preset construction relationships; determining target regions for placing the terrain elements in the terrain components based on the second preset construction relationships and the attribute information of the terrain elements; generating the terrain components based on the attribute information of the terrain elements, the target regions and the preset construction rules.
3. The method of claim 2, wherein, The method of generating the terrain components based on the attribute information, the target regions and the preset construction rules comprises: determining a plurality of preset edge styles, wherein the preset edge styles are used to represent terrain features of edge points of the terrain components; generating the terrain components based on at least part of the preset edge styles, the terrain elements, the attribute information, the target regions and the preset construction rules.
4. The method of claim 1, wherein, The method of generating the game scene based on at least part of the terrain components in the preset number of the terrain components comprises: converting the preset number of the terrain components into a preset number of scene components based on a preset style and a preset landscape corresponding to the game scene; splicing at least part of the scene components in the preset number of the scene components to generate the game scene.
5. The method of claim 4, wherein, The method of converting the preset number of the terrain components into the preset number of scene components based on a preset style and a preset landscape corresponding to the game scene comprises: generating a preset component model corresponding to the terrain components; generating a scene model corresponding to the terrain components based on the preset style and the preset landscape; combining the preset component model and the scene model to obtain the preset number of the scene components.
6. The method of claim 4, wherein, Splice at least part of the preset number of the scene components to generate the game scene, comprising: Splice at least part of the scene components to generate the game scene based on the terrain features of the edges of at least part of the scene components.
7. An apparatus for generating a game scene, characterized by comprising: Comprise: A determination module is configured to determine a preset construction relationship and a preset construction rule of a terrain component, wherein the terrain component is used to represent the terrain of the landscape in the game scene, the preset construction relationship comprises a first preset construction relationship between the terrain components and a second preset construction relationship between regions in the terrain component, and the preset construction rule is used to represent the rule of constructing the terrain elements placed in the region. The first preset construction relationship is used to represent the priority of the terrain component and the attribute information of the terrain elements contained in the terrain component, and the attribute information at least comprises an element type and a terrain parameter. The number of terrain components with different priorities is different. The second preset construction relationship is used to represent the priority of the region in the terrain component and the attribute information of the terrain elements placed in the region. The number of regions with different priorities is different. A component generation module is configured to generate a preset number of terrain components based on the preset construction relationship and the preset construction rule. A map generation module is configured to generate the game scene based on at least part of the preset number of the terrain components.
8. A non-volatile storage medium, characterized by The non-volatile storage medium stores a computer program, wherein the computer program is configured to be run by the processor to execute the game scene generation method in any one of claims 1 to 6. 9.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to run the computer program to execute the game scene generation method in any one of claims 1 to 6.
Citation Information
Patent Citations
Map generating method and device, storage medium and terminal
CN108057245A
Sectional terrain editing
US20170354890A1