Game processing method and device, electronic equipment and computer readable storage medium

CN117224954BActive Publication Date: 2026-08-28NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310991118.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-07
Publication Date
2026-08-28
Estimated Expiration
2043-08-07

AI Technical Summary

Technical Problem

[0003]当以俯视或者仰视角度观看游戏场面时,视觉焦点(也即视线落脚点)会落在游戏场场地中的某一个位置,但由于俯视或者仰视视野的画面中可能会有很多虚拟角色正在进行游戏行为,使得视觉焦点输出的声音被其他声音淹没,这就造成了视觉焦点和听觉焦点的割裂,不利于用户对观察位置上游戏信息的获取

Benefits of technology

[0018]In the game processing method provided in this application, the terminal displays a game scene captured by a virtual camera through a graphical user interface. The game scene includes a virtual sound-emitting object and a corresponding sound-emitting body. The method includes: determining the target virtual sound-emitting object where the visual focus of the virtual camera is located; configuring a listener in the virtual camera; determining the spatial range corresponding to the target sound-emitting body based on the equivalent volume attenuation point on the line connecting the target sound-emitting body to the other first sound-emitting bodies in the game scene; the spatial range corresponding to the target sound-emitting body is the spatial range in the game scene where the listening volume of the target sound-emitting body is greater than the listening volume of the first sound-emitting bodies, and the equivalent volume point is the position point on the line connecting the target sound-emitting body and the first sound-emitting bodies where the listening volume of the target sound-emitting body is the same as that of the first sound-emitting bodies; and adjusting the listener's position to the spatial range corresponding to the target sound-emitting body.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117224954B_ABST
    Figure CN117224954B_ABST
Patent Text Reader

Abstract

The application discloses a game processing method and device, electronic equipment and a computer readable storage medium, wherein a terminal displays a game scene shot by a virtual camera through a graphical user interface, the game scene includes a sound-emitting virtual object and a sound-emitting body corresponding to the sound-emitting virtual object, and the method includes: determining a target sound-emitting virtual object where a visual focus of the virtual camera is located; the virtual camera is configured with a listener; determining a spatial range corresponding to a target sound-emitting body in the game scene, in which a listening volume of the target sound-emitting body is greater than a listening volume of a first sound-emitting body, according to a volume decay equivalent point at which a connection line of the target sound-emitting body and the rest of the first sound-emitting body in the game scene, the listening volume of the target sound-emitting body and the listening volume of the first sound-emitting body are the same; and adjusting a position of the listener in the spatial range. The scheme provided by the application can keep the visual focus and the auditory focus consistent in the virtual game with a top view or a bird's eye view.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a game processing method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] In virtual games, to enhance user immersion, virtual characters can typically output sounds to simulate real-world scenarios, creating a sense of presence. In practice, some virtual games use top-down or bottom-up perspectives to play or observe the game environment, such as a referee's or commander's viewpoint.

[0003] When viewing the game scene from a top-down or bottom-up angle, the visual focus (i.e., the point where the line of sight falls) will fall on a certain position in the game field. However, since there may be many virtual characters performing game actions in the top-down or bottom-up view, the sound output from the visual focus is drowned out by other sounds. This creates a separation between the visual focus and the auditory focus, which is not conducive to the user's acquisition of game information at the observation position. Summary of the Invention

[0004] This application provides a game processing method, apparatus, electronic device, and computer-readable storage medium that enables the visual and auditory focus to remain consistent in virtual games with top-down or bottom-up perspectives. The specific solution is as follows:

[0005] In a first aspect, embodiments of this application provide a game processing method in which a terminal displays a game scene captured by a virtual camera through a graphical user interface. The game scene includes a virtual object that emits sound and a sound-emitting body corresponding to the virtual object. The method includes:

[0006] The virtual object emitting sound is located at the visual focus of the virtual camera; the virtual camera is configured with a listener;

[0007] Based on the volume attenuation equivalent point on the line connecting the target sound-emitting virtual object to the other first sound-emitting objects in the game scene, the spatial range corresponding to the target sound-emitting object is determined; the spatial range corresponding to the target sound-emitting object is the spatial range in the game scene where the listening volume of the target sound-emitting object is greater than the listening volume of the first sound-emitting object, and the volume equivalent point is the position point on the line connecting the target sound-emitting object and the first sound-emitting object where the listening volume of the target sound-emitting object is the same as the listening volume of the first sound-emitting object.

[0008] The listener's position is adjusted to the spatial range corresponding to the target sound source.

[0009] Secondly, embodiments of this application provide a game processing device, in which a terminal displays a game scene captured by a virtual camera through a graphical user interface. The game scene includes a virtual object that emits sound and a sound-emitting body corresponding to the virtual object. The device includes:

[0010] The first determining unit is used to determine the target sound-emitting virtual object where the visual focus of the virtual camera is located; the virtual camera is configured with a listener;

[0011] The second determining unit is used to determine the spatial range corresponding to the target sound source based on the volume attenuation equivalent point on the line connecting the target sound source corresponding to the target sound source and the other first sound sources in the game scene; the spatial range corresponding to the target sound source is the spatial range in the game scene where the listening volume of the target sound source is greater than the listening volume of the first sound source, and the volume equivalent point is the position point on the line connecting the target sound source and the first sound source where the listening volume of the target sound source is the same as the listening volume of the first sound source.

[0012] The position adjustment unit is used to adjust the position of the listener to the spatial range corresponding to the target sound source.

[0013] Thirdly, this application also provides an electronic device, including:

[0014] Processor; and

[0015] A memory for storing a data processing program, which, when the electronic device is powered on and runs through the processor, executes the method described in the first aspect.

[0016] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a data processing program that is executed by a processor to perform the method described in the first aspect.

[0017] Compared with the prior art, this application has the following advantages:

[0018] In the game processing method provided in this application, the terminal displays a game scene captured by a virtual camera through a graphical user interface. The game scene includes a virtual sound-emitting object and a corresponding sound-emitting body. The method includes: determining the target virtual sound-emitting object where the visual focus of the virtual camera is located; configuring a listener in the virtual camera; determining the spatial range corresponding to the target sound-emitting body based on the equivalent volume attenuation point on the line connecting the target sound-emitting body to the other first sound-emitting bodies in the game scene; the spatial range corresponding to the target sound-emitting body is the spatial range in the game scene where the listening volume of the target sound-emitting body is greater than the listening volume of the first sound-emitting bodies, and the equivalent volume point is the position point on the line connecting the target sound-emitting body and the first sound-emitting bodies where the listening volume of the target sound-emitting body is the same as that of the first sound-emitting bodies; and adjusting the listener's position to the spatial range corresponding to the target sound-emitting body.

[0019] As can be seen, in this application, since the visual focus falls on the target virtual sound object, the sound emitted by the target virtual sound object is the most obvious sound that is expected to be heard. Because the spatial range corresponding to the determined target sound source is the spatial range in the game scene where the listening volume of the target sound source is greater than that of the first sound source, when the listener's position is within the spatial range corresponding to the target sound source, the listening volume of the sound emitted by the virtual sound object transmitted from the target sound source to the listener's position is the greatest, and the sound is the most obvious. When the visual focus changes, the spatial area corresponding to the target virtual sound object where the visual focus is located can be quickly determined according to the game processing method provided in this application, thereby determining the listener's position. In this way, even when there are multiple virtual sound objects in the game scene, the consistency between the visual focus and the auditory focus in the game scene can be guaranteed in real time. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the game perspective in a virtual game provided in an embodiment of this application;

[0021] Figure 2 This is a sound location diagram corresponding to a top-down view in the prior art provided in the embodiments of this application;

