Sound effect control method and system for puzzle solving game, electronic equipment and storage medium

The method dynamically adjusts sound effects in puzzle games based on player position and actions, integrating them with puzzle progression to improve immersion and interactivity.

CN120305683APending Publication Date: 2025-07-15NINGBO INST OF NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510655318.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-07-15

Smart Images

  • Figure CN120305683A_ABST
    Figure CN120305683A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of game interaction, and particularly discloses a sound effect control method and system for a puzzle resolving game, electronic equipment and a storage medium, and the method comprises the following steps: obtaining current first space state information of a player in a target game scene and second space state information of a plurality of sound sources; according to the first space state information and the second space state information, determining a target distance between a player and a sound source and posture information of the player, and according to the target distance, the posture information and a preset sound effect attenuation coefficient, determining a sound effect priority and sound effect gradual change information of a scene sound source and at least one target sound source, and adjusting the volume and pitch of the scene sound source based on the sound effect priority and the sound effect gradient information, and determining a target sound effect of the target sound source and a volume value of the target sound effect according to a preset initial sound effect type of the target sound source and a difference value between a preset triggering radius threshold value corresponding to the initial sound effect type and a corresponding target distance, the method greatly improves the sense of reality and interaction experience of the game.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of game interaction, and particularly to a sound effect control method, system, electronic device, and storage medium for a puzzle game. Background Art

[0002] Currently, the sound effect systems of most puzzle games regard sound as a part of the game, usually used to provide an environmental atmosphere or prompt players. In these systems, the sound effects are generally pre-designed and fixed, aiming to enhance the game experience or provide necessary operation feedback for players. Most of the sound effects in the game are used to prompt players to complete certain specific tasks or promote the development of the game plot. The design of the sound effects usually depends on fixed rules and event triggers to help players understand the game process or maintain the game atmosphere. Many games use sound effects to prompt players to approach the target, complete tasks, or use sound effects in certain scenes to increase the sense of immersion.

[0003] Although the sound effect systems in the related technologies can provide basic game atmosphere and prompt functions, they have certain deficiencies in dynamic interactivity and spatial perception. On the one hand, the existing sound effect systems cannot be dynamically adjusted according to the player's real-time position or behavior in the virtual environment, resulting in a lack of a close interactive connection between the player's behavior and the sound effect feedback. On the other hand, the changes in the sound effects are usually only based on the settings of the game scene, rather than the player's specific operations or position changes, thus affecting the immersion and interactivity of the game.

[0004] Secondly, the sound effect feedback in the existing technologies is usually preset and not personalized according to the player's behavior or game progress, and cannot provide a more flexible feedback mechanism for players. Therefore, the existing sound effect systems fail to fully utilize sound as a tool to promote the game process and enhance the player's spatial perception, and cannot effectively enhance the player's sense of active exploration and puzzle-solving experience. Summary of the Invention

[0005] In view of the deficiencies of the existing technologies, this application proposes a sound effect control method, system, electronic device, and storage medium for a puzzle game, aiming to at least solve the problems that in the existing puzzle games, sound is not fully utilized as a tool to promote the game process and enhance the player's spatial perception, and the sound effect system lacks dynamic interaction with the player's spatial behavior.

[0006] In a first aspect, this application provides a sound effect control method for a puzzle game, including:

[0007] Step S100: When the target game is running, obtain the current first spatial state information of the player in the virtual space scene of the target game and the second spatial state information of a plurality of pre-set sound sources.

[0008] Step S200: Determine the target distance of the player from each sound source and the pose information of the player according to the first spatial state information and the second spatial state information, where the pose information includes at least one or more of head direction, body orientation, or view offset;

[0009] Step S300: Determine the sound effect priority and sound effect fade information of each scene sound source, and at least one target sound source according to the target distance, the pose information, and a preset sound attenuation coefficient, where the target sound source is one of the scene sound sources;

[0010] Step S400: Adjust the volume and pitch of each scene sound source based on the sound effect priority and the sound effect fade information, and determine the target sound effect of the target sound source and the volume value of the target sound effect according to the type of the initial sound effect preset for the target sound source, the difference between the preset trigger radius threshold corresponding to each initial sound effect type and the corresponding target distance.

[0011] In some embodiments, after the step S100, the method further includes:

[0012] Step S110: Obtain the first spatial coordinate information and the second spatial coordinate information of the player corresponding before and after a preset data collection time interval, where the second spatial coordinate information is the current position information of the player;

[0013] Step S120: Determine the velocity vector per unit time and the current acceleration vector of the player based on the data collection time interval, the first spatial coordinate information, and the second spatial coordinate information;

[0014] Step S130: Determine the predicted path trajectory of the player based on the velocity vector per unit time and the current acceleration vector of the player, where the predicted path trajectory is used to characterize the occurrence of potential sound source approach events or puzzle-solving behaviors, so as to serve as a spatial basis for sound direction rendering and volume fade control.

[0015] In some embodiments, in the step S130, the algorithm expression of the predicted path trajectory is:

[0016]

[0017] where P predict is the end coordinate of the predicted path, P player is the three-dimensional spatial coordinate vector of the player at the current moment; V player is the velocity vector of the player at the current moment; Δt1 is the time interval; A player is the acceleration vector of the player.

[0018] In some embodiments, in the step S300, it further includes:

[0019] Determine a corresponding sound effect attenuation coefficient according to the current sound effect type corresponding to each of the scene sound sources;

[0020] Determine the current volume of the sound effect fade - in process of each of the scene sound sources according to the sound effect attenuation coefficient and the target distance;

[0021] Based on the current azimuth angle parameter of the player in the attitude information, determine the relative angle between the current position orientation of the player and each of the scene sound sources, and adjust the sound effect direction of the scene sound source based on the relative angle.

[0022] In some embodiments, in the step S300, it further includes:

[0023] The algorithm expression of the sound effect priority is:

[0024]

[0025] In the formula, P priority is the priority value of the sound effect feedback, α is the adjustment factor, D player is the current position of the player, D target is the initial target sound source position; e is the base of the natural logarithm;

[0026] Or, the algorithm expression of the sound effect priority is: P = β·ln(D);

[0027] In the formula, P is the priority value of the sound effect feedback, β is the adjustment factor, D is the distance between the player and the initial target sound source, and ln is the natural logarithm.

[0028] In some embodiments, in the step S300, it further includes:

[0029] The algorithm expression of the current volume is:

[0030] In the formula, V sound is the current volume; V0 is the initial volume; γ is the attenuation coefficient; D source is the distance between the player and the initial target sound source.

[0031] In some embodiments, in the step S400, it further includes:

[0032] Judge whether the player is approaching the target sound source along the correct path according to the predicted path trajectory;

[0033] If so, collect and identify the operation behavior information of the player, determine the corresponding first sound effect feedback according to the operation behavior information, and modify the corresponding playing priority;

[0034] According to the target distance and a preset distance threshold, determine the puzzle-solving progress of the player to generate corresponding second sound effect feedback, where the algorithm expression of the target distance is:

[0035]

[0036] where (x1, y1, z1) are the current three-dimensional space position coordinates of the player; (x2, y2, z2) are the three-dimensional space position coordinates of the target sound source; and ε is the distance threshold set by the system.

[0037] Compared with the prior art, the above technical solution provided by this application at least includes the following beneficial effects or advantages:

[0038] 1) The method provided by this application, through the sound effect control technology of three-dimensional sound and spatial interaction, adjusts the volume, directionality and frequency of the sound effect in real time according to the position change and actions of the player in the virtual environment, enhances the player's spatial perception of the game scene, and compared with the existing sound effect control methods for puzzle-solving games, solves the problem that puzzle-solving games lack the sound and spatial interaction feedback, and greatly improves the realism and interactive experience of the game.

[0039] 2) The method provided by this application, by closely combining the sound trigger module with the puzzle control module and using sound as an important feedback mechanism for puzzle advancement, can trigger the sound effect in real time and control the sound effect fade according to the distance and relative position between the player and the target sound source. Different from the traditional games where the sound effect is only used as a background hint, by deeply integrating the sound effect with the puzzle-solving process, it solves the problem that the prior art cannot guide the player to solve the puzzle through sound feedback, making the sound not only a hint tool, but also a core part of the game process and puzzle-solving mechanism.

[0040] 3) The method provided by this application, by generating corresponding sound effect feedback according to the specific operation behavior of the player, further strengthens the interactivity of the game. Compared with the simple sound effect feedback in traditional puzzle-solving games, the present invention provides a more immersive sound interaction. Each operation of the player can obtain a personalized and dynamic sound effect response. This technology not only enhances the player's sense of game participation, but also improves the player's spatial awareness and motivation for active exploration in the game, thereby promoting the game progress and strengthening the overall experience of the game.

[0041] In a second aspect, this application provides a sound effect control device for a puzzle-solving game, including:

[0042] An acquisition module, configured to obtain, when a target game is running, the current first spatial state information of a player in the virtual space scene of the target game and the second spatial state information of a plurality of pre-set sound sources.

[0043] A distance determination module, configured to determine, according to the first spatial state information and the second spatial state information, the target distance between the player and each of the sound sources and the pose information of the player, where the pose information includes at least one or more of a head direction, a body orientation, or a perspective offset.

[0044] A sound effect determination module, configured to determine, according to the target distance, the pose information, and a preset sound effect attenuation coefficient, the sound effect priority and sound effect fade information of each of the scene sound sources, and at least one target sound source, where the target sound source is one of the scene sound sources.

[0045] A sound source control module, based on the sound effect priority and the sound effect fade information, adjusts the volume and pitch of each of the scene sound sources, and / or determines the target sound effect and the target sound effect volume value of the target sound source according to the type of the initial sound effect preset for the target sound source, the difference between the preset trigger radius threshold corresponding to each initial sound effect type and the corresponding target distance.

[0046] In a third aspect, the present application further provides an electronic device, including:

[0047] At least one processor; and

[0048] A memory communicatively connected to the at least one processor; where

[0049] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the steps of the sound effect control method of the puzzle game provided in the first aspect above.

[0050] In a fourth aspect, the present application further provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the steps of the sound effect control method of the puzzle game provided in the first aspect above are implemented.

[0051] It can be understood that the beneficial effects of the technical solutions provided in the second aspect, the third aspect, and the fourth aspect can refer to the relevant descriptions in the first aspect above, and will not be elaborated here.

[0052] Additional aspects and advantages of the present application will be given in part in the following description, become apparent in part from the following description, or be understood through the practice of the present application. Description of the Drawings

[0053] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.

[0054] Figure 1 is a flowchart of a sound effect control method for a puzzle game shown according to an embodiment of the present application;

[0055] Figure 2 is a sub-flowchart of a sound effect control method for a puzzle game shown according to an embodiment of the present application;

[0056] Figure 3 is a block diagram of a sound effect control device for a puzzle game shown according to an embodiment of the present application;

[0057] Figure 4 is a block diagram of a sound effect control system for a puzzle game shown according to an embodiment of the present application;

[0058] Figure 5 is a block diagram of a player positioning module shown according to an embodiment of the present application;

[0059] Figure 6 is a block diagram of a three-dimensional sound effect control module shown according to an embodiment of the present application;

[0060] Figure 7 is a block diagram of a sound trigger module shown according to an embodiment of the present application;

[0061] Figure 8 is a block diagram of a puzzle control module shown according to an embodiment of the present application;

[0062] Figure 9 is a block diagram of an interaction feedback module shown according to an embodiment of the present application;

[0063] Figure 10 is a block diagram of an electronic device shown according to an embodiment of the present application. Detailed Embodiments

[0064] The following will describe in detail the embodiments of the present application. The embodiments described with reference to the accompanying drawings are exemplary. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0065] It should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present application. The terms used herein in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0066] See also Figure 1 The present embodiment provides a method for controlling sound effects of a puzzle game, including:

[0067] Step S100: when the target game is running, obtaining the current first space state information of the player in the virtual space scene of the target game and the second space state information of the preset multiple sound sources;

[0068] In this step, the first spatial state information of the player in the target game virtual space scene can be obtained through the head-mounted device. The first spatial state information may include the player's position coordinate parameters, facing direction, head direction information, movement direction and speed, providing spatial data support for subsequent core functions such as three-dimensional sound effect control, sound effect trigger mechanism and puzzle status judgment.

[0069] Generally speaking, in order to realize the spatial mapping relationship between 3D sound effects and players, it is necessary to obtain the 3D coordinate position of the player in the virtual scene in real time, as well as dynamic behavior information such as its motion trajectory and facing direction. As the prerequisite for 3D sound effect scheduling, spatial parameters will directly affect the generation logic of the sound effects, the direction calibration algorithm, and the accuracy of spatial gradient transition. Therefore, the player positioning module constitutes the starting point of the sound effect logic control chain in the entire puzzle system.

[0070] It should be understood that by linking with a head-mounted display device or other positioning peripherals, the player's position coordinate information in the three-dimensional virtual space is obtained in real time. The spatial coordinate information includes the player's real-time position data in the XYZ three-axis direction, which is recorded as a vector. And the head direction, body orientation or perspective offset information of the player is collected in the head tracker to determine the angle direction the player is facing, which is defined as a unit direction vector, in which the three components represent the projection size of the orientation vector in three dimensions.

[0071] It should be noted that the player's position collection module can be integrated into the spatial modeling interface of the virtual reality engine, or deployed as an independent module in the client positioning framework. It has good modular packaging capabilities and data multiplexing performance, and the collection frequency can reach 90 frames per second or higher, ensuring that the position data has sufficient spatiotemporal resolution to support high-fidelity sound dynamic switching and instantaneous directional change requirements.

[0072] In this embodiment, to accurately model the dynamic behavior of players, the movement speed and acceleration of players can be calculated based on the position changes over a period of time. The process can include the following steps:

[0073] Step S110: Obtain the first spatial coordinate information and the second spatial coordinate information of the player corresponding before and after a preset data acquisition time interval, where the second spatial coordinate information is the current position information of the player;

[0074] Step S120: Based on the data acquisition time interval, the first spatial coordinate information, and the second spatial coordinate information, determine the velocity vector per unit time and the current acceleration vector of the player;

[0075] In this step, the velocity can be calculated by the following formula:

[0076]

[0077] where V player represents the velocity vector of the player per unit time; P player (t) represents the spatial coordinates at the current moment; Δt1 is the adjacent time interval.

[0078] Similarly, the acceleration A player can be further obtained by the following formula:

[0079]

[0080] where V player (t) is the current velocity; Δt2 is the velocity sampling interval.

[0081] Step S130: Based on the velocity vector per unit time and the current acceleration vector of the player, determine the predicted path trajectory of the player. The predicted path trajectory is used to characterize the occurrence of potential sound source approaching events or puzzle-solving behaviors, as the spatial basis for sound directivity rendering and volume fade control.

[0082] In this step, the algorithm expression of the predicted path trajectory is:

[0083]

[0084] where P predict is the end coordinate of the predicted path, P player is the three-dimensional spatial coordinate vector of the player at the current moment; V player is the velocity vector of the player at the current moment; Δt1 is the time interval; A player is the acceleration vector of the player.

[0085] It should be noted that by analyzing the speed and acceleration changes of consecutive frames, a predicted path trajectory can be generated to calculate potential sound source approaching events or puzzle-solving behaviors in advance. The above parameters will be used as the spatial basis for sound direction rendering and volume fade control in real time. In addition, the player's current position will also be input into the puzzle control module to determine the relative relationship with the sound source position, thereby triggering puzzle events or verifying completion conditions.

[0086] Step S200: Determine the target distance between the player and each sound source and the player's pose information according to the first spatial state information and the second spatial state information. The pose information includes at least one or more of head direction, body orientation, or view offset.

[0087] In this step, it should be noted that the second spatial state information includes the spatial position information of multiple sound sources in the game scene and the direction of each sound source's sound effect. The algorithm expression for the target distance can be:

[0088]

[0089] where (x1, y1, z1) is the player's current three-dimensional spatial position coordinates; (x2, y2, z2) is the target sound source's three-dimensional spatial position coordinates; and ε is the distance threshold set by the system.

[0090] Optionally, the pose information includes at least one or more of head direction, body orientation, or view offset. Since a puzzle game scene may include multiple sound sources and the positions of the multiple sound sources are different, where the positions of the multiple sound sources can be set according to the plot of the puzzle game. By collecting the pose information, the directionality of the sound effect can be adjusted in real time according to the player's head rotation, further enhancing the realism in the virtual space. The collected pose information can also be used to predict the sound sources that the player is about to approach and the sound sources that the player is moving away from.

[0091] Step S300: Determine the sound effect priority and sound effect fade information of each scene sound source and at least one target sound source according to the target distance, the pose information, and a preset sound attenuation coefficient, where the target sound source is one of the scene sound sources.

[0092] In this step, according to the target distance, the attitude information, and based on a preset sound effect attenuation coefficient, and according to the current sound effect type corresponding to each of the scene sound sources, the corresponding sound effect attenuation coefficient is determined; according to the sound effect attenuation coefficient and the target distance, the current volume of the sound effect gradual change process of each of the scene sound sources is determined; based on the current azimuth angle parameter of the player in the attitude information, the relative angle between the current position orientation of the player and each of the scene sound sources is determined, and the sound effect direction of the scene sound source is adjusted based on the relative angle.

[0093] In some embodiments, the algorithm expression for the sound effect priority is:

[0094]

[0095] In the formula, P priority is the priority value of the sound effect feedback, α is the adjustment factor, D player is the current position of the player, D target is the initial target sound source position; e is the base of the natural logarithm;

[0096] Alternatively, the algorithm expression for the sound effect priority is: P = β·ln(D);

[0097] In the formula, P is the priority value of the sound effect feedback, β is the adjustment factor, D is the distance between the player and the initial target sound source, and ln is the natural logarithm.

[0098] In some embodiments, the algorithm expression for the current volume is:

[0099] In the formula, V sound is the current volume; V0 is the initial volume; γ is the attenuation coefficient; D source is the distance between the player and the initial target sound source.

[0100] It should be noted that the attenuation coefficient γ can be set according to actual needs, and different sound effects can use different attenuation coefficients to simulate the characteristics of sound propagation in different environments. For example, in an open environment, the sound may propagate farther, so the attenuation coefficient can be set smaller; while in a closed environment, the propagation of sound is affected by objects such as walls, and the attenuation coefficient should be relatively larger.

[0101] In this way, according to the spatial relationship between the player and multiple sound sources, the volume, directionality, and frequency of the sound effect are dynamically adjusted, so as to achieve a more realistic sound feedback effect. Through the adjustment of three-dimensional sound effects, the immersion and spatial realism of the game can be greatly enhanced. At the same time, it also provides more intuitive game prompts and interactive feedback for players, improving the player's spatial perception ability and active exploration intention.

[0102] Optionally, in order to enable the player to adjust the relevant parameters of the sound effect in a timely manner according to the dynamic relationship between the player and the sound source when the player moves in the virtual space, ensure that the presentation of the sound effect is consistent with the actual behavior of the player, and thus enhance the overall gaming experience, at least one target sound source is selected from the determined multiple target distances. The target sound source can be one or several sound sources closest to the player, so as to flexibly adjust the performance of the sound effect of the target sound source for the dynamic behavior of the player in the virtual space, and further improve the interactivity and user experience of the game.

[0103] Meanwhile, the solution of this step realizes the flexible adjustment of the sound effect in space, making the sound in the game scene not only have the ability of spatial perception, but also change in real time with the player's behavior and position change, further enhancing the immersion and interactivity of the game. Through these technical means, players can interact with the virtual world more naturally during the game process, while enhancing the perception ability of the spatial layout in the virtual environment, thereby improving the exploration and playability of the game.

[0104] Step S400: Based on the sound effect priority and the sound effect fade information, adjust the volume and pitch of each scene sound source, and determine the target sound effect of the target sound source and the volume value of the target sound effect according to the type of the initial sound effect preset for the target sound source, the difference between the preset trigger radius threshold corresponding to each initial sound effect type and the corresponding target distance.

[0105] In this step, according to the estimated path trajectory, it is judged whether the player approaches the target sound source along the correct path; if so, the operation behavior information of the player is collected and recognized, and the corresponding first sound effect feedback is determined according to the operation behavior information and the corresponding playback priority is modified; according to the target distance and the preset distance threshold, the puzzle-solving progress of the player is determined to generate the corresponding second sound effect feedback, where the algorithm expression of the target distance is:

[0106]

[0107] where (x1, y1, z1) are the current three-dimensional space position coordinates of the player; (x2, y2, z2) are the three-dimensional space position coordinates of the target sound source; and ε is the distance threshold set by the system.

[0108] Exemplarily, according to the spatial relationship between the player and the target sound source, the sound effect is dynamically triggered and the fade-in rule of the sound effect is adjusted, thereby enhancing the immersion and interactivity of the game. Specifically, the sound trigger module can control the change and manifestation form of the sound effect according to the relative position, distance and other spatial relationships between the player and the sound source, and realizes the dynamic adjustment of the sound effect by setting the sound effect trigger condition, fade-in rule and trigger radius. During the actual operation process, when the player approaches a certain target sound source, the sound trigger module will trigger a specific sound effect according to the spatial relationship of the signal. These sound effects are not simply triggered. Usually, the volume, frequency and directionality of the sound effect are gradually adjusted according to the relative position between the player and the target sound source, forming a natural sound effect fade-in effect and further enhancing the immersive experience of the game.

[0109] In some embodiments, the sound effect trigger condition is usually determined according to the spatial distance between the player and the sound source. Specifically, the trigger condition can be achieved by setting a distance threshold. When the player enters the threshold range, the sound effect starts to be triggered. The closer the distance between the player and the sound source, the stronger the sound effect. The fade-in process of the sound effect: the sound effect fade-in unit will adjust the volume, frequency and directionality of the sound effect according to the following formula: L = L0 - u·D, where L is the current volume of the sound effect; L0 is the initial volume; u is the attenuation coefficient; D is the distance between the player and the target sound source; in this formula, the attenuation coefficient u can be set to different values according to the sound source type and environment. The volume attenuation gradually decreases as the distance between the player and the sound source increases, making the sound effect performance more natural.

[0110] Optionally, the playback priority of the sound effect feedback generation can also be set according to the following formula: P = β·ln(D), where P is the priority of the sound effect feedback; β is the adjustment factor; D is the distance between the player and the target sound source; ln is the natural logarithm. According to this formula, when the distance between the player and the sound source is small, the feedback priority is high and the sound effect will be more prominent; on the contrary, the playback priority of the sound effect is low, forming a progressive feedback that conforms to the player's behavior. In this way, not only can the rationality of the sound effect trigger be ensured, but also it can be dynamically adjusted according to the player's actual operation and the game process, providing the player with more flexible sound effect feedback and immersive game experience.

[0111] In some embodiments, by real-time judging the relative position between the player and the sound source, it is determined whether a preset puzzle-solving behavior has been completed, and corresponding sound effect feedback is generated according to the puzzle-solving process, thereby promoting the game process. The function of the puzzle control module is closely connected between the triggering of the sound effect and the player's behavior, and cooperates with the three-dimensional sound effect control module, the sound triggering module and the interaction feedback module to provide a dynamic and immersive game experience. Generally, the puzzle control module judges whether the player has completed the corresponding puzzle-solving behavior according to the spatial relationship between the player's position in the virtual space and the target sound source. This judgment depends not only on the distance between the player's current position and the target sound source position, but also takes into account the influence of factors such as the player's movement state and sound effect fade. Specifically, the puzzle control module judges whether the player meets the puzzle-solving conditions through the threshold judgment of the spatial distance, so as to control the progress of the game and the activation of the sound effect feedback.

[0112] Compared with the prior art, the technical solutions provided by the above embodiments at least include the following beneficial effects or advantages:

[0113] 1) The method provided by this application, through the sound effect control technology of three-dimensional sound effect and spatial interaction, adjusts the volume, directionality and frequency of the sound effect in real time according to the position change and actions of the player in the virtual environment, enhances the player's spatial perception of the game scene, and compared with the existing sound effect control methods for puzzle-solving games, solves the problem that puzzle-solving games lack the sound and space interaction feedback, and greatly improves the realism and interaction experience of the game.

[0114] 2) The method provided by this application, by closely combining the sound triggering module with the puzzle control module and using sound as an important feedback mechanism for puzzle advancement, can trigger the sound effect in real time and control the sound effect fade according to the distance and relative position between the player and the target sound source. Different from the traditional games that only use the sound effect as a background hint, by deeply integrating the sound effect with the puzzle-solving process, it solves the problem that the prior art cannot guide the player to solve the puzzle through sound feedback, making the sound not only a hint tool, but also a core part of the game process and the puzzle-solving mechanism.

[0115] 3) The method provided by this application, by generating corresponding sound effect feedback according to the player's specific operation behavior, further strengthens the interactivity of the game. Compared with the simple sound effect feedback in traditional puzzle-solving games, the present invention provides a more immersive sound interaction. Each operation of the player can obtain personalized and dynamic sound effect responses. This technology not only enhances the player's sense of game participation, but also improves the player's spatial awareness and motivation for active exploration in the game, thereby promoting the game progress and strengthening the overall experience of the game.

[0116] Please refer to Figure 3 , this embodiment provides a sound effect control device 200 for a puzzle-solving game. The device 200 includes:

[0117] An acquisition module 210, configured to acquire, when a target game is running, the current first spatial state information of a player in the virtual space scene of the target game and the second spatial state information of a plurality of pre-set sound sources;

[0118] A distance determination module 220, configured to determine, according to the first spatial state information and the second spatial state information, the target distance between the player and each sound source and the pose information of the player, where the pose information includes at least one or more of a head direction, a body orientation, or a viewing angle offset;

[0119] A sound effect determination module 230, configured to determine, according to the target distance, the pose information, and a preset sound effect attenuation coefficient, the sound effect priority and sound effect fade information of each scene sound source, and at least one target sound source, where the target sound source is one of the scene sound sources;

[0120] A sound source control module 240, based on the sound effect priority and the sound effect fade information, adjusts the volume and pitch of each scene sound source, and / or determines the target sound effect and the target sound effect volume value of the target sound source according to the type of the initial sound effect preset for the target sound source, the difference between the preset trigger radius threshold corresponding to each initial sound effect type and the corresponding target distance.

[0121] In some embodiments, the acquisition module 210 is further configured to acquire the first spatial coordinate information and the second spatial coordinate information of the player corresponding before and after a preset data acquisition time interval, where the second spatial coordinate information is the current position information of the player; determine the velocity vector per unit time and the current acceleration vector of the player based on the data acquisition time interval, the first spatial coordinate information, and the second spatial coordinate information; determine the estimated path trajectory of the player based on the velocity vector per unit time and the current acceleration vector of the player, where the estimated path trajectory is used to represent the occurrence of a potential sound source approaching event or a puzzle-solving behavior, so as to serve as a spatial basis for sound directionality rendering and volume fade control.

[0122] In some embodiments, the sound effect determination module 230 is further configured to determine the corresponding sound effect attenuation coefficient according to the sound effect type currently corresponding to each scene sound source; determine the current volume of the sound effect fade process of each scene sound source according to the sound effect attenuation coefficient and the target distance; determine the relative angle between the current position orientation of the player and each scene sound source based on the current azimuth angle parameter of the player in the pose information, and adjust the sound effect direction of the scene sound source based on the relative angle.

[0123] In some embodiments, the sound source control module 240 is further configured to determine whether the player is approaching the target sound source along the correct path according to the predicted path trajectory; if so, collect and identify the operation behavior information of the player, determine the corresponding first sound effect feedback according to the operation behavior information, and modify the corresponding playback priority; determine the puzzle-solving progress of the player according to the target distance and a preset distance threshold, and generate the corresponding second sound effect feedback, where the algorithm expression of the target distance is:

[0124]

[0125] where (x1, y1, z1) are the current three-dimensional space position coordinates of the player; (x2, y2, z2) are the three-dimensional space position coordinates of the target sound source; and ε is the distance threshold set by the system.

[0126] Compared with the prior art, the above technical solution provided by this embodiment at least includes the following beneficial effects or advantages: Through the sound effect control technology of three-dimensional sound effects and spatial interaction, the volume, directionality, and frequency of the sound effects are adjusted in real time according to the position changes and actions of the player in the virtual environment, enhancing the player's spatial perception of the game scene. Compared with the existing sound effect control methods for puzzle-solving games, it solves the problem that puzzle-solving games lack the sound and space interaction feedback, and greatly improves the realism and interactive experience of the game.

[0127] Moreover, by closely combining the sound trigger module with the puzzle control module and using sound as an important feedback mechanism for puzzle advancement, it can trigger the sound effects in real time and control the sound effect fade according to the distance and relative position between the player and the target sound source. Different from the traditional games where the sound effects are only used as background hints, by deeply integrating the sound effects with the puzzle-solving process, it solves the problem that the prior art cannot guide the player to solve puzzles through sound feedback, making the sound not only a hint tool but also a core part of the game process and puzzle-solving mechanism.

[0128] At the same time, by generating the corresponding sound effect feedback according to the specific operation behavior of the player, the interactivity of the game is further enhanced. Compared with the simple sound effect feedback in traditional puzzle-solving games, the present invention provides a more immersive sound interaction. Each operation of the player can obtain a personalized and dynamic sound effect response. This technology not only enhances the player's sense of participation in the game but also improves the player's spatial awareness and motivation for active exploration in the game, thus promoting the game progress and enhancing the overall experience of the game.

[0129] Please refer to Figures 4 to 9 , this embodiment provides a sound effect control system 300 for a puzzle-solving game. The system 300 includes:

[0130] A player positioning module 310, configured to obtain the spatial coordinates and motion state of the player in the virtual game scene;

[0131] A three-dimensional sound effect control module 320, which is connected to the player positioning module 310 and is used to adjust the volume, directionality, and frequency of the sound effect according to the spatial relationship between the player and multiple sound sources;

[0132] A sound trigger module 330, which is connected to the three-dimensional sound effect control module 320 and is used to trigger the sound effect and adjust the fade-in rule of the sound effect according to the distance between the player and the target sound source;

[0133] A puzzle control module 340, which is connected to the sound trigger module 330 and is used to determine whether the player has completed the puzzle-solving behavior according to the relative position between the player and the sound source, and control the feedback of the sound effect;

[0134] An interaction feedback module 350, which is connected to the puzzle control module 340 and is used to generate a sound effect feedback corresponding to the player's operation behavior to enhance the game interactivity.

[0135] Please refer to Figure 5 , specifically, the player positioning module 310 obtains the spatial coordinates and motion state of the player in the virtual game scene in real time. This module continuously tracks the position change, motion direction, and speed of the player, and provides the player's position information and motion state data for subsequent modules.

[0136] Based on the player positioning data, the three-dimensional sound effect control module 320 dynamically adjusts the volume, directionality, and frequency of the sound effect according to the spatial relationship between the player and multiple sound sources. This module ensures that the sound effect presents a realistic effect that conforms to spatial perception by calculating the relative position between the player and the sound source in real time.

[0137] On this basis, the sound trigger module 330 triggers the sound effect and adjusts the fade-in rule of the sound effect according to the distance or other spatial relationship between the player and the target sound source. This module ensures that the sound effect changes with the player's movement. For example, when the player approaches the target sound source, the sound effect gradually increases, and its directionality and frequency are adjusted according to the relative position between the player and the sound source.

[0138] When the player performs an operation related to the puzzle, the puzzle control module 340 determines whether the player has completed the puzzle-solving behavior according to the relative position between the player and the sound source. If the player meets the puzzle-solving conditions, this module will control the feedback of the sound effect to promote the game process and provide a progress hint for the game.

[0139] Finally, the interaction feedback module 350 generates a sound effect feedback corresponding to the player's operation behavior to enhance the game interactivity. When the player performs an operation, the interaction feedback module generates a corresponding sound effect according to the behavior, further improving the immersion and interactivity of the game; these five modules work together to ensure that the system can adjust the sound effect in real time and generate feedback according to the player's behavior and position change, thereby enhancing the immersion and interactivity of the game.

[0140] In some embodiments, the player positioning module 310 may include a spatial coordinate acquisition unit for obtaining the three-dimensional coordinates of the player in the virtual space; an attitude tracking unit for obtaining information on the facing direction or head direction of the player; and a motion trajectory analysis unit for judging the moving direction, speed, and acceleration of the player and providing predicted path information.

[0141] Please refer to Figure 6 , the three-dimensional sound effect control module 320 includes a sound effect attenuation unit for adjusting the volume of the sound effect according to the relative distance between the player and the sound source; a directivity adjustment unit for adjusting the directivity of the sound effect according to the relative angle between the player and the sound source; a frequency adjustment unit for adjusting the frequency and sound quality of the sound effect according to the spatial relationship between the sound source and the player; and an HRTF unit for generating a directional sound effect based on the spatial relationship between the player and the sound source.

[0142] The sound effect attenuation unit calculates the volume of the sound effect through the following formula:

[0143]

[0144] Where, V sound is the current volume; V0 is the initial volume; γ is the attenuation coefficient; D source is the distance between the player and the sound source.

[0145] Specifically, the main function of the three-dimensional sound effect control module is to dynamically adjust the volume, directivity, and frequency of the sound effect according to the spatial relationship between the player and multiple sound sources, so as to achieve a more realistic sound feedback effect. Through the adjustment of the three-dimensional sound effect, the immersion and spatial realism of the game can be greatly enhanced. At the same time, it also provides more intuitive game prompts and interactive feedback for players, improving the game's spatial perception ability and active exploration intention.

[0146] In this embodiment, the three-dimensional sound effect control module includes multiple functional units, including a sound effect attenuation unit, a directivity adjustment unit, a frequency adjustment unit, and an HRTF unit, etc. Through these functional units, the performance of the sound effect can be flexibly adjusted according to the dynamic behavior of the player in the virtual space, further improving the interactivity and user experience of the game.

[0147] Generally, in this embodiment, the sound effect attenuation unit calculates the volume of the sound effect according to the distance between the player and the sound source through the following formula:

[0148]

[0149] Where, V sound is the current volume; V0 is the initial volume; γ is the attenuation coefficient; D source is the distance between the player and the sound source.

[0150] Specifically, the sound attenuation unit adjusts the volume according to the relative distance D between the player and the sound source source and the attenuation coefficient γ. As the player moves farther away from the sound source, the volume of the sound effect gradually decreases according to the attenuation relationship in the formula, thereby simulating the physical characteristics of sound propagation in space.

[0151] During implementation, the attenuation coefficient γ can be set according to actual needs, and different sound effects can use different attenuation coefficients to simulate the characteristics of sound propagation in different environments. For example, in an open environment, sound may travel farther, so the attenuation coefficient can be set smaller; while in a closed environment, the propagation of sound is affected by objects such as walls, and the attenuation coefficient should be relatively larger.

[0152] Optionally, the directivity adjustment unit adjusts the directivity of the sound effect according to the relative angle between the player and the sound source. This unit controls the directional propagation of sound by judging the relative angle between the player's orientation and the sound source. For example, when the angle between the player and the sound source is small, the directivity of the sound effect will be more concentrated, simulating the effect of sound coming from a specific direction. Specifically, the directivity adjustment unit calculates the angle between the player's line of sight direction and the sound source position using spatial vector operations to adjust the sound source direction.

[0153] In some embodiments, the frequency adjustment unit adjusts the frequency and sound quality of the sound effect according to the spatial relationship between the sound source and the player. When the player approaches the sound source, the frequency of the sound effect will tend to be high-frequency, while when the player moves away from the sound source, the sound effect will tend to be low-frequency. This adjustment simulates the propagation characteristics of sound at different distances, making the sound effect more in line with the laws of spatial perception. The core of frequency adjustment is to dynamically calculate the optimal frequency range based on the relative position between the sound source and the player.

[0154] The HRTF unit (Head-Related Transfer Function module) is an important part of the three-dimensional sound effect control module, which is used to generate directional sound effects according to the spatial relationship between the player and the sound source. Specifically, the HRTF unit generates a sense of direction of the sound effect by calculating the spatial angle between the sound source and the player's ears based on the player's ear position and orientation information. The HRTF technology can provide players with more accurate sound localization and enhance their perception of the sound source position in the virtual space.

[0155] In one implementation, the HRTF unit can adjust the directivity of the sound effect in real time according to the player's head rotation, further enhancing the realism in the virtual space. For example, when the player rotates their head, the directivity of the sound effect will change accordingly, making the sound source always located in the player's visual and auditory direction, thus providing a more natural sound experience.

[0156] In addition, the working processes of the frequency and directivity adjustment units closely depend on the player's spatial coordinates and motion state. When the player moves in the virtual space, these units will adjust the relevant parameters of the sound effects in a timely manner according to the dynamic relationship between the player and the sound source, ensuring that the presentation of the sound effects is consistent with the player's actual behavior, thereby enhancing the overall gaming experience.

[0157] In this embodiment, through the collaborative work of the three-dimensional sound effect control module, the flexible adjustment of the sound effects in space is realized, so that the sounds in the game scene not only have the ability of spatial perception, but also can change in real time with the changes of the player's behavior and position, further enhancing the immersion and interactivity of the game. Through these technical means, players can interact with the virtual world more naturally during the game process, while enhancing the perception ability of the spatial layout in the virtual environment, thereby improving the exploration and playability of the game.

[0158] Please refer to Figure 7 , the sound trigger module 330 includes: a sound effect trigger condition unit, which triggers the sound effect according to the distance or other spatial relationships between the player and the target sound source. Usually, the trigger conditions include parameters such as the distance and azimuth angle between the player and the sound source. When the player enters a preset trigger area, the sound effect trigger condition unit will activate the playback of the sound effect; a sound effect fade unit, the main function of this unit is to gradually adjust the volume, frequency and directivity of the sound effect according to the relative position between the player and the target sound source, forming a fade effect. Through this fade effect, the sound effect can change more naturally with the player's movement, enhancing the interactivity and immersion of the game; a trigger radius setting unit, which is used to set different sound effect trigger radii for each sound source. In some embodiments, the trigger radius of the sound effect will be adjusted according to the game scene or the type of the sound source, so as to control the trigger range of the sound effect and its attenuation effect.

[0159] Please refer to Figure 8 , the puzzle control module 340 includes: a puzzle-solving behavior judgment unit, which is used to judge whether the player has completed the puzzle-solving condition based on the spatial distance between the player and the target sound source; a puzzle progress feedback unit, which is used to generate sound effect feedback according to the puzzle-solving progress to promote the game process;

[0160] Among them, the puzzle-solving behavior judgment unit determines whether the puzzle-solving behavior is established by judging whether the spatial distance d between the player's current position and the target sound source position satisfies the following conditions:

[0161]

[0162] In the formula, (x1, y1, z1) are the coordinates of the player's current position; (x2, y2, z2) are the coordinates of the target sound source position; ε is the distance threshold set by the system.

[0163] Specifically, the puzzle control module determines whether a preset puzzle-solving behavior has been completed by continuously judging the relative position between the player and the sound source in real time, and generates corresponding sound feedback according to the puzzle-solving progress, thereby promoting the game process. The function of the puzzle control module is closely connected between the triggering of the sound effect and the player's behavior, and cooperates with the three-dimensional sound effect control module, the sound trigger module and the interaction feedback module to provide a dynamic and immersive game experience.

[0164] Generally, the puzzle control module determines whether the player has completed the corresponding puzzle-solving behavior based on the spatial relationship between the player's position in the virtual space and the target sound source. This determination not only depends on the distance between the player's current position and the target sound source position, but also takes into account the influence of factors such as the player's movement state and sound effect fade. Specifically, the puzzle control module judges whether the player meets the puzzle-solving conditions through the threshold determination of the spatial distance, thereby controlling the progress of the game and the activation of the sound feedback.

[0165] Optionally, the puzzle-solving behavior judgment unit can also combine the analysis result of the player's movement trajectory, considering whether the player approaches the target sound source along the correct path, to further improve the accuracy of the puzzle-solving judgment. At this time, the conditions for puzzle-solving behavior judgment not only depend on the spatial distance, but may also comprehensively consider dynamic factors such as the player's movement direction and speed.

[0166] In addition, the puzzle control module 340 is also closely combined with the three-dimensional sound effect control module 320 to adjust the fade rule of the sound effect to provide real-time feedback. For example, when the player approaches the target sound source, the volume, frequency and directivity of the sound effect will gradually change according to the distance between the player and the target sound source. The fade process of the sound effect can better guide the player to explore and enhance the player's perception of the virtual space at the same time.

[0167] Please refer to Figure 8 , the interaction feedback module 350 includes: a player behavior feedback unit for generating corresponding sound feedback according to the player's operation behavior (such as picking up items, walking, etc.); a sound feedback generation unit for generating corresponding sound feedback according to the recognized behavior and setting its playback priority;

[0168] The sound feedback generation unit sets the playback priority of the feedback sound effect according to the following formula:

[0169]

[0170] In the formula, P priority is the priority value; α is the adjustment factor; D player is the player's current position; D target is the target sound source position; e is the base of the natural logarithm.

[0171] Specifically, the interaction feedback module is used to generate sound effects feedback corresponding to the player's operation behaviors, thereby enhancing the interactivity and immersion of the game. By combining the player's specific operations, such as picking up items, walking, interacting with the environment, etc., the interaction feedback module can generate sound effects feedback in real time and dynamically adjust the volume, directionality, and frequency of the feedback according to the player's behavior, thus promoting the progress of the game and improving the player's spatial perception ability.

[0172] Generally, the function of the interaction feedback module is mainly to generate sound effects feedback through the changes in the player's behavior. Specifically, the interaction feedback module consists of two main units: the player behavior feedback unit and the sound effects feedback generation unit. The player behavior feedback unit is responsible for identifying and classifying the player's operation behaviors, such as moving, picking up items, interacting with the environment, etc. The sound effects feedback generation unit then generates corresponding sound effects based on these identified operation behaviors and adjusts their playback priorities according to the behavior types.

[0173] Optionally, the player behavior feedback unit uses sensor data and in-game environment information to identify various operation behaviors of the player. When the player performs a certain interaction operation, such as walking or picking up an item in the virtual space, the behavior feedback unit will capture and analyze the behavior in real time. Based on the preset behavior model, the behavior feedback unit maps the operation behavior to the corresponding sound effects and transmits them to the sound effects feedback generation unit.

[0174] Specifically, the sound effects feedback generation unit will generate matching sound effects according to the identified behavior. For example, when the player picks up an item, the sound effects feedback generation unit may generate a picking-up sound effect, and when the player walks, it may generate footsteps-related sounds. The playback priority of the sound effects can be dynamically adjusted according to the importance of the operation or changes in the game state. For example, when the player completes a key operation during the puzzle-solving process, the priority of the feedback sound effect may be increased to emphasize the importance of the operation.

[0175] Please refer to Figure 10 , Figure 10 is a structural block diagram of an electronic device provided by an embodiment of the present application. The server 500 of the electronic device includes: a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and executable on the processor 501, such as a program for a sound effect control method of a puzzle game. When the processor 501 executes the computer program 503, it implements the steps of a sound effect control method of a puzzle game in the above embodiments, such as Figure 1 and Figure 2 the steps S100 to S400 of the corresponding embodiments. Or, when the processor 501 executes the computer program 503, it implements the functions of each module in the above Figure 3 corresponding embodiments. For example, Figure 3For the functions of the modules shown (such as the acquisition module 210), please refer specifically to Figure 3 the relevant descriptions in the corresponding embodiments, which will not be elaborated here.

[0176] Exemplarily, the computer program 503 can be divided into one or more units. One or more units are stored in the memory 502 and executed by the processor 501 to complete the technical solutions provided in the above embodiments. One or more units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program 503 in the server 500.

[0177] The electronic device may include, but is not limited to, the processor 501 and the memory 502. Those skilled in the art can understand that Figure 10 this is only an example of the server 500 in the electronic device and does not limit the server 500. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the turntable terminal device may also include an input / output terminal device, a network access terminal device, a bus, etc.

[0178] The so-called processor 501 may be a central processing unit (CPU), or may also be other general-purpose processors, 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, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0179] The memory 502 may be an internal storage unit of the server 500, such as the hard disk or memory of the server 500. The memory 502 may also be an external storage terminal device of the server 500, such as a plug-in hard disk equipped on the server 500, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory 502 may also include both the internal storage unit of the server 500 and the external storage terminal device. The memory 502 is used to store the computer program and other programs and data required by the turntable terminal device. The memory 502 may also be used to temporarily store the data that has been output or will be output.

[0180] In some embodiments, a computer-readable storage medium is further provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the sound effect control method of the puzzle game as described in the above embodiments are implemented.

[0181] In addition, in each embodiment of the present application, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0182] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium can be non-volatile or volatile. Based on such an understanding, to implement all or part of the processes in the above method embodiments of the present application, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable storage medium can include: any entity or device that can carry computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0183] The terms "first", "second", "third", etc. in the specification, claims and drawings of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a series of steps or units are included, or optionally, steps or units not listed are further included, or optionally other steps or units inherent in these processes, methods, products or devices are further included.

[0184] Only the parts relevant to this application are shown in the accompanying drawings, not all of the content. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations can be performed in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operations are completed, but it can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, and so on.

[0185] The terms "component", "module", "system", "unit", etc. used in this specification are used to denote computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a unit can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or distributed between two or more computers. In addition, these units can execute from various computer-readable media on which various data structures are stored. A unit can communicate, for example, through local and / or remote processes according to signals having one or more data packets (such as data from a second unit interacting with a local system, a distributed system, and / or a network. For example, the Internet interacting with other systems through signals).

[0186] Although the embodiments of this application have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and purposes of this application. The scope of this application is defined by the claims and their equivalents.

[0187] Those skilled in the art will readily conceive of other embodiments of this application after considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include known common knowledge or conventional technical means in this technical field that are not disclosed in this application. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of this application are pointed out by the following claims.

Claims

1. A sound effect control method for a puzzle game, characterized in that Including: Step S100: When the target game is running, obtain the current first spatial state information of the player in the virtual space scene of the target game and the second spatial state information of a plurality of pre-set sound sources; Step S200: According to the first spatial state information and the second spatial state information, determine the target distance between the player and each sound source and the pose information of the player, where the pose information includes at least one or more of head direction, body orientation, or view offset; Step S300: According to the target distance, the pose information, and a preset sound attenuation coefficient, determine the sound effect priority and sound effect fade information of each scene sound source, and at least one target sound source, where the target sound source is one of the scene sound sources; Step S400: Based on the sound effect priority and the sound effect fade information, adjust the volume and pitch of each scene sound source, and according to the type of the initial sound effect preset for the target sound source, the difference between the preset trigger radius threshold corresponding to each initial sound effect type and the corresponding target distance, determine the target sound effect of the target sound source and the volume value of the target sound effect.

2. The sound effect control method of the puzzle game according to claim 1, wherein After the step S100, it further includes: Step S110: Obtain the first spatial coordinate information and the second spatial coordinate information of the player corresponding before and after a preset data acquisition time interval, where the second spatial coordinate information is the current position information of the player; Step S120: Based on the data acquisition time interval, the first spatial coordinate information, and the second spatial coordinate information, determine the velocity vector per unit time and the current acceleration vector of the player; Step S130: Based on the velocity vector per unit time and the current acceleration vector of the player, determine the estimated path trajectory of the player, where the estimated path trajectory is used to characterize the occurrence of a potential sound source approaching event or a puzzle-solving behavior, as a spatial basis for sound directionality rendering and volume fade control.

3. The sound effect control method of the puzzle game according to claim 2, characterized in that In the step S130, the algorithm expression of the estimated path trajectory is: Among them, P predict is the end coordinate of the predicted path, and P player is the three-dimensional space coordinate vector of the player at the current moment; V player is the velocity vector of the player at the current moment; Δt1 is the time interval; A player is the acceleration vector of the player.

4. The sound effect control method of the puzzle game according to claim 1, characterized in that, In the step S300, it further includes: Determine the corresponding sound attenuation coefficient according to the sound effect type currently corresponding to each scene sound source; According to the sound attenuation coefficient and the target distance, determine the current volume of the sound effect fade process of each scene sound source; Based on the current azimuth angle parameter of the player in the pose information, determine the relative angle between the current position orientation of the player and each scene sound source, and adjust the sound effect direction of the scene sound source based on the relative angle.

5. The method for controlling the sound effect of the puzzle game according to claim 4, wherein In the step S300, it further includes: The algorithm expression of the sound effect priority is: Wherein, P priority is the priority value of the sound effect feedback, α is the adjustment factor, D player is the current position of the player, D target is the initial target sound source position; e is the base of the natural logarithm; Or, the algorithm expression of the sound effect priority is: P = β·ln(D); In the formula, P is the priority value of the sound effect feedback, β is the adjustment factor, D is the distance between the player and the initial target sound source, and ln is the natural logarithm.

6. The sound effect control method of the puzzle game according to claim 4, wherein In the step S300, it further includes: The algorithmic expression of the current volume is as follows: where V sound is the current volume; V0 is the initial volume; γ is the attenuation coefficient; D source is the distance between the player and the initial target sound source.

7. The sound effect control method of the puzzle game according to claim 2 or 3, characterized in that, In the step S400, it further includes: Based on the predicted path trajectory, determine whether the player approaches the target sound source along the correct path; If so, collect and identify the operation behavior information of the player, and determine the corresponding first sound effect feedback and modify the corresponding playback priority according to the operation behavior information; According to the target distance and a preset distance threshold, determine the puzzle-solving progress of the player and generate corresponding second sound effect feedback, where the algorithm expression of the target distance is: where (x1, y1, z1) are the current three-dimensional space position coordinates of the player; (x2, y2, z2) are the three-dimensional space position coordinates of the target sound source; and ε is the distance threshold set by the system.

8. An audio effect control device for a puzzle game, characterized in that, It includes: An acquisition module, configured to acquire the current first space state information of the player and the second space state information of a plurality of pre-set sound sources in the virtual space scene of the target game when the target game is running; A distance determination module, which determines the target distance between the player and each of the sound sources and the posture information of the player according to the first space state information and the second space state information, where the posture information includes at least one or more of the head direction, body orientation, or view offset; A sound effect determination module, configured to determine the sound effect priority and sound effect fade information of each of the scene sound sources, and at least one target sound source according to the target distance, the posture information, and based on a preset sound effect attenuation coefficient, where the target sound source is one of the scene sound sources; A sound source control module, based on the sound effect priority and the sound effect fade information, adjusts the volume and pitch of each of the scene sound sources, and / or determines the target sound effect and the target sound effect volume value of the target sound source according to the type of the initial sound effect preset for the target sound source, the difference between the preset trigger radius threshold corresponding to each initial sound effect type and the corresponding target distance.

9. An electronic device, characterized in that, It includes: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the steps of the sound effect control method of the puzzle game according to any one of claims 1-7.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, the steps of the sound effect control method of the puzzle game according to any one of claims 1-7 are implemented.

Citation Information

Cited By

  • Immersive script antivirus effect generation method and system based on deep learning

    CN120676308A

  • Game sound effect management method based on Unity Audio Mixer and related equipment

    CN121314187A

  • Game sound effect management method and related equipment based on Unity AudioMixer

    CN121314187B