CN113900804A - Game resource configuration data generation method and game resource construction method - Google Patents

Game resource configuration data generation method and game resource construction method Download PDF

Info

Publication number
CN113900804A
CN113900804A CN202111166700.4A CN202111166700A CN113900804A CN 113900804 A CN113900804 A CN 113900804A CN 202111166700 A CN202111166700 A CN 202111166700A CN 113900804 A CN113900804 A CN 113900804A
Authority
CN
China
Prior art keywords
target
unit
game
resource
game resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111166700.4A
Other languages
Chinese (zh)
Inventor
张小金
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Perfect World Beijing Software Technology Development Co Ltd
Original Assignee
Perfect World Beijing Software Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Perfect World Beijing Software Technology Development Co Ltd filed Critical Perfect World Beijing Software Technology Development Co Ltd
Priority to CN202111166700.4A priority Critical patent/CN113900804A/en
Publication of CN113900804A publication Critical patent/CN113900804A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application discloses a method for generating game resource configuration data and a method for constructing game resources, wherein the method for generating the game resource configuration data comprises the following steps: acquiring modeling data of a three-dimensional game resource, wherein the three-dimensional game resource is obtained by splicing a plurality of unit surfaces, and the modeling data comprises the plurality of unit surfaces forming the three-dimensional game resource; determining a root plane in the unit surface, and constructing a spatial relationship between the root plane and other unit surfaces; and acquiring a configurable surface corresponding to the unit surface, and generating resource configuration data of the three-dimensional game resource according to the configurable surface, the root plane and the spatial relationship, wherein the root plane and the spatial relationship are used for determining an occupied surface of the three-dimensional game resource in a three-dimensional game scene, and the configurable surface is used for representing a configurable position of the game resource based on the three-dimensional game resource. The method and the device are beneficial to reducing the data volume of the resource configuration data and improving the response speed of the game.

Description