[0022] Figure 3 This is a flowchart of the game processing method provided in the embodiments of this application;

[0023] Figure 4 This is a top view of the spatial range of the listener's location in the game processing method provided in this application embodiment;

[0024] Figure 5 This is a schematic diagram illustrating an example of the location area of ​​the listener provided in an embodiment of this application;

[0025] Figure 6This is a schematic diagram illustrating another example of the location area of ​​the listener provided in the embodiments of this application;

[0026] Figure 7 This is a schematic diagram illustrating another example of the location area of ​​the listener provided in the embodiments of this application;

[0027] Figure 8 This is a schematic diagram of an example of a three-dimensional spatial coordinate system provided in an embodiment of this application;

[0028] Figure 9 This is a schematic diagram illustrating the change in the listener's position provided in an embodiment of this application;

[0029] Figure 10 This is a schematic diagram illustrating an example of determining the coordinates of a listener's location according to an embodiment of this application;

[0030] Figure 11 This is a structural block diagram of an example of the game processing device provided in the embodiments of this application;

[0031] Figure 12 This is a structural block diagram of an example of an electronic device provided in an embodiment of this application. Detailed Implementation

[0032] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.

[0033] It should be noted that the terms "first," "second," "third," etc., in the claims, specification, and drawings of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. Such data are interchangeable where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown or described herein. Furthermore, the terms "comprising," "having," and their variations are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatuses.

[0034] It should be understood that in the embodiments of this application, "at least one" means one or more, and "more than one" means two or more. "And / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the related objects before and after it are in an "or" relationship. "Contains A, B and / or C" means containing any one, two, or three of A, B, and C.

[0035] Before detailing the implementation methods of this application, relevant concepts will be introduced and the prior art will be further explained.

[0036] I. Introduction to relevant concepts

[0037] 1. Game software application products (virtual games): Game software application products refer to applications developed according to game application requirements. The types of games may include, but are not limited to, at least one of the following: two-dimensional (2D) game applications, three-dimensional (3D) game applications, virtual reality (VR) game applications, augmented reality (AR) game applications, and mixed reality (MR) game applications.

[0038] 2. Wwise (Audio Engine): Wwise is an audio engine used to interface with game engines, enabling rich interactive audio solutions for games.

[0039] 3. Emitter: The emitter refers to the object that plays sound in a virtual game.

[0040] In this embodiment, the sound-emitting entity may include, but is not limited to, virtual characters and virtual elements in virtual games. A virtual character refers to a character that does not exist in reality, including fictional characters in at least one creative work such as a TV series, movie, comic, or game. A virtual character can be a player character operated by the user, or a non-player character (NPC) that is not operated by the user, capable of guiding the user through the game and interacting with the user-operated virtual character. Virtual elements may include, for example, virtual weapons and game skills.

[0041] In this application embodiment, a user can use a terminal device to operate a virtual character located in a virtual game scene to perform game behaviors, including but not limited to: adjusting body posture, crawling, walking, running, jumping, driving, picking up, shooting, attacking, throwing, moving, sprinting, and defending at least one of the following.

[0042] 4. Listener: A listener refers to an object in a virtual game that receives sound.

[0043] In this embodiment, the speaker and the listener are objects registered in Wwise. Objects registered in Wwise do not necessarily exist in the game scene of the virtual game; they may or may not exist in the game scene. Objects registered in Wwise can be either speakers or listeners.

[0044] 5. Virtual Camera: A virtual camera is a camera that is simulated in the software of an electronic device. It is a tool for representing the viewpoint in a three-dimensional virtual environment. During the game, the game screen is captured by the virtual camera.

[0045] In first-person games, the virtual camera can be positioned above the virtual character's head (specifically, at the eye level); in third-person games, the virtual camera can be positioned above and behind the virtual character.

[0046] 6. First-person perspective: First-person perspective refers to the player's subjective viewpoint, that is, the view that the player can see in a virtual game. In first-person perspective, the user cannot see the virtual character they are controlling, or can only see a small part of the virtual character, such as the hand.

[0047] Third-person perspective: A third-person perspective refers to observing from the viewpoint of a third person. In a third-person perspective, the user can see the virtual character they are controlling.

[0048] In this embodiment of the application, the perspective in the virtual game is either a top-down or bottom-up perspective, allowing the user to view the game scene within their field of vision.

[0049] It should be noted that, in order to more clearly illustrate the game processing method provided in the embodiments of this application, the embodiments of this application use a top-down view in a virtual game as an example for illustration, and this application does not specifically limit it.

[0050] For example, Figure 1 This diagram illustrates the game's perspective in a virtual game. The following is a further explanation... Figure 1 The article introduces the top-down perspective, first-person perspective, and third-person perspective.

[0051] Figure 1The top-down view is the game view in the application scenario of the game processing method provided in this application embodiment. The user who views the game scene from the top-down view can be a user who operates any virtual character in the virtual game. For example, the user is a user who operates the first virtual character or a user who operates the second virtual character. The user who views the game scene from the top-down view can also be a bystander who does not operate a virtual character. This application does not limit this.

[0052] Figure 1 The first-person perspective in the game is the viewpoint of the first virtual character. The game screen presented from this perspective may include the first virtual character's hands, arms, and / or parts of weapons, as well as other virtual characters. Figure 1 (The middle character is the second virtual character).

[0053] Figure 1 The third-person perspective in the game is the view of the game scene from above and behind the first virtual character. The game screen presented in this perspective may include the first virtual character and the second virtual character.

[0054] II. Further Explanation of Existing Technology

[0055] In virtual games where the game scene is viewed from a top-down or bottom-up perspective, the virtual camera is usually positioned as the location for receiving sound, which is also the location of the listener. It can be figuratively understood that the "eyes" and "ears" in the virtual game are located at the same position. The sound heard by the user through the terminal device is the sound emitted by the sound source (the location that emits the sound) and then travels to the listener's location.

[0056] There are often multiple sound sources in the field of view. When a virtual camera is looking at a certain position, it may be interfered with by the sound emitted by a sound source that is closer to the virtual camera. This will cause the position observed by the user in the game scene and the source of the sound heard to be different from the same position, thus causing a separation between the visual focus and the auditory focus.

[0057] like Figure 2 The image shown is a diagram of sound location corresponding to a top-down view in existing technology. Figure 2In this scenario, the virtual camera and the listener are positioned at a relatively high altitude, close to the second sound source, with their line of sight directed from the virtual camera and listener towards the first sound source. That is, the user's visual focus on their terminal device is the first sound source. Because the second sound source is closer to the virtual camera and listener, its sound is more prominent among the sounds received at their locations. Therefore, although the user is watching the game actions performed by the first sound source, the sound heard is more clearly from the second sound source, preventing the user from accurately obtaining relevant information about the first sound source in the game.

[0058] For the reasons mentioned above, in order to maintain consistency between the visual and auditory focus in virtual games with top-down or bottom-up perspectives, the first embodiment of this application provides a game processing method. In this method, a terminal displays a game scene captured by a virtual camera through a graphical user interface. The game scene includes a virtual object that emits sound and a corresponding sound-emitting body. This method is applied to electronic devices, which can be desktop computers, laptops, mobile phones, tablets, servers, etc., or other electronic devices capable of game processing. This application embodiment does not specifically limit the application to these devices.

[0059] like Figure 3 As shown, the game processing method provided in this application embodiment includes the following steps S301 to S303.

[0060] Step S301: Determine the target sound-emitting virtual object where the visual focus of the virtual camera is located.

[0061] The virtual camera is equipped with a listener.

[0062] This step is used to determine the virtual object emitting sound at the visual focus point that the virtual camera is facing in the game scene. As can be understood, the visual focus of the virtual camera in the game scene is the position the user is currently viewing.

[0063] Typically, users can adjust the virtual camera's viewpoint or zoom in / out using their device to focus on specific locations within the game scene. Users can also select a target virtual object emitting sound within the game screen, using that object as the virtual camera's focal point, and adjust the camera's orientation accordingly.

[0064] The line of sight of a virtual camera is a ray that looks at the game scene from the position of the virtual camera at a certain angle. The line of sight is at a certain angle with the vertical or horizontal direction. The angle between the line of sight and the vertical or horizontal direction can be defined as the top-down angle.

[0065] To ensure a better visual experience when viewing game scenes from a high altitude, the virtual camera's top-down angle can typically be set with upper and lower limits. This prevents situations where viewing too far away results in unclear observation of the location, or viewing too close causes dizziness due to the viewer being directly below the camera, thus creating a poor viewing experience. It should be noted that the virtual camera's top-down angle can also be unrestricted; this application does not specifically limit it in this regard.

[0066] In this way, the virtual object that emits sound is closest to the virtual camera in terms of line of sight and is the target virtual object emitting sound at the visual focus. The target virtual object emitting sound can be a virtual character in a game scene, or a virtual object that can emit sound, such as a vehicle or a tree; this application does not limit this.

[0067] In practical applications, virtual objects that make sounds in a game scene may be located on the virtual ground or in the virtual sky (for example, a virtual object making sounds may fall from the sky). Therefore, the visual focus may be a certain location on the virtual ground in the game scene or a certain location in the virtual sky in the game scene.

[0068] It should be noted that when the visual focus changes, the target virtual object emitting sound may or may not change. For example, if a user views target virtual object 1 in real time through a virtual camera, and target virtual object 1 moves from position a to position b, the visual focus changes from position a to position b, but the viewed target virtual object remains unchanged. Similarly, if the user views target virtual object 1 at position a and then views target virtual object 2 at position b, the visual focus changes from position a to position b, and the viewed target virtual object also changes.

[0069] Since virtual games offer both visual and auditory effects, virtual cameras are also equipped with listeners to enhance user immersion. In this application, listeners can be registered using the Wwise audio engine. It should be noted that the initial location of the registered listener can be left unset, or it can be set to the location of the virtual camera within the game scene; this application does not impose any limitations on this.

[0070] In practical applications, users control a virtual camera to view a target virtual object that makes a sound, in order to obtain the game behavior performed by that target virtual object in the game.

[0071] Step S302: Determine the spatial range corresponding to the target sound source based on the equivalent point of volume attenuation on the line connecting the target sound source corresponding to the target sound source virtual object and the other first sound sources in the game scene.

[0072] The spatial range corresponding to the target sound source is the spatial range in the game scene where the listening volume of the target sound source is greater than that of the first sound source. The volume equivalent point is the location point on the line connecting the target sound source and the first sound source where the listening volume of the target sound source is the same as that of the first sound source.

[0073] This step is used to determine the spatial range within the game scene where auditory focus and visual focus can be kept consistent.

[0074] In practical applications, the virtual sound-emitting object and its corresponding sound-emitting body may not be located in the same position in the game scene. The sound-emitting body is the location where the sound emitted by the virtual sound-emitting object corresponds to the sound emitted by the virtual sound-emitting object. The first sound-emitting body is the sound-emitting body corresponding to the virtual sound-emitting object in the game scene other than the target virtual sound-emitting object. There can be one or more first sound-emitting bodies, and the target sound-emitting body and any two of the other first sound-emitting bodies may be located on the same straight line or on different straight lines. This application does not limit this.

[0075] It is important to note that the listening volume of a sound source refers to the loudness of the sound heard from a certain location. The listening volume of a sound source is related to sound attenuation. In real-world scenarios, sound attenuation is related to the distance the sound travels. Therefore, in order to simulate real-world scenarios, the listening volume of a sound source in a virtual game is also related to the distance between the sound source and the listening location. The greater the distance, the more the sound attenuates, and the lower the listening volume.

[0076] In addition to the listening volume of a sound-producing body, a sound-producing body also has a sound volume, which refers to the original volume of the sound produced by the sound-producing body before attenuation.

[0077] Sound attenuation refers to the phenomenon where sound energy decreases during propagation through a medium due to factors such as beam divergence, absorption, reflection, and scattering. In the same medium (e.g., air), the amount of sound attenuation can be considered directly proportional to the distance the sound travels.

[0078] In this application, in order to avoid a separation between visual focus and auditory focus, that is, to ensure that the sound from the target virtual object where the visual focus is located is the most prominent among the heard sounds.

[0079] Considering that all the sounds heard come from virtual objects emitting sound in the game scene—for example, a virtual object initiating an attack, being attacked, or any other virtual object emitting sound can trigger a corresponding sound—the spatial range corresponding to the target virtual object can be determined by using the equivalent volume attenuation point on the line connecting the target virtual object to the other primary virtual objects in the game scene.

[0080] At the equivalent point of volume attenuation on the line connecting the target sound source and a first sound source, the listening volume of the target sound source and the first sound source is the same. On the plane perpendicular to the line connecting the target sound source and the first sound source constructed at the location of the equivalent point of volume attenuation, the listening volume of the target sound source and the first sound source is also the same. Thus, the spatial range in which the listening volume of the target sound source is greater than the listening volume of the first sound source can be determined.

[0081] Step S303: Adjust the listener's position to the spatial range corresponding to the target sound source.

[0082] After determining the spatial range that allows the auditory focus and visual focus to remain consistent, the listener's position can be adjusted to the spatial range corresponding to the target sound source.

[0083] It should be noted that the adjustments in this step can also be understood as settings or adjustments. When initially entering the game scene, if the listener registered with the wwise audio engine is not set to a position in the game scene, this step can be used to set the listener's position within the spatial range corresponding to the determined target sound source. During the virtual game, if the listener registered with the wwise audio engine has a set position in the game scene, this step can be used to adjust the listener's position to the spatial range corresponding to the determined target sound source.

[0084] In this way, the listener's position is within the spatial range corresponding to the target sound source, which ensures that the listening volume of the target sound source is greater than that of the first sound source, meaning that the listening volume of the target sound source is the largest.

[0085] In the game processing method provided in this application, the terminal displays a game scene captured by a virtual camera through a graphical user interface. The game scene includes a virtual sound-emitting object and a corresponding sound-emitting body. The method includes: determining the target virtual sound-emitting object where the visual focus of the virtual camera is located; configuring a listener in the virtual camera; determining the spatial range corresponding to the target sound-emitting body based on the equivalent volume attenuation point on the line connecting the target sound-emitting body to the other first sound-emitting bodies in the game scene; the spatial range corresponding to the target sound-emitting body is the spatial range in the game scene where the listening volume of the target sound-emitting body is greater than the listening volume of the first sound-emitting bodies, and the equivalent volume point is the position point on the line connecting the target sound-emitting body and the first sound-emitting bodies where the listening volume of the target sound-emitting body is the same as that of the first sound-emitting bodies; and adjusting the listener's position to the spatial range corresponding to the target sound-emitting body.

[0086] As can be seen, in this application, since the visual focus falls on the target virtual sound object, the sound emitted by the target virtual sound object is the most obvious sound that is expected to be heard. Because the spatial range corresponding to the determined target sound source is the spatial range in the game scene where the listening volume of the target sound source is greater than that of the first sound source, when the listener's position is within the spatial range corresponding to the target sound source, the listening volume of the sound emitted by the virtual sound object transmitted from the target sound source to the listener's position is the greatest, and the sound is the most obvious. When the visual focus changes, the spatial area corresponding to the target virtual sound object where the visual focus is located can be quickly determined according to the game processing method provided in this application, thereby determining the listener's position. In this way, even when there are multiple virtual sound objects in the game scene, the consistency between the visual focus and the auditory focus in the game scene can be guaranteed in real time.

[0087] Furthermore, when the auditory focus and visual focus are aligned, the sound emitted by the target virtual object at the visual focus is the most prominent among the sounds heard by the user, and is not covered by the sounds emitted by other virtual objects. This allows the user to effectively obtain game information about the target virtual object at the visual focus, thus improving the user experience.

[0088] Normally, the virtual object that makes a sound is located in the same position as the corresponding sound source. That is, the position where the virtual object makes a sound is its position in the game scene.

[0089] Furthermore, considering the random and variable nature of the positions of virtual sound-emitting objects in a game scene, in order to better implement the game processing method provided in this application, in an optional embodiment, when the virtual sound-emitting objects in the game scene are located on the same plane in the game scene (this plane is generally a preset ground plane or a plane parallel to the preset ground plane), the virtual sound-emitting object and the corresponding sound-emitting body are located at the same position. That is, the sound-emitting position of the virtual sound-emitting object is the position of the virtual sound-emitting object in the game scene. When the heights of the virtual sound-emitting objects from the preset ground plane in the game scene are different, before step S302, the method provided in this application embodiment may further include the following steps:

[0090] The plane in the game scene that is parallel to the preset ground plane and is at a preset distance from the preset ground plane is defined as the second plane where the sound-emitting body corresponding to the sound-emitting virtual object is located.

[0091] Based on the position of the virtual voice object in the game scene, the corresponding voice-emitting body is determined in the second plane.

[0092] In this step, the difference between the sound volume of the target sound source and the sound volume of the first sound source may be due to the fact that some or all of the sound sources of the first sound source have the same sound volume and the sound volume of the first sound source is different from the sound volume of the target sound source, or it may be that the sound volumes of all sound sources in the game scene are different. This application does not specifically limit this.

[0093] Specifically, the preset distance can be the maximum height among the heights of each virtual sound-emitting object from the preset ground plane. In this case, the second plane is the plane parallel to the preset ground plane where the virtual sound-emitting object farthest from the preset ground plane is located. Alternatively, the preset distance can be the height with the largest number of virtual sound-emitting objects after sorting the number of virtual sound-emitting objects at each height from the preset ground plane. In this case, more sound-emitting bodies can be set at the positions of the corresponding virtual sound-emitting objects.

[0094] Next, based on the position of the virtual voice object in the game scene, the corresponding sound-emitting body is determined in the second plane. Specifically, when the virtual voice object is not in the second plane, the corresponding sound-emitting body can be set at the intersection of the perpendicular line from the virtual voice object to the second plane and the second plane.

[0095] This technology places the sound-emitting virtual objects in the game scene on the same plane. It only needs to consider that the sound received by the target sound-emitting object on the same plane is greater than the sound received by the other first sound-emitting objects. Based on the sound-emitting objects on the same plane, the spatial range corresponding to the target sound-emitting object can be quickly determined, which improves the efficiency of determining the listener's position.

[0096] Optionally, if the volume of the target sound source is different from that of the first sound source, before step S302, the game processing method provided in this application embodiment can further determine the equivalent point of volume attenuation through the following steps:

[0097] Based on the ratio of the sound volume of the target sound source to the sound volume of the first sound source, the equivalent point of volume attenuation is determined on the line connecting the target sound source and the first sound source.

[0098] In practical applications, the volume of each sound source in a game scene may not be the same. In order to make the listening volume the same at the volume attenuation equivalent point for sound sources with different volumes, the volume attenuation equivalent point can be determined based on the ratio of the volume of the target sound source to the volume of the first sound source.

[0099] In one possible implementation, the listening volume and the sound propagation distance are linearly related, and the equivalent point of volume attenuation can be determined by the following formula:

[0100] x1-l1*v=x2-l2*v

[0101] Where x1 is the volume of the target sound source, x2 is the volume of the first sound source, l1 is the distance between the target sound source and the equivalent point of volume attenuation, l2 is the distance between the first sound source and the equivalent point of volume attenuation, v is the sound attenuation rate in the game scene, and the sum of l1 and l2 is the distance between the target sound source and the first sound source. Thus, l1 and l2 can be calculated, and the equivalent point of volume attenuation can be determined.

[0102] Optionally, when the target sound source and the first sound source have the same sound volume, since the sound attenuation is proportional to the sound propagation distance, step S302 can be achieved through the following steps:

[0103] The spatial range corresponding to the target sound source is determined based on the midpoint of the line connecting the target sound source and the first sound source.

[0104] It is understandable that the distance from the midpoint of the line connecting the target sound source and the first sound source to the target sound source is the same as the distance to the first sound source. Thus, when the sound output of the target sound source and the first sound source is the same, the listening volume of the target sound source at the midpoint is the same as the listening volume of the first sound source.

[0105] In this way, the spatial range in which the listening volume of the target sound source is greater than that of the first sound source can be determined based on the midpoint of the line connecting the target sound source and the first sound source. The listener's position can be located anywhere within this spatial range, ensuring that the most prominent sound heard is from the virtual object of the target sound source where the visual focus is located.

[0106] Optionally, the specific implementation steps for the step "determine the spatial range corresponding to the target sound source based on the midpoint of the line connecting the target sound source and the first sound source" are as follows:

[0107] Determine a plane that is located at the midpoint of the line connecting the target sound source and the first sound source, and is perpendicular to the line connecting the target sound source and the first sound source;

[0108] The spatial intersection of the planes on the side of the game scene closest to the target sound source is defined as the spatial range corresponding to the target sound source.

[0109] This step is used to specifically determine the spatial range corresponding to the target sound source based on the positions of the target sound source and the first sound source.

[0110] When there is a first sound source in the game scene, the point in the area on the side closer to the target sound source in the plane perpendicular to the line connecting the target sound source and the first sound source is the point whose distance to the target sound source is less than its distance to the first sound source.

[0111] Therefore, when there are multiple first sound sources in a game scene, the spatial intersection of the areas closest to the target sound source within the regions formed by the planes perpendicular to the connecting lines (where the midline of the line connecting the target sound source and each first sound source lies) ultimately constitutes the spatial range corresponding to the target sound source. This spatial intersection closest to the target sound source can also be understood as the area containing the target sound source within the region ultimately formed by the planes.

[0112] The following is passed Figure 4 The determination of the spatial range corresponding to the target sound-emitting body is introduced;

[0113] like Figure 4 The image shown is a top view of the spatial range of the listener's location in the game processing method provided in this application embodiment. Figure 4There exists a target sound-emitting body and multiple first sound-emitting bodies (401, 402, 403, 404, and 405) on the same plane as the target sound-emitting body. These first sound-emitting bodies are located in different directions from the target sound-emitting body. The midpoint of the line connecting the target sound-emitting body and the first sound-emitting body 401 is 'a'. It can be seen that in the region divided by the plane located at point 'a' and perpendicular to the line connecting the target sound-emitting body and the first sound-emitting body 401, the distance from each point in the region closer to the target sound-emitting body is less than the distance to the first sound-emitting body 401. Similarly, the midpoints of the lines connecting the target sound-emitting body and the other four sound-emitting bodies are 'b', 'c', 'd', and 'e', ​​respectively. Therefore, in the region divided by the plane located at points b, c, d, and e' and perpendicular to the line connecting the target sound-emitting body and the corresponding first sound-emitting body, the distance from each point in the region closer to the target sound-emitting body is less than the distance to the corresponding first sound-emitting body.

[0114] Therefore, in the spatial intersection formed by the plane perpendicular to the line connecting the target sound source and each of the first sound sources in the region near the target sound source, the distance from any point to the target sound source is less than the distance from that point to any of the first sound sources. Thus, this spatial intersection is the spatial range corresponding to the target sound source.

[0115] Understandably, the spatial range determined in step S302 is the maximum range of the listener's position. That is, at each position outside this spatial range, the listening volume of the target sound source cannot be greater than the listening volume of each first sound source.

[0116] In a specific implementation, to improve the efficiency of adjusting the listener's position and make this solution easier to implement, step S303 can be achieved in at least three ways as provided below:

[0117] 1. Method 1: Considering only the first sound source closest to the target sound source, the specific implementation of step S303 is as follows:

[0118] Identify the first sound source that has the smallest distance from the target sound source among the first sound sources;

[0119] The first target area is defined as a cylindrical region perpendicular to the preset ground plane, with the target sound-emitting body as the center and half the distance between the first target sound-emitting body and the target sound-emitting body as the radius.

[0120] Adjust the listener's position to the first target area.

[0121] The determined cylindrical region is located within the spatial range defined in step S302.

[0122] The following is passed Figure 5 The following explanation addresses the determination of the first target area based on the first sound-emitting body in this step:

[0123] like Figure 5 The diagram shown is an example of the listener's location area provided in an embodiment of this application. In the game scene, the target first sound source 501 closest to the target sound source is determined. It can be seen that the midpoint of the line connecting the target first sound source 501 and the target sound source is the corresponding equivalent point of volume attenuation. Since the distance between the target sound source and the target first sound source is less than the distance between the target sound source and other first sound sources, on the sound source plane, within a circular region formed by the target sound source as the center and half the distance between the target sound source and the target first sound source as the radius, the distance from any point to the target sound source is less than the distance to the other first sound sources. Correspondingly, a cylindrical region can be obtained in three-dimensional space, which is... Figure 5 The cylindrical region 502 of the listener's position is such that the distance from any point in the region to the target sound source is less than the distance to the other first sound sources.

[0124] 2. Method Two: When the virtual sound-emitting object and the corresponding sound-emitting body are in the same position, considering the direction of the sound, in order to ensure that the direction of the heard sound is not much different from the direction of the virtual sound-emitting object in the visual perception, step S303 can adjust the listener's position through the following specific implementation method:

[0125] A first plane is determined based on the virtual camera's line of sight and the perpendicular line from the virtual camera to the preset ground plane of the game scene; the first plane is divided into regions by the perpendicular line located on the target sound source and perpendicular to the preset ground plane, and the side of the region divided by the first plane that is closer to the virtual camera is determined as the first plane region; the listener's position is adjusted to the second plane region within the spatial range of the first plane region.

[0126] The first plane is a plane perpendicular to the preset ground plane where the line connecting the virtual camera and the target sound source is located. The first plane region is the plane region on the side closer to the virtual camera in the divided region formed by dividing the first plane with the perpendicular line perpendicular to the preset ground plane where the target sound source is located. When the listener's position is in the first plane region, it can be ensured that the difference between the direction of the sound heard and the direction of the virtual sound source seen is small.

[0127] The following is passed Figure 6 The second planar region within the spatial range of the first planar region in this step is described as follows:

[0128] like Figure 6The diagram shown is a schematic representation of another example of the listener's location area provided in this application embodiment, where the location of each sound-emitting body is the location of the corresponding virtual sound-emitting object. In a first plane perpendicular to a preset ground plane, within the line of sight of the virtual camera, and after dividing the first plane into regions using a perpendicular line perpendicular to the preset ground plane where the target sound-emitting body is located, multiple first sound-emitting bodies exist in the first plane region closer to the virtual camera. Since each location point in this first plane region is on the same side of the target sound-emitting body as the virtual camera, the direction of the sound heard from the target sound-emitting body is not significantly different from the direction of the seen target sound-emitting virtual object.

[0129] In addition, considering the need to ensure that the listening volume of the target sound source is greater than that of the first sound source, the listener's position can be adjusted to the second plane area within the spatial range of the first plane area.

[0130] In this second plane region, it is ensured that the location of the heard sound and the location of the virtual object emitting the sound in the vision are not too different, and that the listening volume of the target sound source is greater than that of the first sound source, which further reduces the sense of separation between hearing and vision and enhances the user's game immersion.

[0131] It should be noted that the determined second planar region is a planar region that includes the vertical line perpendicular to the preset ground plane where the target sound-emitting body is located, but does not include another boundary line in the planar region that is parallel to the vertical line.

[0132] 2. Method 3: Without considering the positions of the other first sound sources in the game, determine the area where the listener is located by the distance between the listener's position and the target sound source being less than the distances to other positions in the plane where the sound source is located, excluding the target sound source.

[0133] Therefore, step S303 can adjust the listener's position in the following specific way:

[0134] The first datum line is defined as the perpendicular line located at the target sound source and perpendicular to the preset ground plane of the game scene;

[0135] Adjust the listener's position to the first marking line.

[0136] Method 3 follows the principle that a point in a plane whose distance from it is less than the distance from other points in the plane lies on the perpendicular line between that point and the plane. Here, the first marker line is the line within the spatial range determined in step S302.

[0137] It should be noted that, theoretically, the length of the first marker line is not limited. However, considering the attenuation of sound during sound propagation in a game scene, to ensure that the volume of the target sound source heard by the listener does not decrease to zero, a line segment with a preset height from the target sound source can be selected on the first marker line. The listener's position can then be adjusted to any position within this line segment except for the target endpoint, which is the other endpoint of the line segment excluding the target sound source. The preset height is the propagation distance at which the volume of the target sound source attenuates to zero, and this distance can be determined based on the sound attenuation rate.

[0138] The following is passed Figure 7 The first marking line within the spatial range in this step is explained as follows:

[0139] like Figure 7 The diagram shown is a schematic representation of another example of the area where the listener's location is provided in this application embodiment. The distance from each point on the vertical line perpendicular to the preset ground plane where the target sound source is located to the target sound source is less than the distance to other points on the sound source plane. Therefore, this vertical line is the first marker. To ensure that the listening volume of the target sound source corresponding to the listener's location is greater than 0, a corresponding line segment is selected from the first marker, that is... Figure 7 Within the line segment area where the listener's position is located, regardless of the location of the first sound source within the sound source plane, it can be guaranteed that the listening volume of the target sound source at the same location within the line segment area where the listener's position is located is greater than the listening volume of the first sound source.

[0140] In the provided method three, regardless of the position of the first sound source in the sound source plane, the distance from the listener's position on the first mark to the target sound source is minimized. That is, the sound attenuation of the sound output by the target sound source to the listener's position is minimized, so that the sound of the target sound source corresponding to the target sound virtual object is the most obvious in the sound heard by the user.

[0141] It should be noted that in Method 1, Method 2 and Method 3 provided above, each sound source is located on the same plane parallel to the preset ground plane.

[0142] Understandably, a coordinate system and / or latitude and longitude can be set in a game scene, and different locations in the game scene can be distinguished by coordinates and / or latitude and longitude. This application uses setting a coordinate system in a game scene as an example for illustration. Specifically, a global coordinate system can be set for one or more game scenes. This coordinate system can be a three-dimensional spatial coordinate system or a more multi-dimensional spatial coordinate system. This embodiment of the application specifically uses a three-dimensional spatial coordinate system as an example. In this way, each location in the game scene can be represented by a coordinate, and there is a one-to-one correspondence between location and coordinate.

[0143] like Figure 8 The diagram shown is a schematic diagram of an example of a three-dimensional spatial coordinate system provided in the embodiments of this application. It has three axes: X, Y, and Z. The Z axis represents the height of the virtual ground in the game scene. There is a position a in the game scene, and the coordinates of position a in the game scene are (x1, x2, x3).

