Game sound effect playing method, device, storage medium and electronic device

By dynamically determining the target position of the sound generator according to the special effects release progress in the game, the problem of difficulty in synchronizing the sound effect position of the game is solved, and the immersion and realism of the sound effect are improved.

CN115350477BActive Publication Date: 2025-03-04BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210977552.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-15
Publication Date
2025-03-04
Estimated Expiration
2042-08-15

AI Technical Summary

Technical Problem

The prior art is difficult to achieve accurate position synchronization of sound effects in games, resulting in insufficient immersion and realism of game sound effects.

Method used

By determining the target special effect resource and during its release process, the target position of the sound body is dynamically determined according to the special effect release progress, thereby controlling the sound body to play the sound effect at the correct position.

Benefits of technology

It realizes accurate position synchronization of sound effects, improving the immersion and realism of game sound effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115350477B_ABST
    Figure CN115350477B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, device, storage medium and electronic device for playing game sound effects, and to the field of computer technology. The method determines a target special effect resource, and in the process of releasing the target special effect resource, determines the target position of a sound source according to the special effect release progress of the target special effect resource, so as to control the sound source to play the corresponding sound effect at the target position. The position of the target special effect resource is decoupled from the position of the sound source, and the target position of the sound source is accurately determined under different special effect release progresses, so that the sound effect can be played at the correct position, so as to improve the immersion and realism of the game sound effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to a method, device, storage medium and electronic device for playing game sound effects. Background Art

[0002] Game sound effects are an essential part of the game, which can provide necessary event feedback for the game and increase the immersion of the game. Therefore, ensuring that the game sound effects can be played correctly has become one of the increasingly important research directions. Summary of the invention

[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides a method for playing game sound effects, comprising:

[0005] In response to a special effect release instruction, determining a target special effect resource, wherein the target special effect resource is hidden at an initial position of the virtual scene when not released;

[0006] Release the target special effect resource, and determine the target position of the sound source corresponding to the target special effect resource according to the special effect release progress of the target special effect resource;

[0007] The sound emitter is controlled to play the sound effect corresponding to the target special effect resource at the target position.

[0008] Optionally, determining the target position of the sound source corresponding to the target special effect resource according to the special effect release progress of the target special effect resource includes:

[0009] When the special effect release progress indicates that the target special effect resource is switched from a hidden state to a visible state, a sound source of the target special effect resource is created at the special effect release position of the target special effect resource, and the special effect release position is used as the target position of the sound source.

[0010] Optionally, determining the target position of the sound source corresponding to the target special effect resource according to the special effect release progress of the target special effect resource includes:

[0011] When the special effect release progress indicates 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 sound source.

[0012] Optionally, determining the real-time position of the target special effect resource as the target position of the sound-emitting body includes:

[0013] According to a preset synchronization frequency, the real-time position of the target special effect resource is determined as the target position of the sound source.

[0014] Optionally, determining the target position of the sound source corresponding to the target special effect resource according to the special effect release progress of the target special effect resource includes:

[0015] When the special effect release progress indicates that the target special effect resource has finished releasing, the end release position of the target special effect resource is determined as the target position of the sound-emitting body.

[0016] Optionally, controlling the sound emitter to play the sound effect corresponding to the target special effect resource at the target position includes:

[0017] In response to a sound playing instruction, moving the sound-emitting body to the target position;

[0018] Control the sound emitter to play the sound effect corresponding to the target special effect resource.

[0019] Optionally, the method further comprises:

[0020] When the sound effect corresponding to the target special effect resource is played, the sound source is destroyed.

[0021] In a second aspect, the present disclosure provides a game sound effect playback device, comprising:

[0022] A determination module, 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 the virtual scene when not released;

[0023] A release module, configured to release the target special effect resource, and determine a target position of a sound source corresponding to the target special effect resource according to a special effect release progress of the target special effect resource;

[0024] The playing module is configured to control the sound source to play the sound effect corresponding to the target special effect resource at the target position.

[0025] In a third aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the game sound effect playing method described in the first aspect.

[0026] In a fourth aspect, the present disclosure provides an electronic device, including:

[0027] a storage device having a computer program stored thereon;

[0028] A processing device is used to execute the computer program in the storage device to implement the steps of the game sound effect playing method described in the first aspect.

[0029] Based on the above technical solution, by determining the target special effect resource, and in the process of releasing the target special effect resource, the target position of the sound source is determined according to the special effect release progress of the target special effect resource, so as to control the sound source to play the corresponding sound effect at the target position. The position of the target special effect resource is decoupled from the position of the sound source, and the target position of the sound source is accurately determined under different special effect release progress, so that the sound effect can be played at the correct position, so as to improve the immersion and realism of the game sound effect.

[0030] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:

[0032] Figure 1 is a flowchart of a method for playing game sound effects according to some embodiments.

[0033] Figure 2 is a schematic diagram showing the release of target special effect resources according to some embodiments.

[0034] Figure 3 It is a schematic diagram of module connection of a game sound effect playback device according to some embodiments.

[0035] Figure 4 is a schematic diagram of the structure of an electronic device according to some embodiments. DETAILED DESCRIPTION

[0036] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0037] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0038] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "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". The relevant definitions of other terms will be given in the following description.