Game resource configuration data generation method and game resource construction method
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method for generating game resource configuration data and a method for constructing game resources.
Background
With the development of computer technology and the popularization of intelligent equipment, a large number of games with different themes emerge to meet the requirements of users. In game application operated by an intelligent terminal, the development direction of the current game field is to combine a plurality of different playing methods to improve the playability of games.
For a building type game, the data of voxels occupied by the model in the constructable model provided in the game scene is usually saved as the model data, and when a player constructs the model in the game scene, the intersection judgment is performed in the game scene according to the model voxel data, so as to ensure that each voxel grid of the model is not occupied. Due to the fact that the voxel data occupies a large space, especially for the situation that the number of models which can be built in a game scene is large, the storage space of the terminal is occupied, the calculation amount of the judging mode is large, and the terminal cost is large.
Disclosure of Invention
In view of this, the present application provides a method for generating game resource configuration data and a method for constructing game resources.
According to an aspect of the present application, there is provided a method of generating game resource configuration data, the method comprising:
acquiring modeling data of a three-dimensional game resource, wherein the three-dimensional game resource is obtained by splicing a plurality of unit surfaces, and the modeling data comprises the plurality of unit surfaces forming the three-dimensional game resource;
determining a root plane in the unit surface, and constructing a spatial relationship between the root plane and other unit surfaces;
and acquiring a configurable surface corresponding to the unit surface, and generating resource configuration data of the three-dimensional game resource according to the configurable surface, the root plane and the spatial relationship, wherein the root plane and the spatial relationship are used for determining an occupied surface of the three-dimensional game resource in a three-dimensional game scene, and the configurable surface is used for representing a configurable position of the game resource based on the three-dimensional game resource.
Optionally, the acquiring a configurable surface corresponding to the unit surface specifically includes:
acquiring a collinear surface corresponding to the unit surface, wherein the collinear surface comprises a virtual unit surface collinear with any edge of the unit surface;
and acquiring a collinear surface positioned on the unit surface as the reconstructable surface based on the spatial relationship between the unit surface and the collinear surface.
Optionally, before the obtaining of the collinear plane corresponding to the unit plane, the method further includes:
establishing a virtual three-dimensional grid;
and determining the virtual unit faces based on a virtual cube formed by the virtual three-dimensional grid, wherein the virtual unit faces comprise planes formed by six surfaces of the virtual cube and inclined planes formed by edges of the virtual cube, and a plurality of unit faces forming the three-dimensional game resource model are obtained by materializing the corresponding virtual unit faces.
Optionally, the generating resource configuration data of the three-dimensional game resource according to the configurable surface, the root plane, and the spatial relationship specifically includes:
acquiring a function identifier of the three-dimensional game resource;
and generating resource configuration data of the three-dimensional game resource according to the function identifier, the configurable surface, the root plane and the spatial relationship.
According to another aspect of the present application, there is provided a method of constructing a game resource, the method including:
responding to a construction instruction of a target game resource, and acquiring a root plane construction position corresponding to the target game resource and target resource configuration data, wherein the target resource configuration data comprises a target space relationship between the root plane corresponding to the target game resource and other unit surfaces;
according to the root plane construction position and the target space relation, determining a target occupation surface of the target game resource;
reading unit face construction data of a three-dimensional game scene, and constructing the target game resource in the three-dimensional game scene according to the target occupation face when the target game resource is judged to meet construction conditions based on the unit face construction data and the target occupation face.
Optionally, the unit face construction data includes a constructable unit face with construction conditions in the three-dimensional game scene and an already-constructed unit face which is already occupied, the unit face includes a virtual unit face corresponding to a virtual cube in the three-dimensional game scene, and the virtual unit face includes a plane formed by six surfaces of the virtual cube and an inclined plane formed by each side of the virtual cube;
after the reading of the unit face construction data of the three-dimensional game scene, the method further comprises:
judging whether the target occupation surface belongs to the established unit surface;
and if the unit faces do not belong to the established unit faces, identifying whether the target occupation faces contain the established unit faces or not, and determining that the target game resources meet the establishment conditions when the target occupation faces contain the established unit faces.
Optionally, the target resource configuration data further includes a target playable surface corresponding to the target game resource; after the target game resource is constructed in the three-dimensional game scene according to the target occupation plane, the method further comprises the following steps:
and marking the constructable unit surface corresponding to the target occupation surface in the unit surface construction data as an established unit surface, and adding the target constructable surface into the unit surface construction data to serve as the constructable unit surface so as to update the unit surface construction data.
Optionally, the marking a constructable unit surface corresponding to the target occupation surface in the unit surface construction data as a constructed unit surface specifically includes:
if the target occupied surface is a plane of a virtual cube, marking a constructable unit surface corresponding to the target occupied surface in the unit surface construction data as a constructed unit surface;
and if the target occupied surface is an inclined surface of the virtual cube, marking the inclined surfaces of the virtual cube, in which the target occupied surface is located, in the unit surface construction data as constructed unit surfaces.
Optionally, the target resource configuration data further includes a target function identifier of the target game resource; after the target game resource is constructed in the three-dimensional game scene according to the target occupation plane, the method further comprises the following steps:
and reading a target function corresponding to the target game resource according to the target function identification, and associating the target function to the target game resource.
Optionally, after the target game resource is constructed in the three-dimensional game scene according to the target occupation plane, the method further includes:
acquiring a constructable unit surface corresponding to the target occupation surface as an adjacent unit surface;
determining adjacent game resources corresponding to the adjacent unit surfaces in the three-dimensional game scene according to the adjacent unit surfaces;
if the adjacent game resources and the target game resources belong to preset associable resources, the target game resources and the adjacent game resources are bound to be associated game resources, wherein the bound game resources can move synchronously in the three-dimensional game scene.
Optionally, after the binding the association relationship between the target game resource and the adjacent game resource, the method further includes:
judging whether the target game resource and the adjacent game resource belong to preset mergeable resources or not according to the target function identification and the adjacent function identification corresponding to the adjacent game resource;
and if the game resources belong to the preset mergeable resources, acquiring a merge function identifier corresponding to the target function identifier and the adjacent function identifier, and associating a merge function corresponding to the merge function identifier to the associated game resources.
According to another aspect of the present application, there is provided a game resource configuration data generation apparatus, including:
the modeling data acquisition module is used for acquiring modeling data of three-dimensional game resources, wherein the three-dimensional game resources are obtained by splicing a plurality of unit surfaces, and the modeling data comprises a plurality of unit surfaces forming the three-dimensional game resources;
the spatial relationship construction module is used for determining a root plane in the unit surface and constructing a spatial relationship between the root plane and other unit surfaces;
and the configuration data generation module is used for acquiring a configurable surface corresponding to the unit surface and generating resource configuration data of the three-dimensional game resource according to the configurable surface, the root plane and the spatial relationship, wherein the root plane and the spatial relationship are used for determining an occupied surface of the three-dimensional game resource in a three-dimensional game scene, and the configurable surface is used for representing a configurable position of the game resource based on the three-dimensional game resource.
Optionally, the configuration data generating module is specifically configured to:
acquiring a collinear surface corresponding to the unit surface, wherein the collinear surface comprises a virtual unit surface collinear with any edge of the unit surface;
and acquiring a collinear surface positioned on the unit surface as the reconstructable surface based on the spatial relationship between the unit surface and the collinear surface.
Optionally, the apparatus further comprises:
the virtual surface construction module is used for establishing a virtual three-dimensional grid before the collinear surface corresponding to the unit surface is obtained; and determining the virtual unit faces based on a virtual cube formed by the virtual three-dimensional grid, wherein the virtual unit faces comprise planes formed by six surfaces of the virtual cube and inclined planes formed by edges of the virtual cube, and a plurality of unit faces forming the three-dimensional game resource model are obtained by materializing the corresponding virtual unit faces.
Optionally, the configuration data generating module is specifically configured to:
acquiring a function identifier of the three-dimensional game resource;
and generating resource configuration data of the three-dimensional game resource according to the function identifier, the configurable surface, the root plane and the spatial relationship.
According to another aspect of the present application, there is provided a game resource construction apparatus, including:
the system comprises a construction instruction response module, a construction instruction processing module and a game execution module, wherein the construction instruction response module is used for responding to a construction instruction of a target game resource and acquiring a root plane construction position and target resource configuration data corresponding to the target game resource, and the target resource configuration data comprises a target space relation between the root plane corresponding to the target game resource and other unit surfaces;
the occupation surface determining module is used for determining a target occupation surface of the target game resource according to the root plane construction position and the target space relation;
and the game resource construction module is used for reading unit surface construction data of a three-dimensional game scene, and constructing the target game resource in the three-dimensional game scene according to the target occupation surface when the target game resource meets construction conditions based on the unit surface construction data and the target occupation surface.
Optionally, the unit face construction data includes a constructable unit face with construction conditions in the three-dimensional game scene and an already-constructed unit face which is already occupied, the unit face includes a virtual unit face corresponding to a virtual cube in the three-dimensional game scene, and the virtual unit face includes a plane formed by six surfaces of the virtual cube and an inclined plane formed by each side of the virtual cube;
the game resource construction module is further configured to:
after the unit surface construction data of the three-dimensional game scene is read, whether the target occupation surface belongs to the constructed unit surface is judged; and if the unit faces do not belong to the established unit faces, identifying whether the target occupation faces contain the established unit faces or not, and determining that the target game resources meet the establishment conditions when the target occupation faces contain the established unit faces.
Optionally, the target resource configuration data further includes a target playable surface corresponding to the target game resource; the device further comprises:
and the data updating module is used for marking the configurable unit surface corresponding to the target occupation surface in the unit surface construction data as the constructed unit surface after the target game resource is constructed in the three-dimensional game scene according to the target occupation surface, and adding the target configurable unit surface to the unit surface construction data to serve as the configurable unit surface so as to update the unit surface construction data.
Optionally, the data updating module is specifically configured to:
if the target occupied surface is a plane of a virtual cube, marking a constructable unit surface corresponding to the target occupied surface in the unit surface construction data as a constructed unit surface;
and if the target occupied surface is an inclined surface of the virtual cube, marking the inclined surfaces of the virtual cube, in which the target occupied surface is located, in the unit surface construction data as constructed unit surfaces.
Optionally, the target resource configuration data further includes a target function identifier of the target game resource; the device further comprises:
and the function association module is used for reading a target function corresponding to the target game resource according to the target function identification after the target game resource is established in the three-dimensional game scene according to the target occupation surface, and associating the target function to the target game resource.
Optionally, the apparatus further comprises:
the resource binding module is used for acquiring a configurable unit surface corresponding to the target occupation surface as an adjacent unit surface after the target game resource is constructed in the three-dimensional game scene according to the target occupation surface; determining adjacent game resources corresponding to the adjacent unit surfaces in the three-dimensional game scene according to the adjacent unit surfaces; if the adjacent game resources and the target game resources belong to preset associable resources, the target game resources and the adjacent game resources are bound to be associated game resources, wherein the bound game resources can move synchronously in the three-dimensional game scene.
Optionally, the apparatus further comprises:
the function merging module is used for judging whether the target game resource and the adjacent game resource belong to preset mergeable resources or not according to the target function identifier and the adjacent function identifier corresponding to the adjacent game resource after the incidence relation between the target game resource and the adjacent game resource is bound; and if the game resources belong to the preset mergeable resources, acquiring a merge function identifier corresponding to the target function identifier and the adjacent function identifier, and associating a merge function corresponding to the merge function identifier to the associated game resources.
According to yet another aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described game resource configuration data generation method.
According to yet another aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described method of constructing a game resource.
According to yet another aspect of the present application, there is provided a computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor implementing the above game resource configuration data generation method when executing the program.
According to yet another aspect of the present application, there is provided a computer device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor implementing the method for constructing game resources described above when executing the program.
By means of the technical scheme, the game resource configuration data generation method and the game resource construction method, which are provided by the application, are used for obtaining a plurality of unit surfaces for splicing the three-dimensional game resource, selecting the root plane of the unit surfaces, constructing the spatial relationship between the root plane and other unit surfaces, and obtaining the constructable surface corresponding to the unit surface of the three-dimensional game resource, so that the resource configuration data of the three-dimensional game resource comprising the constructable surface, the root plane and the spatial relationship is constructed. The resource configuration data provided by the embodiment of the application not only reduces the data volume of the resource configuration data, but also helps to improve the response speed of the client when the three-dimensional game resources are added in the game scene, and meanwhile, based on the configurable data corresponding to different game resources in the game scene, the method helps to realize quick judgment of whether the three-dimensional game resources can be added, and further improves the game response speed.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart illustrating a method for generating game resource configuration data according to an embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating another method for generating game resource configuration data according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating a bevel in a virtual cube provided by an embodiment of the present application;
fig. 4 shows a flow chart of a method for constructing game resources according to an embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
In this embodiment, a method for generating game resource configuration data is provided, as shown in fig. 1, the method includes:
step 101, obtaining modeling data of a three-dimensional game resource, wherein the three-dimensional game resource is obtained by splicing a plurality of unit surfaces, and the modeling data comprises a plurality of unit surfaces forming the three-dimensional game resource;
in the embodiment of the application, the three-dimensional game resource may specifically be an addable object in the game, for example, various placeable objects such as a house that can be built, placeable furniture, and a usable prop in a three-dimensional game scene. When modeling is carried out aiming at an addable object in a game, three-dimensional game resources can be obtained by splicing a plurality of unit surfaces, modeling data comprises a plurality of unit surfaces used for splicing the three-dimensional game resources, and the surfaces of three-dimensional game resource models can be obtained by splicing the plurality of unit surfaces. Or modeling the three-dimensional game resource in other modes, and acquiring the modeling data in a mode of identifying the surface information of the three-dimensional game resource model.
Step 102, determining a root plane in the unit surface, and constructing a spatial relationship between the root plane and other unit surfaces;
to describe the positional relationship between the unit faces, one of the plurality of unit faces may be selected as a root plane of the three-dimensional game resource, and after the root plane is determined, the spatial relationship between the root plane and the other unit faces of the plurality of unit faces may be established. Therefore, when the three-dimensional game resources are added in the three-dimensional game scene, the position of each unit surface of the three-dimensional game resources in the three-dimensional space can be rapidly determined according to the spatial relationship as long as the position of the root plane in the three-dimensional space is determined.
103, acquiring a configurable surface corresponding to the unit surface, and generating resource configuration data of the three-dimensional game resource according to the configurable surface, the root plane and the spatial relationship, wherein the root plane and the spatial relationship are used for determining an occupied surface of the three-dimensional game resource in a three-dimensional game scene, and the configurable surface is used for representing a configurable position of the game resource based on the three-dimensional game resource.
And finally, acquiring a configurable surface corresponding to the three-dimensional game resource, and generating resource configuration data of the three-dimensional game resource by combining the spatial relationship between the root plane and other planes. For a certain unit surface, the reconstructable surface corresponding to the unit surface is specifically a position where game resources can be added on the basis of the unit surface, and the position is described by a virtual unit surface in a three-dimensional space, for example, the reconstructable surface corresponding to a certain unit surface 1 is a virtual unit surface 1 in the three-dimensional space, and after the three-dimensional game resources are constructed in the three-dimensional game scene, other three-dimensional game resources can be continuously constructed on the reconstructable surface (i.e., the virtual unit surface 1) corresponding to the unit surface 1. In a specific application scenario, in order to show a virtual-real combined effect in a game, when an object is added in a three-dimensional game scene, the newly added object needs to be based on other resources in the three-dimensional game scene, for example, the object is added on the ground, the ground is used as the basis of the new object, or a vase is added on a desk, and the desk is used as the basis of the vase. After the resource configuration data of the three-dimensional game resources are generated, when the three-dimensional game resources are added in the three-dimensional game scene, the occupied area of the three-dimensional game resources in the game scene can be rapidly determined according to the root plane and space relation, so that the data volume of the resource configuration data is reduced, and the response speed of a client side when the three-dimensional game resources are added in the game scene is improved. In addition, whether three-dimensional game resources can be added or not can be quickly judged based on the data of the configurable surfaces corresponding to different game resources in the game scene, and the game response speed is further improved.
By applying the technical scheme of the embodiment, the plurality of unit surfaces for splicing the three-dimensional game resource are obtained, the root plane is selected, the spatial relationship between the root plane and other unit surfaces is established, and the configurable surface corresponding to the unit surface of the three-dimensional game resource is obtained, so that the resource configuration data of the three-dimensional game resource comprising the configurable surface, the root plane and the spatial relationship is established. The resource configuration data provided by the embodiment of the application not only reduces the data volume of the resource configuration data, but also helps to improve the response speed of the client when the three-dimensional game resources are added in the game scene, and meanwhile, based on the configurable data corresponding to different game resources in the game scene, the method helps to realize quick judgment of whether the three-dimensional game resources can be added, and further improves the game response speed.
Further, as a refinement and an extension of the specific implementation of the foregoing embodiment, in order to fully describe the specific implementation process of the present embodiment, another method for generating game resource configuration data is provided, as shown in fig. 2, the method includes:
step 201, establishing a virtual three-dimensional grid; and determining the virtual unit faces based on a virtual cube formed by the virtual three-dimensional grid, wherein the virtual unit faces comprise planes formed by six surfaces of the virtual cube and inclined planes formed by edges of the virtual cube, and a plurality of unit faces forming the three-dimensional game resource model are obtained by materializing the corresponding virtual unit faces.
In this embodiment, a plurality of cell faces constituting the three-dimensional game resource are obtained by materializing virtual cell faces corresponding to the three-dimensional game resource model surface, the virtual cell faces being defined based on a virtual cube formed by a virtual three-dimensional mesh in a three-dimensional virtual space. In a specific application scenario, in a three-dimensional virtual space, a virtual three-dimensional grid is divided according to preset length, width and height data to obtain a plurality of virtual cubes in the space, the length, width and height of each virtual cube correspond to the preset length, width and height data respectively, for each virtual cube, 6 corresponding upper, lower, left, right, front and back surfaces of each virtual cube can be used as virtual unit surfaces, and inclined surfaces formed by each side of each virtual cube can also be used as virtual unit surfaces, as shown in fig. 3, specifically, each side of each virtual cube can be formed into 4 inclined surfaces, namely, front, back, front, left, right and left inclined surfaces. For each virtual unit surface, an ID may be defined, for example, IDs corresponding to 6 planes, i.e., upper, lower, left, right, front, rear, left, and rear, are 01, 02, 03, 04, 05, and 06, and IDs corresponding to 4 slopes, i.e., front, rear, front, left, right, and left, are 07, 08, 09, and 10, respectively.
Step 202, obtaining modeling data of a three-dimensional game resource, wherein the three-dimensional game resource is obtained by splicing a plurality of unit surfaces, and the modeling data comprises a plurality of unit surfaces forming the three-dimensional game resource.
And step 203, determining a root plane in the unit surface, and constructing a spatial relationship between the root plane and other unit surfaces.
In this embodiment, the three-dimensional game resource is obtained by splicing materialized virtual unit faces, and the modeling data may specifically include a virtual cube position where the surface of the three-dimensional game resource is located and a unit face type occupied by the surface in the virtual cube, for example, a virtual object surface occupies the virtual cube (2, 3, 4), and the ID of the unit face occupied in the virtual cube is 01, that is, the unit face occupies the upper surface of the virtual cube. Further, a root plane is defined, and in order to facilitate the construction operation in the subsequent game, the root plane may be selected near the bottom center position of the three-dimensional game resource, and a spatial relationship between the root plane and other unit faces is constructed, such as a coordinate position of a virtual cube where the root plane is located relative to the virtual cube where the other unit faces are located, and a type of the unit face of the other unit face in the virtual cube, where the root plane is taken as an origin. After the spatial relationship is established, after the position of the root plane of the three-dimensional game resource in the three-dimensional game scene is known, the position of each unit surface of the three-dimensional game resource in the three-dimensional game scene can be obtained according to the spatial relationship, and the occupied position of the three-dimensional game resource in the game can be determined according to the position of the root plane.
Step 204, obtaining a collinear surface corresponding to the unit surface, wherein the collinear surface comprises a virtual unit surface collinear with any edge of the unit surface; and acquiring a collinear surface positioned on the unit surface as the reconstructable surface based on the spatial relationship between the unit surface and the collinear surface.
In this embodiment, for any one unit surface, a collinear surface having an adjacent relationship with the unit surface may be obtained first, whether a surface is connected may be determined by whether lines on the surface are collinear, if two surfaces are collinear, it may be considered that the two surfaces are adjacent, whether the collinear surface corresponding to the unit surface may be used as a constructable surface corresponding to the unit surface, and further, it needs to be determined by a spatial position relationship between the collinear surface and the unit surface. Such as unit plane a and corresponding collinear plane B, plane a cannot be used as a building foundation for plane B if plane B is below plane a, and plane B cannot be built with plane a as a support, i.e., plane B cannot be used as a building foundation for plane a, whereas plane a can be used as a building foundation for plane B if plane B is above plane a, and plane B can be built with plane a as a support. In a specific application scenario, if a unit plane of a virtual object includes plane B, it can build a virtual object containing plane a as a base. Based on the method for determining the reconstructable surfaces corresponding to the unit surfaces, the reconstructable surfaces corresponding to each unit surface included in the three-dimensional game resource can be determined, if the reconstructable surfaces corresponding to each unit surface include the same surface as the unit surface corresponding to the resource, the reconstructable surfaces are deleted and de-duplicated, and finally the remaining reconstructable surfaces are used as the reconstructable surfaces corresponding to all the unit surfaces or the reconstructable surfaces corresponding to the three-dimensional game resource.
Step 205, acquiring a function identifier of the three-dimensional game resource; and generating resource configuration data of the three-dimensional game resource according to the function identifier, the configurable surface, the root plane and the spatial relationship.
In this embodiment, to enrich the game play, a function may also be provided for three-dimensional game resources, for example, a blower function of a virtual blower. Specifically, the corresponding function identifier can be obtained for the function of the three-dimensional game resource, and then the function identifier is combined with the configurable surface, the root plane and the spatial relationship of the three-dimensional game resource to generate and store resource configuration data. The functions of the three-dimensional game resources are realized through function functions, and each function corresponds to a unique function identifier. In an actual application scenario, the function table may be configured to store the function, and the function identifier may be used to read the function from the table.
The embodiment of the present application provides a method for constructing a game resource, as shown in fig. 4, including:
step 301, in response to a construction instruction for a target game resource, acquiring a root plane construction position corresponding to the target game resource and target resource configuration data, where the target resource configuration data includes a target spatial relationship between a root plane corresponding to the target game resource and other unit surfaces;
step 302, determining a target occupation area of the target game resource according to the root plane construction position and the target space relation;
step 303, reading unit surface construction data of a three-dimensional game scene, and constructing the target game resource in the three-dimensional game scene according to the target occupation surface when the target game resource is judged to meet construction conditions based on the unit surface construction data and the target occupation surface.
In the above embodiment, when a player builds resources in a three-dimensional game scene, the player may first select a target game resource, and then determine a position where the player wants to add the target game resource by dragging the target game resource to a specified position, or by touching a screen, and the like, and specifically may use the position as a root plane building position corresponding to the target game resource. The game client side responds to a construction instruction of a player for the target game resource, obtains a root plane construction position and target game resource configuration data, and accordingly determines a unit surface, namely a target occupation surface, which needs to be occupied by the target game resource in a three-dimensional game scene according to the root plane position and a target space relation between the root plane and other unit surfaces in the target game resource configuration data. Further, unit surface construction data of the three-dimensional game scene is read, and the unit surface construction data specifically can include information of which unit surfaces in the three-dimensional game scene are occupied and which unit surfaces belong to the constructable surfaces. And finally, judging whether the target game resources meet the construction conditions or not based on the unit face construction data and the target occupation face, if so, constructing the target game resources at the corresponding positions of the target occupation face, otherwise, outputting prompt information to prompt the player to change the position, wherein the current selected position of the player cannot construct the target game resources.
It should be noted that the three-dimensional game scene may be a region, which is pre-divided in the game world and is available for the player to add the object at will, or the entire game world may be used as a region where the object can be added, and correspondingly, the unit plane construction data corresponds to the space region where the object can be added. The efficient building function is realized in the game by editing and building the building area and editing object configuration parameters, namely three-dimensional game scenes and resource configuration data.
Further, as a refinement and an extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of the embodiment, another method for generating game resource configuration data is provided, the method including:
step 401, in response to a construction instruction for a target game resource, acquiring a root plane construction position corresponding to the target game resource and target resource configuration data, where the target resource configuration data includes a target spatial relationship between a root plane corresponding to the target game resource and other unit surfaces.
Step 402, determining a target occupation area of the target game resource according to the root plane construction position and the target space relation.
Step 403, reading unit surface construction data of the three-dimensional game scene, and judging whether the target occupation surface belongs to the constructed unit surface.
Step 404, if the unit face does not belong to the established unit face, identifying whether the target occupation face comprises the established unit face, and constructing the target game resource in the three-dimensional game scene according to the target occupation face when the target occupation face comprises the established unit face.
Optionally, the unit face construction data includes a constructable unit face with construction conditions in the three-dimensional game scene and an already-constructed unit face which is already occupied, the unit face includes a virtual unit face corresponding to a virtual cube in the three-dimensional game scene, and the virtual unit face includes a plane formed by six surfaces of the virtual cube and an inclined plane formed by each side of the virtual cube; the target resource configuration data further comprises a target playable surface corresponding to the target game resource.
In the embodiment of the application, when it is determined that the target game resource is in the pre-specified addable object area, whether the target game resource is establishable in the three-dimensional game scene is continuously determined, specifically, whether a position that the target game resource needs to occupy is already occupied by other resources may be determined first, that is, whether each target occupation surface corresponding to the target game resource belongs to an established unit surface. Under the condition that the target occupation surface is determined to be unoccupied, namely the target occupation surface does not belong to the established unit surface, because the virtual object in the game needs to be established depending on the ground in the game scene or other existing objects, whether each unit surface of the virtual object comprises at least one established unit surface is continuously judged, if yes, the virtual object can be established, the judgment ensures that the virtual object is not built in the game scene in the air, a fulcrum can be arranged, the objective law of the real world is followed, and the virtual-real combined game experience is brought to the player.
Step 405, marking a constructable unit surface corresponding to the target occupation surface in the unit surface construction data as an established unit surface, and adding the target constructable surface to the unit surface construction data to serve as a constructable unit surface so as to update the unit surface construction data.
In this embodiment, after the target game resource is added to the three-dimensional game scene, the occupation situation of the unit surface in the scene also changes, so that after the target game resource is added to the scene, the unit surface construction data of the three-dimensional game scene can be updated in order to facilitate the subsequent other objects to be continuously added to the scene and the management of the resource data in the scene. Specifically, the target occupation surface of the target game resource can be written into the unit surface construction data as the established unit surface, so that a newly added object can be ensured to avoid the position of the established unit surface when resource addition is carried out subsequently, and the target constructable surface corresponding to the target game resource can be written into the unit surface construction data as the constructable unit surface, so that a new object based on the constructable unit surface can be added subsequently.
Optionally, in step 405, "marking a constructable unit surface corresponding to the target occupation surface in the unit surface construction data as an established unit surface", may specifically include: if the target occupied surface is a plane of a virtual cube, marking a constructable unit surface corresponding to the target occupied surface in the unit surface construction data as a constructed unit surface; and if the target occupied surface is an inclined surface of the virtual cube, marking the inclined surfaces of the virtual cube, in which the target occupied surface is located, in the unit surface construction data as constructed unit surfaces.
In this embodiment, since the inclined planes of the virtual cube occupy the space of the entire virtual cube, that is, if one inclined plane of a virtual cube is occupied, the other inclined planes of the virtual cube cannot be occupied, or two or more inclined planes of a virtual cube cannot be occupied at the same time. Therefore, when updating the unit face construction data, if the target occupied face is a plane of the virtual cube, the plane is directly used as the established unit face, and if the target occupied face is an inclined face of the virtual cube, not only the current inclined face but also other inclined faces of the same virtual cube as the current inclined face are used as the established unit face. Therefore, the situation that the new resource and the old resource are overlapped in the space can not occur when the new resource is added subsequently.
Step 406, reading a target function corresponding to the target game resource according to the target function identifier, and associating the target function to the target game resource, where the target resource configuration data further includes the target function identifier of the target game resource.
In this embodiment, the target game resource may be accompanied by a function, and according to the target function identifier in the target resource configuration data, the target function corresponding to the identifier may be read and associated with the target game resource, so that the target game resource may have a corresponding function in the three-dimensional game scene, for example, implementing an air blowing function.
Optionally, the target function corresponding to the target game resource includes at least one of a time trigger function, a spatial relationship trigger function, and an event trigger function. The functions of the target game resources have different trigger mechanisms, for example, the functions of the resources are triggered after a certain time is reached, the functions of the resources are triggered when the resources and other resources are monitored to meet a predetermined spatial position relationship, the functions of the resources are triggered when a system preset event or a player self-defined event is detected, and the like, so that the playing methods of the game resources in the game are enriched, technical supports for realizing various creative playing methods are provided, and for example, a player can realize various competitive strategies by adding functional objects to perform attack and defense combination.
Step 407, acquiring a constructable unit surface corresponding to the target occupation surface as an adjacent unit surface; determining adjacent game resources corresponding to the adjacent unit surfaces in the three-dimensional game scene according to the adjacent unit surfaces; if the adjacent game resources and the target game resources belong to preset associable resources, the target game resources and the adjacent game resources are bound to be associated game resources, wherein the bound game resources can move synchronously in the three-dimensional game scene.
In this embodiment, if the target game resource is constructed based on other existing resources, that is, if the target occupied surface of the target game resource belongs to the configurable surface corresponding to other existing resources, the configurable surface may be obtained as the adjacent unit surface. The configurable surfaces corresponding to other existing resources are stored in the unit surface construction data in advance in a configurable unit surface mode, so that the configurable unit surfaces corresponding to the target occupation surface are obtained to serve as adjacent unit surfaces. In addition, the unit surface construction data may further include a three-dimensional game resource identifier corresponding to the constructable unit surface, so that the game resource corresponding to the adjacent unit surface, that is, the adjacent game resource, may be determined according to the identifier. After further determining the adjacent game resources, it is determined whether the adjacent game resources and the target game resources belong to preset associable resources, and if so, the adjacent game resources and the target game resources are bound as the associated game resources, and specifically, which game resources are associable may be set, for example, resource 1 and resource 2 are associable, resource 1 and resource 3 are associable, and the like. The bound resources can synchronously move in the three-dimensional game scene in response to the movement operation of the player on any one of the resources, and when the player wants to move the position of the game resource in the game scene, the player can synchronously move the associated game resources by moving any one of the resources without moving one of the resources, so that the player can conveniently operate the game.
Step 408, judging whether the target game resource and the adjacent game resource belong to preset mergeable resources according to the target function identifier and the adjacent function identifier corresponding to the adjacent game resource; and if the game resources belong to the preset mergeable resources, acquiring a merge function identifier corresponding to the target function identifier and the adjacent function identifier, and associating a merge function corresponding to the merge function identifier to the associated game resources.
In this embodiment, if two game resources are adjacently disposed in a game scene, a special function or an advanced function of the game resource may also be triggered. Specifically, it may be determined whether the target game resource and the adjacent game resource belong to preset mergeable resources, and if so, the corresponding mergeable function identifier may be queried according to the target function identifier of the target game resource and the adjacent function identifier of the adjacent game resource. Specifically, it can be set that the same kind of resources can be merged, and certainly, it can also be set which types of the mergeable resources corresponding to a certain kind of resources are, for example, resource 1 and resource 1 can be merged, resource 1 and resource 2 can be merged, and the like. In addition, a merge function identifier configuration table corresponding to each mergeable resource may also be configured in advance, for example, the merge function identifier corresponding to resource 1 is 11, the merge function identifier corresponding to resource 1 is 12, and the like. And further associating the merging function corresponding to the merging function identification to the associated game resources, thereby enriching the game playing method. For example, two ordinary blowers may be combined into one super blower, which is three times as wind-powered as the ordinary blowers. In general, a mergeable resource belongs to an associateable resource, but an associateable resource does not necessarily belong to a mergeable resource.
Further, as a specific implementation of the method in fig. 1, an embodiment of the present application provides an apparatus for generating game resource configuration data, where the apparatus includes:
the modeling data acquisition module is used for acquiring modeling data of three-dimensional game resources, wherein the three-dimensional game resources are obtained by splicing a plurality of unit surfaces, and the modeling data comprises a plurality of unit surfaces forming the three-dimensional game resources;
the spatial relationship construction module is used for determining a root plane in the unit surface and constructing a spatial relationship between the root plane and other unit surfaces;
and the configuration data generation module is used for acquiring a configurable surface corresponding to the unit surface and generating resource configuration data of the three-dimensional game resource according to the configurable surface, the root plane and the spatial relationship, wherein the root plane and the spatial relationship are used for determining an occupied surface of the three-dimensional game resource in a three-dimensional game scene, and the configurable surface is used for representing a configurable position of the game resource based on the three-dimensional game resource.
Optionally, the configuration data generating module is specifically configured to:
acquiring a collinear surface corresponding to the unit surface, wherein the collinear surface comprises a virtual unit surface collinear with any edge of the unit surface;
and acquiring a collinear surface positioned on the unit surface as the reconstructable surface based on the spatial relationship between the unit surface and the collinear surface.
Optionally, the apparatus further comprises:
the virtual surface construction module is used for establishing a virtual three-dimensional grid before the collinear surface corresponding to the unit surface is obtained; and determining the virtual unit faces based on a virtual cube formed by the virtual three-dimensional grid, wherein the virtual unit faces comprise planes formed by six surfaces of the virtual cube and inclined planes formed by edges of the virtual cube, and a plurality of unit faces forming the three-dimensional game resource model are obtained by materializing the corresponding virtual unit faces.
Optionally, the configuration data generating module is specifically configured to:
acquiring a function identifier of the three-dimensional game resource;
and generating resource configuration data of the three-dimensional game resource according to the function identifier, the configurable surface, the root plane and the spatial relationship.
Further, as a specific implementation of the method in fig. 4, an embodiment of the present application provides a game resource construction apparatus, where the apparatus includes:
the system comprises a construction instruction response module, a construction instruction processing module and a game execution module, wherein the construction instruction response module is used for responding to a construction instruction of a target game resource and acquiring a root plane construction position and target resource configuration data corresponding to the target game resource, and the target resource configuration data comprises a target space relation between the root plane corresponding to the target game resource and other unit surfaces;
the occupation surface determining module is used for determining a target occupation surface of the target game resource according to the root plane construction position and the target space relation;
and the game resource construction module is used for reading unit surface construction data of a three-dimensional game scene, and constructing the target game resource in the three-dimensional game scene according to the target occupation surface when the target game resource meets construction conditions based on the unit surface construction data and the target occupation surface.
Optionally, the unit face construction data includes a constructable unit face with construction conditions in the three-dimensional game scene and an already-constructed unit face which is already occupied, the unit face includes a virtual unit face corresponding to a virtual cube in the three-dimensional game scene, and the virtual unit face includes a plane formed by six surfaces of the virtual cube and an inclined plane formed by each side of the virtual cube;
the game resource construction module is further configured to:
after the unit surface construction data of the three-dimensional game scene is read, whether the target occupation surface belongs to the constructed unit surface is judged; and if the unit faces do not belong to the established unit faces, identifying whether the target occupation faces contain the established unit faces or not, and determining that the target game resources meet the establishment conditions when the target occupation faces contain the established unit faces.
Optionally, the target resource configuration data further includes a target playable surface corresponding to the target game resource; the device further comprises:
and the data updating module is used for marking the configurable unit surface corresponding to the target occupation surface in the unit surface construction data as the constructed unit surface after the target game resource is constructed in the three-dimensional game scene according to the target occupation surface, and adding the target configurable unit surface to the unit surface construction data to serve as the configurable unit surface so as to update the unit surface construction data.
Optionally, the data updating module is specifically configured to:
if the target occupied surface is a plane of a virtual cube, marking a constructable unit surface corresponding to the target occupied surface in the unit surface construction data as a constructed unit surface;
and if the target occupied surface is an inclined surface of the virtual cube, marking the inclined surfaces of the virtual cube, in which the target occupied surface is located, in the unit surface construction data as constructed unit surfaces.
Optionally, the target resource configuration data further includes a target function identifier of the target game resource; the device further comprises:
and the function association module is used for reading a target function corresponding to the target game resource according to the target function identification after the target game resource is established in the three-dimensional game scene according to the target occupation surface, and associating the target function to the target game resource.
Optionally, the apparatus further comprises:
the resource binding module is used for acquiring a configurable unit surface corresponding to the target occupation surface as an adjacent unit surface after the target game resource is constructed in the three-dimensional game scene according to the target occupation surface; determining adjacent game resources corresponding to the adjacent unit surfaces in the three-dimensional game scene according to the adjacent unit surfaces; if the adjacent game resources and the target game resources belong to preset associable resources, the target game resources and the adjacent game resources are bound to be associated game resources, wherein the bound game resources can move synchronously in the three-dimensional game scene.
Optionally, the apparatus further comprises:
the function merging module is used for judging whether the target game resource and the adjacent game resource belong to preset mergeable resources or not according to the target function identifier and the adjacent function identifier corresponding to the adjacent game resource after the incidence relation between the target game resource and the adjacent game resource is bound; and if the game resources belong to the preset mergeable resources, acquiring a merge function identifier corresponding to the target function identifier and the adjacent function identifier, and associating a merge function corresponding to the merge function identifier to the associated game resources.
It should be noted that, other corresponding descriptions of the functional units related to the game resource configuration data generation device and the game resource construction device provided in the embodiment of the present application may refer to corresponding descriptions in the methods in fig. 1 to fig. 4, and are not described herein again.
Based on the methods shown in fig. 1 to 4, correspondingly, the present application further provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the method for generating game resource configuration data shown in fig. 1 to 4.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Based on the method shown in fig. 1 to fig. 4 and the virtual device embodiment, in order to achieve the above object, the present application further provides a computer device, which may specifically be a personal computer, a server, a network device, and the like, where the computer device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the generation method of the game resource configuration data and the construction method of the game resource as shown in fig. 1 to 4.
Optionally, the computer device may also include a user interface, a network interface, a camera, Radio Frequency (RF) circuitry, sensors, audio circuitry, a WI-FI module, and so forth. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., a bluetooth interface, WI-FI interface), etc.
It will be appreciated by those skilled in the art that the present embodiment provides a computer device architecture that is not limiting of the computer device, and that may include more or fewer components, or some components in combination, or a different arrangement of components.
The storage medium may further include an operating system and a network communication module. An operating system is a program that manages and maintains the hardware and software resources of a computer device, supporting the operation of information handling programs, as well as other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and other hardware and software in the entity device.
Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and also can obtain a plurality of unit surfaces of a spliced three-dimensional game resource through hardware, select a root plane therein, construct a spatial relationship between the root plane and other unit surfaces, and obtain a constructable surface corresponding to the unit surface of the three-dimensional game resource, thereby constructing resource configuration data of the three-dimensional game resource including the constructable surface, the root plane, and the spatial relationship. The resource configuration data provided by the embodiment of the application not only reduces the data volume of the resource configuration data, but also helps to improve the response speed of the client when the three-dimensional game resources are added in the game scene, and meanwhile, based on the configurable data corresponding to different game resources in the game scene, the method helps to realize quick judgment of whether the three-dimensional game resources can be added, and further improves the game response speed.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (15)

1. A method of generating game resource configuration data, the method comprising:
acquiring modeling data of a three-dimensional game resource, wherein the three-dimensional game resource is obtained by splicing a plurality of unit surfaces, and the modeling data comprises the plurality of unit surfaces forming the three-dimensional game resource;
determining a root plane in the unit surface, and constructing a spatial relationship between the root plane and other unit surfaces;
and acquiring a configurable surface corresponding to the unit surface, and generating resource configuration data of the three-dimensional game resource according to the configurable surface, the root plane and the spatial relationship, wherein the root plane and the spatial relationship are used for determining an occupied surface of the three-dimensional game resource in a three-dimensional game scene, and the configurable surface is used for representing a configurable position of the game resource based on the three-dimensional game resource.
2. The method according to claim 1, wherein the obtaining of the reconstructable surface corresponding to the unit surface specifically includes:
acquiring a collinear surface corresponding to the unit surface, wherein the collinear surface comprises a virtual unit surface collinear with any edge of the unit surface;
and acquiring a collinear surface positioned on the unit surface as the reconstructable surface based on the spatial relationship between the unit surface and the collinear surface.
3. The method of claim 2, wherein before the obtaining the co-line plane corresponding to the cell plane, the method further comprises:
establishing a virtual three-dimensional grid;
and determining the virtual unit faces based on a virtual cube formed by the virtual three-dimensional grid, wherein the virtual unit faces comprise planes formed by six surfaces of the virtual cube and inclined planes formed by edges of the virtual cube, and a plurality of unit faces forming the three-dimensional game resource model are obtained by materializing the corresponding virtual unit faces.
4. The method according to any one of claims 1 to 3, wherein the generating resource configuration data of the three-dimensional game resource according to the constructable surface, the root plane and the spatial relationship specifically comprises:
acquiring a function identifier of the three-dimensional game resource;
and generating resource configuration data of the three-dimensional game resource according to the function identifier, the configurable surface, the root plane and the spatial relationship.
5. A method of building game resources, the method comprising:
responding to a construction instruction of a target game resource, and acquiring a root plane construction position corresponding to the target game resource and target resource configuration data, wherein the target resource configuration data comprises a target space relationship between the root plane corresponding to the target game resource and other unit surfaces;
according to the root plane construction position and the target space relation, determining a target occupation surface of the target game resource;
reading unit face construction data of a three-dimensional game scene, and constructing the target game resource in the three-dimensional game scene according to the target occupation face when the target game resource is judged to meet construction conditions based on the unit face construction data and the target occupation face.
6. The method according to claim 5, wherein the cell face construction data includes a constructable cell face having construction conditions in the three-dimensional game scene and an already-occupied established cell face, the cell face includes a virtual cell face corresponding to a virtual cube in the three-dimensional game scene, the virtual cell face includes a plane formed by six surfaces of the virtual cube and a slope formed by each side of the virtual cube;
after the reading of the unit face construction data of the three-dimensional game scene, the method further comprises:
judging whether the target occupation surface belongs to the established unit surface;
and if the unit faces do not belong to the established unit faces, identifying whether the target occupation faces contain the established unit faces or not, and determining that the target game resources meet the establishment conditions when the target occupation faces contain the established unit faces.
7. The method of claim 6, wherein the target resource configuration data further comprises a target playable surface corresponding to the target game resource; after the target game resource is constructed in the three-dimensional game scene according to the target occupation plane, the method further comprises the following steps:
and marking the constructable unit surface corresponding to the target occupation surface in the unit surface construction data as an established unit surface, and adding the target constructable surface into the unit surface construction data to serve as the constructable unit surface so as to update the unit surface construction data.
8. The method according to claim 7, wherein marking a constructable unit surface corresponding to the target occupation surface in the unit surface construction data as a constructed unit surface specifically includes:
if the target occupied surface is a plane of a virtual cube, marking a constructable unit surface corresponding to the target occupied surface in the unit surface construction data as a constructed unit surface;
and if the target occupied surface is an inclined surface of the virtual cube, marking the inclined surfaces of the virtual cube, in which the target occupied surface is located, in the unit surface construction data as constructed unit surfaces.
9. The method of claim 6, wherein the target resource configuration data further comprises a target function identification of the target game resource; after the target game resource is constructed in the three-dimensional game scene according to the target occupation plane, the method further comprises the following steps:
and reading a target function corresponding to the target game resource according to the target function identification, and associating the target function to the target game resource.
10. The method of claim 9, wherein after the target game resource is constructed in the three-dimensional game scene according to the target footprint, the method further comprises:
acquiring a constructable unit surface corresponding to the target occupation surface as an adjacent unit surface;
determining adjacent game resources corresponding to the adjacent unit surfaces in the three-dimensional game scene according to the adjacent unit surfaces;
if the adjacent game resources and the target game resources belong to preset associable resources, the target game resources and the adjacent game resources are bound to be associated game resources, wherein the bound game resources can move synchronously in the three-dimensional game scene.
11. The method of claim 10, wherein after binding the association relationship between the target game resource and the neighboring game resource, the method further comprises:
judging whether the target game resource and the adjacent game resource belong to preset mergeable resources or not according to the target function identification and the adjacent function identification corresponding to the adjacent game resource;
and if the game resources belong to the preset mergeable resources, acquiring a merge function identifier corresponding to the target function identifier and the adjacent function identifier, and associating a merge function corresponding to the merge function identifier to the associated game resources.
12. An apparatus for generating game resource configuration data, the apparatus comprising:
the modeling data acquisition module is used for acquiring modeling data of three-dimensional game resources, wherein the three-dimensional game resources are obtained by splicing a plurality of unit surfaces, and the modeling data comprises a plurality of unit surfaces forming the three-dimensional game resources;
the spatial relationship construction module is used for determining a root plane in the unit surface and constructing a spatial relationship between the root plane and other unit surfaces;
and the configuration data generation module is used for acquiring a configurable surface corresponding to the unit surface and generating resource configuration data of the three-dimensional game resource according to the configurable surface, the root plane and the spatial relationship, wherein the root plane and the spatial relationship are used for determining an occupied surface of the three-dimensional game resource in a three-dimensional game scene, and the configurable surface is used for representing a configurable position of the game resource based on the three-dimensional game resource.
13. An apparatus for building game resources, the apparatus comprising:
the system comprises a construction instruction response module, a construction instruction processing module and a game execution module, wherein the construction instruction response module is used for responding to a construction instruction of a target game resource and acquiring a root plane construction position and target resource configuration data corresponding to the target game resource, and the target resource configuration data comprises a target space relation between the root plane corresponding to the target game resource and other unit surfaces;
the occupation surface determining module is used for determining a target occupation surface of the target game resource according to the root plane construction position and the target space relation;
and the game resource construction module is used for reading unit surface construction data of a three-dimensional game scene, and constructing the target game resource in the three-dimensional game scene according to the target occupation surface when the target game resource meets construction conditions based on the unit surface construction data and the target occupation surface.
14. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of any of claims 1 to 11.
15. A computer device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 11 when executing the computer program.
CN202111166700.4A 2021-09-30 2021-09-30 Game resource configuration data generation method and game resource construction method Pending CN113900804A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111166700.4A CN113900804A (en) 2021-09-30 2021-09-30 Game resource configuration data generation method and game resource construction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111166700.4A CN113900804A (en) 2021-09-30 2021-09-30 Game resource configuration data generation method and game resource construction method