[0144] In virtual games, the visual focus of a virtual camera may be constantly changing. When the visual focus changes, the spatial range corresponding to the target sound-emitting virtual object determined by the above scheme may also be constantly changing. Since there are many position points in a spatial range, the listening volume of the target sound-emitting object corresponding to each position point may not be the same. Thus, when the visual focus changes, adjusting the listener's position to any position in different spatial ranges corresponding to the target sound-emitting virtual object may cause the listening volume of the target sound-emitting virtual object to fluctuate.

[0145] Therefore, in order to ensure that the sound heard by the user does not fluctuate in volume when the visual focus changes, in this embodiment of the application, the position of the listener can be determined as the position where the distance between the first mark and the target sound source is fixed.

[0146] For example, a fixed distance of 10m can be set. When the target sound source's position coordinates are (5, 5, 0), the listener's position coordinates are (5, 5, 10); when the target sound source's position coordinates are (10, 5, 0), the listener's position coordinates are (10, 5, 10). This ensures that even when the visual focus changes, causing the target sound source's position to change, the volume heard by the user from the virtual sound source at the visual focus point remains unchanged, thus guaranteeing a good audio experience for the user on their terminal device.

[0147] Furthermore, in order to ensure that both the sound and visual presentations are at a high altitude and to quickly determine the listener's position based on the known location of the virtual camera, this application can implement the step "adjusting the listener's position to the first marker line" in the following optional manner:

[0148] The listener's position is adjusted to a point on the first mark line, and the distance between the listener and the target sound source is the first distance; the first distance is the component of the distance between the virtual camera and the target sound source in the direction perpendicular to the preset ground plane.

[0149] This step is used to position the listener at the location where the target sound source is directly above the sound source plane and at the same height as the virtual camera.

[0150] Specifically, the computer can calculate the following steps when performing the above steps: "adjusting the listener's position to the first mark line, and the distance between the listener and the target sound source is the first distance; the first distance is the component of the distance between the virtual camera and the target sound source in the direction perpendicular to the preset ground plane":

[0151] Obtain the angle between the virtual camera's line of sight and the preset ground plane; determine the second distance between the listener's position and the virtual camera's position by multiplying the distance between the virtual camera and the target sound source by the cosine of the angle; adjust the listener's position to a point where the line of sight is on a line parallel to the preset ground plane and the distance between the listener and the virtual camera is the second distance.

[0152] The specific calculation formulas for the above steps are as follows:

[0153] d1=l 目标发声体,虚拟摄像机) *cosθ

[0154] Where d1 is the second distance between the listener's position and the virtual camera's position, l 目标发声体,虚拟摄像机) θ is the distance between the virtual camera and the target sound source, and θ is the angle between the virtual camera's line of sight and the preset ground plane.

[0155] like Figure 9 The diagram shown is a schematic representation of a change in the listener's position according to an embodiment of this application. Figure 9 The position of the virtual camera remains unchanged, but the viewing angle changes, causing a change in the position of the visual focus. Therefore, the target sound-emitting body corresponding to the virtual object at the visual focus changes. At the first viewing angle θ1, the target sound-emitting body is target sound-emitting body 1, and the determined listener position 1 is the intersection of the perpendicular line from target sound-emitting body 1 to the preset ground plane and the plane parallel to the preset ground plane where the virtual camera is located. At the second viewing angle θ2, the target sound-emitting body is target sound-emitting body 2, and the determined listener position 2 is the intersection of the perpendicular line from target sound-emitting body 2 to the preset ground plane and the plane parallel to the preset ground plane where the virtual camera is located.

[0156] This technology allows for the rapid determination of a second distance between the listener's position and the virtual camera's position when the virtual camera's state changes. This distance is based on the virtual camera's position and the position of the target sound-emitting virtual object corresponding to the visual focus. The listener's position can then be adjusted accordingly. Changes in the virtual camera's state include at least one of the following: a change in the virtual camera's position or a change in the virtual camera's line of sight.

[0157] In one possible implementation, when all virtual sound-emitting objects are located on a preset ground plane, the virtual sound-emitting objects and their corresponding sound-emitting bodies are situated at the same position. In this case, the height of the virtual sound-emitting objects in the game scene is the height of the preset ground plane (typically, the height of the preset ground plane is 0). Since the position and line of sight of the virtual camera in the game scene often change frequently, in order to reduce the computational load of data calculations in the game scene, the listener's position can be quickly determined using the following method in this embodiment:

[0158] Obtain the position and top-down angle of the virtual camera; determine the listener's position offset relative to the virtual camera by the ratio of the height of the virtual camera to the tangent of the top-down angle; determine the listener's position by the position of the virtual camera's line of sight on a line parallel to the preset ground plane, at a distance equal to this position offset.

[0159] The specific calculation formulas for the above steps are as follows:

[0160] d2=h / tanθ

[0161] Where d2 is the position offset of the listener relative to the virtual camera, h is the height of the virtual camera (the height of the virtual camera from the preset ground plane), and θ is the downward angle of the virtual camera (the downward angle is the angle between the line of sight of the virtual camera and the preset ground plane).

[0162] Typically, since the location data of a virtual camera can be acquired in real time, the listener's location can be quickly determined using this data. In practice, it is not necessary to obtain the location of the visual focus; the listener's location can be determined solely by the position of the virtual camera and the listener's line of sight.

[0163] like Figure 10 The diagram shown is an example of determining the coordinates of the listener's position according to an embodiment of this application. The positive direction of the X-axis is east, and the positive direction of the Y-axis is north. The coordinates of the virtual camera's position are (5, 10, 10). The virtual camera views the game scene from a 45° downward angle, 30° south of east. The listener's position is the position offset from the virtual camera's position (5, 10, 10) along the horizontal direction of 30° south of east by an amount of 10 / tan45° = 10.

[0164] In this way, the coordinates of the listener's position can be determined. Since the listener's position is located at 30° east of south of the virtual camera, therefore, x 听者位置 =x 虚拟摄像机 +position offset * cos30°, y 听者位置 =y 虚拟摄像机- Position offset * sin30°, z 听者位置 =z 虚拟摄像机 Thus, x is calculated. 听者位置 =5 + 5 * √3 ≈ 13.65, y 听者位置 =10-5=5, z 听者位置 =10, therefore, the coordinates of the listener's position are (13.65, 5, 10).

[0165] Since the state of the virtual camera may change frequently, that is, the visual focus of the virtual camera may shift frequently, the above method can be used to quickly and accurately calculate the positional offset of the listener relative to the virtual camera when the state of the virtual camera changes, and then determine the new listener position.

[0166] The above is a description of how the listener's position is determined in the game processing method provided in the embodiments of this application.

[0167] Optionally, the game processing method provided in this application embodiment may further include the following steps:

[0168] The audio data of the virtual sound-producing object corresponding to the sound-producing body is configured with parameters to obtain the configured audio data; based on the configured audio data, the terminal is controlled to play the corresponding audio.

[0169] In this application, Wwise can be used to configure the parameters of the audio data corresponding to each sound source in the game scene. Specifically, Wwise can set various sound attributes according to the spatial relationship between the sound source and the listener's position.

[0170] Wwise can complete parameter configuration instantly. In this way, when the positions of various virtual sound objects in the virtual game change frequently, causing the corresponding sound sources to change constantly and the spatial relationship between the sound sources and the listener to change continuously, the corresponding parameter configuration can be updated in a timely manner, and the corresponding audio can be played on the terminal device based on the audio data after parameter configuration.

