CN111603774A - Method and device for breaking virtual resources in game - Google Patents

Method and device for breaking virtual resources in game Download PDF

Info

Publication number
CN111603774A
CN111603774A CN202010604381.XA CN202010604381A CN111603774A CN 111603774 A CN111603774 A CN 111603774A CN 202010604381 A CN202010604381 A CN 202010604381A CN 111603774 A CN111603774 A CN 111603774A
Authority
CN
China
Prior art keywords
resource
crushed
resources
fragmented
client
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.)
Granted
Application number
CN202010604381.XA
Other languages
Chinese (zh)
Other versions
CN111603774B (en
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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202010604381.XA priority Critical patent/CN111603774B/en
Publication of CN111603774A publication Critical patent/CN111603774A/en
Application granted granted Critical
Publication of CN111603774B publication Critical patent/CN111603774B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/57Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
    • A63F13/577Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game using determination of contact between game characters or objects, e.g. to avoid collision between virtual racing cars
    • 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/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/64Methods for processing data by generating or executing the game program for computing dynamical parameters of game objects, e.g. motion determination or computation of frictional forces for a virtual car

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for breaking virtual resources in a game. Wherein, the method comprises the following steps: cutting a target virtual resource in a game scene into a plurality of resources to be crushed; obtaining the damage statistical result of each resource to be crushed in the plurality of resources to be crushed by at least one attack source; and when determining that at least one resource to be crushed meets a preset crushing condition based on the injury statistical result, sending a notification message to a client, wherein the notification message is used for notifying the client to call a preset crushing calculation mode to perform crushing operation on the at least one resource to be crushed, and generating a plurality of fragments corresponding to the at least one resource to be crushed. The invention solves the technical problem of traffic resource waste when virtual resources in games are crushed in the prior art.

Description

Method and device for breaking virtual resources in game
Technical Field
The invention relates to the technical field of games, in particular to a method and a device for breaking virtual resources in a game.
Background
With the improvement of game quality requirements of players, particularly during scene interaction, immersive bringing-in experience is brought to the players by the false reality, wherein the breaking reality of scene objects is a bright point of a realistic game.
In the common crushing production scheme in the prior art, a crushing animation is usually provided by art, and the crushing animation is directly played when the crushing is triggered in a game, but the crushing effect in the scheme is fixed and is non-directional. A more real crushing manufacturing scheme in the prior art is a physical crushing scheme, namely, a model manufactured by art is guided into a grid cutting tool, the model is cut into a plurality of small fragments, and the fragments are connected and organized by lines to form a tree. When the breaking is triggered in the game, a breaking algorithm is used for cutting in real time to generate small fragments, then force which is calculated in real time is applied to the small fragments, and finally the fragments run under a physical engine, so that the effect of breaking the fragments is achieved.
However, the fragmentation synchronization method between the server and the client in the prior art includes: however, both string synchronization and event synchronization generate huge traffic, and physical operation itself is unstable, so that physical participation in logical settlement directly affects performance stability.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for crushing virtual resources in a game, which are used for at least solving the technical problem of traffic resource waste when the virtual resources in the game are crushed in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a method for breaking virtual resources in a game, including: cutting a target virtual resource in a game scene into a plurality of resources to be crushed; obtaining the damage statistical result of each resource to be crushed in the plurality of resources to be crushed by at least one attack source; and when determining that at least one resource to be crushed meets a preset crushing condition based on the injury statistical result, sending a notification message to a client, wherein the notification message is used for notifying the client to call a preset crushing calculation mode to perform crushing operation on the at least one resource to be crushed, and generating a plurality of fragments corresponding to the at least one resource to be crushed.
According to another aspect of the embodiments of the present invention, there is also provided a method for breaking virtual resources in a game, including: receiving a notification message from a server, wherein the notification message is used for notifying a client to call a preset fragmentation calculation mode to perform fragmentation operation on at least one resource to be fragmented, and generate a plurality of fragments corresponding to the at least one resource to be fragmented, the at least one resource to be fragmented is a resource which is determined to meet a preset fragmentation condition based on an injury statistical result in the plurality of resources to be fragmented, the plurality of resources to be fragmented are formed by cutting target virtual resources in a game scene, and the injury statistical result is a residual blood volume value of each resource to be fragmented in the plurality of resources to be fragmented from at least one attack source; and responding to the notification message, calling the preset fragmentation calculation mode to perform fragmentation calculation on the at least one resource to be fragmented, and generating the plurality of fragments.
According to another aspect of the embodiments of the present invention, a non-volatile storage medium is further provided, where the non-volatile storage medium includes a stored program, and when the program runs, the device where the non-volatile storage medium is located is controlled to execute any one of the above methods for breaking virtual resources in a game.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program stored in a memory, where the program executes any one of the above methods for breaking virtual resources in a game.
In the embodiment of the invention, the target virtual resources in the game scene are cut into a plurality of resources to be crushed; obtaining the damage statistical result of each resource to be crushed in the plurality of resources to be crushed by at least one attack source; when it is determined that at least one resource to be crushed meets a preset crushing condition based on the injury statistical result, a notification message is sent to the client, wherein the notification message is used for notifying the client to call a preset crushing calculation mode to perform crushing operation on the at least one resource to be crushed, and a plurality of fragments corresponding to the at least one resource to be crushed are generated, so that the purpose of completely decoupling physical crushing and business logic is achieved, the technical effect of reducing flow resources when virtual resources in a game are crushed is achieved, and the technical problem that the flow resources are wasted when the virtual resources in the game are crushed in the prior art is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a method for breaking up virtual resources in a game according to an embodiment of the present invention;
FIG. 2 is a flow chart of an alternative method for breaking up virtual resources in a game in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart of another method for breaking up virtual resources in a game according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a device for breaking virtual resources in a game according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another device for breaking virtual resources in a game according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, 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 only a part of the embodiments of the present invention, and not all of the embodiments. 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 the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for breaking up virtual resources in a game, it being noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 1 is a flowchart of a method for breaking up virtual resources in a game according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, cutting target virtual resources in a game scene into a plurality of resources to be crushed;
step S104, obtaining the injury statistical result of at least one attack source to each resource to be crushed in the plurality of resources to be crushed;
and step S106, when it is determined that at least one resource to be crushed meets a preset crushing condition based on the injury statistical result, sending a notification message to a client, wherein the notification message is used for notifying the client to call a preset crushing calculation mode to perform crushing operation on the at least one resource to be crushed, and generating a plurality of fragments corresponding to the at least one resource to be crushed.
In the embodiment of the invention, the target virtual resources in the game scene are cut into a plurality of resources to be crushed; obtaining the damage statistical result of each resource to be crushed in the plurality of resources to be crushed by at least one attack source; when it is determined that at least one resource to be crushed meets a preset crushing condition based on the injury statistical result, a notification message is sent to the client, wherein the notification message is used for notifying the client to call a preset crushing calculation mode to perform crushing operation on the at least one resource to be crushed, and a plurality of fragments corresponding to the at least one resource to be crushed are generated, so that the purpose of completely decoupling physical crushing and business logic is achieved, the technical effect of reducing flow resources when virtual resources in a game are crushed is achieved, and the technical problem that the flow resources are wasted when the virtual resources in the game are crushed in the prior art is solved.
Optionally, the target virtual resource may be a virtual resource in a game scene such as a wall, a cup, a butterfly, a table, a chair, and the like; as an optional embodiment, a grid cutting tool physxLab may be used to perform model grid cutting on the target virtual resource to obtain a plurality of resources to be crushed. Optionally, the resource to be crushed may be a plurality of resources to be crushed with different sizes.
In an alternative embodiment, the preset fragmentation calculation includes one of the following: realblast fragmentation algorithm, Blast fragmentation algorithm.
In the embodiment of the application, the method for breaking the virtual resources in the game is realized based on a physical engine physx and a Blast breaking algorithm. Specifically, in the embodiment of the application, the game engine layer adopts a mesh cutting tool physxLab to perform model mesh cutting, a Blast breaking algorithm is adopted as a breaking calculation mode, and the physical logic layer adopts an N-grid scheme to perform synchronous design, so that a real physical breaking effect can be achieved, the flow problem between a server and a client can be solved on the basis of complete synchronization, the performance problem existing in large-scale application can be solved, and the performance blockage problem caused by edge events (such as disconnection reconnection, player entry aoi and the like) can be solved.
In the embodiment of the application, the Blast fragmentation algorithm is only focused on the physical fragmentation visual effect, so that the Blast fragmentation algorithm is not involved in any business logic. Cutting a target virtual resource in a game scene into a plurality of resources to be crushed by adopting an N grid scheme; each resource to be crushed has only two states, namely a non-crushing state (intact state) and a crushing state, wherein each resource to be crushed is completely controlled by a server, the number of times each resource to be crushed is struck and the weight of each resource to be crushed can be determined, each resource to be crushed has a preset life value, when the life value of at least one resource to be crushed is smaller than a preset life threshold value, the at least one resource to be crushed is determined to meet the preset crushing condition, a notification message is sent to a client, the client is notified to call a preset crushing calculation mode to perform crushing operation on the at least one resource to be crushed, a plurality of fragments corresponding to the at least one resource to be crushed are generated, and physical crushing and service logic can be completely decoupled in a game scene.
As an optional embodiment, a grid cutting tool physLab may be used to make resources to be broken, cut a target virtual resource in a game scene into N resources to be broken, and respectively derive the N broken resources obtained by cutting. Wherein, each resource to be broken is loaded into an entity in the game scene, and the entity can be completely broken.
In the embodiment of the application, through performing damage settlement in a game logic layer, that is, obtaining a damage statistical result of at least one attack source on each resource to be broken in the plurality of resources to be broken, if it is determined that at least one resource to be broken meets a preset breaking condition based on the damage statistical result, notifying the client to call a preset breaking calculation mode to perform a breaking operation on the at least one resource to be broken, and generating a plurality of fragments corresponding to the at least one resource to be broken.
Optionally, in this embodiment of the application, the server may encode the N fragmented resources obtained by cutting, for example, the number may be increased from the bottom layer number 1 to the upper layer number N by default. It should be noted that each resource to be fragmented can be controlled by the plan filling table to set the life threshold. In a game scene, a series of attack sources are defined, and different attack sources cause different damages to resources to be broken, but in the embodiment of the application, the resources are not directly handed to a Blast breaking algorithm to execute breaking settlement, but handed to an upper logic layer to execute breaking settlement.
In an alternative embodiment, fig. 2 is a flowchart of an alternative method for breaking virtual resources in a game according to an embodiment of the present invention, and as shown in fig. 2, determining that at least one resource to be broken meets a preset breaking condition based on the injury statistical result includes:
step S202, determining a life value of at least one resource to be crushed based on the injury statistical result;
step S204, comparing the life value with a preset life threshold value;
step S206, if the comparison result indicates that the life value is smaller than the preset life threshold, determining that the at least one resource to be crushed meets the preset crushing condition.
In an alternative embodiment, the status of each resource to be fragmented includes: a crushed state and a sound state; before sending the notification message to the client, the method further includes: and changing the state of the at least one resource to be crushed from the intact state to the crushing state.
In another optional embodiment, the sending the notification message to the client includes: and sending the crushing state of the at least one resource to be crushed to the client.
As an alternative embodiment, the server has a dictionary of all the resources to be fragmented in each target virtual resource, where the key value in the dictionary is the number of the resource to be fragmented, and the value is the remaining blood volume value of the resource to be fragmented. And the server controls the resource to be crushed to have only two states: one is a crushing state (e.g., a fully crushed state), one is a sound state, there are no intermediate states, so fully synchronized crushing can be achieved between the server and the client while crushing the object.
In addition, because a state synchronization mode is adopted between the server and the client, huge flow and memory consumption of the server generated when the server and the client are in synchronization physical fragmentation do not need to be worried about. Because the state synchronization is adopted, the server only needs to synchronize the state of whether the resource to be crushed is crushed to the client, and therefore the server does not need to maintain the event cache queue.
Optionally, the preset life threshold may be 0, when the life value of the resource to be fragmented is smaller than the preset life threshold 0, the server determines that the resource to be fragmented is in a fragmentation state, notifies all clients of the fragmentation state of the resource to be fragmented by sending a notification message, and the clients invoke a preset fragmentation calculation method to perform fragmentation operation on the resource to be fragmented, so as to generate a plurality of fragments corresponding to the resource to be fragmented. Namely, an infinite damage is executed on the resource to be crushed through a blast crushing algorithm, so that the resource is completely crushed.
It should be noted that, in the embodiment of the present application, each resource to be fragmented may be defined by a plan, and when the damage degree of the resource to be fragmented reaches a certain threshold, the resource to be fragmented may be fragmented as a whole immediately.
In an optional embodiment, the method further includes:
step S302, detecting whether a plurality of target virtual resources exist in the game scene at the same time;
step S304, when it is detected that a plurality of target virtual resources exist in the game scene at the same time, synchronizing status data of all to-be-broken resources of the target virtual resources to a client, wherein the client determines whether to locally generate the to-be-broken resources correspondingly according to the status data.
In the optional embodiment, by detecting whether a plurality of target virtual resources exist in a game scene at the same time, and synchronizing status data of all to-be-broken resources of the target virtual resources to a client when the plurality of target virtual resources exist at the same time, the client determines whether to locally and correspondingly generate the to-be-broken resources according to the status data.
For example, when a large number of target virtual resources suddenly enter aoi in a game scene, the server may synchronize state data of all resources to be broken that the target virtual resources possess to the client, and the client determines whether to locally generate corresponding resources to be broken according to the state data, and if the resources to be broken are in a good state, the client directly locally generates corresponding resources to be broken, and if the resources to be broken are in a completely broken state, the client does not need to locally generate corresponding resources to be broken. With the alternative embodiments provided herein, the problem of stutter due to a broken reconnection or player entry aoi is avoided.
In an optional embodiment, before sending the notification message to the client, the method further includes: when a trigger instruction is received, the resources to be broken are loaded, resource consumption of a large number of physical operations can be reduced, large-scale broken objects in a game scene are completely the same as common objects before being broken, and the problem that the frame rate is too low due to too high load of the game scene can be solved.
In the embodiment of the application, the purpose of large-scale application of the physical fragmentation scheme in a game scene can be achieved through performance optimization, for example, only a common physical file is loaded at first before a notification message is sent to a client, and the resource to be fragmented is loaded when a trigger instruction is received; the shot storyboard can be closed, the updating of the entity is shielded, and the graph is not used; and can also be controlled from the aspect of art, such as controlling the quantity of fragments.
In an optional embodiment, after sending the notification message to the client, some performance optimization may also be performed, for example, the multiple fragments are recycled, otherwise, memory consumption is increasing, and the multiple fragments may also be dynamically recycled through one fragment pool; as an optional embodiment, the method can also enable the art to produce low-surface-number fragments, combine a part of high-quality fragments to combine with special-effect covering, achieve a good physical crushing effect, and save a large amount of memory overhead and physical operation overhead; as another alternative, the shards strictly disable callbacks, avoiding harming the player due to shard callbacks.
In accordance with an embodiment of the present invention, there is provided another embodiment of a method for breaking up virtual resources in a game, where the steps illustrated in the flowchart of the figure may be performed in a computer system, such as a set of computer-executable instructions, and where a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that presented herein.
Fig. 3 is a flowchart of another method for breaking up virtual resources in a game according to an embodiment of the present invention, as shown in fig. 3, the method includes the following steps:
step S402, receiving a notification message from a server, wherein the notification message is used for notifying a client to call a preset fragmentation calculation mode to perform fragmentation operation on at least one resource to be fragmented, and generate a plurality of fragments corresponding to the at least one resource to be fragmented, the at least one resource to be fragmented is a resource which is determined to meet a preset fragmentation condition based on an injury statistical result in the plurality of resources to be fragmented, the plurality of resources to be fragmented are formed by cutting target virtual resources in a game scene, and the injury statistical result is a residual blood volume value of each resource to be fragmented in the plurality of resources to be fragmented from at least one attack source;
step S404, in response to the notification message, invoking the preset fragmentation calculation mode to perform fragmentation operation on the at least one resource to be fragmented, and generating the plurality of fragments.
In the embodiment of the present invention, a notification message from a server is received, where the notification message is used to notify a client to invoke a preset fragmentation calculation method to perform a fragmentation operation on at least one resource to be fragmented, so as to generate a plurality of fragments corresponding to the at least one resource to be fragmented, where the at least one resource to be fragmented is a resource that satisfies a preset fragmentation condition and is determined based on an injury statistical result in the plurality of resources to be fragmented, the plurality of resources to be fragmented are obtained by cutting a target virtual resource in a game scene, and the injury statistical result is a remaining blood volume value of at least one attack source to each resource to be fragmented in the plurality of resources to be fragmented; and responding to the notification message, calling the preset fragmentation calculation mode to perform fragmentation operation on the at least one resource to be fragmented, and generating the plurality of fragments, so that the purpose of completely decoupling physical fragmentation and business logic is achieved, the technical effect of reducing flow resources when the virtual resources in the game are fragmented is achieved, and the technical problem that the flow resources are wasted when the virtual resources in the game are fragmented in the prior art is solved.
Optionally, the target virtual resource may be a virtual resource in a game scene such as a wall, a cup, a butterfly, a table, a chair, and the like; as an optional embodiment, the server may perform model grid cutting on the target virtual resource by using a grid cutting tool physxLab to obtain a plurality of resources to be crushed. Optionally, the resource to be crushed may be a plurality of resources to be crushed with different sizes.
In an alternative embodiment, the preset fragmentation calculation includes one of the following: realblast fragmentation algorithm, Blast fragmentation algorithm.
In the embodiment of the application, the method for breaking the virtual resources in the game is realized based on a physical engine physx and a Blast breaking algorithm. Specifically, in the embodiment of the application, the game engine layer adopts a mesh cutting tool physxLab to perform model mesh cutting, a Blast breaking algorithm is adopted as a breaking calculation mode, and the physical logic layer adopts an N-grid scheme to perform synchronous design, so that a real physical breaking effect can be achieved, the flow problem between a server and a client can be solved on the basis of complete synchronization, the performance problem existing in large-scale application can be solved, and the performance blockage problem caused by edge events (such as disconnection reconnection, player entry aoi and the like) can be solved.
In the embodiment of the application, the Blast fragmentation algorithm is only focused on the physical fragmentation visual effect, so that the Blast fragmentation algorithm is not involved in any business logic. Cutting a target virtual resource in a game scene into a plurality of resources to be crushed by adopting an N grid scheme; each resource to be crushed has only two states, namely a non-crushing state (intact state) and a crushing state, wherein each resource to be crushed is completely controlled by a server, the number of times each resource to be crushed is struck and the weight of each resource to be crushed can be determined, each resource to be crushed has a preset life value, when the life value of at least one resource to be crushed is smaller than a preset life threshold value, the at least one resource to be crushed is determined to meet the preset crushing condition, a notification message is sent to a client, the client is notified to call a preset crushing calculation mode to perform crushing operation on the at least one resource to be crushed, a plurality of fragments corresponding to the at least one resource to be crushed are generated, and physical crushing and service logic can be completely decoupled in a game scene.
As an optional embodiment, the server may use a grid cutting tool physLab to make resources to be broken, cut the target virtual resources in the game scene into N resources to be broken, and respectively export the N broken resources obtained by the cutting. Wherein, each resource to be broken is loaded into an entity in the game scene, and the entity can be completely broken.
In the embodiment of the application, injury settlement is performed in a game logic layer, that is, an injury statistical result of at least one attack source on each resource to be fragmented in the multiple resources to be fragmented is obtained, if it is determined that at least one resource to be fragmented meets a preset fragmentation condition based on the injury statistical result, a notification message is sent to a client, and the client responds to the notification message and invokes a preset fragmentation calculation mode to perform fragmentation operation on the at least one resource to be fragmented, so as to generate multiple fragments corresponding to the at least one resource to be fragmented.
Optionally, in this embodiment of the application, the server may further encode the N fragmented resources obtained by cutting, for example, the number may be increased from the bottom layer number 1 to the upper layer number N by default.
It should be noted that each resource to be fragmented can be controlled by the plan filling table to set the life threshold. In a game scene, a series of attack sources are defined, and different attack sources cause different damages to resources to be broken, but in the embodiment of the application, the resources are not directly handed to a Blast breaking algorithm to execute breaking settlement, but handed to an upper logic layer to execute breaking settlement.
According to an embodiment of the present invention, an embodiment of an apparatus for implementing the method for breaking virtual resources in a game is further provided, and fig. 4 is a schematic structural diagram of a device for breaking virtual resources in a game according to an embodiment of the present invention, as shown in fig. 4, the device for breaking virtual resources in a game includes: a cutting module 40, an acquisition module 42, and a notification module 44, wherein:
the cutting module 40 is used for cutting the target virtual resources in the game scene into a plurality of resources to be crushed; an obtaining module 42, configured to obtain an injury statistical result of each resource to be fragmented in the multiple resources to be fragmented, where the at least one attack source is located; a notification module 44, configured to send a notification message to a client when it is determined that at least one resource to be fragmented meets a preset fragmentation condition based on the injury statistical result, where the notification message is used to notify the client to invoke a preset fragmentation calculation manner to perform a fragmentation operation on the at least one resource to be fragmented, so as to generate a plurality of fragments corresponding to the at least one resource to be fragmented.
It should be noted that the above modules may be implemented by software or hardware, for example, for the latter, the following may be implemented: the modules can be located in the same processor; alternatively, the modules may be located in different processors in any combination.
It should be noted here that the cutting module 40, the obtaining module 42 and the notifying module 44 correspond to steps S102 to S106 in embodiment 1, and the modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of embodiment 1. It should be noted that the modules described above may be implemented in a computer terminal as part of an apparatus.
According to an embodiment of the present invention, another embodiment of an apparatus for implementing the method for breaking virtual resources in a game is further provided, fig. 5 is a schematic structural diagram of another apparatus for breaking virtual resources in a game according to an embodiment of the present invention, and as shown in fig. 5, the apparatus for breaking virtual resources in a game includes: a receiving module 50 and a calling module 52, wherein:
a receiving module 50, configured to receive a notification message from a server, where the notification message is used to notify a client to invoke a preset fragmentation calculation manner to perform a fragmentation operation on at least one resource to be fragmented, so as to generate a plurality of fragments corresponding to the at least one resource to be fragmented, where the at least one resource to be fragmented is a resource that satisfies a preset fragmentation condition and is determined based on an injury statistical result in the plurality of resources to be fragmented, the plurality of resources to be fragmented are obtained by cutting a target virtual resource in a game scene, and the injury statistical result is a remaining blood volume value of at least one attack source to each resource to be fragmented in the plurality of resources to be fragmented; the invoking module 52 is configured to invoke the preset fragmentation calculation manner to perform fragmentation operation on the at least one resource to be fragmented in response to the notification message, so as to generate the plurality of fragments.
It should be noted that, for alternative or preferred embodiments of the present embodiment, reference may be made to the description in the foregoing method embodiments, and details are not described herein again.
The device for breaking virtual resources in a game may further include a processor and a memory, where the cutting module 40, the obtaining module 42, the notifying module 44, and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor comprises a kernel, and the kernel calls a corresponding program unit from the memory, wherein one or more than one kernel can be arranged. The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
According to the embodiment of the application, the embodiment of the storage medium is also provided. Optionally, in this embodiment, the storage medium includes a stored program, and when the program runs, the device on which the storage medium is located is controlled to execute the method for breaking the virtual resource in any game.
Optionally, in this embodiment, the storage medium may be located in any one of a group of computer terminals in a computer network, or in any one of a group of mobile terminals, and the storage medium includes a stored program.
Optionally, the program controls the device on which the storage medium is located to perform the following functions when running: cutting a target virtual resource in a game scene into a plurality of resources to be crushed; obtaining the damage statistical result of each resource to be crushed in the plurality of resources to be crushed by at least one attack source; and when determining that at least one resource to be crushed meets a preset crushing condition based on the injury statistical result, sending a notification message to a client, wherein the notification message is used for notifying the client to call a preset crushing calculation mode to perform crushing operation on the at least one resource to be crushed, and generating a plurality of fragments corresponding to the at least one resource to be crushed.
According to the embodiment of the application, the embodiment of the processor is also provided. Optionally, in this embodiment, the processor is configured to run a program, where the program is run to execute the method for breaking virtual resources in any game.
The embodiment of the application provides equipment, the equipment comprises a processor, a memory and a program which is stored on the memory and can run on the processor, and the following steps are realized when the processor executes the program: cutting a target virtual resource in a game scene into a plurality of resources to be crushed; obtaining the damage statistical result of each resource to be crushed in the plurality of resources to be crushed by at least one attack source; and when determining that at least one resource to be crushed meets a preset crushing condition based on the injury statistical result, sending a notification message to a client, wherein the notification message is used for notifying the client to call a preset crushing calculation mode to perform crushing operation on the at least one resource to be crushed, and generating a plurality of fragments corresponding to the at least one resource to be crushed.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: cutting a target virtual resource in a game scene into a plurality of resources to be crushed; obtaining the damage statistical result of each resource to be crushed in the plurality of resources to be crushed by at least one attack source; and when determining that at least one resource to be crushed meets a preset crushing condition based on the injury statistical result, sending a notification message to a client, wherein the notification message is used for notifying the client to call a preset crushing calculation mode to perform crushing operation on the at least one resource to be crushed, and generating a plurality of fragments corresponding to the at least one resource to be crushed.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for breaking virtual resources in a game is characterized by comprising the following steps:
cutting a target virtual resource in a game scene into a plurality of resources to be crushed;
obtaining the damage statistical result of each resource to be crushed in the plurality of resources to be crushed by at least one attack source;
and when determining that at least one resource to be crushed meets a preset crushing condition based on the injury statistical result, sending a notification message to a client, wherein the notification message is used for notifying the client to call a preset crushing calculation mode to perform crushing operation on the at least one resource to be crushed, and generating a plurality of fragments corresponding to the at least one resource to be crushed.
2. The method of claim 1, wherein the status of each resource to be fragmented comprises: a crushed state and a sound state;
before sending the notification message to the client, the method further comprises: changing the state of the at least one resource to be crushed from the intact state to the crushed state;
the sending the notification message to the client includes: sending the fragmentation status of the at least one resource to be fragmented to the client.
3. The method of claim 1, wherein determining that at least one resource to be crushed satisfies a preset crushing condition based on the injury statistic comprises:
determining a life value of at least one resource to be crushed based on the injury statistics;
comparing the life value with a preset life threshold value;
and if the comparison result indicates that the life value is smaller than the preset life threshold value, determining that the at least one resource to be crushed meets the preset crushing condition.
4. The method of claim 1, further comprising:
detecting whether a plurality of target virtual resources exist in the game scene at the same time;
and when detecting that a plurality of target virtual resources exist in the game scene at the same time, synchronizing the state data of all the resources to be broken of the target virtual resources to a client, wherein the client determines whether the resources to be broken are generated locally and correspondingly according to the state data.
5. The method of claim 1, wherein prior to sending the notification message to the client, the method further comprises: and loading the resource to be crushed when a trigger instruction is received.
6. The method of claim 1, wherein after sending the notification message to the client, the method further comprises: and recovering the plurality of fragments.
7. The method of claim 1, wherein the predetermined fragmentation calculation comprises one of: realblast fragmentation algorithm, Blast fragmentation algorithm.
8. A method for breaking virtual resources in a game is characterized by comprising the following steps:
receiving a notification message from a server, wherein the notification message is used for notifying a client to call a preset fragmentation calculation mode to perform fragmentation operation on at least one resource to be fragmented, and generate a plurality of fragments corresponding to the at least one resource to be fragmented, the at least one resource to be fragmented is a resource which is determined to meet a preset fragmentation condition based on an injury statistical result in the plurality of resources to be fragmented, the plurality of resources to be fragmented are formed by cutting target virtual resources in a game scene, and the injury statistical result is a residual blood volume value of each resource to be fragmented in the plurality of resources to be fragmented from at least one attack source;
and responding to the notification message, calling the preset fragmentation calculation mode to perform fragmentation operation on the at least one resource to be fragmented, and generating the plurality of fragments.
9. A non-volatile storage medium, comprising a stored program, wherein when the program runs, a device in which the non-volatile storage medium is located is controlled to execute the method for breaking virtual resources in a game according to any one of claims 1 to 8.
10. A processor for executing a program stored in a memory, wherein the program when executed performs the method for breaking virtual resources in a game according to any one of claims 1 to 8.
CN202010604381.XA 2020-06-29 2020-06-29 Method and device for crushing virtual resources in game Active CN111603774B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010604381.XA CN111603774B (en) 2020-06-29 2020-06-29 Method and device for crushing virtual resources in game

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010604381.XA CN111603774B (en) 2020-06-29 2020-06-29 Method and device for crushing virtual resources in game

Publications (2)

Publication Number Publication Date
CN111603774A true CN111603774A (en) 2020-09-01
CN111603774B CN111603774B (en) 2023-09-26

Family

ID=72202561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010604381.XA Active CN111603774B (en) 2020-06-29 2020-06-29 Method and device for crushing virtual resources in game

Country Status (1)

Country Link
CN (1) CN111603774B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113694522A (en) * 2021-08-27 2021-11-26 上海米哈游璃月科技有限公司 Method and device for processing crushing effect, storage medium and electronic equipment
CN113936079A (en) * 2021-09-17 2022-01-14 完美世界(北京)软件科技发展有限公司 Animation generation method, animation generation device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170070842A1 (en) * 2014-01-24 2017-03-09 Schneider Electric USA, Inc. Dynamic adaptable environment resource management controller apparatuses, methods and systems
CN108525296A (en) * 2018-04-24 2018-09-14 网易(杭州)网络有限公司 Information processing method, device in reality-virtualizing game and processor
CN108579085A (en) * 2018-03-12 2018-09-28 腾讯科技(深圳)有限公司 Treating method and apparatus, storage medium and the electronic device of barrier collision
CN110992453A (en) * 2019-12-17 2020-04-10 上海米哈游天命科技有限公司 Scene object display method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170070842A1 (en) * 2014-01-24 2017-03-09 Schneider Electric USA, Inc. Dynamic adaptable environment resource management controller apparatuses, methods and systems
CN108579085A (en) * 2018-03-12 2018-09-28 腾讯科技(深圳)有限公司 Treating method and apparatus, storage medium and the electronic device of barrier collision
CN108525296A (en) * 2018-04-24 2018-09-14 网易(杭州)网络有限公司 Information processing method, device in reality-virtualizing game and processor
CN110992453A (en) * 2019-12-17 2020-04-10 上海米哈游天命科技有限公司 Scene object display method and device, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113694522A (en) * 2021-08-27 2021-11-26 上海米哈游璃月科技有限公司 Method and device for processing crushing effect, storage medium and electronic equipment
CN113694522B (en) * 2021-08-27 2023-10-24 上海米哈游璃月科技有限公司 Method and device for processing crushing effect, storage medium and electronic equipment
CN113936079A (en) * 2021-09-17 2022-01-14 完美世界(北京)软件科技发展有限公司 Animation generation method, animation generation device and storage medium

Also Published As

Publication number Publication date
CN111603774B (en) 2023-09-26

Similar Documents

Publication Publication Date Title
US11216313B2 (en) Method and apparatus for processing resource request
CN105677477B (en) Method and device for optimizing application program resources and electronic equipment
CN111603774A (en) Method and device for breaking virtual resources in game
CN105763602A (en) Data request processing method, server and cloud interactive system
CN109343902B (en) Audio processing assembly operation method and device, terminal and storage medium
WO2019042294A1 (en) Resource allocation method and related product
US20230326115A1 (en) Bullet screen comment display method and apparatus, bullet screen comment sending method and apparatus, computer device, computer-readable storage medium, and computer program product
CN104965695B (en) The method and apparatus of analog subscriber real-time operation
CN107154068B (en) A kind of animation producing method, device, client and computer readable storage medium
US9098339B2 (en) Predictive cloud-based presimulation
CN104243285A (en) Message pushing method and server
CN106131241B (en) A kind of method for connecting network, device and mobile terminal
CN106412631A (en) Video playing method and device
CN104009969A (en) Communication method for network game systems
US10111207B2 (en) Network device, terminal device, and voice service control method
CN110308951A (en) A kind of processing method and processing device of startup interface Caton, equipment, storage medium
CN113440839A (en) Method, device, equipment and storage medium for controlling non-player game role
CN105554712B (en) A kind of SMS processing method and user terminal
CN109718543B (en) Same-screen processing method and device
KR20180102605A (en) Image drawing methods, associated devices and systems
WO2022022281A1 (en) Game data processing method and apparatus, and computer and readable storage medium
CN113694521A (en) Injury processing method, apparatus, electronic device and storage medium
CN106407098A (en) Application program state monitoring method and device
CN112399515A (en) Communication processing method and device
JP6567032B2 (en) Multiple stream content presentation

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
GR01 Patent grant
GR01 Patent grant