CN111135572A - Game sound effect management method and device, storage medium and electronic equipment - Google Patents

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

Info

Publication number
CN111135572A
CN111135572A CN201911343504.2A CN201911343504A CN111135572A CN 111135572 A CN111135572 A CN 111135572A CN 201911343504 A CN201911343504 A CN 201911343504A CN 111135572 A CN111135572 A CN 111135572A
Authority
CN
China
Prior art keywords
sound effect
game sound
playing
game
dynamic
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.)
Withdrawn
Application number
CN201911343504.2A
Other languages
Chinese (zh)
Inventor
陶作柠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Pixel Software Technology Co Ltd
Original Assignee
Beijing Pixel Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Pixel Software Technology Co Ltd filed Critical Beijing Pixel Software Technology Co Ltd
Priority to CN201911343504.2A priority Critical patent/CN111135572A/en
Publication of CN111135572A publication Critical patent/CN111135572A/en
Withdrawn 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

Abstract

The embodiment of the application provides a game sound effect management method and device, a storage medium and electronic equipment, and relates to the field of game control. The method comprises the following steps: acquiring the position of a controlled object, a background game sound effect and a dynamic game sound effect; the position of the dynamic game sound effect is positioned in a preset loading range taking the position of the controlled object as the center; when the position of the controlled object is in the background sound effect range, playing the background game sound effect; and when the position of the dynamic game sound effect is within the dynamic sound effect range, playing the dynamic game sound effect. Because the specific game sound effect can be loaded in the specific game scene, the aim of reasonably using the running memory can be fulfilled. And the game sound effect is divided into a background game sound effect and a dynamic game sound effect, and the controlled object can be played only when being positioned in the sound effect range corresponding to the game sound effect, so that the playing effect of the game sound effect is enhanced. Therefore, the playing effect of the game sound effect can be improved, and the consumption of the running memory is reduced.

Description

Game sound effect management method and device, storage medium and electronic equipment
Technical Field
The application relates to the field of game control, in particular to a game sound effect management method, a game sound effect management device, a storage medium and electronic equipment.
Background
At present, people generally face the problems of high working strength, high mental stress and the like, and moderate games can combine people with labor and ease, relieve the mental stress of people, relieve the mood of people and further improve the social productivity.
However, when playing the game sound effect, the current game directly loads all the game sound effects in the scene, which may cause a large amount of running memory to be consumed, the game is easy to run and collapse, and the playing effect of the game sound effect may be poor. Therefore, the existing game sound effect management mode is not beneficial to relieving the mental stress of people and even bringing stress to people.
Therefore, how to improve the playing effect of the game sound and reduce the consumption of the operating memory becomes a problem to be solved urgently.
Disclosure of Invention
The present application provides a method, an apparatus, a storage medium, and an electronic device for managing game sound, which can improve the playing effect of game sound and reduce the consumption of running memory.
The embodiment of the application can be realized as follows:
in a first aspect, an embodiment of the present application provides a method for managing sound effects of a game, including: acquiring the position of a controlled object; acquiring background game sound effect and dynamic game sound effect; the position of the dynamic game sound effect is positioned in a preset loading range taking the position of the controlled object as the center; when the position of the controlled object is in a background sound effect range, playing the background game sound effect; the background sound effect range is a first preset range taking the position of the background game sound effect as the center; when the position of the dynamic game sound effect is within the dynamic sound effect range, playing the dynamic game sound effect; the dynamic sound effect range is a second preset range taking the position of the controlled object as the center.
In an alternative embodiment, the method further comprises: and when the position of the dynamic game sound effect is positioned outside the preset loading range, unloading the dynamic game sound effect.
In an optional embodiment, when the position of the controlled object is in a background sound effect range, the step of playing the background game sound effect includes: and taking the time point when the position of the controlled object firstly enters the background sound effect range as a playing starting point, and completely playing the background game sound effect at least once in a preset time period.
In an optional embodiment, the step of completely playing the background game sound effect at least once within a preset time period by using a time point when the position of the controlled object first enters the background sound effect range as a playing starting point comprises: the time point when the position of the controlled object firstly enters the background sound effect range is taken as a playing starting point, and the background game sound effect is completely played; determining whether the background game sound effect is a circular playing sound effect; and when the background game sound effect is a circular playing sound effect, the background game sound effect is played according to a first preset time length as a time interval period in a first preset time period.
In an optional embodiment, the dynamic game sound effect comprises a common game sound effect and a regional game sound effect, and when the position of the dynamic game sound effect is within the dynamic sound effect range, the step of playing the dynamic game sound effect comprises: when the position of the common game sound effect is in the dynamic sound effect range, playing the common game sound effect according to the state of the controlled object and the common sound effect distance; the common sound effect distance is the distance between the position of the common game sound effect and the position of the controlled object; when the position of the regional game sound effect is in the dynamic sound effect range, playing the regional game sound effect according to the regional sound effect distance; the zone sound effect distance is the distance between the position of the zone game sound effect and the position of the controlled object.
In an optional embodiment, the step of playing the common game sound effect according to the state of the controlled object and the common sound effect distance includes: when the state of the controlled object is the state of triggering the common game sound effect, and the common sound effect distance is smaller than a first preset distance, playing the common game sound effect; the step of playing the regional game sound effects according to the regional sound effect distance comprises the following steps: and when the area sound effect distance is smaller than a second preset distance, playing the area game sound effect.
In an optional embodiment, when there are a plurality of ordinary game sound effects to be played, the step of playing the ordinary game sound effects includes: playing each common game sound effect according to the priority order of each common game sound effect; when a plurality of regional game sound effects need to be played, the step of playing the regional game sound effects comprises the following steps: and playing each regional game sound effect according to the priority order of each regional game sound effect.
In an alternative embodiment, the step of playing each of the ordinary game sound effects according to the priority order of each of the ordinary game sound effects comprises: determining whether the target common game sound effect is a circular playing sound effect; the target common game sound effect is any one of the plurality of common game sound effects; when the target common game sound effect is a circular playing sound effect, playing the target common game sound effect within a second preset time period by taking a second preset time length as a time interval period; according to the priority order of each regional game sound effect, the step of playing each regional game sound effect comprises the following steps: determining whether the sound effect of the target area game is a circular playing sound effect; the target area game sound effect is any one of the plurality of area game sound effects; and when the target area game sound effect is a circular playing sound effect, playing the target area game sound effect according to a third preset time period as a time interval period in a third preset time period.
In a second aspect, an embodiment of the present application provides a game sound effect management apparatus, including: the acquisition module is used for acquiring the position of the controlled object; the acquisition module is also used for acquiring background game sound effect and dynamic game sound effect; the position of the dynamic game sound effect is positioned in a preset loading range taking the position of the controlled object as the center; the playing module is used for playing the background game sound effect when the position of the controlled object is in a background sound effect range; the background sound effect range is a first preset range taking the position of the background game sound effect as the center; the playing module is also used for playing the dynamic game sound effect when the position of the dynamic game sound effect is within the dynamic sound effect range; the dynamic sound effect range is a second preset range taking the position of the controlled object as the center.
In an optional implementation manner, the playing module is further configured to unload the dynamic game sound effect when the position of the dynamic game sound effect is outside the preset loading range.
In an optional embodiment, the playing module is configured to play the background game sound effect at least once in a preset time period, with a time point when the position of the controlled object first enters the background sound effect range as a playing starting point.
In an optional implementation manner, the playing module is configured to completely play the background game sound effect by taking a time point when the position of the controlled object first enters a background sound effect range as a playing starting point; the playing module is also used for determining whether the background game sound effect is a circular playing sound effect; the playing module is also used for playing the background game sound effect as a time interval period according to a first preset duration in a first preset time period when the background game sound effect is a circular playing sound effect.
In an optional implementation manner, the dynamic game sound effect comprises a common game sound effect and a regional game sound effect, and the playing module is used for playing the common game sound effect according to the state of the controlled object and the common sound effect distance when the position of the common game sound effect is within the dynamic sound effect range; the common sound effect distance is the distance between the position of the common game sound effect and the position of the controlled object; the playing module is also used for playing the regional game sound effect according to the regional sound effect distance when the position of the regional game sound effect is within the dynamic sound effect range; the zone sound effect distance is the distance between the position of the zone game sound effect and the position of the controlled object.
In an optional embodiment, the playing module is configured to play the common game sound effect when the state of the controlled object is the state that the common game sound effect is triggered, and the common sound effect distance is smaller than a first preset distance; the playing module is used for playing the regional game sound effect when the regional sound effect distance is smaller than a second preset distance.
In an optional implementation manner, when there are a plurality of common game sound effects to be played, the playing module is configured to play each common game sound effect according to a priority order of each common game sound effect; when there are multiple regional game sound effects to be played, the playing module is used for playing each regional game sound effect according to the priority order of the regional game sound effects.
In an optional embodiment, the playing module is configured to determine whether a target common game sound effect is a circular playing sound effect; the target common game sound effect is any one of the plurality of common game sound effects; the playing module is also used for playing the target common game sound effect within a second preset time period according to a second preset time length as a time interval cycle when the target common game sound effect is a circular playing sound effect; the playing module is used for determining whether the sound effect of the target area game is a circular playing sound effect; the target area game sound effect is any one of the plurality of area game sound effects; the playing module is also used for playing the target area game sound effect according to a third preset time period as a time interval period in a third preset time period when the target area game sound effect is a circular playing sound effect.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the game sound effect management method according to any one of the foregoing embodiments.
In a fourth aspect, an embodiment of the present application provides an electronic device, including: the system comprises a processor, a memory and a bus, wherein the memory stores machine readable instructions, when the electronic device runs, the processor and the memory are communicated through the bus, and the processor executes the machine readable instructions to execute the game sound effect management method according to any one of the preceding embodiments.
The beneficial effects of the embodiment of the application include, for example: firstly, obtaining background game sound effect and obtaining dynamic game sound effect in a preset loading range taking the position of a controlled object as the center, and then playing the background game sound effect when the position of the controlled object is in the background sound effect range; and when the position of the dynamic game sound effect is within the dynamic sound effect range, playing the dynamic game sound effect. That is, the specific game sound effect is loaded in the specific game scene, and the purpose of operating the memory can be reasonably used. And the game sound effect is divided into a background game sound effect and a dynamic game sound effect, and the controlled object can be played only when being positioned in the sound effect range corresponding to the game sound effect, so that the playing effect of the game sound effect is enhanced. Therefore, the playing effect of the game sound effect can be improved, and the consumption of the running memory is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a block diagram of an electronic device according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of a method for managing sound effects of a game according to an embodiment of the present disclosure;
FIG. 3 is a schematic view of an application scenario of the method for managing sound effects of a game on an electronic device according to the embodiment of the present application;
FIG. 4 is another flowchart of a method for managing sound effects of a game according to an embodiment of the present disclosure;
FIG. 5 is another flowchart of a method for managing sound effects of a game according to an embodiment of the present disclosure;
FIG. 6 is another flowchart of a method for managing sound effects of a game according to an embodiment of the present disclosure;
FIG. 7 is another flowchart of a method for managing sound effects of a game according to an embodiment of the present disclosure;
FIG. 8 is another flowchart of a method for managing sound effects of a game according to an embodiment of the present disclosure;
fig. 9 is a functional block diagram of a game sound effect management apparatus according to an embodiment of the present disclosure.
Icon: 100-an electronic device; 110-a memory; 120-a processor; 130-a bus; 140-a communication interface; 200-game sound effect management device; 210-an obtaining module; 220-playing module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present application may be combined with each other without conflict.
In the process of implementing the technical solution of the embodiment of the present application, the inventors of the present application find that:
with the rapid development of the game industry, the advance path of the sound effect of the game is continuously explored while the game pursues the picture. In the existing game, all game sound effects are directly loaded into an operating memory in a small scene, the sound effect types are not distinguished, and the game is stopped when the playing stopping condition is reached. This results in a large amount of running memory being consumed, the game is easy to run and collapse, and the playing effect of the game sound effect is poor. Therefore, the existing game sound effect management mode is not beneficial to relieving the mental stress of people and even bringing stress to people.
It will be appreciated that the prior art includes at least the following disadvantages: 1. loading all game sound effects into the running memory consumes a large amount of running memory, and when the consumption of the running memory is too high, the game is crashed. 2. The single sound effect type is inconvenient for sound effect management and can not achieve better playing effect. 3. The way of switching the sound effect of the game is not friendly.
Therefore, in order to overcome the above drawbacks, embodiments of the present application provide a method, an apparatus, a storage medium, and an electronic device for managing game sound, which can improve the playing effect of game sound and reduce the consumption of running memory. It should be noted that the defects of the solutions in the above prior art are the results obtained after the inventor has made practice and careful study, and therefore, the discovery process of the above problems and the solutions proposed by the embodiments of the present application in the following description should be the contribution of the inventor to the present application in the course of the present application.
Referring to fig. 1, a block diagram of an electronic device 100 according to an embodiment of the present disclosure is shown. The electronic device 100 may include a memory 110, a processor 120, a bus 130, and a communication interface 140, the memory 110, the processor 120, and the communication interface 140 being electrically connected to each other, directly or indirectly, to enable transmission or interaction of data. For example, the components may be electrically connected to each other via one or more buses 130 or signal lines. Processor 120 may process information and/or data related to game sound effect management to perform one or more of the functions described herein. For example, the processor 120 may obtain the position of the controlled object, the background game sound effect and the dynamic game sound effect, and perform the game sound effect management according to the above data, thereby implementing the game sound effect management analysis method provided by the present application.
The Memory 110 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Read Only Memory (EPROM), an electrically Erasable Read Only Memory (EEPROM), and the like.
The processor 120 may be an integrated circuit chip having signal processing capabilities. The processor 120 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
It will be appreciated that the configuration shown in FIG. 1 is merely illustrative and that the electronic device 100 may include more or fewer components than shown in FIG. 1 or may have a different configuration than shown in FIG. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof. In practical applications, the electronic device 100 provided in the present application includes, but is not limited to: mobile phones, tablet computers, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, Personal Digital Assistants (PDAs), wearable electronic devices, virtual reality devices, servers, and the like.
For convenience of understanding, the following embodiments of the present application will take the electronic device 100 shown in fig. 1 as an example, and will specifically describe the game sound effect management method provided by the embodiments of the present application with reference to the drawings.
Referring to fig. 2, an embodiment of the present application provides a flow diagram of a game sound effect management method, where the game sound effect management method can be applied to the electronic device 100, and the game sound effect management method includes the following steps:
and S100, acquiring the position of the controlled object.
The controlled object may be understood as a game character controlled by a player when playing a game, and the position of the controlled object is a position of the game character in the game, for example, coordinates of the game character in a three-dimensional space of the game or coordinates of the game character in a two-dimensional space of the game, which is not limited in this application.
S110, obtaining a background game sound effect and a dynamic game sound effect; the position of the dynamic game sound effect is within a preset loading range centered on the position of the controlled object.
Firstly, the game sound effect can be divided into a background game sound effect and a dynamic game sound effect in advance, the background game sound effect is an analysis scene static sound effect file, and the dynamic game sound effect is an analysis scene dynamic sound effect file. For example, when a game character enters a palace in a game, a piece of background music related to the palace can be played, and the played game sound effect can be divided into the background game sound effect; when the game role runs in the game, the running footstep sound can be played, and the played game sound effect can be divided into dynamic game sound effects. In the application, the obtained background game sound effect and the dynamic game sound effect can further comprise information such as sound effect positions, volume, circulation states and the like corresponding to the sound effects.
In a game, the background game sound effects are usually few, and usually only include the game sound effects corresponding to each fixed scene in the game, and a large amount of running memory space is not occupied when all the background game sound effects are loaded into the running memory, so that the electronic device 100 can directly acquire all the background game sound effects.
For the dynamic game sound effect, the electronic device 100 may acquire all the dynamic game sound effects within a preset loading range centered on the position of the controlled object. Referring to an application scenario diagram of the game sound management method shown in fig. 3 on an electronic device, a is a controlled object, and a dynamic game sound 1, a dynamic game sound 2, and a dynamic game sound 3 are respectively disposed at positions of a car C, a tree T, and a bicycle B, and assuming that an area included in a circle S1 with a center a as a center is a preset loading range, the dynamic game sound that can be acquired by the electronic device 100 includes the dynamic game sound 1 and the dynamic game sound 2 because the car C and the tree T are located in the area included in the circle S1 and the bicycle B is located outside the area included in the circle S1.
It is understood that the above-mentioned obtaining in S100 and S110 may be understood as loading the relevant data into the operating memory.
In addition, it is also necessary to supplement that, in order to further save the running memory, the application may acquire the background game sound effect only when the position of the background game sound effect is within a preset loading range centered on the position of the controlled object.
S120, when the position of the controlled object is in the background sound effect range, playing a background game sound effect; the background sound effect range is a first preset range taking the position of the background game sound effect as the center.
Referring to the application scenario shown in fig. 3, a is the controlled object, and the background game sound effect 1 is disposed at the position of the building D, and assuming that the area included in the circle S2 with D as the center is the first preset range, at this time, since the controlled object a is located outside the area included in S2, the electronic device 100 may not play the background game sound effect 1.
S130, when the position of the dynamic game sound effect is in the dynamic sound effect range, playing the dynamic game sound effect; the dynamic sound effect range is a second preset range centered on the position of the controlled object.
Referring to the application scenario shown in fig. 3, a is a controlled object, and it is assumed that an area included in a circle S3 with a center being a center a is a second preset range, at this time, since the car C is located outside the area included in S3 and the tree T is located in the area included in S3, the electronic device 100 can play the dynamic game sound effect 2.
It should be understood that, since the background game sound effect is firstly acquired and the dynamic game sound effect within the preset loading range centered on the position of the controlled object is acquired, then when the position of the controlled object is within the background sound effect range, the background game sound effect is played; and when the position of the dynamic game sound effect is within the dynamic sound effect range, playing the dynamic game sound effect. That is, the specific game sound effect is loaded in the specific game scene, and the purpose of operating the memory can be reasonably used. And the game sound effect is divided into a background game sound effect and a dynamic game sound effect, and the controlled object can be played only when being positioned in the sound effect range corresponding to the game sound effect, so that the playing effect of the game sound effect is enhanced. Therefore, the playing effect of the game sound effect can be improved, and the consumption of the running memory is reduced.
Further, on the basis of fig. 2, a possible implementation manner of the complete solution is given below, please refer to fig. 4, and fig. 4 shows another flowchart of the game sound effect management method provided in the embodiment of the present application.
When the position of the controlled object is located in the background sound effect range, for how to play the background game sound effect, S120 may include:
S120A, the time point when the position of the controlled object first enters the background sound effect range is used as the playing start point, and the background game sound effect is played at least once within the preset time period.
Referring still to the application scenario shown in fig. 3, the background game sound effect 1 may be a segment of palace music (total playing time is 3min), and it is assumed that the time point when the player controls the controlled object a to first enter the area included in S2 is "19: 10: 11 ", the preset time period is the playing time of the palace music, the electronic device 100 may display the preset time period in a" 19: 10: and the time point of 11' is the starting point of playing, and the background game sound effect 1 is completely played once within 3 min.
It is understood that during the period of playing the background game sound effect 1, the background game sound effect 1 is played regardless of whether the player-controlled object a leaves the area included in S2. Also during the period of playing the background game sound effect 1, the player controls the controlled object a to leave the area covered by the re-entry S2, and the background game sound effect 1 does not resume playing.
As to how to completely play the background game sound effect at least once within the preset time period by taking the time point when the position of the controlled object first enters the background sound effect range as the play start point, with reference to fig. 4, S120A may include:
S120A-1, the time point when the position of the controlled object firstly enters the background sound effect range is taken as the playing starting point, and the background game sound effect is completely played.
Referring still to the application scenario shown in fig. 3, the background game sound effect 1 may be a segment of palace music (total playing time is 3min), and it is assumed that the time point when the player controls the controlled object a to first enter the area included in S2 is "19: 10: 11 ", then electronic device 100 may transmit the message in" 19: 10: the time point 11 is the play starting point, the background game sound effect 1 is played once in a complete way, and the playing time point 19: 13: 11 "stop the playing of the sound effect.
S120A-2, determining whether the background game sound effect is a loop play sound effect.
With reference to the application scenario shown in fig. 3, after the background game sound effect 1 is completely played, the electronic device 100 may further determine whether the background game sound effect 1 is a loop play sound effect, that is, determine whether the background game sound effect 1 needs to be played in a loop. It is understood that whether the background game sound effect needs to be played circularly or not can be preset.
S120A-3, when the background game sound effect is the circulation playing sound effect, playing the background game sound effect within a first preset time period and with a first preset duration as a time interval period.
Referring to the application scenario shown in fig. 3, it is assumed that the first preset time period is 30min and the first preset time duration is 5 s. When the background game sound effect 1 is completely played and the background game sound effect 1 is a loop play sound effect, the electronic device 100 can play the background game sound effect 1 in a loop at an interval of 5s, and the audio playback method is executed in "19: 33: 11 "stop the playing of the sound effect.
It should be noted that, when the background game sound effect 1 stops playing, the playing may be stopped in the form of fading-out stopping playing or the like.
In some possible embodiments, the dynamic game sound effects may include normal game sound effects and local game sound effects, and for how to play the dynamic game sound effects when the position of the dynamic game sound effects is within the dynamic sound effect range, referring to fig. 6, S130 may include:
S130A, when the position of the common game sound effect is in the dynamic sound effect range, playing the common game sound effect according to the state of the controlled object and the common sound effect distance; the normal sound effect distance is a distance between a position of the normal game sound effect and a position of the controlled object.
The common game sound effects may include a birdsong sound effect, a walking footstep sound effect, a character skill sound effect, a gunshot sound effect, and the like. Please continue to refer to the application scenario shown in fig. 3, assuming that the common game sound effects included in the application scenario are: a bird song sound effect, a walking step sound effect, a character skill sound effect, a gunshot sound effect, a car sound effect, and a bicycle sound effect. And the walking footstep sound effect, the character skill sound effect and the gunshot sound effect are arranged at the positions of the controlled object A, and the birdsong sound effect, the car sound effect and the bicycle sound effect are respectively arranged at the positions of the trees T, the car C and the bicycle B. Since only the walking footstep sound effect, the character skill sound effect, and the gunshot sound effect are located within the area included in the circle S1, the common game sound effect can be played according to the state of the controlled object a and the common sound effect distance.
Then, for the walking step sound effect, whether the controlled object A meets the walking state or not can be judged, whether the distance between the position of the walking step sound effect and the position of the controlled object A is smaller than a preset value or not can be judged, and when the controlled object A meets the walking state and the distance between the position of the walking step sound effect and the position of the controlled object A is smaller than the preset value, the walking step sound effect is played. For the role skill sound effect, whether the controlled object A meets the skill release state or not can be judged, whether the distance between the position of the role skill sound effect and the position of the controlled object A is smaller than a preset value or not can be judged, and when the controlled object A meets the skill release state and the distance between the position of the role skill sound effect and the position of the controlled object A is smaller than the preset value, the role skill sound effect is played. And for the gunshot sound effect, whether the controlled object A meets the gun opening state or not can be judged, whether the distance between the position of the gunshot sound effect and the position of the controlled object A is smaller than a preset value or not can be judged, and when the controlled object A meets the gun opening state and the distance between the position of the gunshot sound effect and the position of the controlled object A is smaller than the preset value, the gunshot sound effect is played.
In other words, when the controlled object a moves, the player can hear the walking footsteps; when the controlled object A releases the skill, the player can hear the character skill sound effect; when the controlled object A opens the gun, the player can hear the sound effect of the gun; when the controlled object a approaches the tree T, the player can hear the birdsong effect; when the object a to be controlled approaches the car C, the player can hear the car sound effect. This enhances the playability of the game.
It can be understood that "playing the ordinary game sound effect according to the state of the controlled object and the ordinary sound effect distance" in the present application can be understood as playing the ordinary game sound effect when the state of the controlled object satisfies the condition of playing the ordinary game sound effect, and the ordinary sound effect distance is smaller than the preset distance.
It should be further noted that, in practical application, whether each sound effect in the game is a common game sound effect can be determined according to practical requirements, and each sound effect in the game can be effectively and flexibly managed through the game sound effect management method provided by the application.
As to how to play the common game sound effects according to the state of the controlled object and the common sound effect distance, with reference to fig. 6, S130A may include:
S130A-1, when the state of the controlled object is the state of triggering the common game sound effect and the common sound effect distance is less than the first preset distance, playing the common game sound effect.
Please continue to refer to the application scenario shown in fig. 3, assuming that the common game sound effects included in the application scenario are: step sound effect. And the walking footstep sound effect is set at the position where the controlled object a is located. Since the walking footstep effect is located within the area included in the circle S1, the location of the walking footstep effect is located within the dynamic effect range.
Then, for the walking step sound effect, it can be determined whether the state of the controlled object a is the state of triggering the walking step sound effect (i.e., the walking state is satisfied), and whether the distance between the position of the walking step sound effect and the position of the controlled object a is smaller than a first preset distance. And when the controlled object A is in a state of triggering the walking step sound effect and the distance between the position of the walking step sound effect and the position of the controlled object A is smaller than a first preset distance, playing the walking step sound effect.
In some possible embodiments, when there are a plurality of ordinary game sound effects to play, for how to play the ordinary game sound effects, S130A-1 may include: and playing each common game sound effect according to the priority order of each common game sound effect.
Please continue to refer to the application scenario shown in fig. 3, assuming that the common game sound effects included in the application scenario are: a bird song sound effect, a walking step sound effect, a character skill sound effect, a gunshot sound effect, a car sound effect, and a bicycle sound effect. When the sound effects are all required to be played, the electronic device 100 may obtain the priority of each sound effect, and then play each common game sound effect in the order from high priority to low priority. For example, the walking footstep sound effect, the character skill sound effect and the gunshot sound effect have the highest priority, and the priority of the bird song sound effect, the car sound effect and the bicycle sound effect is sequentially reduced, so that when the controlled object a approaches to the tree T, the car C and the bicycle B, and releases the skill, opens the gun and walks, the walking footstep sound effect, the character skill sound effect and the gunshot sound effect are preferentially played, and further the reality of the game is enhanced.
For how to play each ordinary game sound effect in the priority order of each ordinary game sound effect, the following steps can be performed: determining whether the target common game sound effect is a circular playing sound effect; the target normal game sound effect is any one of a plurality of normal game sound effects. And when the target common game sound effect is the circular playing sound effect, playing the target common game sound effect within a second preset time period by taking a second preset time length as a time interval period.
With reference to the application scenario shown in fig. 3, it is assumed that the target common game sound effect is a character skill sound effect, the character skill sound effect is a circular playing sound effect, the second preset time period is 5min, and the second preset time duration is 1 s. The character skill sound effect can be played at 5s intervals for 5min in a loop.
With reference to fig. 6, S130B, when the position of the local game sound effect is within the dynamic sound effect range, playing the local game sound effect according to the local sound effect distance; the area sound effect distance is a distance between the position of the area game sound effect and the position of the controlled object.
The common game sound effect can comprise a tree sound effect, a river sound effect and the like. Please continue to refer to the application scenario shown in fig. 3, assuming that the area game sound effects included in the application scenario are: tree sound, river sound. The tree sound effect and the river sound effect are respectively arranged at the positions of the tree T and the river R.
And for the tree sound effect, whether the distance between the position of the tree sound effect and the position of the controlled object A is smaller than a preset value or not can be judged, and when the distance between the position of the tree sound effect and the position of the controlled object A is smaller than the preset value, the tree sound effect is played. And for the river sound effect, whether the distance between the position of the river sound effect and the position of the controlled object A is smaller than a preset value or not can be judged, and when the distance between the position of the river sound effect and the position of the controlled object A is smaller than the preset value, the river sound effect is played.
In other words, when the controlled object a approaches the tree T, the player can hear the tree sound effect; when the controlled object a approaches the river R, the player can hear the river sound effect. This enhances the playability of the game.
It should be further noted that, in practical application, whether each sound effect in the game is a regional game sound effect can be determined according to practical requirements, and each sound effect in the game can be effectively and flexibly managed through the game sound effect management method provided by the application.
With respect to how the zone game sound effects are played according to the zone sound effect distance, please continue to refer to fig. 7, S130B may include:
S130B-1, when the area sound effect distance is less than the second preset distance, playing the area game sound effect.
Please continue to refer to the application scenario shown in fig. 3, assuming that the area game sound effects included in the application scenario are: and (5) a tree sound effect. And the tree sound effect is set at the position where the controlled object a is located. Then, for the tree sound effect, when the distance between the position of the tree sound effect and the position of the controlled object A is smaller than a second preset distance, the tree sound effect is played.
In some possible embodiments, when there are multiple zone game sound effects to play, for how to play the zone game sound effects, S130B-1 may include: and playing each regional game sound effect according to the priority order of each regional game sound effect.
Please continue to refer to the application scenario shown in fig. 3, assuming that the area game sound effects included in the application scenario are: tree sound, river sound. When the sound effects all need to be played, the electronic device 100 may obtain the priority of each sound effect, and then play the sound effects of each regional game in the order from high priority to low priority. For example, if the tree sound effect has the highest priority and the river sound effect has the lowest priority, the tree sound effect is preferentially played when the controlled object a approaches the tree T or the river R.
For how to play each regional game sound effect according to the priority order of each regional game sound effect, whether the target regional game sound effect is a circular play sound effect can be determined; the target zone game sound effect is any one of a plurality of zone game sound effects. And when the target area game sound effect is the circular playing sound effect, playing the target area game sound effect within a third preset time period by taking a third preset time length as a time interval period.
Referring to the application scenario shown in fig. 3, it is assumed that the target area game sound effect is a tree sound effect, the tree sound effect is a loop playing sound effect, the third preset time period is 5min, and the third preset time period is 1 s. The tree sound effect can be played cyclically at 5s intervals for 5 min.
It should be noted that the first preset time period, the second preset time period, and the third preset time period may be infinite. Thereby realizing the infinite circulation playing of the specific sound effect.
In the application, the obtained background game sound effect and the dynamic game sound effect can further comprise information such as a sound effect group name, a sound effect position, volume, a circulation state and the like corresponding to each sound effect. And for the dynamic game sound effect, the common game sound effect and the regional game sound effect in the dynamic game sound effect can be determined according to the information such as the sound effect group name, the sound effect position, the volume, the circulation state and the like.
To further reduce the consumption of the operating memory, after S130, on the basis of fig. 7, referring to fig. 8, the method further includes:
s140, when the position of the dynamic game sound effect is outside the preset loading range, the dynamic game sound effect is unloaded.
Referring to the application scenario shown in fig. 3, the dynamic game sound effects in the area covered by the current circle S1 include: car sound, tree sound, etc. are unloaded from the operating memory when the position of one of these sound is outside the area covered by the circle S1 as the position of the object a moves. And further, the consumption of the running memory is reduced.
It should be understood that the method provided by the application can play a role in obviously reducing the consumption of sound effects on the running memory and enhancing the reality and the friendliness of game scenes.
In addition, it is also necessary to supplement that, in order to further save the running memory, the application may also unload the background game sound effect when the position of the background game sound effect is outside the preset loading range.
In order to execute the corresponding steps in the foregoing embodiments and various possible manners, an implementation manner of the game sound effect management apparatus is provided below, please refer to fig. 9, and fig. 9 shows a functional block diagram of the game sound effect management apparatus provided in the embodiments of the present application. It should be noted that the basic principle and the generated technical effects of the game sound effect management apparatus 200 provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no part of the present embodiment is mentioned, and corresponding contents in the above embodiments may be referred to. The game sound effect management apparatus 200 includes: an acquisition module 210 and a playing module 220.
Alternatively, the modules may be stored in a memory in the form of software or Firmware (Firmware) or be fixed in an Operating System (OS) of the electronic device 100 provided in the present application, and may be executed by a processor in the electronic device 100. Meanwhile, data, codes of programs, and the like required to execute the above modules may be stored in the memory.
Among other things, the acquisition module 210 may be used to support the electronic device 100 to perform the above-described S100, S110, etc., and/or other processes for the techniques described herein.
The play module 220 may be used to support the electronic device 100 to perform the above-described S120, S130, S120A, S120A-1, S120A-2, S120A-3, S130A, S130A-1, S130B, S130B-1, S140, etc., and/or other processes for the techniques described herein.
Based on the above method embodiment, the present application further provides a computer readable storage medium, where a computer program is stored on the computer readable storage medium, and the computer program is executed by a processor to perform the steps of the game sound effect management method.
Optionally, the storage medium may be a general storage medium, such as a removable disk, a hard disk, and the like, and when the computer program on the storage medium is executed, the game sound management method may be executed, so as to solve the problem that how to improve the playing effect of the game sound and reduce the consumption of the operating memory are urgently needed, thereby achieving the purposes of improving the playing effect of the game sound and reducing the consumption of the operating memory.
To sum up, the embodiment of the present application provides a method, an apparatus, a storage medium and an electronic device for managing sound effects of a game, wherein the method includes: acquiring the position of a controlled object; acquiring background game sound effect and dynamic game sound effect; the position of the dynamic game sound effect is positioned in a preset loading range taking the position of the controlled object as the center; when the position of the controlled object is in the background sound effect range, playing the background game sound effect; the background sound effect range is a first preset range taking the position of the background game sound effect as the center; when the position of the dynamic game sound effect is in the dynamic sound effect range, playing the dynamic game sound effect; the dynamic sound effect range is a second preset range centered on the position of the controlled object. Firstly, obtaining background game sound effect and obtaining dynamic game sound effect in a preset loading range taking the position of a controlled object as the center, and then playing the background game sound effect when the position of the controlled object is in the background sound effect range; and when the position of the dynamic game sound effect is within the dynamic sound effect range, playing the dynamic game sound effect. That is, the specific game sound effect is loaded in the specific game scene, and the purpose of operating the memory can be reasonably used. And the game sound effect is divided into a background game sound effect and a dynamic game sound effect, and the controlled object can be played only when being positioned in the sound effect range corresponding to the game sound effect, so that the playing effect of the game sound effect is enhanced. Therefore, the playing effect of the game sound effect can be improved, and the consumption of the running memory is reduced.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. A method for managing sound effects of a game is characterized by comprising the following steps:
acquiring the position of a controlled object;
acquiring background game sound effect and dynamic game sound effect; the position of the dynamic game sound effect is positioned in a preset loading range taking the position of the controlled object as the center;
when the position of the controlled object is in a background sound effect range, playing the background game sound effect; the background sound effect range is a first preset range taking the position of the background game sound effect as the center;
when the position of the dynamic game sound effect is within the dynamic sound effect range, playing the dynamic game sound effect; the dynamic sound effect range is a second preset range taking the position of the controlled object as the center.
2. The method of claim 1, further comprising:
and when the position of the dynamic game sound effect is positioned outside the preset loading range, unloading the dynamic game sound effect.
3. The method of claim 1, wherein the step of playing the background game sound effect when the position of the controlled object is in a background sound effect range comprises:
and taking the time point when the position of the controlled object firstly enters the background sound effect range as a playing starting point, and completely playing the background game sound effect at least once in a preset time period.
4. The method as claimed in claim 3, wherein the step of playing the background game sound effect at least once in a preset time period with a time point when the position of the controlled object first enters the background sound effect range as a playing start point comprises:
the time point when the position of the controlled object firstly enters the background sound effect range is taken as a playing starting point, and the background game sound effect is completely played;
determining whether the background game sound effect is a circular playing sound effect;
and when the background game sound effect is a circular playing sound effect, the background game sound effect is played according to a first preset time length as a time interval period in a first preset time period.
5. The method of claim 1, wherein the dynamic game sound effects comprise normal game sound effects and regional game sound effects, and when the position of the dynamic game sound effects is within a dynamic sound effect range, the step of playing the dynamic game sound effects comprises:
when the position of the common game sound effect is in the dynamic sound effect range, playing the common game sound effect according to the state of the controlled object and the common sound effect distance; the common sound effect distance is the distance between the position of the common game sound effect and the position of the controlled object;
when the position of the regional game sound effect is in the dynamic sound effect range, playing the regional game sound effect according to the regional sound effect distance; the zone sound effect distance is the distance between the position of the zone game sound effect and the position of the controlled object.
6. The method of claim 5, wherein the step of playing the normal game sound effects according to the state of the controlled object and the normal sound effect distance comprises:
when the state of the controlled object is a state of triggering a common game sound effect, and the common sound effect distance is smaller than a first preset distance, playing the common game sound effect;
the step of playing the regional game sound effects according to the regional sound effect distance comprises the following steps:
and when the area sound effect distance is smaller than a second preset distance, playing the area game sound effect.
7. The method of claim 6, wherein when there are a plurality of normal game sound effects to play, the step of playing the normal game sound effects comprises:
playing each common game sound effect according to the priority order of each common game sound effect;
when a plurality of regional game sound effects need to be played, the step of playing the regional game sound effects comprises the following steps:
and playing each regional game sound effect according to the priority order of each regional game sound effect.
8. The method of claim 7, wherein the step of playing each of the generic game sound effects in the priority order of each of the generic game sound effects comprises:
determining whether the target common game sound effect is a circular playing sound effect; the target common game sound effect is any one of the plurality of common game sound effects;
when the target common game sound effect is a circular playing sound effect, playing the target common game sound effect within a second preset time period by taking a second preset time length as a time interval period;
according to the priority order of each regional game sound effect, the step of playing each regional game sound effect comprises the following steps:
determining whether the sound effect of the target area game is a circular playing sound effect; the target area game sound effect is any one of the plurality of area game sound effects;
and when the target area game sound effect is a circular playing sound effect, playing the target area game sound effect according to a third preset time period as a time interval period in a third preset time period.
9. A game sound effect management apparatus, comprising:
the acquisition module is used for acquiring the position of the controlled object;
the acquisition module is also used for acquiring background game sound effect and dynamic game sound effect; the position of the dynamic game sound effect is positioned in a preset loading range taking the position of the controlled object as the center;
the playing module is used for playing the background game sound effect when the position of the controlled object is in a background sound effect range; the background sound effect range is a first preset range taking the position of the background game sound effect as the center;
the playing module is also used for playing the dynamic game sound effect when the position of the dynamic game sound effect is within the dynamic sound effect range; the dynamic sound effect range is a second preset range taking the position of the controlled object as the center.
10. A computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing a game sound effect management method according to any one of claims 1-8.
11. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine readable instructions which when executed by the electronic device communicate over the bus, the processor executing the machine readable instructions to perform the method of game sound effect management of any of claims 1-8.
CN201911343504.2A 2019-12-24 2019-12-24 Game sound effect management method and device, storage medium and electronic equipment Withdrawn CN111135572A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911343504.2A CN111135572A (en) 2019-12-24 2019-12-24 Game sound effect management method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911343504.2A CN111135572A (en) 2019-12-24 2019-12-24 Game sound effect management method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111135572A true CN111135572A (en) 2020-05-12

Family

ID=70519556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911343504.2A Withdrawn CN111135572A (en) 2019-12-24 2019-12-24 Game sound effect management method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111135572A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672757A (en) * 2021-08-23 2021-11-19 北京字跳网络技术有限公司 Audio playing method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007014444A (en) * 2005-07-06 2007-01-25 Konami Digital Entertainment:Kk Game apparatus, and control method and program therefor
CN105159655A (en) * 2014-05-28 2015-12-16 腾讯科技(深圳)有限公司 Playing method and playing device for behavior event
CN105354406A (en) * 2014-08-19 2016-02-24 腾讯科技(深圳)有限公司 Background music processing method and apparatus
CN107179908A (en) * 2017-05-16 2017-09-19 网易(杭州)网络有限公司 Audio method of adjustment, device, electronic equipment and computer-readable recording medium
CN108465241A (en) * 2018-02-12 2018-08-31 网易(杭州)网络有限公司 Processing method, device, storage medium and the electronic equipment of game sound reverberation
CN108525302A (en) * 2018-04-09 2018-09-14 网易(杭州)网络有限公司 Control method, device, processor and the terminal of game background music
JP2018201790A (en) * 2017-06-02 2018-12-27 株式会社カプコン Game program and game device
CN109173259A (en) * 2018-07-17 2019-01-11 派视觉虚拟现实(深圳)软件技术有限公司 Audio optimization method, device and equipment in a kind of game
CN110538456A (en) * 2019-09-09 2019-12-06 北京西山居互动娱乐科技有限公司 Sound source setting method, device, equipment and storage medium in virtual environment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007014444A (en) * 2005-07-06 2007-01-25 Konami Digital Entertainment:Kk Game apparatus, and control method and program therefor
CN105159655A (en) * 2014-05-28 2015-12-16 腾讯科技(深圳)有限公司 Playing method and playing device for behavior event
CN105354406A (en) * 2014-08-19 2016-02-24 腾讯科技(深圳)有限公司 Background music processing method and apparatus
CN107179908A (en) * 2017-05-16 2017-09-19 网易(杭州)网络有限公司 Audio method of adjustment, device, electronic equipment and computer-readable recording medium
JP2018201790A (en) * 2017-06-02 2018-12-27 株式会社カプコン Game program and game device
CN108465241A (en) * 2018-02-12 2018-08-31 网易(杭州)网络有限公司 Processing method, device, storage medium and the electronic equipment of game sound reverberation
CN108525302A (en) * 2018-04-09 2018-09-14 网易(杭州)网络有限公司 Control method, device, processor and the terminal of game background music
CN109173259A (en) * 2018-07-17 2019-01-11 派视觉虚拟现实(深圳)软件技术有限公司 Audio optimization method, device and equipment in a kind of game
CN110538456A (en) * 2019-09-09 2019-12-06 北京西山居互动娱乐科技有限公司 Sound source setting method, device, equipment and storage medium in virtual environment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672757A (en) * 2021-08-23 2021-11-19 北京字跳网络技术有限公司 Audio playing method and device
CN113672757B (en) * 2021-08-23 2024-01-16 北京字跳网络技术有限公司 Audio playing method and device