[0171] In practical applications, Wwise integrates voice events (Event format) into an audio format (Bnk format) that the game engine can recognize. Typically, a Bnk file can contain multiple voice events. The game engine needs to load the Bnk file first before it can read and play the voice events contained within it.

[0172] Specifically, audio data parameter configuration can include volume parameter configuration and sound panning parameter configuration, please refer to the following description for details:

[0173] 1. Volume parameter configuration:

[0174] Based on the sound attenuation strategy and the distance between the sound source and the listener, the initial audio data of the virtual sound object corresponding to the sound source is configured to adjust the listening volume; wherein, the sound attenuation strategy includes: the listening volume is inversely proportional to the corresponding distance.

[0175] In practical applications, sound signals propagate in a cone-shaped pattern from the location of the sound source. Therefore, in order to make the game more realistic, the sounds emitted in the game scene follow the auditory phenomenon of near sound being louder and far sound being softer. That is, the closer the sound source is to the listener, the louder the sound volume is, and vice versa.

[0176] Furthermore, the distance sound travels is related to its frequency. The lower the frequency of a sound, the longer its wavelength, the stronger its diffraction ability, and the lower its likelihood of absorption. Therefore, low-frequency sounds can travel farther than high-frequency sounds. For example, infrasound waves generated by earthquakes can travel considerable distances. Therefore, this application can also set sound attenuation settings for the audio data corresponding to each sound source based on the frequency of the sound in the audio data and the distance between the listener and the corresponding sound source.

[0177] In this way, by setting the volume attenuation of the audio data corresponding to each sound source based on the distance between the sound source and the listener, the sound attenuation is made to match the sound attenuation in a real scene, giving users a sense of immersion and enhancing their gaming experience.

[0178] 2. Audio-visual positioning parameter configuration:

[0179] Based on the sound image positioning adjustment strategy, the position of the sound-emitting virtual object, and the orientation of the virtual camera at its location, the left and right channel parameters of the initial audio data of the sound-emitting virtual object corresponding to the sound source are configured; the sound image positioning is used to indicate the direction to which the corresponding sound is directed.

[0180] It is understandable that sound has a sense of direction in the real world, that is, the human ear can determine the direction from which the sound comes based on what it hears.

[0181] Therefore, in this application, the initial audio data corresponding to the sound source can be positioned according to the position of the sound source and the position of the listener, so that the sound received at the listener's position produces an up-down and / or front-back and / or left-right effect, thereby simulating the location of sound in the real world.

[0182] In a specific implementation, the left and right channels can be set according to the spatial relationship between the positions of each sound source and the listener's position, so that the user can perceive the direction of the sound and improve the user's gaming auditory experience.

[0183] Understandably, Wwise allows for the setting of volume attenuation curves, low-pass filter parameter curves, and sound image positioning parameter curves. These curves can be set by developers based on actual needs and continuously adjusted and optimized based on listening experience. This allows for quick parameter configuration of the initial audio data of the virtual sound object based on the set curves.

[0184] In addition, after adjusting the listener's position to the spatial range corresponding to the target sound source in step S303, the game processing method provided in this application embodiment may further include: binding the listener's position to the game object.

[0185] After the game ends, the game object corresponding to the registered listener can be deleted. Therefore, the game processing method provided in this application embodiment may also include the following steps: in response to the game end command for the game scene, the game object is cleared through the audio engine.

[0186] In this way, when the game ends, the audio engine promptly clears the registered game objects to free up resources and reduce space usage.

[0187] Corresponding to the game processing method provided in the first embodiment of this application, the second embodiment of this application also provides a game processing device. In this device, a terminal displays a game scene captured by a virtual camera through a graphical user interface. The game scene includes a virtual sound-emitting object and a sound-emitting body corresponding to the virtual sound-emitting object, such as... Figure 11 As shown, the game processing device 1100 includes:

[0188] The first determining unit 1101 is used to determine the target sound-emitting virtual object where the visual focus of the virtual camera is located; the virtual camera is configured with a listener;

[0189] The second determining unit 1102 is used to determine the spatial range corresponding to the target sound source based on the volume attenuation equivalent point on the line connecting the target sound source corresponding to the target sound source in the virtual object and the other first sound sources in the game scene; the spatial range corresponding to the target sound source is the spatial range in the game scene where the listening volume of the target sound source is greater than the listening volume of the first sound source, and the volume equivalent point is the position point on the line connecting the target sound source and the first sound source where the listening volume of the target sound source is the same as the listening volume of the first sound source.

[0190] The position adjustment unit 1103 is used to adjust the position of the listener to the spatial range corresponding to the target sound source.

[0191] Optionally, when the target sound emitter and the first sound emitter have the same sound volume, the second determining unit 1102 is specifically used to: determine the spatial range corresponding to the target sound emitter based on the midpoint of the line connecting the target sound emitter and the first sound emitter.

[0192] Optionally, if the volume of the target sound source is different from that of the first sound source, the second determining unit 1102 is further configured to: determine an equivalent point of volume attenuation on the line connecting the target sound source and the first sound source based on the ratio of the volume of the target sound source to the volume of the first sound source.

[0193] Optionally, the second determining unit 1102 is specifically used to: determine a plane located at the midpoint of the line connecting the target sound source and the first sound source, and perpendicular to the line connecting the target sound source and the first sound source; and determine the spatial intersection of the plane on the side of the game scene closer to the target sound source as the spatial range corresponding to the target sound source.

[0194] Optionally, when the virtual sound-emitting object and the corresponding sound-emitting body are in the same position, the position adjustment unit 1103 is specifically used to: determine a first plane based on the line of sight of the virtual camera and the perpendicular line from the virtual camera to the preset ground plane of the game scene; divide the first plane into regions by the perpendicular line located on the target sound-emitting body and perpendicular to the preset ground plane, and determine the side of the region divided by the first plane that is closer to the virtual camera as the first plane region;

[0195] The listener's position is adjusted to the planar area of ​​the first plane within the spatial range.

[0196] Optionally, the position adjustment unit 1103 is specifically used to: determine a first marker line as a vertical line located at the target sound source and perpendicular to a preset ground plane of the game scene within the spatial range; and adjust the listener's position to the first marker line.

[0197] Optionally, the position adjustment unit 1103 is specifically used to: adjust the position of the listener to a position point on the first mark line, and the distance between the listener and the target sound source is a first distance; the first distance is the component of the distance between the virtual camera and the target sound source in the direction perpendicular to the preset ground plane.

[0198] Optionally, the position adjustment unit 1103 is specifically used to: obtain the angle between the line of sight of the virtual camera and the preset ground plane; determine the product of the distance between the virtual camera and the target sound source and the cosine of the angle as the second distance between the listener's position and the position of the virtual camera; and adjust the listener's position to a point where the line of sight is on a line parallel to the preset ground plane and the distance between the listener and the virtual camera is the second distance.

[0199] Optionally, if the heights of the virtual voice-emitting objects to the preset ground plane in the game scene are not the same, the first determining unit 1101 is further configured to: determine a plane in the game scene that is parallel to the preset ground plane and at a preset distance from the preset ground plane as the second plane where the voice-emitting body corresponding to the virtual voice-emitting object is located; and determine the voice-emitting body corresponding to the virtual voice-emitting object in the second plane according to the position of the virtual voice-emitting object in the game scene.

[0200] Corresponding to the game processing method provided in the first embodiment of this application, the third embodiment of this application also provides an electronic device for implementing game processing. For example... Figure 12 As shown, the electronic device 1200 includes: a processor 1201; and a memory 1202 for storing a program for a game processing method. After the device is powered on and the program for the game processing method is run by the processor, the following steps are performed:

[0201] The virtual object emitting sound is located at the visual focus of the virtual camera; the virtual camera is configured with a listener;

[0202] Based on the volume attenuation equivalent point on the line connecting the target sound-emitting virtual object to the other first sound-emitting objects in the game scene, the spatial range corresponding to the target sound-emitting object is determined; the spatial range corresponding to the target sound-emitting object is the spatial range in the game scene where the listening volume of the target sound-emitting object is greater than the listening volume of the first sound-emitting object, and the volume equivalent point is the position point on the line connecting the target sound-emitting object and the first sound-emitting object where the listening volume of the target sound-emitting object is the same as the listening volume of the first sound-emitting object.

[0203] The listener's position is adjusted to the spatial range corresponding to the target sound source.

[0204] Corresponding to the game processing method provided in the first embodiment of this application, the fourth embodiment of this application provides a computer-readable storage medium storing a program for the game processing method, which is executed by a processor to perform the following steps:

[0205] The virtual object emitting sound is located at the visual focus of the virtual camera; the virtual camera is configured with a listener;

[0206] Based on the volume attenuation equivalent point on the line connecting the target sound-emitting virtual object to the other first sound-emitting objects in the game scene, the spatial range corresponding to the target sound-emitting object is determined; the spatial range corresponding to the target sound-emitting object is the spatial range in the game scene where the listening volume of the target sound-emitting object is greater than the listening volume of the first sound-emitting object, and the volume equivalent point is the position point on the line connecting the target sound-emitting object and the first sound-emitting object where the listening volume of the target sound-emitting object is the same as the listening volume of the first sound-emitting object.

[0207] The listener's position is adjusted to the spatial range corresponding to the target sound source.

[0208] It should be noted that for a detailed description of the apparatus, electronic device and computer-readable storage medium provided in the second, third and fourth embodiments of this application, please refer to the relevant description of the first embodiment of this application, which will not be repeated here.

[0209] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.

[0210] In a typical configuration, a node device in a blockchain includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0211] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0212] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage media, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.

[0213] 2. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0214] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.

Claims

1. A game processing method, characterized in that, The terminal displays a game scene captured by a virtual camera through a graphical user interface. The game scene includes a virtual sound-emitting object and a corresponding sound-emitting body. The method includes: The virtual object emitting sound is located at the visual focus of the virtual camera; the virtual camera is configured with a listener; Based on the volume attenuation equivalent point on the line connecting the target sound-emitting virtual object to the other first sound-emitting objects in the game scene, the spatial range corresponding to the target sound-emitting object is determined; the spatial range corresponding to the target sound-emitting object is the spatial range in the game scene where the listening volume of the target sound-emitting object is greater than the listening volume of the first sound-emitting object, and the volume attenuation equivalent point is the position point on the line connecting the target sound-emitting object and the first sound-emitting object where the listening volume of the target sound-emitting object is the same as the listening volume of the first sound-emitting object. The listener's position is adjusted to the spatial range corresponding to the target sound source.

2. The method according to claim 1, characterized in that, When the target sound source has the same volume as the first sound source, determining the spatial range corresponding to the target sound source based on the equivalent volume attenuation point on the line connecting the target sound source corresponding to the virtual sound source and the other first sound sources in the game scene includes: The spatial range corresponding to the target sound source is determined based on the midpoint of the line connecting the target sound source and the first sound source.

3. The method according to claim 1, characterized in that, When the volume of the target sound source is different from that of the first sound source, before determining the spatial range corresponding to the target sound source based on the volume attenuation equivalent point on the line connecting the target sound source corresponding to the virtual sound source and the other first sound sources in the game scene, the method further includes: Based on the ratio of the sound volume emitted by the target sound source to the sound volume emitted by the first sound source, an equivalent point of volume attenuation is determined on the line connecting the target sound source and the first sound source.

4. The method according to claim 2, characterized in that, The step of determining the spatial range corresponding to the target sound source based on the midpoint of the line connecting the target sound source and the first sound source includes: Determine a plane located at the midpoint of the line connecting the target sound source and the first sound source, and perpendicular to the line connecting the target sound source and the first sound source; The spatial intersection of the plane on the side of the game scene closest to the target sound source is defined as the spatial range corresponding to the target sound source.

5. The method according to claim 1, characterized in that, When the virtual sound-emitting object and the corresponding sound-emitting body are in the same position, adjusting the listener's position to the spatial range corresponding to the target sound-emitting body includes: The first plane is determined based on the line of sight of the virtual camera and the perpendicular line from the virtual camera to the preset ground plane of the game scene; The first plane is divided into regions by a vertical line located on the target sound source and perpendicular to the preset ground plane, and the side of the region divided by the first plane that is closer to the virtual camera is defined as the first plane region. The listener's position is adjusted to the second plane region within the spatial range of the first plane region.

6. The method according to claim 1, characterized in that, Adjusting the listener's position to the spatial range corresponding to the target sound source includes: The perpendicular line located at the target sound source and perpendicular to the preset ground plane of the game scene is defined as the first datum line; Adjust the listener's position to the first mark.

7. The method according to claim 6, characterized in that, The step of adjusting the listener's position to the first mark includes: The listener's position is adjusted to a point on the first mark line, at a distance of a first distance from the target sound source; the first distance is the component of the distance between the virtual camera and the target sound source in the direction perpendicular to the preset ground plane.

8. The method according to claim 7, characterized in that, The step of adjusting the listener's position to a point on the first mark line, where the distance between the listener and the target sound source is a first distance, includes: Obtain the angle between the virtual camera's line of sight and the preset ground plane; The product of the distance between the virtual camera and the target sound source and the cosine of the included angle is determined as the second distance between the listener's position and the virtual camera's position; The listener's position is adjusted to a point where their line of sight is on a line parallel to the preset ground plane, and the distance between them and the virtual camera is the second distance.

9. The method according to claim 1, characterized in that, When the heights of the virtual sound-emitting objects to the preset ground plane in the game scene are not the same, before the equivalent point of volume attenuation on the line connecting the target sound-emitting body corresponding to the target virtual sound-emitting object and the other first sound-emitting bodies in the game scene, the method further includes: The plane in the game scene that is parallel to the preset ground plane and is at a preset distance from the preset ground plane is defined as the second plane where the sound-emitting virtual object is located; Based on the position of the virtual voice-emitting object in the game scene, the voice-emitting body corresponding to the virtual voice-emitting object is determined in the second plane.

10. A game processing device, characterized in that, The terminal displays a game scene captured by a virtual camera through a graphical user interface. The game scene includes virtual sound-emitting objects and corresponding sound-emitting bodies. The device includes: The first determining unit is used to determine the target sound-emitting virtual object where the visual focus of the virtual camera is located; the virtual camera is configured with a listener; The second determining unit is used to determine the spatial range corresponding to the target sound source based on the volume attenuation equivalent point on the line connecting the target sound source corresponding to the target sound source in the virtual object and the other first sound sources in the game scene; the spatial range corresponding to the target sound source is the spatial range in the game scene where the listening volume of the target sound source is greater than the listening volume of the first sound source, and the volume attenuation equivalent point is the position point on the line connecting the target sound source and the first sound source where the listening volume of the target sound source is the same as the listening volume of the first sound source. The position adjustment unit is used to adjust the position of the listener to the spatial range corresponding to the target sound source.

11. An electronic device, characterized in that, include: processor; as well as A memory for storing a data processing program, which, when the electronic device is powered on and runs through the processor, executes the method as described in any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, The system contains a data processing program that is executed by a processor to perform the method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Sound propagation simulation method and device, electronic equipment and computer readable medium

    CN115779425A

  • Sound effect generating device, sound effect generating program for providing the same, and recording medium

    JP2011028169A