[0039] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0040] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0041] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0042] Figure 1 FIG. 1 is a flowchart of a method for playing game sound effects according to some embodiments. Figure 1 As shown, the embodiment of the present disclosure provides a method for playing game sound effects, which can be executed by an electronic device, specifically, by a game sound effect playing device, which can be implemented by software and / or hardware and configured in the electronic device. Figure 1 As shown, the method may include the following steps.

[0043] In step 110 , in response to a 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.

[0044] Here, the special effect release instruction is used to instruct the release of special effects in the virtual scene. For example, for a fireball launcher, when the player triggers an instruction for instructing the fireball launcher to launch a fireball special effect, the fireball launcher launches the fireball special effect.

[0045] It should be understood that the special effects described in the present disclosure may be game skills or objects that frequently appear in game scenes.

[0046] The game engine responds to the special effect release instruction and determines the target special effect resource from the special effect pool. In the special effect pool, multiple game special effect resources are pre-created. When releasing the game special effect, the game engine determines the target special effect resource from the special effect pool. It should be understood that each time a game special effect is released, the special effect resource used is different, and the game engine can recycle the game special effect resources in the special effect pool as the target special effect resource.

[0047] For example, for a fireball launcher, its corresponding special effect pool can create 5 fireball special effects. When releasing a fireball special effect for the first time, the first fireball special effect in the special effect pool can be used as the target special effect resource. When releasing a fireball special effect for the second time, the second fireball special effect in the special effect pool can be used as the target special effect resource. When releasing a fireball special effect for the fifth time, the fifth fireball special effect in the special effect pool can be used as the target special effect resource. When releasing a fireball special effect for the sixth time, the first fireball special effect in the special effect pool can be used as the target special effect resource.

[0048] It is worth noting that the target special effect resource is hidden in the initial position of the virtual scene when it is not released. For the special effect pool, the game special effect resources in the special effect pool have all been created in the virtual scene before they are released, and are hidden in the initial position of the virtual scene, and are presented in an invisible state. That is, the game special effect resources have been created in the virtual scene, but are in an invisible state. When the game special effect resources are released, the game special effect resources are presented in a visible state.

[0049] The initial position may be any point in a virtual scene, which may be a game scene or a virtual reality scene.

[0050] It should be understood that by using the special effects pool, the game performance can be optimized. In particular, for game special effects that are frequently triggered, if a game special effect is recreated every time it is triggered, it will consume a lot of game performance. Through the special effects pool, multiple game special effects resources are pre-created in the virtual scene, which can optimize the game performance. Among them, the pre-created game special effects resources can be understood as a virtual object in the virtual scene.

[0051] In step 120, the target special effect resource is released, and according to the special effect release progress of the target special effect resource, the target position of the sound source corresponding to the target special effect resource is determined.

[0052] 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 switches from a hidden state to a visible state.

[0053] Figure 2 FIG. 1 is a schematic diagram showing a method of releasing a target special effect resource according to some embodiments. Figure 2 As shown, a special effect pool 210 is created in the virtual scene, and a first special effect resource 211, a second special effect resource 212, a third special effect resource 213, a fourth special effect resource 214, and a fifth special effect resource 215 are created in the special effect 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 all hidden in the virtual scene and presented as invisible. When a special effect release instruction for instructing the transmitter 200 to launch a special effect resource is received, the first special effect resource 211 in the special effect pool 210 is determined as the target special effect resource, and the first special effect resource 211 is released at the special effect release position 230. Among them, 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 is presented as a visible state at the special effect release position 230. The first special effect resource 211 may be a dynamic special effect, and its release process may further include the first special effect resource 211 moving from the special effect release position 230 to the middle position 240, and moving from the middle position 240 to the end release position 250. Taking the fireball special effect as an example, the fireball special effect is launched at the special effect release position 230, presents a display state, moves to the middle position 240, and finally moves to the end release position 250. At the end release position 250, the fireball special effect dissipates and returns to the special effect pool 200.

[0054] In the process of releasing the target special effect resource, the target position of the sound source corresponding to the target special effect resource is determined according to the special effect release progress of the target special effect resource.

[0055] like Figure 2 As shown, the special effect release progress of the target special effect resource includes the first special effect resource 211 moving from the initial position 220 to the special effect release position 230, from the special effect release position 230 to the middle position 240, from the middle position 240 to the end release position 250, and from the end release position 250 to the initial position 220.

[0056] During the release process of the target special effect resource, the position of the sound emitter corresponding to the target special effect resource is not coupled with the position of the target special effect resource, that is, the position of the sound emitter is not synchronized with the position of the target special effect resource in the virtual scene. Instead, the target position of the sound emitter is dynamically determined according to the special effect release progress of the target special effect resource, so that the position of the target special effect resource is decoupled from the position of the sound emitter, so that the target position of the sound emitter can be the correct sound effect position.

[0057] For example, Figure 2As shown, when the first special effect resource 211 is located at the initial position 220, the sound source 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, the sound source of the first special effect resource 211 may be created at the special effect release position 230, and the target position of the sound source is the special effect release position 230. When the first special effect resource 211 moves to the middle position 240, the target position of the sound source is synchronized with the middle position 240. When the first special effect resource 211 moves to the end release position 250, the target position of the sound source is synchronized with the end release position 250. When the first special effect resource 211 switches from a visible state to a 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 sound source may be maintained at the end release position 250.

[0058] It should be understood that the target position of the sound source corresponding to the target special effect resource is related or unrelated to the position of the target special effect resource in the virtual scene, depending on the special effect release progress of the target special effect resource.

[0059] In step 130, the sound source is controlled to play the sound effect corresponding to the target special effect resource at the target position.

[0060] Here, a sound emitter refers to an object that emits a specific sound effect. For example, in a virtual scene, there is a pile of firewood that makes a crackling sound. At the location of the firewood, there will be a sound emitter that makes a crackling sound. It should be understood that the sound emitter may be invisible in the virtual scene, or the sound emitter only represents a sound event that plays a sound effect at the target location, and it is not necessarily a physical object. In addition, it is worth noting that in other terms, a sound emitter may also be called an emitter.

[0061] After determining the target position of the sound emitter, the sound emitter is controlled to play the 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.

[0062] It is worth noting that when the sound source plays the target special effect resource, the sound engine can perform spatial processing on the sound effect according to the position information of the sound source and the position information of the listener, and then the electronic device outputs the spatialized sound effect so that the output sound effect can be realistic.

[0063] Therefore, by determining the target special effect resource, and in the process of releasing the target special effect resource, the target position of the sound source is determined according to the special effect release progress of the target special effect resource, so as to control the sound source to play the corresponding sound effect at the target position. This decouples the position of the target special effect resource from the position of the sound source, and accurately determines the target position of the sound source under different special effect release progress, so that the sound effect can be played at the correct position, thereby improving the immersion and realism of the game sound effect.