Similar Documents

Publication Publication Date Title
CN107861814B (en) Resource allocation method and equipment
KR102148948B1 (en) Multi tasking method of electronic apparatus and electronic apparatus thereof
CN107402790B (en) Application program starting method and device, storage medium and terminal
US20160048412A1 (en) Method and apparatus for switching applications
US10386914B2 (en) Method and apparatus for running application program
CN107729216B (en) Application program control method and device, storage medium and electronic equipment
CN107952241B (en) Rendering control method and device and readable storage medium
CN112331214A (en) Equipment awakening method and device
WO2016198027A1 (en) Multi-operation event execution method and device
CN110968415A (en) Scheduling method and device of multi-core processor and terminal
CN110806925B (en) Audio playing method and equipment
CN111782295B (en) Application program running method and device, electronic equipment and storage medium
CN110008027B (en) Process running method and device, terminal and storage medium
WO2019076255A1 (en) Game application control method, and device
CN111127612A (en) Game scene node updating method and device, storage medium and electronic equipment
CN110020383B (en) Page data request processing method and device
CN111135572A (en) Game sound effect management method and device, storage medium and electronic equipment
US20190156017A1 (en) Terminal and method for managing launch of an application of a terminal
US10238971B2 (en) Dynamic quality of service management in multiplayer gaming
CN111782294A (en) Application program running method and device, electronic equipment and storage medium
CN111857854A (en) Shutdown resource loading method and device, storage medium and electronic equipment
CN113134234B (en) Information display method, device, terminal and storage medium
CN110960857A (en) Game data monitoring method and device, electronic equipment and storage medium
CN113144606B (en) Skill triggering method of virtual object and related equipment
CN107547742B (en) Wake-up lock release method and device for mobile terminal

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200512