CN111127612A - Game scene node updating method and device, storage medium and electronic equipment - Google Patents

Game scene node updating method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111127612A
CN111127612A CN201911343864.2A CN201911343864A CN111127612A CN 111127612 A CN111127612 A CN 111127612A CN 201911343864 A CN201911343864 A CN 201911343864A CN 111127612 A CN111127612 A CN 111127612A
Authority
CN
China
Prior art keywords
game scene
bounding box
space bounding
model
node
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
CN201911343864.2A
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.)
Beijing Pixel Software Technology Co Ltd
Original Assignee
Beijing Pixel Software Technology 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 Beijing Pixel Software Technology Co Ltd filed Critical Beijing Pixel Software Technology Co Ltd
Priority to CN201911343864.2A priority Critical patent/CN111127612A/en
Publication of CN111127612A publication Critical patent/CN111127612A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/56Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/77Game security or game management aspects involving data related to game devices or game servers, e.g. configuration data, software version or amount of memory

Abstract

The embodiment of the invention provides a method and a device for updating game scene nodes, a storage medium and electronic equipment, and relates to the field of computer games. The method comprises the following steps: acquiring a local space bounding box of a game scene node; the local space bounding box is the sum of model space bounding boxes of all models of the game scene nodes; judging whether the position information of the game scene node is updated or not; and after the position information of the game scene nodes is updated, calculating the world space bounding boxes of the game scene nodes according to the updated position information and the local space bounding boxes. When the position information of the game scene node is updated, the world space bounding box of the game scene node can be calculated only according to the updated position information and one local space bounding box, and the update of the game scene node is completed. Therefore, when the position information of the game scene nodes is frequently updated, the calculated amount can be greatly reduced, the reduction of the number of game frames can be avoided, and the smooth running of the game is ensured.

Description

Game scene node updating method and device, storage medium and electronic equipment
Technical Field
The invention relates to the field of computer games, in particular to a method and a device for updating game scene nodes, a storage medium and electronic equipment.
Background
At present, people generally face the problems of high working strength, high mental stress and the like, and moderate games can combine people with labor and ease, relieve the mental stress of people, relieve the mood of people and further improve the social productivity.
In the three-dimensional game, one or more models are added under each game scene node to render objects in the three-dimensional game. When the position information of a game scene node is updated (for example, a Non-Player Character (NPC) moves in a three-dimensional game), a world space bounding box of the game scene node needs to be calculated according to the updated position information and all models of the game scene node, so that the update of the game scene node is completed.
However, at present, when the world space bounding box of the game scene node is calculated, the calculation amount is too large, so that the number of game frames is reduced, the game is blocked, great troubles are brought to players, the mental stress of people is not relieved, and the mood of people is relieved.
Disclosure of Invention
The invention aims to provide a method, a device, a storage medium and an electronic device for updating game scene nodes, which can avoid the reduction of the number of game frames and ensure the smooth running of a game.
Embodiments of the invention may be implemented as follows:
in a first aspect, an embodiment provides an updating method of a game scene node, including: acquiring a local space bounding box of a game scene node; the local space bounding box is the sum of model space bounding boxes of all models of the game scene nodes; judging whether the position information of the game scene node is updated or not; and after the position information of the game scene node is updated, calculating the world space bounding box of the game scene node according to the updated position information and the local space bounding box.
In an alternative embodiment, the method further comprises: when a target model is deleted, deleting a model space bounding box of the target model from the local space bounding box; the target model is any one of all models of the game scene nodes.
In an alternative embodiment, the step of removing the model space bounding box of the target model from the local space bounding box comprises: traversing other models except the target model in all models of the game scene nodes; merging the model space bounding box of each other model as the local space bounding box.
In an alternative embodiment, the method further comprises: when an additional model is added to the game scene node, the model space bounding box of the additional model is merged into the local space bounding box.
In an alternative embodiment, the position information includes at least one of coordinate information, orientation information, and zoom information.
In a second aspect, an embodiment provides an apparatus for updating a game scene node, including: the acquisition module is used for acquiring a local space bounding box of a game scene node; the local space bounding box is the sum of model space bounding boxes of all models of the game scene nodes; the judging module is used for judging whether the position information of the game scene nodes is updated or not; and the updating module is used for calculating the world space bounding box of the game scene node according to the updated position information and the local space bounding box after the position information of the game scene node is updated.
In an alternative embodiment, the apparatus further comprises a maintenance module for, when a target model is deleted, deleting a model space bounding box of the target model from the local space bounding box; the target model is any one of all models of the game scene nodes.
In an optional embodiment, the maintenance module is configured to traverse all models of the game scene nodes except the target model; the maintenance module is further configured to merge the model space bounding box of each of the other models as the local space bounding box.
In an alternative embodiment, the apparatus further includes a maintenance module, configured to, when an additional model is added to the game scene node, merge a model space bounding box of the additional model into the local space bounding box.
In an alternative embodiment, the position information includes at least one of coordinate information, orientation information, and zoom information.
In a third aspect, the embodiments provide a computer-readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implementing the method for updating a game scene node according to any one of the foregoing embodiments.
In a fourth aspect, an embodiment provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine readable instructions, when the electronic device runs, the processor and the memory communicate through the bus, and the processor executes the machine readable instructions to execute the method for updating the game scene node according to any one of the foregoing embodiments.
The beneficial effects of the embodiment of the invention include, for example: the local space bounding box is the sum of the model space bounding boxes of all the models of the game scene nodes, in other words, the obtained local space bounding box combines the model space bounding boxes of all the models of the game scene nodes into one local space bounding box, when the position information of the game scene nodes is updated, the world space bounding box of the game scene nodes under the current game scene can be calculated only according to the updated position information and one local space bounding box, and the update of the game scene nodes is completed. Therefore, when the position information of the game scene nodes is frequently updated, the calculated amount of the world space bounding boxes of the game scene nodes can be greatly reduced, the reduction of the number of game frames can be further avoided, and the smooth running of the game is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a schematic diagram of a game scene node A with multiple models attached;
fig. 2 is a block diagram of an electronic device according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of an updating method of a game scene node according to an embodiment of the present application;
fig. 4 is another flowchart of an updating method of a game scene node according to an embodiment of the present disclosure;
FIG. 5 is a diagram of a game scenario with multiple models attached to node B;
fig. 6 is a schematic flowchart of an updating method of a game scene node according to an embodiment of the present application;
FIG. 7 is a functional block diagram of an apparatus for updating game scene nodes according to an embodiment of the present application;
fig. 8 is another functional block diagram of an apparatus for updating a game scene node according to an embodiment of the present application.
Icon: 100-an electronic device; 110-a memory; 120-a processor; 130-a bus; 140-a communication interface; 200-updating means of game scene nodes; 210-an obtaining module; 220-a judgment module; 230-an update module; 240-maintenance module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
First, the terms referred to herein may be explained with reference to the following:
game scene nodes: in a three-dimensional game, a game scene node is a node that manages models to be rendered in a game scene, and contains information such as coordinates, and one or more models may be attached to one game scene node (i.e., one game scene may include one or more models).
A bounding box: in a three-dimensional game, a bounding box represents the size of the space occupied by an object or model, for example, a bounding box may be the smallest cube that happens to enclose an object. When the bounding box is the smallest cube that just surrounds the object, it can be represented by the maximum and minimum coordinates of the eight vertices of the bounding box, i.e. the bounding box can be represented by two coordinates, for example, "(0, 0, 0), (1, 1, 1)" can represent a bounding box with a length, width and height of 1, the maximum coordinate of the bounding box is (1, 1, 1), and the minimum coordinate is (0, 0, 0). Referring to fig. 1, the dashed boxes on model 1 and model 2 can be understood as the smallest cubic bounding boxes.
Model space bounding box: the model space bounding box is a bounding box of the model under its own coordinate system (that is, the model space bounding box does not contain coordinate orientation scaling information in the world space of the game scene), for example, the model space bounding box of a model may be a bounding box with an origin at the volume center of the model and a length, a width and a height of 2, and the coordinate representation of the bounding box may be "(-1, -1, -1), (1, 1)".
World space bounding box: the world space bounding box is a bounding box of a model or a scene node under the world space of a game scene after the model or the scene node is placed in the game scene. The coordinates of the world space bounding box can be calculated from all bounding boxes it contains and its coordinate orientation scaling information in world space. For example, a scene node includes two models, which are model a and model B, where the bounding box of model a is "(0, 0, 0), (1, 1, 1)", the bounding box of model B is "(1, 1, 1), (2, 2, 2)", the world coordinates of the scene node (i.e. the coordinates of the scene node under the world space of the current game scene) is (100, 100, 100), the world space bounding box of model a is "(100 ), (101, 101, 101)", the world space bounding box of model B may be "(101, 101, 101), (102, 102, 102)", and the world space bounding box of the scene node is "(100, 100, 100), (102, 102, 102)".
In the process of implementing the technical solution of the embodiment of the present application, the inventors of the present application find that:
in a three-dimensional game, one or more models are attached to each game scene node to render objects or models in the three-dimensional game (i.e., game scene). When the position information of the game scene node is updated (for example, an NPC moves in a three-dimensional game), the world space bounding box of all models of the game scene node is calculated according to the updated position information (for example, coordinates, orientation, zoom information and the like), and then the world space bounding box of the game scene node is calculated according to the world space bounding boxes of all models, so that the update of the game scene node is completed. After the updating is finished, the world space bounding box of the game scene node can be used for judging whether the game scene node is in the visual field range of the camera (namely the visual field range of the controlled character), and finally the display rendering of the game model is finished.
That is, once the position of the game scene node is updated, the world space bounding boxes of all models of the game scene node are updated once according to the new position information of the game scene node. Specifically, after the position of the game scene node is updated, calculation needs to be performed according to the new position information of the game scene node and the model space bounding box of each model of the game scene node, a world space bounding box of each model of the game scene node in the world space of the current game scene is calculated, and then the world space bounding boxes of all the models are combined to obtain the world space bounding box of the game scene node in the current game scene. For example, if a game scene node includes two models, which are model a and model B, respectively, the bounding box of model a is "(0, 0, 0), (1, 1, 1)", the bounding box of model B is "(1, 1, 1), (2, 2, 2)", and the world coordinates of the scene node is (100, 100, 100), then the world space bounding box of model a is calculated as "(100, 100, 100), (101, 101, 101)", the world space bounding box of model B is calculated as "(101, 101, 101), (102, 102, 102)", and then the world space bounding boxes of the two models are combined to obtain the world space bounding box of the game scene node under the current game scene as "(100, 100, 100), (102, 102, 102)".
If a plurality of game scene nodes exist and each game scene node is added with a plurality of models, a large number of world space bounding boxes of the models need to be calculated when the positions of the game scene nodes are frequently updated, namely, when the position information of the game scene nodes is frequently updated, the world space bounding boxes of all the models are frequently calculated, a large number of calculation resources of a CPU (central processing unit) of equipment are occupied (the calculation amount is too large when the world space bounding boxes of the game scene nodes are calculated), so that the running efficiency of the equipment is reduced, the number of game frames is reduced, game jamming is caused, great troubles are brought to players, the mental stress of people is not relieved, and the mood of people is relieved.
Therefore, in order to improve the above drawbacks, embodiments of the present application provide an updating method and apparatus for a game scene node, a storage medium, and an electronic device, which can avoid reducing the number of game frames and ensure smooth operation of a game. It should be noted that the defects of the solutions in the above prior art are the results obtained after the inventor has made practice and careful study, and therefore, the discovery process of the above problems and the solutions proposed by the embodiments of the present application in the following description should be the contribution of the inventor to the present application in the course of the present application.
Fig. 2 is a block diagram of an electronic device 100 according to an embodiment of the present disclosure. The electronic device 100 may include a memory 110, a processor 120, a bus 130, and a communication interface 140, the memory 110, the processor 120, and the communication interface 140 being electrically connected to each other, directly or indirectly, to enable transmission or interaction of data. For example, the components may be electrically connected to each other via one or more buses 130 or signal lines. Processor 120 may process information and/or data related to the update of the game scene nodes to perform one or more of the functions described herein. For example, the processor 120 may obtain the local space bounding box of the game scene node, and update the game scene node according to the data, thereby implementing the update method of the game scene node provided by the present application.
The Memory 110 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Read Only Memory (EPROM), an electrically Erasable Read Only Memory (EEPROM), and the like.
The processor 120 may be an integrated circuit chip having signal processing capabilities. The processor 120 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
It will be appreciated that the configuration shown in FIG. 2 is merely illustrative and that the electronic device 100 may include more or fewer components than shown in FIG. 2 or may have a different configuration than shown in FIG. 2. The components shown in fig. 2 may be implemented in hardware, software, or a combination thereof. In practical applications, the electronic device 100 provided in the present application includes, but is not limited to: mobile phones, tablet computers, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, Personal Digital Assistants (PDAs), wearable electronic devices, virtual reality devices, servers, and the like.
For convenience of understanding, the following embodiments of the present application will specifically describe, by taking the electronic device 100 shown in fig. 2 as an example, a method for updating a game scene node provided in the embodiments of the present application with reference to the drawings.
Referring to fig. 3, an embodiment of the present application provides a flowchart of a method for updating a game scene node, where the method for updating a game scene node can be applied to the electronic device 100, and the method for updating a game scene node includes the following steps:
s100, obtaining a local space bounding box of a game scene node; the local space bounding box is the sum of the model space bounding boxes of all models of the game scene node.
In some possible embodiments, the above-mentioned local space bounding box may be a bounding box of a model space bounding box that contains all models of the game scene node (i.e. the local space bounding box is the sum of the model space bounding boxes of all models of the game scene node). With reference to fig. 1, it is assumed that two models are added below the game scene node a, where the model space bounding boxes of the model 1 are "(0, 0, 0), (1, 1)", and the model space bounding box of the model 2 is "(1, 1, 1), (2, 2, 2)", and the local space bounding box of the game scene node a is the sum of the model space bounding boxes of the model 1 and the model 2, i.e., "(0, 0), (2, 2)".
It will be appreciated that the above-described local spatial bounding box may not contain location information (e.g., coordinates, orientation, zoom information, etc.) in world space of the game scene.
And S110, judging whether the position information of the game scene node is updated or not.
In some possible embodiments, the position information may include at least one of coordinate information, orientation information, and zoom information, and when there is an update in the at least one of coordinate information, orientation information, and zoom information, it is determined that the position information of the game scene node is updated. And, when the position information of the game scene node is updated, S120 is performed.
And S120, after the position information of the game scene nodes is updated, calculating the world space bounding box of the game scene nodes according to the updated position information and the local space bounding box.
Continuing with the example of the game scene node a shown in fig. 1, assume that two models are added below the game scene node a, where the model space bounding box of the model 1 is "(0, 0, 0), (1, 1, 1)", the model space bounding box of the model 2 is "(1, 1, 1), (2, 2, 2)", and the local space bounding box of the game scene node a at this time is "(0, 0, 0), (2, 2, 2)", and the world coordinates of the scene node are (100, 100, 100). Therefore, when calculating the world space bounding boxes of the game scene nodes, the world space bounding boxes of the model 1 and the model 2 are not calculated, and the world space bounding boxes of the game scene nodes are calculated from the world space bounding boxes of the model 1 and the model 2, but calculated directly from the local space bounding box using the game scene node a and the updated position information, and the world space bounding box of the game scene node a is calculated to be "(100 ), (102, 102, 102)". Therefore, the calculation amount in the updating process of the game scene nodes is greatly reduced by combining the model space bounding boxes of all the models of the game scene nodes into a local space bounding box.
It should be understood that, since the local space bounding box is the sum of the model space bounding boxes of all models of the game scene node, in other words, the obtained local space bounding box has merged the model space bounding boxes of all models of the game scene node into one local space bounding box, when the position information of the game scene node is updated, the world space bounding box of the game scene node in the current game scene can be calculated only according to the updated position information and one local space bounding box, and the update of the game scene node is completed. Therefore, when the position information of the game scene nodes is frequently updated, the calculated amount of the world space bounding boxes of the game scene nodes can be greatly reduced, the reduction of the number of game frames can be further avoided, and the smooth running of the game is ensured.
Further, on the basis of fig. 3, a possible implementation manner of the complete solution is given below, please refer to fig. 4, and fig. 4 shows another flowchart of an updating method of a game scene node provided in an embodiment of the present application.
For how to make the local space bounding box the sum of the model space bounding boxes of all models of the game scene node, the method further comprises:
s130, when the target model is deleted, deleting the model space bounding box of the target model from the local space bounding box; the target model is any one of all models of the game scene nodes.
In some embodiments, taking the game scene node B shown in fig. 5 as an example, it is assumed that three models are added below the game scene node B, where the models are model 1, model 2, and model 3, the model space bounding boxes of model 1 are "(0, 0, 0), (1, 1, 1)", the model space bounding boxes of model 2 are "(1, 1, 1), (2, 2, 2)", the model space bounding boxes of model 3 are "(0, 0, 0), (4, 4, 4)", and at this time, the local space bounding box of the game scene node B is "(0, 0, 0), (4, 4, 4)". When model 1 is deleted, the model space bounding box "(0, 0, 0), (1, 1, 1)" of model 1 may be deleted from "(0, 0, 0), (4, 4, 4)", and the local space bounding box after the model space bounding box of model 1 is deleted is "(0, 0, 0), (4, 4, 4)" according to the merge and delete rule of bounding boxes.
Regarding how to delete the model space bounding box of the target model from the local space bounding box, referring to fig. 6 on the basis of fig. 3, S130 may include:
and S130A, traversing other models except the target model in all models of the game scene nodes.
Continuing with the example of the game scene node B shown in fig. 5, assuming that the model 1 is deleted, the models other than the target model in all the models of the game scene node may be first traversed, that is, the models other than the target model in all the models of the game scene node, including the models 2 and 3, are obtained.
S130B, merging the model space bounding box of each other model as a local space bounding box.
Continuing with the game scenario node B shown in fig. 5 as an example, if the obtained other models include model 2 and model 3, model 2 and model 3 may be merged to obtain a local spatial bounding box of the game scenario node B. Since the model space bounding box of model 2 is "(1, 1, 1), (2, 2, 2)", and the model space bounding box of model 3 is "(0, 0, 0), (4, 4, 4)", the local space bounding box of the game scene node B is "(0, 0, 0), (4, 4, 4)".
For how to make the local space bounding box the sum of the model space bounding boxes of all models of the game scene node, the method further comprises:
and S140, when an additional model is added to the game scene node, combining the model space bounding box of the additional model into the local space bounding box.
Continuing with the game scenario node B shown in fig. 5 as an example, assuming that an additional model is added to the game scenario node B, model 4 (the model space bounding box of model 4 is "(2, 2, 2), (4, 4, 4)"), the model space bounding box of model 4 may be merged into the local space bounding box of the game scenario node B. Since the model space bounding boxes of the model 4 are "(2, 2, 2), (4, 4, 4)", and the local space bounding boxes of the game scene node B are "(0, 0, 0), (4, 4)", the local space bounding boxes after merging the model space bounding boxes of the model 4 are "(0, 0, 0), (4, 4, 4)".
It should be understood that the merge and delete methods provided in the present applications S130, S130A, S130B conform to the merge and delete rules of bounding boxes.
In order to execute the corresponding steps in the foregoing embodiments and various possible manners, an implementation manner of an updating apparatus of a game scene node is given below, please refer to fig. 7, and fig. 7 shows a functional block diagram of the updating apparatus of a game scene node provided in an embodiment of the present application. It should be noted that the basic principle and the generated technical effect of the updating apparatus 200 for a game scene node provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no part of the present embodiment is mentioned, and reference may be made to the corresponding contents in the above embodiments. The game scene node updating apparatus 200 includes: an obtaining module 210, a judging module 220, and an updating module 230.
Alternatively, the modules may be stored in a memory in the form of software or Firmware (Firmware) or be fixed in an Operating System (OS) of the electronic device 100 provided in the present application, and may be executed by a processor in the electronic device 100. Meanwhile, data, codes of programs, and the like required to execute the above modules may be stored in the memory.
The obtaining module 210 may be configured to obtain a local space bounding box of a game scene node; the local space bounding box is the sum of the model space bounding boxes of all models of the game scene node.
It is to be appreciated that acquisition module 210 can be utilized to support electronic device 100 in performing the aforementioned S100, and/or other processes for the techniques described herein.
The determining module 220 may be configured to determine whether the location information of the game scene node is updated.
It is to be appreciated that determination module 220 can be utilized to enable electronic device 100 to perform S110, etc., described above, and/or other processes for the techniques described herein.
The updating module 230 may be configured to, after the position information of the game scene node is updated, calculate a world space bounding box of the game scene node according to the updated position information and the local space bounding box.
It is to be appreciated that update module 230 can be utilized to support electronic device 100 in performing the aforementioned S120, and/or the like, and/or other processes for the techniques described herein.
Regarding how to make the local space bounding box be the sum of the model space bounding boxes of all models of the game scene node, in some possible embodiments, referring to fig. 8 on the basis of fig. 7, the updating apparatus 200 of the game scene node further includes a maintenance module 240, where the maintenance module 240 may be configured to delete the model space bounding box of the target model from the local space bounding box when deleting the target model; the target model is any one of all models of the game scene nodes.
It is to be appreciated that maintenance module 240 may be utilized to support electronic device 100 in performing S130, etc., described above, and/or other processes for the techniques described herein.
For how to delete the model space bounding box of the target model from the local space bounding box, the maintenance module 240 may be configured to traverse all models of the nodes of the game scene except the target model; and a model space bounding box for merging each of the other models as a local space bounding box.
It is to be appreciated that maintenance module 240 may be utilized to support electronic device 100 in performing the aforementioned S130A, S130B, and/or the like, and/or other processes for the techniques described herein.
For how to make the local space bounding box the sum of the model space bounding boxes of all models of the game scene node, the maintenance module 240 may be configured to merge the model space bounding boxes of additional models into the local space bounding box when adding an additional model in the game scene node.
It will be appreciated that maintenance module 240 may be used to support electronic device 100 in performing the above-described S140, S130B, etc., and/or other processes for the techniques described herein.
Based on the foregoing method embodiment, the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the method for updating the game scene node.
Optionally, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, and the like, and when a computer program on the storage medium is executed, the method for updating the game scene nodes can be executed, so as to solve the problems of how to avoid the reduction of the number of game frames and the game pause caused by too large calculation amount when calculating the world space bounding box of the game scene nodes, thereby achieving the effects of avoiding the reduction of the number of game frames and ensuring the smooth operation of the game.
To sum up, an embodiment of the present invention provides a method, an apparatus, a storage medium, and an electronic device for updating a game scene node, where the method includes: acquiring a local space bounding box of a game scene node; the local space bounding box is the sum of model space bounding boxes of all models of the game scene nodes; judging whether the position information of the game scene node is updated or not; and after the position information of the game scene nodes is updated, calculating the world space bounding boxes of the game scene nodes according to the updated position information and the local space bounding boxes. The local space bounding box is the sum of the model space bounding boxes of all the models of the game scene nodes, in other words, the obtained local space bounding box combines the model space bounding boxes of all the models of the game scene nodes into one local space bounding box, when the position information of the game scene nodes is updated, the world space bounding box of the game scene nodes under the current game scene can be calculated only according to the updated position information and one local space bounding box, and the update of the game scene nodes is completed. Therefore, when the position information of the game scene nodes is frequently updated, the calculated amount of the world space bounding boxes of the game scene nodes can be greatly reduced, the reduction of the number of game frames can be further avoided, and the smooth running of the game is ensured.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A method for updating game scene nodes is characterized by comprising the following steps:
acquiring a local space bounding box of a game scene node; the local space bounding box is the sum of model space bounding boxes of all models of the game scene nodes;
judging whether the position information of the game scene node is updated or not;
and after the position information of the game scene node is updated, calculating the world space bounding box of the game scene node according to the updated position information and the local space bounding box.
2. The method of claim 1, further comprising:
when a target model is deleted, deleting a model space bounding box of the target model from the local space bounding box; the target model is any one of all models of the game scene nodes.
3. The method of claim 2, wherein the step of removing the model space bounding box of the target model from the local space bounding box comprises:
traversing other models except the target model in all models of the game scene nodes;
merging the model space bounding box of each other model as the local space bounding box.
4. The method of claim 1, further comprising:
when an additional model is added to the game scene node, the model space bounding box of the additional model is merged into the local space bounding box.
5. The method of claim 1, wherein the position information comprises at least one of coordinate information, orientation information, and zoom information.
6. An apparatus for updating a game scene node, comprising:
the acquisition module is used for acquiring a local space bounding box of a game scene node; the local space bounding box is the sum of model space bounding boxes of all models of the game scene nodes;
the judging module is used for judging whether the position information of the game scene nodes is updated or not;
and the updating module is used for calculating the world space bounding box of the game scene node according to the updated position information and the local space bounding box after the position information of the game scene node is updated.
7. The apparatus of claim 6, further comprising a maintenance module to delete a model space bounding box of a target model from the local space bounding box when the target model is deleted; the target model is any one of all models of the game scene nodes.
8. The apparatus of claim 7, wherein the maintenance module is configured to traverse all models of the nodes of the game scene except the target model;
the maintenance module is further configured to merge the model space bounding box of each of the other models as the local space bounding box.
9. A computer-readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing an update method of a game scenario node according to any one of claims 1 to 5.
10. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine readable instructions which, when the electronic device is operated, communicate with the memory through the bus, the processor executing the machine readable instructions to perform the method of updating a game scenario node of any one of claims 1-5.
CN201911343864.2A 2019-12-24 2019-12-24 Game scene node updating method and device, storage medium and electronic equipment Pending CN111127612A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911343864.2A CN111127612A (en) 2019-12-24 2019-12-24 Game scene node updating method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911343864.2A CN111127612A (en) 2019-12-24 2019-12-24 Game scene node updating method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111127612A true CN111127612A (en) 2020-05-08

Family

ID=70501579

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911343864.2A Pending CN111127612A (en) 2019-12-24 2019-12-24 Game scene node updating method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111127612A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111701246A (en) * 2020-06-17 2020-09-25 网易(杭州)网络有限公司 Game AI decision configuration method and device
CN112686362A (en) * 2020-12-28 2021-04-20 北京像素软件科技股份有限公司 Game space way-finding model training method and device, electronic equipment and storage medium
CN113117327A (en) * 2021-04-12 2021-07-16 网易(杭州)网络有限公司 Augmented reality interaction control method and device, electronic equipment and storage medium
CN113769382A (en) * 2021-09-10 2021-12-10 网易(杭州)网络有限公司 Method, device and equipment for eliminating model in game scene and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109887093A (en) * 2019-01-17 2019-06-14 珠海金山网络游戏科技有限公司 A kind of game level of detail processing method and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109887093A (en) * 2019-01-17 2019-06-14 珠海金山网络游戏科技有限公司 A kind of game level of detail processing method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李朝顺: "基于Unity3D的多用户交互油田仿真培训系统研究" *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111701246A (en) * 2020-06-17 2020-09-25 网易(杭州)网络有限公司 Game AI decision configuration method and device
CN111701246B (en) * 2020-06-17 2024-02-23 网易(杭州)网络有限公司 Decision configuration method and device for game AI
CN112686362A (en) * 2020-12-28 2021-04-20 北京像素软件科技股份有限公司 Game space way-finding model training method and device, electronic equipment and storage medium
CN113117327A (en) * 2021-04-12 2021-07-16 网易(杭州)网络有限公司 Augmented reality interaction control method and device, electronic equipment and storage medium
CN113117327B (en) * 2021-04-12 2024-02-02 网易(杭州)网络有限公司 Augmented reality interaction control method and device, electronic equipment and storage medium
CN113769382A (en) * 2021-09-10 2021-12-10 网易(杭州)网络有限公司 Method, device and equipment for eliminating model in game scene and storage medium

Similar Documents

Publication Publication Date Title
CN111127612A (en) Game scene node updating method and device, storage medium and electronic equipment
CN111815755B (en) Method and device for determining blocked area of virtual object and terminal equipment
US11270497B2 (en) Object loading method and apparatus, storage medium, and electronic device
CN109377542B (en) Three-dimensional model rendering method and device and electronic equipment
CN112650790B (en) Target point cloud plane determining method and device, electronic equipment and storage medium
CN110990516A (en) Map data processing method and device and server
CN113077548B (en) Collision detection method, device, equipment and storage medium for object
CN109308386B (en) Engineering drawing wall body identification method and device and electronic equipment
US20160349964A1 (en) Method and computing device for performing operation on icon cell
CN111068316A (en) Game frame number adjusting method and device, storage medium and electronic equipment
JP7262530B2 (en) Location information generation method, related device and computer program product
AU2016262127B2 (en) Method and system for computer graphics rendering
US20130194275A1 (en) Graph based degree of freedom counter for two dimensional drawings
CN108564637B (en) Geometric model arrangement method and device
CN116109767A (en) Rendering method of three-dimensional scene, image processor, electronic device and storage medium
CN113139891B (en) Image processing method, device, electronic equipment and storage medium
CN109064393B (en) Face special effect processing method and device
CN107038176B (en) Method, device and equipment for rendering web graph page
CN114519762A (en) Model normal processing method and device, storage medium and electronic equipment
CN113256755A (en) Image rendering method, intelligent terminal and storage device
CN113487694B (en) Electronic map rendering method, device, equipment and automatic driving vehicle
CN113051491B (en) Map data processing method, apparatus, storage medium, and program product
CN116309974B (en) Animation scene rendering method, system, electronic equipment and medium
CN114820908B (en) Virtual image generation method and device, electronic equipment and storage medium
CN115761123B (en) Three-dimensional model processing method, three-dimensional model processing device, electronic equipment and storage medium

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