[0064] In some feasible implementations, when the special effect release progress indicates that the target special effect resource switches from a hidden state to a visible state, a sound source of the target special effect resource is created at the special effect release position of the target special effect resource, and the special effect release position is used as the target position of the sound source.

[0065] Here, the target special effect resource being in a hidden state means that the target special effect resource is in the special effect pool, and the target special effect resource switching from a hidden state to a visible state means that the target special effect resource begins to be released. Figure 2 As shown, at the special effect release position 230 , the first special effect resource 211 is switched from a hidden state to a visible state.

[0066] When the target special effect resource is switched from a hidden state to a visible state, a sound emitter of the target special effect resource is created at the special effect release position of the target special effect resource, and the special effect release position is used as the target position of the sound emitter.

[0067] For example, for a fireball launcher, when the fireball launcher launches a fireball special effect, the fireball special effect appears in the game screen. At this time, a sound emitter of the fireball special effect is created at the position where the fireball special effect appears in the game screen, and the target position of the sound emitter is the position where the fireball special effect appears in the game screen.

[0068] It is worth noting that when the fireball special effect is in the special effect pool, the fireball special effect is hidden and the sound emitter of the fireball special effect is not created. That is, when the fireball special effect is in the special effect pool, the sound emitter is decoupled from the position of the fireball special effect.

[0069] Therefore, when the target special effect resource switches from a hidden state to a visible state, by creating a sound source of the target special effect resource at the special effect release position of the target special effect resource, it can be ensured that the sound effect will not start playing at the initial position, but can be played accurately at the special effect release position. Moreover, by recreating the sound generator, it can also be ensured that when the duration of the sound effect is greater than the special effect duration, even if the target special effect resource is recycled, the tail sound of the sound effect corresponding to the target special effect resource will not be played at the special effect release position, but will be played at the end release position of the target special effect resource. For example, Figure 2As shown, when the sound source 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 re-appeared as a target special effect resource at the special effect release position 230, since in this embodiment, the position of the sound source is decoupled from the characteristic resource, the sound source of the first special effect resource 211 will only be created at the special effect release position 230 of the first special effect resource 211, it can ensure that the tail sound of the sound effect that should have been played at the end release position 250 will not be played at the special effect release position 230, and it can ensure that the tail sound of the sound effect is played at the end release position 250.

[0070] In some feasible implementations, when the special effect release progress indicates 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 sound-emitting body.

[0071] Here, when the target special effect resource is not released, the target special effect resource is in the special effect pool, and is hidden and invisible in the game screen. When the target special effect resource is released, the target special effect resource is visible in its life cycle and is visible in the game screen. For example, Figure 2 As shown, the life cycle of the target special effect resource includes the process that the first special effect resource 211 switches to a visible state at the special effect release position 230, moves from the special effect release position 230 to the middle position 240, moves from the middle position 240 to the end release position 250, and disappears at the end release position 250. In this process, the target position of the sound emitter is synchronized with the real-time position of the target special effect resource. That is, when the target special effect resource is in a visible state, the target position of the sound emitter follows the position of the target special effect resource.

[0072] For example, when a fireball special effect is visible in the game screen and the fireball special effect moves in the virtual scene, the sound source will move with the fireball special effect, and the sound effect of the fireball special effect can also move with the fireball special effect.

[0073] It is worth noting that when the target special effect resource is in a hidden state, the target position of the sound emitter is not equal to the position of the target special effect resource. That is, when the target special effect resource is in the special effect pool, the target position of the sound emitter is not synchronized with the position of the target special effect resource.

[0074] like Figure 2As shown, when the first special effect resource 211 is located in the path of the special effect release position 230, the middle position 240 and the end release position 250, the target position of the sound emitter 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 in the path of the end release position 250 and the initial position 220, or when the first special effect resource 211 is located in the path of the initial position 220 and the special effect release position 230, the target position of the sound emitter is not synchronized with the position of the first special effect resource 211.

[0075] In some embodiments, the real-time position of the target special effect resource may be determined as the target position of the sound source according to a preset synchronization frequency.

[0076] Wherein, determining the real-time position of the target special effect resource as the target position of the sound emitter according to the preset synchronization frequency may be an act of determining the real-time position of the target special effect resource as the target position of the sound emitter once in each frame. Alternatively, determining the real-time position of the target special effect resource as the target position of the sound emitter according to the preset synchronization frequency may be an act of determining the real-time position of the target special effect resource as the target position of the sound emitter once in a frame with a preset number of frames.

[0077] It should be understood that the use of a per-frame synchronization strategy or an interval frame synchronization strategy can be selected according to actual conditions.

[0078] Thus, when the special effect release progress indicates that the target special effect resource is in a visible state, by determining the real-time position of the target special effect resource as the target position of the sound-emitting body, it is possible to ensure that during the release of the target special effect resource, the sound effect moves along with the target special effect resource. Moreover, by determining the real-time position of the target special effect resource as the target position of the sound-emitting body only when the target special effect resource is in a visible state, it is possible to ensure that the sound effect of the target special effect resource can be played completely at the end release position without being removed. For example, when the duration of the sound effect of the target special effect resource is greater than the special effect duration of the target special effect resource, the target special effect resource is no longer visible in the game screen, but the sound effect of the target special effect resource can still be played completely at the disappearance position of the target special effect resource.

[0079] In some feasible implementations, when the special effect release progress indicates that the target special effect resource has finished releasing, the end release position of the target special effect resource is determined as the target position of the sound-emitting body.

[0080] Here, the end of 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 not visible in the game screen. At this time, the target position of the sound emitter is decoupled from the real-time position of the target special effect resource, and the end of the release position of the target special effect resource is determined as the target position of the sound emitter.

[0081] like Figure 2 As shown, the first special effect resource 211 ends the special effect release at the end release position 250 , switches from a visible state to a hidden state, and the first special effect resource 211 returns to the special effect pool 210 .

[0082] During this process, the sound source of the first special effect resource 211 is maintained at the end release position 250 until the sound effect of the first special effect resource 211 is played and the sound source is destroyed.

[0083] It is worth noting that when the first special effect resource 211 is located between the end release position 250 and the initial position 220 , the target position of the sound source is not synchronized with the position of the first special effect resource 211 , and is always maintained at the end release position 250 .

[0084] Therefore, when the special effect release progress indicates that the target special effect resource has ended releasing, by determining the end release position of the target special effect resource as the target position of the sound source, it can be ensured that the sound effect can be played to completion at the vanishing point of the target special effect resource.

[0085] In some feasible embodiments, in step 130, the sound-emitting body may be moved to the target position in response to a sound playing instruction, and the sound-emitting body may be controlled to play the sound effect corresponding to the target special effect resource.

[0086] Here, the sound play instruction is used to trigger a sound event to control the sound source to play a sound effect. The sound play instruction can be triggered by a target special effect resource. When receiving the sound play instruction, the game engine first executes the step of moving the sound source to the target position, and then executes the step of controlling the sound source to play the sound effect corresponding to the target special effect resource, so as to ensure that the target position of the sound source is consistent with the target position each time the sound effect starts to play, and then the corresponding sound effect is played.

[0087] As some examples, in the same frame of the game screen, two behaviors may occur at the same time, one is the position synchronization behavior, and the other is the sound effect playback behavior. Among them, the position synchronization behavior is used to make the target position of the sound emitter consistent with the target position, and the sound effect playback behavior is used to make the sound emitter play the sound effect. In this case, the game engine first executes the position synchronization behavior, and delays the sound effect playback behavior until the end of the frame to ensure that each time the sound effect is played, the playback position of the sound effect is consistent with the target position.

[0088] Thus, when a sound playing instruction is received, by first executing the operation of moving the sound-emitting body to the target position, and then executing the operation of controlling the sound-emitting body to play the sound effect corresponding to the target special effect resource, the playing position of the sound effect can be made consistent with the target position, so as to ensure that the sound effect is played at the correct position. Moreover, even if the position of the target special effect resource changes dramatically, the sound effect will not be removed. For example, for the sound engine, the sound engine will remove the sound whose volume is lower than the threshold. The volume of the target special effect resource is related to the distance between the sound-emitting body and the listener, and the farther the distance, the lower the volume. When the position of the target special effect resource changes, the distance between the sound-emitting body and the listener changes, which will cause the volume to be lower than the threshold. At this time, the sound engine will remove the sound effect of the target special effect resource. By first executing the operation of moving the sound-emitting body to the target position, and then executing the operation of controlling the sound-emitting body to play the sound effect corresponding to the target special effect resource, before each sound effect is played, the position of the sound-emitting body and the target special effect resource is synchronized, so as to ensure that the sound effect of the target special effect resource will not be removed.

[0089] In some feasible implementations, when the sound effect corresponding to the target special effect resource is played, the sound source is destroyed.

[0090] Here, the entire life cycle of the sound emitter starts from the creation of the sound emitter at the special effect release position and ends when the sound effect is played. The life cycle of the sound emitter does not follow the life cycle of the target special effect resource, that is, when the target special effect resource is released, the sound emitter will not be destroyed. The sound emitter will only be destroyed after the corresponding sound effect is played.

[0091] For example, Figure 2 As shown, the first special effect resource 211 switches to a hidden state at the end release position 250, and the first special effect resource 211 disappears from the game screen. At this time, the sound source is not destroyed, but maintained at the end release position 250, and the sound source is destroyed after the sound effect is played.

[0092] Exemplarily, when the sound effect duration of the fireball special effect is greater than the special effect duration of the fireball special effect, the sound source can be maintained at the vanishing point of the fireball special effect on the game screen, and continue to play the completion sound effect at the vanishing point.

[0093] Therefore, by destroying the sound source when the sound effect corresponding to the target special effect resource is finished playing, it can be ensured that the sound effect can be played completely.

[0094] Figure 3 FIG. 1 is a schematic diagram showing module connections of a game sound effect playback device according to some embodiments. Figure 3 As shown, the game sound effect playing device 300 may include:

[0095] The determination module 301 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 the virtual scene when not released;

[0096] A release module 302 is configured to release the target special effect resource and determine a target position of a sound source corresponding to the target special effect resource according to a special effect release progress of the target special effect resource;

[0097] The playing module 303 is configured to control the sound source to play the sound effect corresponding to the target special effect resource at the target position.

[0098] Optionally, the release module 302 includes:

[0099] The first synchronization unit is configured to create a sound body of the target special effect resource at the special effect release position of the target special effect resource when the special effect release progress indicates that the target special effect resource switches from a hidden state to a visible state, and use the special effect release position as the target position of the sound body.

[0100] Optionally, the release module 302 includes:

[0101] The second synchronization unit is configured to determine the real-time position of the target special effect resource as the target position of the sound-emitting body when the special effect release progress indicates that the target special effect resource is in a visible state.

[0102] Optionally, the second synchronization unit is specifically configured as follows:

[0103] According to a preset synchronization frequency, the real-time position of the target special effect resource is determined as the target position of the sound source.

[0104] Optionally, the release module 302 includes:

[0105] The third synchronization unit is configured to determine the end release position of the target special effect resource as the target position of the sound-emitting body when the special effect release progress indicates that the target special effect resource has ended releasing.

[0106] Optionally, the playing module 303 includes:

[0107] a moving unit, configured to move the sound-emitting body to the target position in response to a sound playing instruction;

[0108] The control unit is configured to control the sound source to play the sound effect corresponding to the target special effect resource.

[0109] Optionally, the game sound effect playing device 300 further includes:

[0110] The destruction module is configured to destroy the sound source when the sound effect corresponding to the target special effect resource is played.

[0111] Regarding the game sound effect playback device 300 in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0112] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0113] like Figure 4 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to 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 required for the operation of the electronic device 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 the bus 604.

[0114] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0115] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable storage medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0116] It should be noted that the computer-readable storage medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable storage medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0117] In some embodiments, 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"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0118] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0119] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: determines the target special effect resource in response to the special effect release instruction, wherein the target special effect resource is hidden in the initial position of the virtual scene when not released; releases the target special effect resource, and determines the target position of the sound source corresponding to the target special effect resource according to the special effect release progress of the target special effect resource; controls the sound source to play the sound effect corresponding to the target special effect resource at the target position.

[0120] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0121] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0122] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.

[0123] The functions described above herein 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), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0124] In the context of the present disclosure, a machine-readable storage medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A 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, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0125] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0126] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0127] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device 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 elaborated here.

Claims

1. A method for playing game sound effects, characterized in that: include: In response to a special effect release instruction, a target special effect resource is determined from a special effect pool, wherein the special effect pool includes a plurality of game special effect resources pre-created in a virtual scene, and when the game special effect resources are not released, they are hidden in an initial position of the virtual scene and are presented as an invisible state; The target special effect resource is released at the special effect release position, and according to the special effect release progress of the target special effect resource, the target position of the sound source corresponding to the target special effect resource is determined; Control the sound emitter to play the sound effect corresponding to the target special effect resource at the target position; The determining, according to the special effect release progress of the target special effect resource, the target position of the sound source corresponding to the target special effect resource comprises: When the special effect release progress indicates that the target special effect resource is switched from a hidden state to a visible state, a sound emitter of the target special effect resource is created at the special effect release position of the target special effect resource, and the special effect release position is used as the target position of the sound emitter; When 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 sound emitter; When the special effect release progress indicates that the target special effect resource has finished releasing, the end release position of the target special effect resource is determined as the target position of the sound source, and the sound source is maintained at the end release position until the sound effect corresponding to the target special effect resource is played, and the sound source is destroyed.

2. The method according to claim 1, characterized in that The step of determining the real-time position of the target special effect resource as the target position of the sound source includes: According to a preset synchronization frequency, the real-time position of the target special effect resource is determined as the target position of the sound source.

3. The method according to any one of claims 1 to 2, characterized in that The controlling the sound emitter to play the sound effect corresponding to the target special effect resource at the target position includes: In response to a sound playing instruction, moving the sound-emitting body to the target position; Control the sound emitter to play the sound effect corresponding to the target special effect resource.

4. A game sound effect playing device, characterized in that: include: A determination module, configured to determine a target special effect resource from a special effect pool in response to a special effect release instruction, wherein the special effect pool includes a plurality of game special effect resources pre-created in a virtual scene, and when the game special effect resources are not released, they are hidden in an initial position of the virtual scene and are presented as an invisible state; A release module, configured to release the target special effect resource at the special effect release position, and determine the target position of the sound source corresponding to the target special effect resource according to the special effect release progress of the target special effect resource; A playing module, configured to control the sound emitter to play the sound effect corresponding to the target special effect resource at the target position; The release module comprises: A first synchronization unit is configured to create a sound-emitting body of the target special effect resource at a special effect release position of the target special effect resource when the special effect release progress indicates that the target special effect resource is switched from a hidden state to a visible state, and use the special effect release position as a target position of the sound-emitting body; A second synchronization unit is configured to determine the real-time position of the target special effect resource as the target position of the sound emitter when the special effect release progress indicates that the target special effect resource is in a visible state; The third synchronization unit is configured to determine the end release position of the target special effect resource as the target position of the sound source when the special effect release progress indicates that the target special effect resource has ended releasing, and maintain the sound source at the end release position until the sound effect corresponding to the target special effect resource is finished playing, and then destroy the sound source.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 3 are implemented.

6. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Video processing method, computer storage medium and terminal

    CN108307127A

  • Animation playing method and device, storage medium, electronic device

    CN108619720A

  • Mobile speaker system for virtual reality environments

    CN110045818A

  • Game skill sound effect processing method and device and electronic device

    CN113289338A

  • Game program and game device

    JP2012055452A