Publications (1)

Publication Number Publication Date
CN113900804A true CN113900804A (en) 2022-01-07

Family

ID=79190196

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111166700.4A Pending CN113900804A (en) 2021-09-30 2021-09-30 Game resource configuration data generation method and game resource construction method

Country Status (1)

Country Link
CN (1) CN113900804A (en)

Similar Documents

Publication Publication Date Title
JP6783957B2 (en) Virtual resource generation method and device in 3D game scene
US11426661B2 (en) Virtual resource processing method in game scene and apparatus, terminal, and storage-medium
US11517818B2 (en) Processing method, rendering method and device for static component in game scene
JP6783395B2 (en) Information processing methods and devices, storage media, electronic devices
CN111714895B (en) Game data processing method and device, storage medium and computer equipment
CN112023399B (en) Game scene data processing method and device, storage medium and computer equipment
CN111359201B (en) Jigsaw-type game method, system and equipment
WO2023005522A1 (en) Virtual skill control method and apparatus, device, storage medium, and program product
JP2020507847A (en) Object moving method and apparatus, storage medium, and electronic device
CN112973127A (en) Game 3D scene editing method and device
US10744410B2 (en) Storage medium, information processing apparatus, image processing method, and information processing system
CN110716766A (en) Game scene loading method and device, computer readable medium and electronic equipment
CN110801629B (en) Method, device, terminal and medium for displaying virtual object life value prompt graph
KR20230129526A (en) Virtual scenario conversion methods, devices, devices, storage media and program products
CN112827177B (en) Method, device and equipment for generating surface vegetation in virtual environment and storage medium
TWI290062B (en) Image generation apparatus, automatic arrangement method and recording medium
CN110555916B (en) Terrain editing method and device for virtual scene, storage medium and electronic equipment
CN113900804A (en) Game resource configuration data generation method and game resource construction method
KR102603609B1 (en) Method, device, terminal, and storage medium for selecting virtual objects
CN115841535A (en) Method and device for generating sub-scene data and electronic equipment
CN114255312A (en) Processing method and device of vegetation image and electronic equipment
CN111589155B (en) Building component editing method and device, storage medium and electronic equipment
CN108416830A (en) Animation display control method, device, equipment and storage medium
CN114307157A (en) Sound processing method, device, equipment and storage medium in virtual scene
CN112473135A (en) Real-time illumination simulation method, device, equipment and storage medium for mobile game

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination