CN-116603242-B - Indoor game level generation method and device, storage medium and electronic equipment
Abstract
The disclosure relates to the technical field of computers, in particular to an indoor game level generating method, an indoor game level generating device, a storage medium and electronic equipment. The indoor game level generating method comprises the steps of obtaining building structure information of a building in a game scene, identifying the building type of the building according to the building structure information, creating an indoor game level of the building based on the building type, configuring loading time and unloading time of the indoor game level based on the indoor game level and the building structure information, traversing all the buildings in the game scene to obtain all the indoor game levels of the game scene and the loading time and the unloading time of the indoor game level, and generating the game level corresponding to the game scene. The indoor game level generation method provided by the disclosure can solve the problem of poor equipment performance caused by game loading.
Inventors
- CHEN SHILV
Assignees
- 网易(杭州)网络有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20230523
Claims (20)
- 1. An indoor game level generation method, characterized in that the method comprises the following steps: acquiring building structure information of a building in a game scene; the method comprises the steps of identifying the building type of a building according to building structure information, and creating an indoor game level of the building based on the building type, wherein the building type is determined to be a closed structure when the building structure information meets a first condition that a building outer elevation is totally closed and the building structure is simple, the building type is determined to be an open structure when the building structure information meets a second condition that the building outer elevation is not closed and the building structure is simple, the building type is determined to be a complex structure when the building structure information does not meet the first condition and does not meet the second condition, and the indoor game level comprises a first type indoor game level and/or a second type indoor game level; Configuring a trigger corresponding to the indoor game level and triggering conditions of the trigger based on the indoor game level and the building structure information to obtain loading time and unloading time of the indoor game level, wherein a first trigger and a first triggering range, a second trigger and a second triggering range are configured for the first type of indoor game level; Traversing all buildings in the game scene to obtain all indoor game stages of the game scene and loading and unloading occasions of the indoor game stages, and generating the game stages corresponding to the game scene.
- 2. The indoor game level generation method of claim 1, wherein when the building type is the closed structure, the creating the indoor game level of the building based on the building type comprises: Creating a first type of indoor game level based on building content of an access floor of the building; and creating a second type of indoor game level based on building content of other layers of the building, wherein the other layers comprise a layer above an access level and/or a layer below the access level of the building.
- 3. The indoor game level generation method of claim 1, wherein when the building type is the open structure, the creating the indoor game level of the building based on the building type comprises: And creating a first type of indoor game level based on building content of other layers of the building, wherein the other layers comprise a layer above an access level and/or a layer below the access level of the building.
- 4. The indoor game level generation method of claim 1, wherein when the building type is the complex structure, the creating the indoor game level of the building based on the building type comprises: splitting the building into simple buildings and/or connecting buildings among the simple buildings, wherein the simple buildings are of closed structures or open structures; creating a first type of indoor game level based on building contents of an entrance layer of a simple building of a closed structure and building contents of other layers of a simple building of an open structure; Creating a second type of indoor game level based on building content of other layers of a simple building of closed structure, and/or Based on the floor building content to which the connection building is connected, a first type of indoor game level is created.
- 5. The indoor game level generation method of claim 1, wherein the trigger is used to load and/or unload the indoor game level upon detecting that the trigger condition is satisfied.
- 6. The method of claim 1, wherein the first trigger is configured to load the indoor game level when a virtual object is detected to enter the first trigger range, and wherein the second trigger is configured to unload the indoor game level when a virtual object is detected to enter the second trigger range.
- 7. The method of claim 1, wherein the third trigger is configured to load the indoor game level when a virtual object is detected to pass through the third trigger range in the forward direction, and to unload the indoor game level when a virtual object is detected to pass through the third trigger range in the reverse direction of the forward direction.
- 8. The method of generating an indoor game level of claim 1, further comprising: Obtaining a visual distance parameter of a virtual object; and configuring that the distance difference between the first position where the virtual object is positioned and the second position where the indoor game stage is positioned is smaller than the visual distance parameter as the loading time.
- 9. The method of generating an indoor game level of claim 1, further comprising: Acquiring a bottom keeping distance parameter of the indoor game level; And configuring that the distance difference between the first position where the virtual object is positioned and the second position where the indoor game stage is positioned is larger than the bottom protection distance parameter as the unloading opportunity.
- 10. A method of operating an indoor gaming level, the method comprising: loading a target in-house game level in a game scene in response to detecting a loading opportunity satisfying the target in-house game level, and Unloading the target indoor game level in response to detecting that an unloading opportunity of the target indoor game level in the game scene is satisfied; The indoor game level comprises a virtual object and a plurality of indoor game levels, wherein each indoor game level is configured with a corresponding trigger and trigger conditions of the corresponding trigger to obtain loading time and unloading time of the indoor game level, the indoor game level is built according to building types of buildings in the game scene, the building types are determined to be of a closed structure when building structure information of the buildings meets a first condition that building facades are fully closed and the building structures are simple, the building types are determined to be of an open structure when the building structure information meets a second condition that the building facades are not closed and the building structures are simple, the building types are determined to be of a complex structure when the building structure information does not meet the first condition and the second condition are not met, the indoor game level comprises a first type of indoor game level and/or a second type of indoor game level, a first trigger and a first trigger range are configured for the second type of indoor game level, and a second trigger range are configured for the second type of indoor game level, and a third trigger range are configured for the second type of indoor game level.
- 11. The method for operating an indoor game level according to claim 10, characterized in that the method further comprises: and judging the loading time and/or unloading time of the target indoor game level when the trigger condition of the trigger corresponding to the target indoor game level is met.
- 12. The method of claim 11, wherein when the building type of the building is a closed structure, the method comprises: Loading building content of an access layer of the building when the virtual object moves in the game scene in response to detecting that the virtual object enters a first trigger range corresponding to a first trigger, and And unloading building contents of an access layer of the building in response to detecting that the virtual object enters a second trigger range corresponding to a second trigger.
- 13. The method for operating an indoor game level according to claim 12, characterized in that the method further comprises: Loading building contents of other layers of the building in response to detecting that the virtual object passes through a third trigger range in a corresponding positive direction of a third trigger after the virtual object enters the building contents of the access layer, or Unloading building content of other floors of the building in response to detecting that the virtual object passes through the third trigger range in a direction opposite the forward direction; Wherein the other layers include an upper layer above the access level and/or a lower layer below the access level of the building.
- 14. The method of claim 11, wherein when the building type of the building is an open structure, the method comprises: when the virtual object moves in the game scene, loading building contents of other layers of the building in response to detecting that the virtual object enters a first trigger range corresponding to a first trigger, or Unloading building contents of other layers of the building in response to detecting that the virtual object enters a second trigger range corresponding to a second trigger; Wherein the other layers include an upper layer above the access level and/or a lower layer below the access level of the building.
- 15. The method for operating an indoor game level according to claim 10, characterized in that the method further comprises: Acquiring a visual distance parameter of the virtual object, a first position where the virtual object is located and a second position where the indoor game stage is located; And when the distance difference between the first position and the second position is smaller than the visual distance parameter, judging that the loading time of the target indoor game stage is met.
- 16. The method for operating an indoor game level according to claim 10, characterized in that the method further comprises: Acquiring a bottom keeping distance parameter of the indoor game stage, a first position where the virtual object is located and a second position where the indoor game stage is located; And judging that the unloading time of the target indoor game level is met when the distance difference between the first position and the second position is larger than the bottom keeping distance parameter.
- 17. An indoor game level generating device, comprising: the acquisition module is used for acquiring building structure information of a building in the game scene; The building system comprises a building structure information module, a building module, an indoor game level, a building type opening structure and an indoor game level, wherein the building structure information module is used for identifying the building type of the building according to the building structure information and creating the indoor game level of the building based on the building type, wherein the building type is determined to be a closed structure when the building structure information meets a first condition that a building outer elevation is fully closed and a building structure is simple, the building type is determined to be an open structure when the building structure information meets a second condition that the building outer elevation is not closed and the building structure is simple, the building type is determined to be a complex structure when the building structure information does not meet the first condition and does not meet the second condition, and the indoor game level comprises the first type indoor game level and/or the second type indoor game level; The configuration module is used for configuring a trigger corresponding to the indoor game level and a trigger condition of the trigger based on the indoor game level and the building structure information to obtain loading time and unloading time of the indoor game level, wherein a first trigger and a first trigger range, a second trigger and a second trigger range are configured for the first type of indoor game level; And the traversing module is used for traversing all buildings in the game scene to obtain all indoor game stages of the game scene and loading and unloading occasions of the indoor game stages, and generating the game stages corresponding to the game scene.
- 18. An indoor game level operation device, comprising: A loading module for loading the target indoor game level in response to detecting the loading time meeting the target indoor game level in the game scene, and The unloading module is used for unloading the target indoor game level in response to detection of the unloading time meeting the target indoor game level in the game scene; The indoor game level comprises a plurality of indoor game levels, each indoor game level is configured with a corresponding trigger and trigger conditions of the corresponding trigger to obtain loading time and unloading time of the indoor game level, the indoor game level is built according to building types of buildings in the game level, when building structure information of the buildings meets first conditions of fully-closed building facades and simple building structures, the building types are determined to be closed structures, when the building structure information meets second conditions of non-closed building facades and simple building structures, the building types are determined to be open structures, when the building structure information does not meet the first conditions and does not meet the second conditions, the building types are determined to be complex structures, the indoor game level comprises first type indoor game level and/or second type indoor game level, first triggers and first trigger ranges and second triggers and second trigger ranges are configured for the first type indoor game level, and third triggers and third trigger directions are configured for the second type indoor game level.
- 19. A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the indoor game level generation method according to any one of claims 1 to 9, or the indoor game level operation method according to any one of claims 10 to 16.
- 20. An electronic device, comprising: One or more processors; Storage means for storing one or more programs that when executed by the one or more processors cause the one or more processors to implement the method of generating an indoor game level as claimed in any one of claims 1 to 9, or the method of operating an indoor game level as claimed in any one of claims 10 to 16.
Description
Indoor game level generation method and device, storage medium and electronic equipment Technical Field The disclosure relates to the technical field of computers, in particular to an indoor game level generating method, an indoor game level generating device, a storage medium and electronic equipment. Background In computer games, after a player enters a game, the player needs to preload out corresponding game scenes according to the indoor game level for use by the player. Because the game scene of the world game is complex, unreasonable setting of the indoor game level may cause more game resources of buildings, trees, vehicles, sculptures and the like corresponding to the indoor game level, and great pressure is brought to the performance of equipment during loading, so that performance problems such as game clamping, mobile phone scalding, game flashing and backing, excessive memory occupation of mobile phones by games and the like occur in the game process, and the game experience of players is poor. It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art. Disclosure of Invention The disclosure provides an indoor game level generating method, an indoor game level generating device, a storage medium and electronic equipment, and aims to solve the problem of poor equipment performance caused by loading an indoor game level with a game. Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure. According to one aspect of the embodiment of the present disclosure, an indoor game level generating method is provided, which includes acquiring building structure information of a building in a game scene, identifying a building type of the building according to the building structure information, creating an indoor game level of the building based on the building type, configuring loading time and unloading time of the indoor game level based on the indoor game level and the building structure information, traversing all buildings in the game scene to obtain all indoor game levels of the game scene and loading time and unloading time of the indoor game level, and generating a game level corresponding to the game scene. According to a second aspect of the embodiment of the present disclosure, there is provided an indoor game level running method, which includes loading a target indoor game level in a game scene in response to detecting that a loading occasion of the target indoor game level in the game scene is satisfied, and unloading the target indoor game level in response to detecting that an unloading occasion of the target indoor game level in the game scene is satisfied, wherein the game scene includes a plurality of indoor game levels, each indoor game level is configured with a corresponding loading occasion and unloading occasion, and the indoor game level is created according to a building type of a building in the game scene. According to a third aspect of the embodiment of the present disclosure, an indoor game level generating device is provided, which includes an acquiring module configured to acquire building structure information of a building in a game scene, a creating module configured to identify a building type of the building according to the building structure information and create an indoor game level of the building based on the building type, a configuring module configured to configure loading time and unloading time of the indoor game level based on the indoor game level and the building structure information, and a traversing module configured to traverse all the buildings in the game scene to obtain all the indoor game levels of the game scene and loading time and unloading time of the indoor game level, and generate a game level corresponding to the game scene. According to a fourth aspect of the embodiment of the present disclosure, there is provided an indoor game level running device, including a loading module configured to load a target indoor game level in a game scene in response to detecting that a loading occasion of the target indoor game level in the game scene is satisfied, and an unloading module configured to unload the target indoor game level in response to detecting that an unloading occasion of the target indoor game level in the game scene is satisfied, wherein the game scene includes a plurality of indoor game levels, each indoor game level is configured with a corresponding loading occasion and unloading occasion, and the indoor game level is created according to a building type of a building in the game scene. According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage me