CN115350477A - Game sound effect playing method and device, storage medium and electronic equipment - Google Patents

Game sound effect playing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115350477A
CN115350477A CN202210977552.2A CN202210977552A CN115350477A CN 115350477 A CN115350477 A CN 115350477A CN 202210977552 A CN202210977552 A CN 202210977552A CN 115350477 A CN115350477 A CN 115350477A
Authority
CN
China
Prior art keywords
special effect
target
resource
target special
sounding body
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
CN202210977552.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 Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network 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 Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202210977552.2A priority Critical patent/CN115350477A/en
Publication of CN115350477A publication Critical patent/CN115350477A/en
Pending legal-status Critical Current

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/50Controlling the output signals based on the game progress
    • A63F13/54Controlling the output signals based on the game progress involving acoustic signals, e.g. for simulating revolutions per minute [RPM] dependent engine sounds in a driving game or reverberation against a virtual wall
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Pinball Game Machines (AREA)

Abstract

The method determines a target special effect resource, and determines a target position of a sound generating body according to a special effect release progress of the target special effect resource in a process of releasing the target special effect resource so as to control the sound generating body to play a corresponding sound effect at the target position. The position of the target special effect resource is decoupled from the position of the sounding body, the target position of the sounding body is accurately determined under different special effect release schedules, the sound effect can be played at the correct position, and the immersion and reality of the game sound effect are improved.

Description

Game sound effect playing method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for playing game sound effects, a storage medium, and an electronic device.
Background
The game sound effect is an indispensable component in the game, can provide necessary event feedback for the game, and can also increase the immersion feeling of the game. Therefore, ensuring that the game sound effect can be played correctly becomes one of the more and more important research directions.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a method for playing a game sound effect, including:
responding to a special effect release instruction, and determining target special effect resources, wherein the target special effect resources are hidden at the initial position of the virtual scene when not released;
releasing the target special-effect resource, and determining the target position of a sounding body corresponding to the target special-effect resource according to the special-effect release progress of the target special-effect resource;
and controlling the sounding body to play the sound effect corresponding to the target special effect resource at the target position.
Optionally, the determining, according to the special effect release progress of the target special effect resource, a target position of a sounding body corresponding to the target special effect resource includes:
under the condition that the special effect release progress indicates that the target special effect resource is switched from a hidden state to a visible state, a sounding body of the target special effect resource is created at a special effect release position of the target special effect resource, and the special effect release position is used as a target position of the sounding body.
Optionally, the determining, according to the special effect release progress of the target special effect resource, a target position of a sounding body corresponding to the target special effect resource includes:
and under the condition that the special effect release progress indicates that the target special effect resource is in a visible state, determining the real-time position of the target special effect resource as the target position of the sounding body.
Optionally, the determining a real-time position of the target special effect resource as a target position of the sounding body includes:
and determining the real-time position of the target special effect resource as the target position of the sounding body according to a preset synchronous frequency.
Optionally, the determining, according to the special effect release progress of the target special effect resource, a target position of a sounding body corresponding to the target special effect resource includes:
and under the condition that the special effect release progress represents that the target special effect resource is released at the end, determining the release-ending position of the target special effect resource as the target position of the sounding body.
Optionally, the controlling the sounding body to play the sound effect corresponding to the target special effect resource at the target position includes:
moving the sounding body to the target position in response to a sound playing instruction;
and controlling the sounding body to play the sound effect corresponding to the target special effect resource.
Optionally, the method further comprises:
and under the condition that the sound effect corresponding to the target special effect resource is played, destroying the sounding body.
In a second aspect, the present disclosure provides a game sound effect playing device, including:
the determining module is configured to respond to a special effect releasing instruction and determine target special effect resources, wherein the target special effect resources are hidden at the initial position of the virtual scene when not released;
the release module is configured to release the target special effect resource and determine a target position of a sounding body corresponding to the target special effect resource according to the special effect release progress of the target special effect resource;
and the playing module is configured to control the sounding body to play the sound effect corresponding to the target special-effect resource at the target position.
In a third aspect, the present disclosure provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processing device, implements the steps of the game sound effect playing method of the first aspect.
In a fourth aspect, the present disclosure provides an electronic device comprising:
a storage device having a computer program stored thereon;
a processing device for executing the computer program in the storage device to realize the steps of the game sound effect playing method of the first aspect.
Based on the technical scheme, the target special effect resource is determined, and in the process of releasing the target special effect resource, the target position of the sounding body is determined according to the special effect release progress of the target special effect resource, so that the sounding body is controlled to play the corresponding sound effect at the target position. The positions of the target special effect resources and the positions of the sounding bodies are decoupled, the target positions of the sounding bodies are accurately determined under different special effect release schedules, the sound effect can be played at the correct position, and the immersion and reality of the game sound effect are improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale. In the drawings:
FIG. 1 is a flow diagram illustrating a method for game sound effect playback according to some embodiments.
Fig. 2 is a schematic diagram illustrating the release of target special effects resources, according to some embodiments.
FIG. 3 is a block diagram of a game sound effect playing apparatus according to some embodiments.
Fig. 4 is a schematic structural diagram of an electronic device shown in accordance with some embodiments.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more complete and thorough understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
FIG. 1 is a flow diagram illustrating a method for game sound effect playback according to some embodiments. As shown in fig. 1, an embodiment of the present disclosure provides a method for playing game sound effect, which may be executed by an electronic device, and specifically, may be executed by a game sound effect playing apparatus, where the apparatus may be implemented by software and/or hardware and configured in the electronic device. As shown in fig. 1, the method may include the following steps.
In step 110, in response to the special effect release instruction, a target special effect resource is determined, wherein the target special effect resource is hidden at an initial position of the virtual scene when not released.
Here, the special effect release instruction is used to instruct to release the special effect in the virtual scene. For example, for a fireball launcher, the fireball launcher launches a fireball effect when a player triggers an instruction instructing the fireball launcher to launch the fireball effect.
It should be understood that the special effects described in this disclosure may be game skills or objects that appear frequently in a game scene.
The game engine determines a target special effect resource from the special effect pool in response to the special effect release instruction. The game engine determines a target special effect resource from the special effect pool when releasing the game special effect. It should be appreciated that each time a game effect is released, the effect resources used are different, and the game engine may recycle the game effect resources within the effect pool as the target effect resources.
For example, for a fireball launcher, its corresponding special effects pool may be created with 5 fireball special effects. When the fireball special effects are released for the first time, the first fireball special effect in the special effect pool can be used as a target special effect resource. When the fireball special effects are released for the second time, the second fireball special effect in the special effect pool can be used as the target special effect resource. When the fireball special effects are released for the fifth time, the fifth fireball special effect in the special effect pool can be used as a target special effect resource. When the fireball special effects are released for the sixth time, the first fireball special effect in the special effect pool can be used as a target special effect resource.
It is worth mentioning that the target special effect resource is hidden at the initial position of the virtual scene when not released. For the special effect pool, when the game special effect resources in the special effect pool are not released, the game special effect resources are already created in the virtual scene, and are hidden in the initial position of the virtual scene and are in an invisible state. I.e. the game effect resource has been created in the virtual scene but is in an invisible state. When the game effect resource is released, the game effect resource appears in a visible state.
Wherein the initial position may be any point in the virtual scene. The virtual scene may be a game scene or a virtual reality scene, etc.
It should be appreciated that by using the special effects pool, game performance may be optimized. Especially for frequently triggered game effects, it is extremely costly to the performance of the game if a game effect is recreated with each trigger. Through the special effect pool, a plurality of game special effect resources are created in the virtual scene in advance, and the game performance can be optimized. The game special effect resource is created in advance, and can be understood as a virtual object in a virtual scene.
In step 120, the target special effect resource is released, and a target position of the sounding body corresponding to the target special effect resource is determined according to the special effect release progress of the target special effect resource.
Here, after determining the target special effect resource, the game engine releases the target special effect resource at the special effect release position, and the target special effect resource is switched from the hidden state to the visible state.
Fig. 2 is a schematic diagram illustrating the release of target special effects resources, according to some embodiments. As shown in fig. 2, a special effects pool 210 is created in a virtual scene, and a first special effects resource 211, a second special effects resource 212, a third special effects resource 213, a fourth special effects resource 214, and a fifth special effects resource 215 are created in the special effects pool 210. The first special effect resource 211, the second special effect resource 212, the third special effect resource 213, the fourth special effect resource 214, and the fifth special effect resource 215 are hidden in the virtual scene and are in an invisible state. When a special effect release instruction for instructing the transmitter 200 to transmit a special effect resource is received, a first special effect resource 211 in the special effect pool 210 is determined as a target special effect resource, and the first special effect resource 211 is released at a special effect release position 230. Here, releasing the first special effect resource 211 means that the first special effect resource 211 moves from the initial position 220 to the special effect release position 230, and the first special effect resource 211 appears in a visible state at the special effect release position 230. The first special effect resource 211 may be a dynamic special effect, and the releasing process may further include moving the first special effect resource 211 from the special effect releasing position 230 to the intermediate position 240, and from the intermediate position 240 to the ending releasing position 250. Taking the fireball effect as an example, the fireball effect is launched at the effect release position 230, is displayed, moves to the intermediate position 240, and finally moves to the end release position 250. At the end release position 250, the fireball effect dissipates and returns to the effect pool 200.
And in the process of releasing the target special effect resource, determining the target position of the sounding body corresponding to the target special effect resource according to the special effect release progress of the target special effect resource.
As shown in fig. 2, the trick-play progress of the target trick-play resource includes the first trick-play resource 211 moving from the initial position 220 to the trick-play release position 230, from the trick-play release position 230 to the intermediate position 240, from the intermediate position 240 to the end release position 250, and from the end release position 250 to the initial position 220.
In the releasing process of the target special effect resource, the position of the sounding body corresponding to the target special effect resource is not coupled with the position of the target special effect resource, namely the position of the sounding body is not synchronous with the position of the target special effect resource in a virtual scene, and the target position of the sounding body is dynamically determined according to the special effect releasing progress of the target special effect resource, so that the position of the target special effect resource is decoupled from the position of the sounding body, and the target position of the sounding body can be a correct sound effect position.
For example, as shown in fig. 2, when the first special effect resource 211 is located at the initial position 220, a sounding body of the first special effect resource 211 may not be created. When the first special effect resource 211 is located at the special effect release position 230, a sound generator of the first special effect resource 211 may be created at the special effect release position 230, and the target position of the sound generator is the special effect release position 230. When the first special effects resource 211 is moved to the intermediate position 240, the target position of the sounding body is synchronized with the intermediate position 240. When the first special effect resource 211 is moved to the end release position 250, the target position of the sounding body is synchronized with the end release position 250. When the first special effect resource 211 is switched from the visible state to the hidden state at the end release position 250, the first special effect resource 211 moves from the end release position 250 to the initial position 220, and at this time, the target position of the sounding body may be maintained at the end release position 250.
It should be understood that the target position of the sounding body corresponding to the target special effect resource is related or unrelated to the position of the target special effect resource in the virtual scene according to the difference of the special effect release progress of the target special effect resource.
In step 130, the sound generator is controlled to play the sound effect corresponding to the target special effect resource at the target position.
Here, the sounding body refers to an object that emits a specific sound effect. For example, there is a pile of firewood fire in the virtual scene that makes a crackling sound, and at the location of the firewood fire there will be a sound producing body that makes a crackling sound. It should be understood that the sound producing body may be invisible in the virtual scene, or the sound producing body merely represents a sound event playing a sound effect at the target position, and it is not necessarily a substantial object. It should be noted that, in other terms, the sounding body may be referred to as a transmitter.
And after the target position of the sounding body is determined, controlling the sounding body to play a sound effect corresponding to the target special effect resource at the target position. Wherein, different target special effect resources correspond to different sound effects, and the sound effect can be an audio file.
It should be noted that, when the sound generator plays the target special effect resource, the sound engine may perform spatialization processing on the sound effect according to the position information of the sound generator and the position information of the listener, and then the electronic device outputs the spatialized sound effect, so that the output sound effect has a sense of reality.
Therefore, the target special effect resource is determined, and in the process of releasing the target special effect resource, the target position of the sounding body is determined according to the special effect release progress of the target special effect resource, so that the sounding body is controlled to play the corresponding sound effect at the target position. The positions of the target special effect resources and the positions of the sounding bodies are decoupled, the target positions of the sounding bodies are accurately determined under different special effect release schedules, the sound effect can be played at the correct position, and the immersion and reality of the game sound effect are improved.
In some implementations, in a case that the special effect release progress indicates that the target special effect resource is switched from a hidden state to a visible state, a sounding body of the target special effect resource is created at a special effect release position of the target special effect resource, and the special effect release position is taken as a target position of the sounding body.
Here, the target special effect resource being in the hidden state means that the target special effect resource is in the special effect pool, and the target special effect resource being switched from the hidden state to the visible state means that the target special effect resource starts to be released. As shown in fig. 2, at the special effect release position 230, the first special effect resource 211 is switched from the hidden state to the visible state.
When the target special effect resource is switched from the hidden state to the visible state, a sounding body of the target special effect resource is created at a special effect release position of the target special effect resource, and the special effect release position is used as a target position of the sounding body.
For example, for a fireball launcher, when the fireball launcher launches a fireball effect, the fireball effect appears in the game screen. At this time, a sound producing body of the fireball effect is created at a position where the fireball effect appears in the game screen, and the target position of the sound producing body is a position where the fireball effect appears in the game screen.
It is worth to be noted that when the fireball special effect is located in the special effect pool, the fireball special effect is in a hidden state, and a sounding body of the fireball special effect is not created. That is, when the fireball effect is located in the effect pool, the positions of the sounding body and the fireball effect are decoupled.
Therefore, when the target special effect resource is switched from the hidden state to the visible state, the sound producing body of the target special effect resource is created at the special effect release position of the target special effect resource, so that the sound effect can be ensured not to be played at the initial position, but can be accurately played at the special effect release position. Moreover, by creating the sounder again, it can be ensured that even if the target special effect resource is recycled, the tail sound of the sound effect corresponding to the target special effect resource is not played at the special effect release position, but the tail sound corresponding to the target special effect resource is played at the end release position of the target special effect resource. For example, as shown in fig. 2, when the sound generating body of the first special effect resource 211 continues to play the sound effect at the end release position 250, if the first special effect resource 211 is newly present at the special effect release position 230 as the target special effect resource, since in this embodiment, the position of the sound generating body and the position of the feature resource are decoupled, the sound generating body of the first special effect resource 211 is created only at the special effect release position 230 of the first special effect resource 211, it can be ensured that the tail sound of the sound effect that should originally be played at the end release position 250 does not become to be played at the special effect release position 230, and it can be ensured that the tail sound of the sound effect is played at the end release position 250.
In some implementation manners, in a case that the special effect release progress indicates that the target special effect resource is presented in a visible state, the real-time position of the target special effect resource is determined as the target position of the sounding body.
Here, when the target special effect resource is not released, the target special effect resource is located in the special effect pool, and is in a hidden state and is not visible in the game screen. When the target special effect resource is released, the target special effect resource is in a visible state in the life cycle and is visible in the game picture. For example, as shown in fig. 2, the life cycle of the target special effect resource includes a process in which the first special effect resource 211 is switched to a visible state at the special effect release position 230, moved from the special effect release position 230 to the intermediate position 240, moved from the intermediate position 240 to the end release position 250, and disappears at the end release position 250. In the process, the target position of the sounding body is synchronized with the real-time position of the target special effect resource. That is, the target special effect resource is in a visible state, and the target position of the sounding body follows the position of the target special effect resource.
For example, when the fireball effect is visible in the game screen and the fireball effect moves in the virtual scene, the sound production body can move along with the fireball effect, and the sound effect of the fireball effect can also move along with the movement of the fireball effect.
It should be noted that, when the target special effect resource is in the hidden state, the target position of the sounding body is not equal to the position of the target special effect resource. That is, when the target special effect resource is located in the special effect pool, the target position of the sounding body is not synchronized with the position of the target special effect resource.
As shown in fig. 2, when the first special effect resource 211 is located on the path of the special effect release position 230, the middle position 240 and the end release position 250, the target position of the sounding body of the first special effect resource 211 is the same as the real-time position of the first special effect resource 211. When the first special effect resource 211 is located on the path between the end release position 250 and the initial position 220, or when the first special effect resource 211 is located on the path between the initial position 220 and the special effect release position 230, the target position of the sound generating body is not synchronized with the position of the first special effect resource 211.
In some embodiments, the real-time position of the target special effect resource may be determined as the target position of the sounding body according to a preset synchronization frequency.
The determining of the real-time position of the target special effect resource as the target position of the sounding body may be performed once per frame of the picture. Alternatively, the real-time position of the target special effect resource may be determined as the target position of the sounding body according to the preset synchronization frequency, and the action of determining the real-time position of the target special effect resource as the target position of the sounding body may be performed once on the frames spaced by the preset number of frames.
It should be understood that the use of the per-frame synchronization strategy or the use of the interval frame synchronization strategy may be selected according to practical situations.
Therefore, under the condition that the special effect release progress represents that the target special effect resource is in a visible state, the real-time position of the target special effect resource is determined as the target position of the sounding body, and the sound effect can be guaranteed to move along with the movement of the target special effect resource in the process of releasing the target special effect resource. Moreover, the real-time position of the target special effect resource is determined as the target position of the sounding body only when the target special effect resource is in a visible state, so that the sound effect of the target special effect resource can be completely played at the release ending position and cannot be removed. For example, when the duration of the sound effect of the target special effect resource is longer than the special effect duration of the target special effect resource, the target special effect resource is not visible in the game screen, but the sound effect of the target special effect resource can also be completely played at the disappearing position of the target special effect resource.
In some realizable embodiments, in a case that the special effect release progress indicates that the target special effect resource finishes releasing, determining an ending release position of the target special effect resource as a target position of the sounding body.
Here, ending the release of the target special effect resource means that the target special effect resource is switched from a visible state to a hidden state, and the target special effect resource is invisible in the game screen. At this time, the target position of the sounding body is decoupled from the real-time position of the target special effect resource, and the release ending position of the target special effect resource is determined as the target position of the sounding body.
As shown in fig. 2, the first special effects resource 211 ends the special effects release at the end release position 250, switches from the visible state to the hidden state, and the first special effects resource 211 returns to the special effects pool 210.
In this process, the sounding body of the first special effect resource 211 is maintained at the end release position 250 until the sound effect playing of the first special effect resource 211 is completed, and the sounding body is destroyed.
It should be noted that when the first special effect resource 211 is located at the end release position 250 and the path of the initial position 220, the target position of the sounding body is not synchronized with the position of the first special effect resource 211, and is always maintained at the end release position 250.
Therefore, when the special effect release progress indicates that the target special effect resource is released completely, the release ending position of the target special effect resource is determined as the target position of the sounding body, and the sound effect can be guaranteed to be played on the vanishing point of the target special effect resource.
In some embodiments, in step 130, in response to a sound playing instruction, the sound generator may be moved to the target position, and the sound generator may be controlled to play a sound effect corresponding to the target special effect resource.
Here, the sound playing instruction is used to trigger a sound event to control the sound generator to play the sound effect, and the sound playing instruction may be triggered by the target special effect resource. When a sound playing instruction is received, the game engine firstly executes the step of moving the sound generating body to the target position and then executes the step of controlling the sound generating body to play the sound effect corresponding to the target special effect resource, so that the target position of the sound generating body is consistent with the target position when the sound effect starts to be played each time, and then the corresponding sound effect is played.
As some examples, in the same frame of game picture, it is possible to simultaneously occur two behaviors, one is a position synchronization behavior and the other is a sound effect playing behavior. The position synchronization behavior is used for enabling the target position of the sounding body to be consistent with the target position, and the sound effect playing behavior is used for enabling the sounding body to play a sound effect. In this case, the game engine executes the position synchronization action first, and delays the sound effect playing action until the end of the frame, so as to ensure that the playing position of the sound effect is consistent with the target position each time the sound effect is played.
Therefore, when a sound playing instruction is received, the operation that the sounding body moves to the target position is executed firstly, and then the operation that the sounding body is controlled to play the sound effect corresponding to the target special effect resource is executed, so that the playing position of the sound effect is consistent with the target position, and the sound effect is guaranteed to be played at the correct position. Moreover, even if the position of the target special effect resource jumps sharply, the sound effect cannot be removed. For example, for a sound engine, the sound engine may remove sounds having a volume below a threshold. The volume of the target special effect resource is related to the distance between the sounding body and the listener, and the volume is smaller when the distance is longer. When the position of the target special-effect resource jumps, the distance from the sounding body to the listener changes, which causes the volume to be lower than the threshold value. At this time, the sound engine removes the sound effect of the target special effect resource. By executing the operation of moving the sounding body to the target position and then executing the operation of controlling the sounding body to play the sound effect corresponding to the target special effect resource, the positions of the sounding body and the target special effect resource are synchronized before the sound effect is played every time, and the sound effect of the target special effect resource is ensured not to be removed.
In some implementation manners, the sound generating body is destroyed when the sound effect playing corresponding to the target special effect resource is completed.
Here, the start point of the entire life cycle of the sounding body is to create the sounding body at the special effect release position, and the end point is to complete the sound effect playback. The life cycle of the sounding body is not following the life cycle of the target special-effect resource, namely when the target special-effect resource is released, the sounding body cannot be destroyed, and the sounding body can be destroyed only after the corresponding sound effect is played.
For example, as shown in fig. 2, the first special effect resource 211 is switched to the hidden state at the end release position 250, and the first special effect resource 211 disappears on the game screen. At this time, the sounding body is not destroyed but maintained at the end release position 250, and after the play completion sound effect, the sounding body is destroyed.
Illustratively, when the sound effect duration of the fireball effect is longer than the effect duration of the fireball effect, the sounding body can be maintained at the vanishing point of the fireball effect on the game screen, and the sound effect is continued to be played at the vanishing point.
Therefore, the sounding body is destroyed under the condition that the sound effect playing corresponding to the target special effect resource is completed, and the sound effect can be guaranteed to be played completely.
FIG. 3 is a block diagram of a game sound effect playing apparatus according to some embodiments. As shown in fig. 3, the game sound effect playing apparatus 300 may include:
a determining module 301, configured to determine, in response to a special effect release instruction, a target special effect resource, where the target special effect resource is hidden at an initial position of a virtual scene when not released;
a release module 302, configured to release the target special effect resource, and determine a target position of a sounding body corresponding to the target special effect resource according to a special effect release progress of the target special effect resource;
the playing module 303 is configured to control the sound generator to play the sound effect corresponding to the target special effect resource at the target position.
Optionally, the releasing module 302 includes:
a first synchronization unit configured to create a sounding body of the target special effect resource at a special effect release position of the target special effect resource and take the special effect release position as a target position of the sounding body, in a case where the special effect release progress indicates that the target special effect resource is switched from a hidden state to a visible state.
Optionally, the releasing module 302 includes:
a second synchronization unit, configured to determine a real-time position of the target special effect resource as a target position of the sounding body when the special effect release progress indicates that the target special effect resource is in a visible state.
Optionally, the second synchronization unit is specifically configured to:
and determining the real-time position of the target special effect resource as the target position of the sounding body according to a preset synchronous frequency.
Optionally, the releasing module 302 includes:
a third synchronization unit, configured to determine, when the special effect release progress indicates that the target special effect resource is released end, an end release position of the target special effect resource as a target position of the sounding body.
Optionally, the playing module 303 includes:
a moving unit configured to move the sounding body to the target position in response to a sound playing instruction;
and the control unit is configured to control the sound producing body to play the sound effect corresponding to the target special effect resource.
Optionally, the game sound effect playing apparatus 300 further comprises:
and the destroying module is configured to destroy the sounding body under the condition that the sound effect corresponding to the target special effect resource is played.
With respect to the game sound effect playing apparatus 300 in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be described in detail here.
Referring now to FIG. 4, a block diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, electronic device 600 may include a processing device (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage device 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable storage medium of the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable storage medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the electronic devices may communicate with each other using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer-readable storage medium may be included in the electronic device; or may be separate and not incorporated into the electronic device.
The computer readable storage medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: responding to a special effect release instruction, and determining target special effect resources, wherein the target special effect resources are hidden at the initial position of the virtual scene when not released; releasing the target special effect resource, and determining a target position of a sounding body corresponding to the target special effect resource according to the special effect release progress of the target special effect resource; and controlling the sounding body to play the sound effect corresponding to the target special effect resource at the target position.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, smalltalk, C + +, and including conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the name of a module in some cases does not constitute a limitation on the module itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable storage medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable storage medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.

Claims (10)

1. A method for playing sound effect of a game is characterized by comprising the following steps:
responding to a special effect release instruction, and determining target special effect resources, wherein the target special effect resources are hidden at the initial position of the virtual scene when not released;
releasing the target special-effect resource, and determining the target position of a sounding body corresponding to the target special-effect resource according to the special-effect release progress of the target special-effect resource;
and controlling the sounding body to play the sound effect corresponding to the target special effect resource at the target position.
2. The method according to claim 1, wherein the determining a target position of a sound generating body corresponding to the target special effect resource according to the special effect release progress of the target special effect resource comprises:
and under the condition that the special effect release progress indicates that the target special effect resource is switched from a hidden state to a visible state, creating a sounding body of the target special effect resource at a special effect release position of the target special effect resource, and taking the special effect release position as a target position of the sounding body.
3. The method according to claim 1, wherein the determining a target position of a sounding body corresponding to the target special effect resource according to the special effect release progress of the target special effect resource comprises:
and under the condition that the special effect release progress indicates that the target special effect resource is in a visible state, determining the real-time position of the target special effect resource as the target position of the sounding body.
4. The method of claim 3, wherein the determining the real-time location of the target special effects resource as the target location of the sounding body comprises:
and determining the real-time position of the target special effect resource as the target position of the sounding body according to a preset synchronous frequency.
5. The method according to claim 1, wherein the determining a target position of a sounding body corresponding to the target special effect resource according to the special effect release progress of the target special effect resource comprises:
and under the condition that the special effect release progress represents that the target special effect resource is released at the end, determining the release-ending position of the target special effect resource as the target position of the sounding body.
6. The method according to any one of claims 1 to 5, wherein the controlling the sound generator to play the sound effect corresponding to the target special effect resource at the target position comprises:
moving the sounding body to the target position in response to a sound playing instruction;
and controlling the sounding body to play the sound effect corresponding to the target special effect resource.
7. The method according to any one of claims 1 to 5, further comprising:
and under the condition that the sound effect corresponding to the target special effect resource is played, destroying the sounding body.
8. A sound effect playing device for game, comprising:
the determining module is configured to determine a target special effect resource in response to a special effect release instruction, wherein the target special effect resource is hidden at an initial position of a virtual scene when not released;
the release module is configured to release the target special effect resource and determine a target position of a sounding body corresponding to the target special effect resource according to the special effect release progress of the target special effect resource;
and the playing module is configured to control the sounding body to play the sound effect corresponding to the target special-effect resource at the target position.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by processing means, carries out the steps of the method of any one of claims 1 to 7.
10. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method of any one of claims 1 to 7.
CN202210977552.2A 2022-08-15 2022-08-15 Game sound effect playing method and device, storage medium and electronic equipment Pending CN115350477A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210977552.2A CN115350477A (en) 2022-08-15 2022-08-15 Game sound effect playing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210977552.2A CN115350477A (en) 2022-08-15 2022-08-15 Game sound effect playing method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115350477A true CN115350477A (en) 2022-11-18

Family

ID=84001311

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210977552.2A Pending CN115350477A (en) 2022-08-15 2022-08-15 Game sound effect playing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115350477A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012055452A (en) * 2010-09-08 2012-03-22 Copcom Co Ltd Game program and game device
US20160358364A1 (en) * 2015-06-07 2016-12-08 Apple Inc. Automatic Rendering Of 3D Sound
CN108307127A (en) * 2018-01-12 2018-07-20 广州市百果园信息技术有限公司 Method for processing video frequency and computer storage media, terminal
CN108619720A (en) * 2018-04-11 2018-10-09 腾讯科技(深圳)有限公司 Playing method and device, storage medium, the electronic device of animation
CN109414621A (en) * 2016-04-11 2019-03-01 新游株式会社 Music game apparatus and method, and record the computer-readable recording medium of its program
CN110045818A (en) * 2018-01-17 2019-07-23 哈曼国际工业有限公司 Mobile speaker system for reality environment
CN113289338A (en) * 2021-04-28 2021-08-24 网易(杭州)网络有限公司 Game skill sound effect processing method and device and electronic device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012055452A (en) * 2010-09-08 2012-03-22 Copcom Co Ltd Game program and game device
US20160358364A1 (en) * 2015-06-07 2016-12-08 Apple Inc. Automatic Rendering Of 3D Sound
CN109414621A (en) * 2016-04-11 2019-03-01 新游株式会社 Music game apparatus and method, and record the computer-readable recording medium of its program
CN108307127A (en) * 2018-01-12 2018-07-20 广州市百果园信息技术有限公司 Method for processing video frequency and computer storage media, terminal
CN110045818A (en) * 2018-01-17 2019-07-23 哈曼国际工业有限公司 Mobile speaker system for reality environment
CN108619720A (en) * 2018-04-11 2018-10-09 腾讯科技(深圳)有限公司 Playing method and device, storage medium, the electronic device of animation
CN113289338A (en) * 2021-04-28 2021-08-24 网易(杭州)网络有限公司 Game skill sound effect processing method and device and electronic device

Similar Documents

Publication Publication Date Title
US20170163702A1 (en) Android platform-based multimedia processing method and electronic device
CN113867876B (en) Expression display method, device, equipment and storage medium
CN111803951A (en) Game editing method and device, electronic equipment and computer readable medium
CN111526411A (en) Video processing method, device, equipment and medium
CN111435600B (en) Method and apparatus for processing audio
CN109582274B (en) Volume adjusting method and device, electronic equipment and computer readable storage medium
CN112165652B (en) Video processing method, device, equipment and computer readable storage medium
WO2022042634A1 (en) Audio data processing method and apparatus, and device and storage medium
US20240127856A1 (en) Audio processing method and apparatus, and electronic device and storage medium
US11272136B2 (en) Method and device for processing multimedia information, electronic equipment and computer-readable storage medium
CN112882568A (en) Audio playing method and device, electronic equipment and storage medium
CN113867593A (en) Interaction method, device, electronic equipment and storage medium
CN110022493B (en) Playing progress display method and device, electronic equipment and storage medium
CN113301424B (en) Play control method, device, storage medium and program product
JP7255026B2 (en) Video recording method, apparatus, electronic equipment and storage medium
WO2024037480A1 (en) Interaction method and apparatus, electronic device, and storage medium
WO2020253452A1 (en) Status message pushing method, and method, device and apparatus for switching interaction content in live broadcast room
EP4344218A1 (en) Special effect playback method and system for live broadcast room, and device
CN115350477A (en) Game sound effect playing method and device, storage medium and electronic equipment
WO2023072280A1 (en) Media content sending method and apparatus, and device, readable storage medium and product
CN116527980A (en) Animation playing method, device, medium and electronic equipment
CN114584822B (en) Synchronous playing method and device, terminal equipment and storage medium
CN114419201B (en) Animation display method and device, electronic equipment and medium
CN114584709B (en) Method, device, equipment and storage medium for generating zooming special effects
CN114669053A (en) Game sound effect playing method and device, storage medium and electronic equipment

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