Method and device for displaying game screen, readable storage medium and electronic device
By introducing global camera position and camera scoring parameters, the problems of poor expansion of the camera system and low accuracy of game screens in the prior art are solved, and more efficient game screen shooting and camera system scalability are achieved.
Patent Information
- Application Number
- CN202210138780.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-15
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-02-15
AI Technical Summary
The camera systems in existing games have poor scalability, low accuracy in game screen display, and machine learning-based camera systems have challenges in data volume and interpretability, making it difficult to adapt to the fast iterative game development process.
By introducing global camera and camera scoring parameters, the global camera in the game scene is obtained, the target global camera is selected according to the camera score, and the target global camera is updated at preset time intervals to control the camera to shoot the game scene and display the game screen.
It improves the accuracy and quality of game screen shooting, enhances the scalability of the camera system, and enables users to customize the camera layout and scoring mechanism according to their needs, adapting to different game combat modes and events.
Smart Images

Figure CN114534256B_ABST
Abstract
Description
Background Art
[0002] In games, the behavior of the camera plays a vital role in the performance of the game screen.
[0003] In related technologies, the camera systems in games are mainly based on state jumps, similar to state machines and behavior trees, and only trigger behaviors under specific circumstances. For example, in God of War 4, the camera focuses on the enemy when the character aims at the target and throws. There are also some camera systems that use machine learning methods, such as the Dota 2 playback system, which obtains the best observation position through feature extraction and model calculation.
[0004] However, the camera system based on behavior trees and state machines emphasizes the impact of the environment on the characters. It only generates behaviors when specific events are triggered, which is suitable for the camera model of a single character. The camera system that uses machine learning methods requires a large amount of training data and models for training. It has strong customization characteristics, poor scalability and portability, and the machine learning algorithm itself has poor interpretability and large amount of computation, which makes it difficult to adapt to the fast-iteration game product development process.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] The purpose of the present disclosure is to provide a method and device for displaying a game screen, a computer-readable storage medium and an electronic device, thereby at least to a certain extent improving the problems of poor scalability of the camera system in the game and low accuracy of the game screen display.
[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0008] According to a first aspect of the present disclosure, a method for displaying a game screen is provided, wherein the game screen is obtained by photographing a game scene with a camera in the game, and the method comprises: obtaining a global camera position in the game scene, wherein the global camera position is predetermined according to a camera position restriction condition; determining a camera position score for each global camera position according to a camera scoring parameter, and selecting a target global camera position whose camera position score meets a preset condition; controlling the camera to photograph the game scene based on the target global camera position, and displaying the photographed game screen; and updating the target global camera position at preset time intervals.
[0009] In an exemplary embodiment of the present disclosure, based on the above solution, the method further includes:
[0010] When a preset event occurs, obtain a preset shot track file corresponding to the preset event; based on a temporary camera position in the preset shot track file, capture a game scene, and display the captured game screen.
[0011] In an exemplary embodiment of the present disclosure, based on the foregoing solution, the method further includes: when the preset event ends, update the target global camera position, and based on the updated target global camera position, capture a game scene, and display the captured game screen.
[0012] In an exemplary embodiment of the present disclosure, based on the foregoing solution, the global camera position includes one or more surrounding camera positions, and each surrounding camera position is determined based on any minimum surrounding shape that can simultaneously surround the at least two game characters.
[0013] In an exemplary embodiment of the present disclosure, based on the foregoing solution, the minimum surrounding shape includes a minimum surrounding sphere, and obtaining the global camera position in the game scene includes: calculating a minimum surrounding sphere that can simultaneously surround the at least two game characters according to the current positions of each of the at least two game characters; determining a target distance of each surrounding camera position relative to the center of the minimum surrounding sphere based on the radius of the minimum surrounding sphere and the viewing angle range of the camera; obtaining the global camera position in the game scene according to the target distance and the preset direction of each surrounding camera position; wherein the preset direction is used to indicate the direction of the surrounding camera position relative to the center of the minimum surrounding sphere.
[0014] In an exemplary embodiment of the present disclosure, based on the foregoing solution, determining the target distance of each surrounding camera position relative to the center of the minimum surrounding sphere based on the radius of the minimum surrounding sphere and the viewing angle range of the camera includes: taking the tangent value of half of the viewing angle of the camera in the first direction as the first tangent value, and taking the tangent value of half of the viewing angle of the camera in the second direction as the second tangent value; determining a first ratio between the radius of the minimum surrounding sphere and the first tangent value; determining a second ratio between the radius of the minimum surrounding sphere and the second tangent value; determining the target distance of each surrounding camera position relative to the center of the minimum surrounding sphere based on the maximum value of the first ratio and the second ratio; wherein the first direction and the second direction are perpendicular.
[0015] In an exemplary embodiment of the present disclosure, based on the foregoing solution, determining the target distance of each surrounding camera position relative to the center of the minimum enclosing sphere based on the radius of the minimum enclosing sphere and the viewing angle range of the camera includes: taking the sine value of half of the viewing angle of the camera in the first direction as the first sine value, and taking the sine value of half of the viewing angle of the camera in the second direction as the second sine value; determining a third ratio between the radius of the minimum enclosing sphere and the first sine value; determining a fourth ratio between the radius of the minimum enclosing sphere and the second sine value; determining the target distance of each surrounding camera position relative to the center of the minimum enclosing sphere based on the maximum value of the third ratio and the fourth ratio; wherein the first direction and the second direction are perpendicular.
[0016] In an exemplary embodiment of the present disclosure, based on the foregoing solution, obtaining the global camera positions in the game scene according to the target distance and the preset directions of each surrounding camera position includes: determining the actual distance of each surrounding camera position relative to the center of the minimum enclosing sphere according to the preset distance and the target distance in the configuration parameters of each surrounding camera position; for each surrounding camera position, determining the position of the surrounding camera position according to the actual distance and the preset direction in the configuration parameters of the surrounding camera position, so as to obtain the global camera positions in the game scene; wherein the preset distance is used to indicate the difference between the actual distance and the target distance.
[0017] In an exemplary embodiment of the present disclosure, based on the foregoing solution, the global camera positions include one or more of surrounding camera positions, personal camera positions, and scene camera positions; when the global camera positions include surrounding camera positions, the camera position restriction conditions include: at least two game characters in the game scene are simultaneously within the viewing range of the surrounding camera position; when the global camera positions include personal camera positions, the camera position restriction conditions include: in the preset directions around each game character and at a preset distance from the game character; when the global camera positions include scene camera positions, the camera position restriction conditions are used to indicate highlighting the target scene landscape in the game scene.
[0018] In an exemplary embodiment of the present disclosure, based on the foregoing solution, displaying the captured game screen includes: when the target global camera position is any one of the surrounding camera positions, mapping and displaying the game location indicated by the geometric center of the minimum enclosing shape corresponding to the surrounding camera position at the center of the game screen.
[0019] In an exemplary embodiment of the present disclosure, based on the foregoing solution, controlling the camera to capture a game scene based on the target global camera position and display the captured game screen includes: when the target global camera position is the portable camera position, performing the following processing procedure: mapping and displaying the first game character corresponding to the portable camera position at the center of the game screen; when the second game character competing with the first game character is outside the field of view of the camera, controlling the camera to rotate in the direction where the second game character is located, so that the camera captures the game scene based on the rotated direction and displays the captured game screen.
[0020] In an exemplary embodiment of the present disclosure, based on the foregoing solution, the method further includes: when the target global camera position is the portable camera position, performing the following processing procedure: after locking the second game character competing with the first game character corresponding to the portable camera position, adjusting the parameters of the portable camera position corresponding to the first game character based on the distance between the first game character and the second game character and / or the height difference between the first game character and the second game character, so as to control the camera to capture the game scene based on the adjusted portable camera position; wherein, the parameters of the portable camera position include one or more of the pitch angle, yaw angle, roll angle of the camera at the portable camera position, and the distance between the portable camera position and the first game character.
[0021] In an exemplary embodiment of the present disclosure, based on the foregoing solution, controlling the camera to capture a game scene based on the target global camera position and display the captured game screen includes: when the global camera position includes the scene camera position, performing the following processing procedure: when the distance between the target global camera position and the scene camera position is less than a first preset value and the camera position score of the scene camera position is greater than a second preset value, determining the target position of the camera based on the distance between the target global camera position and the scene camera position; controlling the camera to capture the game scene based on the target position, so as to prominently display the target scene landscape indicated by the scene camera position in the captured game screen.
[0022] In an exemplary embodiment of the present disclosure, based on the foregoing solution, the method further includes: when the global camera position includes the surrounding camera position, determining the camera position score of each surrounding camera position according to the first camera scoring parameter corresponding to the surrounding camera position; when the global camera position includes the portable camera position, determining the camera position score of each portable camera position according to the second camera scoring parameter corresponding to the portable camera position; when the global camera position includes the scene camera position, determining the camera position score of each scene camera position according to the third camera scoring parameter corresponding to the scene camera position.
[0023] In an exemplary embodiment of the present disclosure, based on the foregoing solution, the camera scoring parameter is determined in advance based on one or more of the number of game characters observed by the global camera position, the distance between the global camera position and the game character, the distance between the global camera position and the current camera position, the angular difference between the global camera position and the current camera position, the spatial composition of the game screen, and the occlusion area of the game character by other virtual objects in the game.
[0024] In an exemplary embodiment of the present disclosure, based on the foregoing solution, the controlling the camera to capture the game scene based on the target global camera position includes: controlling the camera to move from the current camera position to the target global camera position so that the camera captures the game scene based on the target global camera position; wherein, the controlling the camera to move from the current camera position to the target global camera position includes: controlling the camera to rotate based on the current camera position to face the direction of a preset target point of the target global camera position in the game scene; performing a first interpolation according to the angular difference between the current camera position and the target global camera position to determine the direction of the camera during the movement; performing a second interpolation according to a first distance from the current camera position to the preset target point and a second distance from the target global camera position to the preset target point; determining the position of the camera during the movement based on the direction of the camera and the second interpolation, so as to display the game screen according to the position of the camera during the movement before the camera reaches the target global camera position.
[0025] In an exemplary embodiment of the present disclosure, based on the foregoing solution, the selecting the target global camera position whose camera position score meets the preset condition includes: determining the global camera position with the largest camera position score from the global camera positions to select the target global camera position.
[0026] According to a second aspect of the present disclosure, there is provided a game screen display device, where the game screen is obtained by a camera in the game capturing a game scene, and the device includes: a global camera position acquisition module configured to acquire global camera positions in the game scene, where the global camera positions are determined in advance according to camera position restriction conditions; a target global camera position selection module configured to determine the camera position scores of each global camera position according to camera scoring parameters and select the target global camera position whose camera position score meets the preset condition; a game screen display module configured to control the camera to capture the game scene based on the target global camera position and display the captured game screen; and a target global camera position update module configured to update the target global camera position at preset time intervals.
[0027] According to a third aspect of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, it implements the method for displaying a game screen as described in the first aspect of the foregoing embodiments.
[0028] According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic device, including: a processor; and a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for displaying a game screen as described in the first aspect of the foregoing embodiments.
[0029] As can be seen from the above technical solutions, the method for displaying a game screen, the display device of the game screen, the computer-readable storage medium and the electronic device for implementing the method for displaying the game screen in the exemplary embodiments of the present disclosure at least have the following advantages and positive effects:
[0030] In the technical solutions provided by some embodiments of the present disclosure, first, a global camera position in a game scene is obtained, then, a camera position score for each global camera position is determined according to camera scoring parameters, a target global camera position whose camera position score meets a preset condition is selected, the camera is controlled to shoot the game scene based on the target global camera position, and the captured game screen is displayed, and the target global camera position is updated at intervals of a preset time. Compared with the related art, on the one hand, by introducing camera positions and scoring the camera positions, the present disclosure can select camera positions that can correctly capture the focus points in the game, thereby improving the accuracy and quality of game screen shooting; on the other hand, by introducing camera positions and the camera position scoring mechanism, the present disclosure enables users to layout the camera positions and set the camera position scoring mechanism according to their own needs, improving the scalability of the camera system in the game.
[0031] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure and, together with the specification, are used to explain the principles of the present disclosure. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.
[0033] Figure 1 Schematic diagram showing Euler angles for representing the direction of a camera in an exemplary embodiment of the present disclosure;
[0034] Figure 2Schematic diagram showing the field of view angle of a camera in an exemplary embodiment of the present disclosure;
[0035] Figure 3 Flow schematic diagram showing a method for displaying a game screen in an exemplary embodiment of the present disclosure;
[0036] Figure 4 Flow schematic diagram showing a method for determining an enclosing camera position in an exemplary embodiment of the present disclosure;
[0037] Figure 5A 、 Figure 5B 、 Figure 5C Schematic diagram showing an enclosing camera position determined based on the minimum enclosing sphere in an exemplary embodiment of the present disclosure;
[0038] Figure 6 Flow schematic diagram showing another method for determining an enclosing camera position in an exemplary embodiment of the present disclosure;
[0039] Figure 7 Schematic diagram showing a visualized personal camera position in an exemplary embodiment of the present disclosure;
[0040] Figure 8 Flow schematic diagram showing a method for displaying a game screen when the global camera position includes a scene camera position in an exemplary embodiment of the present disclosure;
[0041] Figure 9 Schematic diagram showing a visualized scene camera position in an exemplary embodiment of the present disclosure;
[0042] Figure 10 Flow schematic diagram showing a method for displaying a game screen based on a temporary camera position in an exemplary embodiment of the present disclosure;
[0043] Figure 11 Flow schematic diagram showing a method for controlling a camera to switch camera positions in an exemplary embodiment of the present disclosure;
[0044] Figure 12 Schematic diagram showing the position change of a camera during the process of switching camera positions in an exemplary embodiment of the present disclosure;
[0045] Figure 13 Schematic diagram showing a method for controlling a camera in a game in an exemplary embodiment of the present disclosure;
[0046] Figure 14 Schematic diagram showing the structure of a game screen display device in an exemplary embodiment of the present disclosure;
[0047] Figure 15 Schematic diagram showing the structure of a computer storage medium in an exemplary embodiment of the present disclosure;
[0048] Figure 16 A schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0049] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0050] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express an open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.
[0051] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and their repeated descriptions will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities.
[0052] In games, the behavior of the camera plays a vital role in the performance of the game screen. Good camera behavior can greatly improve the quality of the game. The camera usually includes parameters such as camera position, camera direction, and field of view.
[0053] The camera direction can be obtained by Figure 1 The Euler angles shown are expressed as Figure 1 The Euler angles are shown in the example of aircraft in the aviation industry. The Euler angles used to represent the camera direction are exactly the same. Figure 1 The aircraft in the figure can be replaced by a camera. Euler angle is a way to represent rotation. It is a three-dimensional vector in form, and its value represents the rotation angle of the camera around the three axes of the coordinate system (i.e., the x-axis, the y-axis, and the z-axis). Figure 1The angles of pitch for rotation about the x-axis, yaw for rotation about the y-axis, and roll for rotation about the z-axis as shown, where the angle of rotation about the x-axis can be referred to as the pitch angle, the angle of rotation about the y-axis can be referred to as the yaw angle, and the angle of rotation about the z-axis can be referred to as the roll angle. The field of view (FOV) of the camera can be as Figure 2 shown, Figure 2 where 21 in it represents the camera and 22 represents the field of view of camera 21. The field of view can be used to represent the range of the image captured by the camera.
[0054] In one camera technology, the camera system in the game is based on state transitions, similar to state machines and behavior trees, and only triggers behaviors under specific circumstances: for example, in "God of War 4", the camera will focus and advance towards the enemy when the character aims at the target and throws.
[0055] However, this camera system based on behavior trees and state machines emphasizes more on the impact of the environment on the character, and only generates behaviors when specific events are triggered, which is only suitable for the single-character camera mode.
[0056] In another related technology, a camera system based on machine learning methods is adopted: for example, the replay system in "Dota 2" obtains the best viewing position through feature extraction and model calculation. Its core idea is a classifier. Specifically, "event" labels are defined according to the behaviors of individuals and teams, which are determined by features such as movement and attack, and then sample data is obtained through manual marking. In actual use, all operations on the field are extracted at regular intervals, and the corresponding event labels are calculated using the kNN (K-Nearest Neighbor) method, and the event type with the highest priority is selected, and one of the events is randomly focused on.
[0057] However, this camera system learned using machine learning methods requires a large amount of data and model training, and has the characteristic of strong customization. It is a good solution for game types with a single mode like "Dota 2", but it is not suitable for products with multiple combat modes, and there are problems of poor interpretability and huge computational complexity brought by machine learning algorithms, making it difficult to adapt to the development process of fast-iterating game products.
[0058] In the embodiments of the present disclosure, a method for displaying a game screen is first provided, which overcomes at least to some extent the defects existing in the above-mentioned related technologies.
[0059] Figure 3 The flowchart of the method for displaying a game screen in an exemplary embodiment of the present disclosure is shown, where the game screen is obtained by the camera in the game shooting the game scene. Refer to Figure 3 , this method includes:
[0060] Step S310: Obtain the global camera positions in the game scene, where the global camera positions are pre-determined according to camera position limit conditions;
[0061] Step S320: Determine the position scores of each global camera position according to the camera scoring parameters, and select the target global camera positions whose position scores meet the preset conditions;
[0062] Step S330: Control the camera to capture the game scene based on the target global camera positions, and display the captured game images;
[0063] Step S340: Update the target global camera positions at preset time intervals.
[0064] In Figure 3 In the technical solution provided by the embodiment shown, first, obtain the global camera positions in the game scene, then, determine the position scores of each global camera position according to the camera scoring parameters, select the target global camera positions whose position scores meet the preset conditions, control the camera to capture the game scene based on the target global camera positions, and display the captured game images, and update the target global camera positions at preset time intervals. Compared with the related art, on the one hand, through the introduction of camera positions and the scoring of camera positions, the present disclosure can select the camera positions that can correctly capture the focus points in the game, thereby improving the accuracy and quality of game image capture; on the other hand, through the introduction of camera positions and the camera position scoring mechanism, the present disclosure enables users to layout the camera positions and set the camera position scoring mechanism according to their own needs, improving the scalability of the camera system in the game.
[0065] The following Figure 3 elaborates in detail on the specific implementation manners of each step in the embodiment shown:
[0066] In step S310, obtain the global camera positions in the game scene, where the global camera positions are pre-determined according to camera position limit conditions.
[0067] Exemplarily, based on the virtuality of the computer, camera positions for capturing the game scene can be arranged in the game space, and these camera positions can also be understood as virtual cameras. The essence of a camera position or a virtual camera is to configure parameters for the camera that actually conducts the shooting in the game.
[0068] In the present disclosure, using the positions and data of the camera positions, the current best camera positions can be selected based on the utility system. Using the data of the camera positions, corresponding parameters can be configured for the camera that actually conducts the game scene shooting in the game, such as controlling the camera that actually conducts the game scene shooting to switch to a certain camera position for shooting the game scene, setting the value of the field of view angle of the camera, etc.
[0069] For the utility system, the states it can jump to are determined. However, in the camera system, the state space is infinite, that is, all positions and orientations in space are states that can be jumped to. Therefore, in this disclosure, the concept of camera positions is introduced, and some restrictive conditions are added to convert the camera system state space from infinite to finite, and use it to approximate the local optimal solution as much as possible to select the best camera position.
[0070] In an exemplary embodiment, the global camera positions can be understood as the camera positions that exist throughout the entire battle, that is, throughout the game process, the global camera positions always exist, and throughout the game process, scoring and switching can be based on these global camera positions. From the perspective of shooting, the positions and angles of most cameras in space are meaningless, and it is unreasonable to randomly set camera positions in the game battle space. Therefore, some camera position restrictive conditions can be added to reasonably layout the global camera positions, so as to use limited data to obtain the shooting effect of a cinematic game screen as much as possible, and improve the shooting accuracy and quality of the game screen.
[0071] Exemplarily, the global camera positions can include one or more of the surrounding camera positions, the follow-up camera positions, and the scene camera positions. Among them, the surrounding camera positions can be determined by the first camera position restrictive condition, and the first camera position restrictive condition includes that at least two game characters in the game scene are simultaneously within the field of view of the surrounding camera positions; the follow-up camera positions can be determined by the second camera position restrictive condition, and the second camera position restrictive condition includes a preset direction around each game character and a preset distance from the game character; the scene camera positions can be determined by the third camera position restrictive condition, and the third camera position restrictive condition is used to indicate highlighting the target scene landscape in the game scene. In the surrounding camera positions, more attention is paid to the global information in the game battle. Regarding the battle as a stage play performance, the camera positions can be arranged around the stage and facing the center of the stage to obtain the surrounding camera positions.
[0072] In an exemplary embodiment, the global camera positions can include one or more surrounding camera positions, and each surrounding camera position is determined based on any minimum enclosing shape that can simultaneously enclose at least two game characters.
[0073] Among them, the minimum enclosing shape can include any spatial geometric body such as a cube, a sphere, etc., which can be customized according to user needs, and this exemplary embodiment does not make special limitations on this.
[0074] Exemplarily, taking the minimum enclosing shape as a sphere, that is, the minimum enclosing shape is the minimum enclosing sphere as an example, Figure 4 shows a schematic flowchart of a method for determining surrounding camera positions in an exemplary embodiment of the present disclosure. Refer to Figure 4 and this method can include steps S410 to S430.
[0075] In step S410, according to the current positions of each of at least two game characters, a minimum enclosing sphere that can simultaneously enclose the at least two game characters is calculated.
[0076] In an exemplary embodiment, a minimum enclosing sphere algorithm can be used to calculate the minimum enclosing sphere that can simultaneously enclose at least two game characters.
[0077] It should be noted that when the minimum enclosing shape is other geometric bodies, other minimum enclosing shapes that can simultaneously enclose at least two game characters can be calculated according to the corresponding minimum enclosing algorithms of other geometric bodies. This exemplary embodiment does not make special limitations on this.
[0078] In an exemplary embodiment, at least two game characters may include game characters currently in a battle. When there are multiple groups of game characters currently in battle, the at least two game characters can be determined from the multiple groups according to the excitement level of the battles of the game characters currently in battle. The measurement index of the excitement level of the battles can be customized according to requirements. For example, according to the difference in the remaining virtual health values of the two sides in the battle, the game characters in the battle group with the smallest or largest difference in the virtual health values of the two sides in the battle are selected as the at least two game characters. This exemplary embodiment does not make special limitations on this.
[0079] In another exemplary embodiment, at least two game characters may include all game characters in the current game. Taking a team battle game as an example, each team has 5 game players, and there are 10 game characters in the whole game. The at least two game characters can include these 10 game characters in total. Then, in step S410, according to the current positions of each of these 10 game characters, a minimum enclosing sphere that can simultaneously enclose these 10 game characters can be calculated based on the minimum enclosing sphere algorithm. Further, the minimum enclosing sphere can be calculated in each frame of the game screen to determine the enclosing camera position in each frame of the game screen. Therefore, a minimum enclosing sphere algorithm with higher calculation efficiency can be selected. For example, Ritter's bounding sphere (3D space enclosing sphere algorithm) can be selected to calculate the minimum enclosing sphere, and the complexity of this algorithm is , where n is the number of points, d is the dimension. In the present disclosure, the camera is in a three-dimensional space, so d = 3. Of course, other minimum enclosing sphere algorithms can also be used to calculate the minimum enclosing sphere. This exemplary embodiment does not make special limitations on this.
[0080] Next, in step S420, based on the radius of the minimum enclosing sphere and the viewing angle range of the camera, determine the target distance of each enclosing camera position relative to the center of the sphere of the minimum enclosing sphere.
[0081] When configuring the enclosing camera positions based on the minimum enclosing sphere, the distance from the center of the enclosing camera position relative to the center of the sphere of the minimum enclosing sphere can be the radius of the enclosing sphere, that is, the enclosing camera positions can be configured on the surface of the minimum enclosing sphere. In other words, the target distance in step S420 can be the radius of the minimum enclosing sphere. In this way, the enclosing camera positions are located on the surface of the minimum enclosing sphere.
[0082] If the enclosing camera positions are located on the surface of the enclosing sphere, due to the frustum of a cone, the camera cannot observe the entire enclosing sphere completely, as Figure 5A shown. In Figure 5A , 51, 52, and 53 are respectively three enclosing camera positions. Figure 5A Taking the camera placed at the enclosing camera position 51 as an example, at this time, the viewing range of the camera can include Figure 5A the range within the dashed triangle in . It can be seen that within the viewing range of the camera, the entire enclosing sphere cannot be observed completely. In other words, the game character enclosed by the entire enclosing sphere cannot be observed completely.
[0083] In order to enable the enclosing camera positions to observe the enclosing sphere more, based on the radius of the minimum enclosing sphere and the viewing angle range of the camera, determine the target distance of each enclosing camera position relative to the center of the sphere of the minimum enclosing sphere. This target distance can make the enclosing camera positions move further away from the center of the enclosing sphere, that is, placed outside the surface of the enclosing sphere.
[0084] In an exemplary embodiment, determining the target distance of each enclosing camera position relative to the center of the sphere of the minimum enclosing sphere based on the radius of the minimum enclosing sphere and the viewing angle range of the camera used to capture the game scene includes: taking the tangent value of half of the viewing angle of the camera in the first direction as the first tangent value, and taking the tangent value of half of the viewing angle of the camera in the second direction as the second tangent value; determining a first ratio between the radius of the minimum enclosing sphere and the first tangent value; determining a second ratio between the radius of the minimum enclosing sphere and the second tangent value; determining the target distance of each enclosing camera position relative to the center of the sphere of the minimum enclosing sphere based on the maximum value of the first ratio and the second ratio; where the first direction and the second direction are perpendicular.
[0085] For example, the target distance of each enclosing camera position relative to the center of the sphere of the minimum enclosing sphere can be determined based on the radius of the minimum enclosing sphere and the viewing angle range of the camera through the following formula (1):
[0086] (1);
[0087] In formula (1), represents the calculated target distance, represents the radius of the minimum enclosing sphere, represents the tangent value of half of the field of view angle of the camera in the first direction, represents the tangent value of half of the field of view angle of the camera in the second direction. Among them, the first direction can be horizontal, the second direction can be vertical, and vice versa. Taking the game screen captured by the camera and displayed on the graphical user interface of the terminal device as an example, the horizontal direction can be understood as the horizontal direction of the graphical user interface of the terminal device, and the vertical direction can be understood as the vertical direction of the graphical user interface of the terminal device. Through the above formula (1), it can be ensured that the diameter of the enclosing sphere is the long side of the graphical user interface.
[0088] Figure 5B The camera position 54 in Figure 5B is the enclosing camera position determined by the target distance calculated in formula (1). Figure 5B The dashed triangle in Figure 5A represents the field of view range that the enclosing camera position 54 can observe. The bottom side 55 of the dashed triangle is the diameter of the enclosing sphere. It can be seen from
[0089] Although in Figure 5B the enclosing camera position 54 is relative to Figure 5A the enclosing camera positions 51, 52, and 53 in
[0090] it can observe a larger range of the enclosing sphere, but still does not observe the entire enclosing sphere.
[0091] For example, it is also possible to determine the target distance of each enclosing camera position relative to the center of the minimum enclosing sphere based on the radius of the minimum enclosing sphere and the viewing angle range of the camera for capturing the game scene through the following formula (2):
[0092] (2);
[0093] In formula (2), represents the calculated target distance, represents the radius of the minimum enclosing sphere, represents the sine value of half of the field of view angle of the camera in the first direction, represents the sine value of half of the field of view angle of the camera in the second direction. For example, if the field of view angle of the camera in the first direction is 100, then is . Among them, the first direction can be horizontal, the second direction can be vertical, and vice versa. Taking the game screen captured by the camera and displayed on the graphical user interface of the terminal device as an example, the horizontal direction can be understood as the horizontal direction of the graphical user interface of the terminal device, and the vertical direction can be understood as the vertical direction of the graphical user interface of the terminal device.
[0094] The target distance determined by the above formula (2) can enable the enclosing camera position to observe the entire enclosing sphere. As shown in Figure 5C shown Figure 5C the camera position 56 in is the enclosing camera position determined by the target distance calculated in formula (2). Figure 5C The dashed triangle in represents the field of view range that the enclosing camera position 56 can observe. The sides 57 and 58 of the dashed triangle are the tangents to the spherical surface of the enclosing sphere. It can be seen from Figure 5C that formula (2) can enable the enclosing camera position to observe the diameter of the enclosing sphere.
[0095] It should be noted that for the sake of easy understanding, in Figure 5A , Figure 5B , Figure 5C a two-dimensional diagram, that is, a circle, is used to replace the enclosing sphere in three-dimensional space. In Figure 5A , Figure 5B , Figure 5C the small circle represents our game character, and the large circle represents the enemy game character.
[0096] In an exemplary embodiment, the user can, according to their own needs, determine whether to use the above formula (1) or formula (2) to determine the target distance. When there are multiple enclosing camera positions, formula (1) can also be used to determine the target distance for some enclosing camera positions, and formula (2) can be used to determine the target distance for some enclosing camera positions. Of course, the radius of the minimum enclosing sphere can also be directly determined as the target distance, and this exemplary embodiment does not make special limitations on this.
[0097] Next, in step S430, according to the target distance and the preset direction of each enclosing camera position, obtain the global camera position in the game scene.
[0098] In an exemplary embodiment, one or more surrounding camera positions may be preconfigured in the game scene based on the minimum bounding sphere as needed. Among them, when preconfiguring the surrounding camera positions, the configuration parameters of each surrounding camera position may include a distance parameter and a direction parameter.
[0099] The direction parameter is used to indicate the direction of the surrounding camera position relative to the center of the minimum bounding sphere, that is, the preset direction in step S430. For example, it is 45 degrees obliquely above the center of the bounding sphere. For each surrounding camera position, based on the distance parameter, the direction parameter, and the center of the minimum bounding sphere, the surrounding camera position can be uniquely determined.
[0100] Among them, the distance parameter is used to indicate the actual distance of the surrounding camera position relative to the center of the minimum bounding sphere.
[0101] In one exemplary embodiment, the value of the distance parameter, that is, the actual distance, may be the target distance in step S420 above. In another exemplary embodiment, the value of the distance parameter, that is, the actual distance, may also be the radius of the minimum bounding sphere.
[0102] In yet another exemplary embodiment, the value of the distance parameter, that is, the actual distance, may also be the actual distance obtained by adjusting the distance according to the radius of the minimum bounding sphere or the above target distance. For example, the actual distance is the target distance minus a preset value, and this exemplary embodiment does not make special limitations on this.
[0103] Next, in combination with Figure 6 a further description of the specific implementation manner of step S430 will be given. Figure 6 The flowchart shows another method for determining a surrounding camera position in an exemplary embodiment of the present disclosure. Referring to Figure 6 , this method may include step S610 to step S620.
[0104] In step S610, according to the preset distance in the configuration parameters of each surrounding camera position and the target distance, the actual distance of the surrounding camera position relative to the center of the minimum bounding sphere is determined.
[0105] In an exemplary embodiment, as described above, the configuration parameters of each surrounding camera position may include a distance parameter and a direction parameter. Among them, the value of the distance parameter may be determined according to the above target distance and the preset distance in the configuration parameters. The preset distance is used to indicate the difference between the actual distance and the target distance.
[0106] For example, when the preset distance of the surrounding camera position is configured as 5 distance units, it can represent that the actual distance of the surrounding camera position relative to the center of the minimum enclosing sphere is the target distance plus 5 distance units. When the preset distance in the configuration parameter of the surrounding camera position is configured as -5 distance units, it can represent that the actual distance of the surrounding camera position relative to the center of the minimum enclosing sphere is the target distance minus 5 distance units. When the preset distance in the configuration parameter of the surrounding camera position is configured as 0, it can represent that the actual distance is equal to the target distance.
[0107] Next, in step S620, for each surrounding camera position, based on the actual distance and the preset direction in the configuration parameter of the surrounding camera position, determine the position of the surrounding camera position to obtain the global camera positions in the game scene;
[0108] Exemplarily, the distance parameter and the direction parameter of each surrounding camera position can be pre-configured in the configuration table of the surrounding camera position. Among them, the value of the distance parameter can be configured as the relationship between the actual distance and the target distance. For example, the value of the distance parameter is configured as , where -5 can be understood as the above-mentioned preset distance, which means that the actual distance is equal to the target distance minus 5. That is to say, the actual distance is closer to the center of the minimum enclosing sphere compared to the target distance. For example, the value of the distance parameter is configured as , where +5 can be understood as the above-mentioned preset distance, which means that the actual distance is equal to the target distance plus 5. That is to say, the actual distance is farther from the center of the minimum enclosing sphere than the target distance. The direction parameter can be configured according to requirements, and it is used to indicate the direction of the surrounding camera position relative to the center of the minimum enclosing sphere. Based on the configured distance parameter and direction parameter, the surrounding camera position can be determined.
[0109] Furthermore, other camera parameters can also be configured for each surrounding camera position according to requirements, such as configuring the pitch angle, yaw angle, roll angle shown in Figure 1 , and the field of view angle shown in Figure 2 , etc., to determine the orientation and field of view range of the camera at this surrounding camera position.
[0110] Among them, the number of surrounding camera positions and the configuration parameters of the cameras in these positions can be customized according to requirements, and this exemplary embodiment does not make special limitations on this.
[0111] It should be noted that for the specific implementation of determining the surrounding camera positions based on other enclosing shapes, reference can be made to the embodiment shown in Figure 4 . Just replace the technical terms "radius of the minimum enclosing sphere" involved in the embodiment shown in Figure 4 with "the minimum or maximum distance from the geometric center of the minimum enclosing shape to the surface of the minimum enclosing shape", and replace "the center of the minimum enclosing sphere" with "the geometric center of the minimum enclosing shape". Details are not elaborated here.
[0112] Through the above steps S410 to S430, the surrounding camera positions in the game can be determined and obtained. Since the surrounding camera positions can observe multiple game characters simultaneously, the surrounding camera positions pay more attention to the overall information in the game battle. The personal camera positions, as the name implies, are the camera positions that follow the movement of the game characters and pay more attention to individuals.
[0113] As mentioned above, when the global camera positions include personal camera positions, the camera position limiting conditions include: preset directions around each game character and a preset distance from the game character.
[0114] For example, four personal camera positions can be respectively set at positions 5 meters away from the character at -15 degrees, 0 degrees, 15 degrees behind each game character, and directly in front of the character. As Figure 7 shown, Figure 7 FIG. shows a schematic diagram of the visualized personal camera positions in an exemplary embodiment of the present disclosure. Based on four preset directions, namely -15 degrees, 0 degrees, 15 degrees behind the game character, and directly in front of the character, and a preset distance of 5 meters, four personal camera positions 71, 71, 73, and 74 can be configured for each game character. Of course, the preset directions and the preset distance can be customized according to requirements, and this exemplary embodiment does not make special limitations in this regard.
[0115] Exemplarily, the focus of the surrounding camera positions and the personal camera positions is on the dynamic objects in the game, while the focus of the scene camera is on the static objects in the game. According to user needs or experience, some camera positions for observing the target scene landscapes in the game scene can be arranged in the pre-made game scene in advance, that is, scene camera positions. For example, a scene camera position 1 can be arranged to photograph a certain mountain peak A in the game scene. In this way, the corresponding target scene landscape can be prominently displayed based on the scene camera position to highlight the scene effect. The specific implementation of how to prominently display the corresponding target scene landscape based on the scene camera position is described in step S330 below.
[0116] Based on the above description of the layout of the surrounding camera positions, personal camera positions, and scene camera positions, the user can pre-arrange one or more of the surrounding camera positions, personal camera positions, and scene camera positions in the game scene according to their own needs, and the number of each type of camera position can also be customized according to user needs. Based on this, the specific implementation of step S310 can be to obtain one or more of the surrounding camera positions, personal camera positions, and scene camera positions pre-arranged in the game.
[0117] Next, in step S320, the camera position scores of each global camera position are determined according to the camera scoring parameters, and the target global camera positions whose camera position scores meet the preset conditions are selected.
[0118] In an exemplary embodiment, the camera scoring parameter may include the relationship between the global camera position and the game elements in the game scene.
[0119] Among them, the game elements may include game characters, game scene elements in the game environment where the game characters are located, such as mountains, rivers, etc. in the game, skills displayed by the game characters, and gains of the game characters. For example, the camera scoring parameters may include the distance between the global camera position and the game characters, the number of game characters observed by the global camera position, the distance between the global camera position and the target scene element in the game (such as a mountain), the skills observed by the global camera position, and the distance between the global camera position and the game character affected by the current buff (gain).
[0120] In another exemplary embodiment, the camera scoring parameters may include the display effect of the game screen presented by the field of view of the global camera, such as the spatial composition of the game screen presented by the global camera, and the occlusion area of the game character by other virtual objects in the game (such as game scene elements) in the game screen presented by the global camera.
[0121] In another exemplary embodiment, the camera scoring parameter can be predetermined based on one or more of the number of game characters observed by the global camera position, the distance between the global camera position and the game characters, the distance between the global camera position and the current camera position, the angle difference between the global camera position and the current camera position, the spatial composition of the game screen, and the occlusion area of the game characters by other virtual objects in the game.
[0122] As mentioned above, for different types of global camera positions, since they have different focuses, different preset scoring rules can be configured for different types of global camera positions to improve the accuracy and rationality of the camera position scoring.
[0123] Based on this, determining the camera position score of each global camera position according to the camera scoring parameters may include: determining the camera position score of each surrounding camera position according to the first camera scoring parameters corresponding to the surrounding camera position; determining the camera position score of each portable camera position according to the second camera scoring parameters corresponding to the portable camera position; and determining the camera position score of each scene camera position according to the third camera scoring parameters corresponding to the scene camera position.
[0124] For example, according to the characteristics or focus points of different types of global cameras, target scoring parameters that meet the characteristics or focus points of each type of global camera can be selected from the above-mentioned camera scoring parameters, so as to determine the scoring rules of each type of global camera according to the target scoring parameters of each type of global camera.
[0125] Alternatively, for each type of global camera position, different combinations of the above camera scoring parameters can be made. For example, for the focus points of each global camera position type, different weights can be configured for each camera scoring parameter, so that each type of global camera position has a suitable scoring system or scoring rule. For example, for the surround camera position, which pays more attention to the number of characters observed, the weight of this rule parameter in the first camera scoring parameter can be configured higher. The portable camera position is not sensitive to observation skills, buffs (enhancements), etc., so the weight of such camera scoring parameters in the second camera scoring parameter can be configured lower.
[0126] In this way, different camera scoring rules can be configured for each type of global camera position by combining different camera scoring parameters to score this type of global camera position, so as to obtain the desired effect. In other words, by adjusting the camera scoring parameters, the camera system model can be quickly obtained, and then a customized event is used to combine a characteristic camera system, so that each battle in the game can have its own characteristics and focus points, enriching the intelligence of the camera system in the game.
[0127] Furthermore, when determining the camera scoring parameters, the relationship between the camera scoring parameters and the camera position score can also be customized according to requirements or experience. For example, in some situations where it is desired to focus on characters, "the number of characters observed by the global camera position and the distance between the global camera position and the characters" can be a plus item, that is, proportional to the camera position score. When in some situations where it is more desired to focus on the game scene and not be interfered by characters, "the number of characters observed by the global camera position and the distance between the global camera position and the characters" can be a minus item or a useless item.
[0128] Exemplarily, selecting the target global camera position whose camera position score meets the preset condition includes: determining the global camera position with the largest camera position score from the global camera positions to select the target global camera position.
[0129] For example, after determining the camera position scores of each global camera position, all the camera position scores can be sorted in descending order or ascending order, and the global camera position with the largest camera position score is determined, and this global camera position is determined as the target global camera position.
[0130] Continue to refer to Figure 3 , in step S330, control the camera to shoot the game scene based on the target global camera position and display the captured game screen.
[0131] Exemplarily, when the determined target global camera position is any surrounding camera position, a specific implementation manner of displaying the captured game screen may be to map and display the game location indicated by the geometric center of the smallest surrounding shape corresponding to the surrounding camera position at the center of the game screen.
[0132] Taking the smallest surrounding shape being the smallest surrounding sphere as an example, as described above, if the game battle scene corresponding to at least two game characters is regarded as a stage play performance, the center of the sphere of the surrounding sphere can be regarded as the exact center of the stage. Therefore, by mapping and displaying the game location indicated by the center of the smallest surrounding sphere at the center of the game screen, the display effect of the game screen can be improved, enabling game players to see the most exciting battle scenes.
[0133] Exemplarily, when the selected target global camera position is the body-mounted camera position, a specific implementation manner of step S330 may be: mapping and displaying the first game character corresponding to the body-mounted camera position at the center of the game screen; when the second game character dueling with the first game character is outside the field of view of the camera, controlling the camera to rotate in the direction where the second game character is located, so that the camera captures the game scene based on the rotated direction and displays the captured game screen. The second game character may be any game character in the opposing camp, or a monster or NPC (Non-Player Character) in the game, etc., and this exemplary implementation does not make special limitations on this.
[0134] For example, in the present disclosure, when the target global camera position is the body-mounted camera position, the first game character corresponding to the body-mounted camera position can be kept at the center of the screen. When the second game character fighting against the first game character is about to leave the field of view of the camera, the camera is rotated in the direction of the second game character, thereby realizing the automatic target locking function. In this way, for game players with touch screens, such as mobile game players, the visibility of the character body can be guaranteed. When the player operates the game character through the main joystick or rotates the camera through the sub-joystick, the game character will not be blocked by the fingers or joystick special effects.
[0135] Exemplarily, when the selected target global camera position is the body camera position, another specific implementation of step S330 may be: after locking the second game character that is in battle with the first game character corresponding to the body camera position, based on the distance between the first game character and the second game character and / or the height difference between the first game character and the second game character, adjust the parameters of the body camera position corresponding to the first game character, so as to control the camera to capture the game scene based on the adjusted body camera position. Wherein, the parameters of the body camera position include one or more of the pitch angle, yaw angle, roll angle of the camera at the body camera position, and the distance between the body camera position and the first game character.
[0136] Taking the body camera position including the 4 body camera positions at -15 degrees, 0 degrees, 15 degrees behind the above-mentioned game character and 5 meters in front of the character as an example, when the game character locks an enemy, the 3 body camera positions behind the game character can be automatically corrected based on the height difference between the game character and the enemy and the distance between the game character and the enemy. For example, when the enemy is a large monster, when the game character approaches the large monster, the positions and pitch angle parameters of the 3 body camera positions behind can be adjusted to produce effects such as propulsion and looking up.
[0137] After automatically locking the enemy, by automatically correcting the body camera position behind the game character, it can be ensured that the attacking enemy will not leave the camera's field of view. The body camera position in front of the game character can be adjusted to behind the locked character to observe the attacker from the perspective of the locked person. Among them, the parameter correction method of the body camera position can be customized according to needs, and this exemplary implementation does not make special limitations on this.
[0138] Exemplarily, when the global camera position includes the scene camera position, the specific implementation of step S330 may include each step as Figure 8 shown. Refer to Figure 8 , Figure 8 which shows a schematic flowchart of a method for displaying a game screen when the global camera position includes the scene camera position in an exemplary embodiment of the present disclosure. The method may include step S810 to step S820. Among them:
[0139] In step S810, when the distance between the target global camera position and the scene camera position is less than a first preset value and the camera position score of the scene camera position is greater than a second preset value, determine the target position of the camera based on the distance between the target global camera position and the scene camera position.
[0140] Exemplarily, in the above step S320, when sorting the scores of the global camera positions, the scene camera positions may not participate in the sorting, and only the portable camera positions and the surrounding camera positions are sorted, so as to select the target global camera position from the portable camera positions and the surrounding camera positions.
[0141] After selecting the target global camera position, it is judged whether there is a scene camera position within a range within the first preset value from the target global camera position. If there is no scene camera position, the camera is directly switched to the target global camera position for shooting. If there is a scene camera position, a target scene camera position with a camera position score greater than the second preset value is determined from all the scene camera positions near it. If the number of scene camera positions with a camera position score greater than the second preset value is greater than or equal to 2, the camera position scores of the scene camera positions with a camera position score greater than the second preset value can be sorted to determine the target scene camera position with the largest camera position score among the scene camera positions with a camera position score greater than the second preset value.
[0142] Exemplarily, the specific implementation manner of determining the target position of the camera based on the distance between the target global camera position and the scene camera position may be: when the distance between the target global camera position and the scene camera position is greater than the third preset value, the determined target position of the camera is located between the target global camera position and the scene camera position and close to the target global camera position; when the distance between the target global camera position and the scene camera position is less than the third preset value, the determined target position of the camera is located between the target global camera position and the scene camera position and close to the scene camera position.
[0143] Among them, the quantitative relationship between the distance between the target global camera position and the scene camera position and the target position of the camera can be customized according to user needs, and this exemplary embodiment does not make special limitations on this.
[0144] In step S820, control the camera to shoot the game scene based on the target position, so as to prominently display the target scene landscape indicated by the scene camera position in the captured game screen.
[0145] For example, after determining the target position of the camera between the target scene position and the target global position, the camera can be switched from the current position to the target position for shooting to prominently display the target scene landscape corresponding to the target scene position and highlight the scene effect. In other words, the scene position can be understood as a trap for trapping other types of positions. If there is a scene position near the currently determined target global position (such as a certain surrounding position), and the score of the scene position meets the preset conditions, such as being greater than the second preset value or the score of the scene position being positive as described above, then other types of positions will move closer to the position where the scene position is located. In this way, the connection between battles, characters, and scenes in the game can be strengthened to obtain high-quality game images through shooting.
[0146] Exemplarily, Figure 9 shows a schematic diagram after visualizing the scene position in an exemplary embodiment of the present disclosure. In Figure 9 , the grid lines are scene positions. During the battle process of the game, if there is any other type of global position, such as Figure 9 any one of the surrounding positions 91, 92, 93 in, approaches the scene position, the camera will move closer to the position where the scene position is located to highlight the scene effect corresponding to the scene position.
[0147] Next, continue to refer to Figure 3 , in step S340, the target global position is updated at preset time intervals.
[0148] Exemplarily, in the present disclosure, according to the preset time interval, at each update moment, the above steps S310 to S330 can be repeatedly executed to re-select the target global position from the current global positions, and then between the current update moment and the next update moment, the camera is controlled to shoot the game scene based on the target global position selected at the current update moment and display the captured game image.
[0149] Since in the game, the behavior of the game characters is not fixed, the current value of the camera scoring parameter will also change accordingly. For example, at time A, global position 1 is the closest to the game character, and at time B, it may be global position 2 that is the closest to the game character. Therefore, a preset update period can be pre-configured, and at each update moment, each global position is re-scored according to the camera scoring parameter, and a new target global position is re-selected based on the scoring result to perform shooting and display of the game scene based on the newly selected target global position.
[0150] Furthermore, in addition to the global positions, for some preset events, the game scene can also be shot based on the temporary positions corresponding to the preset events, and the captured game image is displayed.
[0151] Exemplarily, Figure 10 FIG. is a schematic flowchart of a method for displaying a game screen based on a temporary camera position in an exemplary embodiment of the present disclosure. Refer to Figure 10 , the method may include step S1010 to step S1020. Wherein: in step S1010, when a preset event occurs, obtain a preset lens track file corresponding to the preset event; in step S1020, based on the temporary camera position in the preset lens track file, perform shooting of a game scene, and display the captured game screen.
[0152] Exemplarily, when the preset event ends, update the target global camera position, so as to perform shooting of a game scene based on the updated target global camera position, and display the captured game screen.
[0153] For example, within a preset time interval when no preset event occurs, the currently determined target global camera position can be maintained for shooting until the preset time interval is exceeded, so as to perform shooting again within the next update cycle based on the updated target global camera position.
[0154] When a preset event occurs within the preset time interval, the camera can be switched from the current target global camera position to the temporary camera position corresponding to the preset event for shooting during the temporary time until the preset event ends. After the preset event ends, re-rate all the global camera positions based on the game data and the camera scoring parameters at the end of the preset event to determine the current camera position score of the global camera position, and then re-select a new target global camera position, and so on in a loop. Thus, the control of the camera in the game is realized to improve the accuracy and display quality of the game screen display.
[0155] In an exemplary embodiment, the preset event can be customized based on the user's needs, such as when any game character releases a key skill or the enemy changes phases and needs to perform.
[0156] The temporary camera position is used for highly customized performance content. Therefore, the behavior of the temporary camera position can be defined in advance. For example, artists make lens track files in other software. When an event occurs, in cooperation with the model of the game character, control the temporary camera position to use these lens track data to generate different behaviors for shooting and displaying the game screen. Specifically, the lens track file includes camera movement data, etc. By playing the lens track file, specific lens performances can be achieved. For example, when a character releases a key skill, usually an artist makes a lens track file in advance and shoots and displays it in cooperation with the actions and special effects of the skill.
[0157] In the present disclosure, based on the concept of the camera position, it is easy to add the shooting and display of preset special events to the camera system of the game.
[0158] Further, whether the target global camera position is re-determined or a preset event occurs, it is necessary to control the camera to move from its current camera position to the target camera position so that the camera can perform shooting based on the target camera position. Among them, for a direct cut shot, the switching logic of the lens does not need to be considered, but for a smooth transition shot, it can be based on Figure 11 The camera position switching method shown is used to switch the camera position to avoid the situation where the target is not in the lens or the camera passes through the target during the camera position switching process, and to ensure the screen display effect during the camera position switching process.
[0159] Exemplarily, Figure 11 The flowchart of the method for controlling the camera to switch the camera position in an exemplary embodiment of the present disclosure is shown. Refer to Figure 11 The method may include step S1110 to step S1140.
[0160] In step S1110, control the camera to rotate from the current camera position to face the direction of the preset target point of the target global camera position in the game scene.
[0161] In the present disclosure, for different types of camera positions, a preset target point can be determined for it, which can be customized according to user needs. For example, for an enclosing camera position, the preset target point can be the geometric center of the smallest enclosing shape. When the smallest enclosing shape is an enclosing sphere, the preset target point can be the center of the enclosing sphere. For a follow camera position, the preset target point can be the game character corresponding to the follow camera position. And since the scene camera position will not be actually switched during the switching process, and the role of the scene camera position is only to highlight the scene display effect, the scene camera position may not need to be configured with a preset target point.
[0162] During the process of switching the camera position, the camera can be first controlled to rotate from the position where the current camera position is located to face the direction of the target preset target point of the target global camera position in the game scene.
[0163] When the target global camera position is an enclosing camera position, the camera can be controlled to rotate from the position where the current camera position is located to face the direction of the geometric center of the enclosing shape. Taking the enclosing shape as an enclosing sphere as an example, the camera can be controlled to rotate from the position where the current camera position is located to face the direction of the center of the enclosing sphere.
[0164] Refer to Figure 12 As shown, in Figure 12 The camera can be controlled to rotate from the current camera position 121 to face the direction of the preset target point 123 of the target camera position 122 in the game scene. Among them, Figure 12The dashed triangle represents the direction of the camera before rotation at the current camera position, and the solid triangle represents the direction of the camera after rotating to face the preset target point 123 at the current camera position.
[0165] Next, in step S1120, a first interpolation is performed based on the angle difference between the current camera position and the target global camera position to determine the direction of the camera during the movement.
[0166] Exemplarily, the orientation of the camera during the transition is determined by interpolating between the angle of the current camera position and the angle of the target camera position. For example, if the angle difference between the current camera position and the target global camera position is 150 degrees and it takes 5 seconds to move from the current camera position to the target global camera position, then a first interpolation can be performed within 5 seconds so that the rotation angle of the camera can change by 150 degrees.
[0167] Next, in step S1130, a second interpolation is performed based on the first distance from the current camera position to the preset target point and the second distance from the target global camera position to the preset target point.
[0168] In step S1130, the preset target point refers to the preset target point of the target global camera position in the game scene in step S1110. Taking the target global camera position as an enclosing camera position as an example, a second interpolation can be performed based on the first distance from the current camera position to the geometric center of the current enclosing shape (such as the center of the enclosing sphere) and the second distance from the target global camera position to the center of the current enclosing sphere. For example, if the first distance is 6 meters and the second distance is 1 meter, and it takes 5 seconds to move from the current camera position to the target global camera position, then an interpolation can be performed within 5 seconds so that the moving distance of the camera can reach 5 meters.
[0169] In step S1140, based on the direction of the camera and the second interpolation, the position of the camera during the movement is determined, so as to display the game screen according to the position of the camera during the movement before the camera reaches the target global camera position.
[0170] For example, the orientation of the camera during the camera position switch can be determined through the first interpolation, and the moving distance of the camera during the camera position switch can be determined based on the second interpolation. Furthermore, based on the orientation and the moving distance, the position of the camera during the camera position switch can be determined. Refer to Figure 12 , Figure 12 which schematically shows three positions 124, 125, and 126 of the camera during the camera position switch. Based on the determined position of the camera during the switch, the game screen can be displayed according to the position of the camera during the movement before the camera reaches the target camera position.
[0171] When performing the above steps S1110 to S1140, the handheld lens operation can be simulated by adjusting the change speed. For example, it moves slowly at the beginning of the transformation, accelerates to the peak in the middle section, and finally stops slowly. The speed change curve can use different interpolation functions or be directly customized to ensure the realism when the camera position changes. At the same time, during the switching process, the maximum linear speed and angular speed of the camera can be set, the relationship between the distance difference and the angle difference between camera positions can be compared, and the interpolation coefficient of the camera can be determined. The specific implementation scheme can be customized according to requirements, as long as the position and angle reach the target position simultaneously while maintaining stability.
[0172] Next, Figure 13 A camera control method in a game in an exemplary embodiment of the present disclosure is shown. Refer to Figure 13 and this method may include steps S1310 to S1380.
[0173] In step S1310, initialize the camera position;
[0174] In step S1320, score the global camera positions and select the global camera position with the highest score;
[0175] In step S1330, wait;
[0176] In step S1340, determine whether the global camera position update time is reached. If yes, return to step S1320. If no, execute step S1350;
[0177] In step S1350, determine whether a preset event occurs. If no, return to step S1330. If yes, execute step S1360;
[0178] In step S1360, switch to the temporary camera position;
[0179] In step S1370, wait;
[0180] In step S1380, determine whether the preset event ends. If yes, go to step S1320. If no, go to step S1370.
[0181] For example, the initialization of the camera position in step S1310 can be understood as obtaining the globally pre - arranged camera positions. As mentioned above, since the behaviors of game characters in the game world are not fixed, each globally arranged camera position is scored according to the camera scoring parameters at a certain time interval, and a new camera position is re - selected based on the scoring results. Such a process can be called a scoring cycle. In a scoring cycle where no preset event occurs, the current camera position can be maintained to capture the scene until the camera scoring interval is exceeded, at which point the globally arranged camera positions are updated. If a preset special event occurs during the scoring cycle, the special event can be captured using the temporary camera position corresponding to the preset special event until the preset special event ends. When the preset special event ends, the temporary camera position can be immediately destroyed, and a new round of global camera position scoring immediately begins to select a new optimal global camera position. This cycle is repeated to achieve the control of the camera in the game.
[0182] In the present disclosure, based on different types of camera positions and their corresponding camera scoring parameters, the camera system can be rapidly expanded. It can be customized according to user requirements. At the same time, machine learning methods can be introduced to train the parameters of the camera system to improve the accuracy of scoring and the accuracy of camera position layout.
[0183] Furthermore, based on the concept of camera positions and the scoring mechanism of camera positions, the aesthetics of the camera - captured images can be ensured, guaranteeing that the camera can correctly capture the focus points in battles, and enabling the camera system to achieve a good balance between controllability and intelligence. This allows the camera system to adapt to different game battle modes and special events that may occur at any time during the game battle.
[0184] In addition, for art developers of the camera system, communication barriers can be reduced, and the artistry of the entire camera system can be improved, thereby enabling the camera system in the game to achieve a film - like effect.
[0185] Those skilled in the art can understand that all or part of the steps of the above - described embodiments are implemented as a computer program executed by a CPU. When this computer program is executed by the CPU, the above - described functions defined by the above - described method provided by the present invention are performed. The program can be stored in a computer - readable storage medium, which can be a read - only memory, a magnetic disk, an optical disc, or the like.
[0186] In addition, it should be noted that the above - mentioned drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present invention, rather than for limiting purposes. It is easy to understand that the processes shown in the above - mentioned drawings do not indicate or limit the time sequence of these processes. Additionally, it is also easy to understand that these processes can be executed synchronously or asynchronously, for example, in multiple modules.
[0187] Figure 14 A schematic structural diagram of a display device for a game screen in an exemplary embodiment of the present disclosure is shown. Refer to Figure 14 , the device 1400 may include a global camera position acquisition module 1410, a target global camera position selection module 1420, a game screen display module 1430, and a target global camera position update module 1440. Among them:
[0188] The global camera position acquisition module 1410 is configured to acquire the global camera positions in the game scene, and the global camera positions are determined in advance according to the camera position limit conditions;
[0189] The target global camera position selection module 1420 is configured to determine the camera position scores of each global camera position according to the camera scoring parameters, and select the target global camera positions whose camera position scores meet the preset conditions;
[0190] The game screen display module 1430 is configured to control the camera to shoot the game scene based on the target global camera positions, and display the game screen obtained by shooting;
[0191] The target global camera position update module 1440 is configured to update the target global camera positions at preset time intervals.
[0192] In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the device further includes a temporary camera position switching module, and the temporary camera position switching module is configured to: when a preset event occurs, acquire the preset lens track file corresponding to the preset event; shoot the game scene based on the temporary camera positions in the preset lens track file, and display the game screen obtained by shooting.
[0193] In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, when the preset event ends, update the target global camera positions, so as to shoot the game scene based on the updated target global camera positions, and display the game screen obtained by shooting.
[0194] In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the global camera positions include one or more surrounding camera positions, and each surrounding camera position is determined based on the smallest surrounding shape that can simultaneously surround at least two game characters.
[0195] In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the minimum enclosing shape may include a minimum enclosing sphere, and the global camera position acquisition module 1410 may be specifically configured to: calculate a minimum enclosing sphere that can simultaneously enclose the at least two game characters according to the current positions of each game character; determine the target distance of each enclosing camera position relative to the center of the sphere of the minimum enclosing sphere based on the radius of the minimum enclosing sphere and the viewing angle range of the camera; and acquire the global camera position in the game scene according to the target distance and the preset direction of each enclosing camera position; wherein the preset direction is used to indicate the direction of the enclosing camera position relative to the center of the sphere of the minimum enclosing sphere.
[0196] In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the determining the target distance of each enclosing camera position relative to the center of the sphere of the minimum enclosing sphere based on the radius of the minimum enclosing sphere and the viewing angle range of the camera includes: taking the tangent value of half of the viewing angle of the camera in the first direction as the first tangent value, and taking the tangent value of half of the viewing angle of the camera in the second direction as the second tangent value; determining a first ratio between the radius of the minimum enclosing sphere and the first tangent value; determining a second ratio between the radius of the minimum enclosing sphere and the second tangent value; and determining the target distance of each enclosing camera position relative to the center of the sphere of the minimum enclosing sphere based on the maximum value of the first ratio and the second ratio; wherein the first direction and the second direction are perpendicular.
[0197] In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the determining the target distance of each enclosing camera position relative to the center of the sphere of the minimum enclosing sphere based on the radius of the minimum enclosing sphere and the viewing angle range of the camera includes: taking the sine value of half of the viewing angle of the camera in the first direction as the first sine value, and taking the sine value of half of the viewing angle of the camera in the second direction as the second sine value; determining a third ratio between the radius of the minimum enclosing sphere and the first sine value; determining a fourth ratio between the radius of the minimum enclosing sphere and the second sine value; and determining the target distance of each enclosing camera position relative to the center of the sphere of the minimum enclosing sphere based on the maximum value of the third ratio and the fourth ratio; wherein the first direction and the second direction are perpendicular.
[0198] In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, obtaining the global camera positions in the game scene according to the target distance and the preset directions of each surrounding camera position includes: determining the actual distance of each surrounding camera position relative to the center of the minimum enclosing sphere according to the preset distance in the configuration parameters of each surrounding camera position and the target distance; for each surrounding camera position, determining the position of the surrounding camera position according to the actual distance and the preset direction in the configuration parameters of the surrounding camera position, so as to obtain the global camera positions in the game scene; wherein, the preset distance is used to indicate the difference between the actual distance and the target distance.
[0199] In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the global camera positions include one or more of surrounding camera positions, follow-up camera positions, and scene camera positions; when the global camera positions include surrounding camera positions, the camera position restriction conditions include: at least two game characters in the game scene are simultaneously within the field of view of the surrounding camera position; when the global camera positions include follow-up camera positions, the camera position restriction conditions include: in the preset directions around each game character and at a preset distance from the game character; when the global camera positions include scene camera positions, the camera position restriction conditions are used to indicate highlighting a target scene landscape in the game scene.
[0200] In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the game screen display module 1430 may be specifically configured to: when the target global camera position is any one of the surrounding camera positions, map and display the game location indicated by the geometric center of the minimum enclosing shape corresponding to the surrounding camera position in the center of the game screen.
[0201] In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the game screen display module 1430 may be specifically configured to: when the target global camera position is a follow-up camera position, perform the following processing procedure: map and display the first game character corresponding to the follow-up camera position in the center of the game screen; when the second game character in a duel with the first game character is outside the field of view of the camera, control the camera to rotate in the direction where the second game character is located, so that the camera shoots the game scene based on the rotated direction and displays the captured game screen.
[0202] In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the game screen display module 1430 may be specifically configured to: when the target global camera position is the portable camera position, perform the following processing procedures: after locking the second game character that is in battle with the first game character corresponding to the portable camera position, adjust the parameters of the portable camera position corresponding to the first game character based on the distance between the first game character and the second game character and / or the height difference between the first game character and the second game character, so as to control the camera to shoot the game scene based on the adjusted portable camera position; wherein, the parameters of the portable camera position include one or more of the pitch angle, yaw angle, roll angle of the camera at the portable camera position, and the distance between the portable camera position and the first game character.
[0203] In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the game screen display module 1430 may be specifically configured to: when the global camera position includes the scene camera position, perform the following processing procedures: when the distance between the target global camera position and the scene camera position is less than a first preset value and the camera position score of the scene camera position is greater than a second preset value, determine the target position of the camera based on the distance between the target global camera position and the scene camera position;
[0204] Control the camera to shoot the game scene based on the target position, so as to prominently display the target scene landscape indicated by the scene camera position in the captured game screen.
[0205] In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the target global camera position selection module 1420 may also be specifically configured to: when the global camera position includes the surround camera position, determine the camera position score of each surround camera position according to the first camera scoring parameter corresponding to the surround camera position; when the global camera position includes the portable camera position, determine the camera position score of each portable camera position according to the second camera scoring parameter corresponding to the portable camera position; when the global camera position includes the scene camera position, determine the camera position score of each scene camera position according to the third camera scoring parameter corresponding to the scene camera position.
[0206] In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the camera scoring parameter is determined in advance based on one or more of the number of game characters observed by the global camera position, the distance between the global camera position and the game character, the distance between the global camera position and the current camera position, the angle difference between the global camera position and the current camera position, the spatial composition of the game screen, and the occlusion area of the game character by other virtual objects in the game.
[0207] In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the game screen display module 1430 may be specifically configured to: control the camera to move from the current position to the target global position, so that the camera captures a game scene based on the target global position; wherein, the control of the camera to move from the current position to the target global position includes: controlling the camera to rotate from the current position to face the direction of a preset target point of the target global position in the game scene; performing a first interpolation according to the angle difference between the current position and the target global position to determine the direction of the camera during the movement; performing a second interpolation according to a first distance from the current position to the preset target point and a second distance from the target global position to the preset target point; and determining the position of the camera during the movement based on the direction of the camera and the second interpolation, so as to display a game screen according to the position of the camera during the movement before the camera reaches the target global position.
[0208] In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the target global position selection module 1420 may also be specifically configured to: determine the global position with the largest position score from the global positions to select the target global position.
[0209] The specific details of each unit in the above game screen display device have been described in detail in the corresponding game screen display method, and thus will not be elaborated herein.
[0210] It should be noted that although several modules or units of a device for action execution are mentioned in the foregoing detailed description, such a division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more of the above-mentioned modules or units may be embodied in one module or unit. Conversely, the features and functions of one module or unit described above may be further divided and embodied by multiple modules or units.
[0211] In addition, although the steps of the methods in the present disclosure are described in a specific order in the drawings, this does not require or imply that these steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc.
[0212] Through the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (such as a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0213] In an exemplary embodiment of the present disclosure, there is also provided a computer storage medium capable of implementing the above method. A program product capable of implementing the above method of this specification is stored thereon. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification.
[0214] Refer to Figure 15 As shown, a program product 1500 for implementing the above method according to an embodiment of the present disclosure is described. It can be a portable compact disc read-only memory (CD-ROM) and includes program code, and can run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.
[0215] The program product can adopt any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0216] A computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0217] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the above.
[0218] The program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., by using an Internet service provider to connect through the Internet).
[0219] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0220] Those skilled in the art can understand that various aspects of the present disclosure can be implemented as a system, method, or program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuitry", "module", or "system" here.
[0221] The following refers to Figure 16 to describe the electronic device 1600 according to such an embodiment of the present disclosure. Figure 16 The illustrated electronic device 1600 is merely an example and should not impose any limitation on the functions and scope of use of the embodiments of the present disclosure.
[0222] As Figure 16As shown, the electronic device 1600 is presented in the form of a general-purpose computing device. The components of the electronic device 1600 may include, but are not limited to: at least one of the above-mentioned processing units 1610, at least one of the above-mentioned storage units 1620, a bus 1630 connecting different system components (including the storage unit 1620 and the processing unit 1610), and a display unit 1640.
[0223] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 1610, so that the processing unit 810 executes the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Method" section above. For example, the processing unit 1610 can execute each step as shown in Figure 3 shown in.
[0224] The storage unit 1620 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 16201 and / or a cache storage unit 16202, and may further include a read-only storage unit (ROM) 16203.
[0225] The storage unit 1620 may also include a program / utility 16204 having a set (at least one) of program modules 8205. Such program modules 16205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.
[0226] The bus 1630 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any bus structure in a variety of bus structures.
[0227] The electronic device 1600 can also communicate with one or more external devices 1700 (such as a keyboard, a pointing device, a Bluetooth device, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 1600, and / or communicate with any device that enables the electronic device 1600 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 1650. Moreover, the electronic device 1600 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 1660. As shown in the figure, the network adapter 1660 communicates with other modules of the electronic device 1600 through the bus 1630. It should be understood that although not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 1600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0228] Through the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0229] In addition, the above-mentioned drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, rather than for limiting purposes. It is easy to understand that the processes shown in the above-mentioned drawings do not indicate or limit the time sequence of these processes. Additionally, it is also easy to understand that these processes can be executed synchronously or asynchronously in, for example, multiple modules.
[0230] After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other embodiments of the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.
Claims
1. A method for displaying a game screen, characterized in that, the game screen is obtained by shooting a game scene through a camera in the game, and the method includes: obtaining a global camera position in the game scene, the global camera position being determined in advance according to camera position restriction conditions, and the global camera position including camera positions that always exist throughout the game process; determining a camera position score for each global camera position according to camera score parameters, and selecting target global camera positions whose camera position scores meet preset conditions; controlling the camera to shoot the game scene based on the target global camera positions, and displaying the game screen obtained by shooting; updating the target global camera positions at preset time intervals.
2. The method for displaying a game screen according to claim 1, characterized in that, the method further includes: when a preset event occurs, obtaining a preset lens track file corresponding to the preset event; shooting the game scene based on a temporary camera position in the preset lens track file, and displaying the game screen obtained by shooting.
3. The method for displaying a game screen according to claim 2, characterized in that, the method further includes: when the preset event ends, updating the target global camera positions, so as to shoot the game scene based on the updated target global camera positions, and displaying the game screen obtained by shooting.
4. The method for displaying a game screen according to claim 1, characterized in that, the global camera positions include one or more of an encircling camera position, a follow camera position, and a scene camera position; when the global camera positions include an encircling camera position, the camera position restriction conditions include: at least two game characters in the game scene are simultaneously within the field of view of the encircling camera position; when the global camera positions include a follow camera position, the camera position restriction conditions include: in a preset direction around each game character and at a preset distance from the game character; when the global camera positions include a scene camera position, the camera position restriction conditions are used to indicate highlighting a target scene landscape in the game scene.
5. The method for displaying a game screen according to claim 1, characterized in that, the global camera positions include one or more encircling camera positions, and each encircling camera position is determined based on any minimum enclosing shape that can simultaneously enclose at least two game characters.
6. The method for displaying a game screen according to claim 5, characterized in that, the minimum enclosing shape includes a minimum enclosing sphere; the obtaining of the global camera positions in the game scene includes: calculating a minimum enclosing sphere that can simultaneously enclose the at least two game characters according to the current positions of each of the at least two game characters; determining a target distance of each encircling camera position relative to the center of the sphere of the minimum enclosing sphere based on the radius of the minimum enclosing sphere and the viewing angle range of the camera; obtaining the global camera positions in the game scene according to the target distance and the preset direction of each encircling camera position; wherein, the preset direction is used to indicate the direction of the encircling camera position relative to the center of the sphere of the minimum enclosing sphere.
7. The method for displaying a game screen according to claim 6, characterized in that, Determining a target distance of each of the surrounding camera positions relative to the center of the minimum enclosing sphere based on the radius of the minimum enclosing sphere and the viewing angle range of the camera includes: Taking the tangent value of half of the viewing angle of the camera in the first direction as the first tangent value, and taking the tangent value of half of the viewing angle of the camera in the second direction as the second tangent value; Determining a first ratio between the radius of the minimum enclosing sphere and the first tangent value; Determining a second ratio between the radius of the minimum enclosing sphere and the second tangent value; Determining the target distance of each of the surrounding camera positions relative to the center of the minimum enclosing sphere based on the maximum value of the first ratio and the second ratio; Wherein, the first direction and the second direction are perpendicular.
8. The method for displaying a game screen according to claim 6, characterized in that, Determining a target distance of each of the surrounding camera positions relative to the center of the minimum enclosing sphere based on the radius of the minimum enclosing sphere and the viewing angle range of the camera includes: Taking the sine value of half of the viewing angle of the camera in the first direction as the first sine value, and taking the sine value of half of the viewing angle of the camera in the second direction as the second sine value; Determining a third ratio between the radius of the minimum enclosing sphere and the first sine value; Determining a fourth ratio between the radius of the minimum enclosing sphere and the second sine value; Determining the target distance of each of the surrounding camera positions relative to the center of the minimum enclosing sphere based on the maximum value of the third ratio and the fourth ratio; Wherein, the first direction and the second direction are perpendicular.
9. The method for displaying a game screen according to claim 6, characterized in that, Obtaining a global camera position in the game scene according to the target distance and the preset direction of each surrounding camera position includes: Determining the actual distance of each surrounding camera position relative to the center of the minimum enclosing sphere according to the preset distance and the target distance in the configuration parameters of each surrounding camera position; For each surrounding camera position, determining the position of the surrounding camera position according to the actual distance and the preset direction in the configuration parameters of the surrounding camera position, so as to obtain a global camera position in the game scene; Wherein, the preset distance is used to indicate the difference between the actual distance and the target distance.
10. The method for displaying a game screen according to claim 4, characterized in that, Displaying the captured game screen includes: When the target global camera position is any one of the surrounding camera positions, mapping and displaying the game location indicated by the geometric center of the minimum enclosing shape corresponding to the surrounding camera position at the center of the game screen.
11. The method for displaying a game screen according to claim 4, characterized in that, Controlling the camera to capture the game scene based on the target global camera position and displaying the captured game screen includes: When the target global camera position is a personal camera position, performing the following processing procedure: Mapping and displaying the first game character corresponding to the personal camera position at the center of the game screen; When the second game character in a duel with the first game character is outside the field of view of the camera, control the camera to rotate in the direction where the second game character is located, so that the camera shoots the game scene based on the rotated direction and displays the captured game screen.
12. The method for displaying a game screen according to claim 4, wherein, the method further includes: when the target global camera position is the portable camera position, perform the following processing procedure: after locking the second game character that is in a battle with the first game character corresponding to the portable camera position, adjust the parameters of the portable camera position corresponding to the first game character based on the distance between the first game character and the second game character and / or the height difference between the first game character and the second game character, so as to control the camera to shoot the game scene based on the adjusted portable camera position; wherein, the parameters of the portable camera position include one or more of the pitch angle, yaw angle, roll angle of the camera at the portable camera position, and the distance between the portable camera position and the first game character.
13. The method for displaying a game screen according to claim 4, wherein, the controlling the camera to shoot the game scene based on the target global camera position and displaying the captured game screen includes: when the global camera position includes the scene camera position, perform the following processing procedure: when the distance between the target global camera position and the scene camera position is less than a first preset value and the camera position score of the scene camera position is greater than a second preset value, determine the target position of the camera based on the distance between the target global camera position and the scene camera position; control the camera to shoot the game scene based on the target position, so as to prominently display the target scene landscape indicated by the scene camera position in the captured game screen.
14. The method for displaying a game screen according to claim 4, wherein, the method further includes: when the global camera position includes the surrounding camera position, determine the camera position score of each surrounding camera position according to the first camera scoring parameter corresponding to the surrounding camera position; when the global camera position includes the portable camera position, determine the camera position score of each portable camera position according to the second camera scoring parameter corresponding to the portable camera position; when the global camera position includes the scene camera position, determine the camera position score of each scene camera position according to the third camera scoring parameter corresponding to the scene camera position.
15. The method for displaying a game screen according to claim 1, wherein, the camera scoring parameter is determined in advance based on one or more of the number of game characters observed by the global camera position, the distance between the global camera position and the game characters, the distance between the global camera position and the current camera position, the angle difference between the global camera position and the current camera position, the spatial composition of the game screen, and the occlusion area of the game characters by other virtual objects in the game.
16. The method for displaying a game screen according to any one of claims 1 to 15, wherein, The controlling the camera to shoot the game scene based on the target global camera position includes: Control the camera to move from the current camera position to the target global camera position, so that the camera shoots the game scene based on the target global camera position; Wherein, controlling the camera to move from the current camera position to the target global camera position includes: Control the camera to rotate to a direction toward a preset target point of the target global camera position in the game scene based on the current camera position; Performing a first interpolation according to an angle difference between the current camera position and the target global camera position to determine a direction of the camera during movement; Performing a second interpolation according to a first distance from the current camera position to the preset target point and a second distance from the target global camera position to the preset target point; Based on the direction of the camera and the second interpolation, the position of the camera during the movement is determined, so that before the camera reaches the target global camera position, the game screen is displayed according to the position of the camera during the movement.
17. The method for displaying a game screen according to any one of claims 1 to 15, It is characterized in that The step of selecting the target global aircraft position whose aircraft position score meets a preset condition comprises: A global camera position with the largest camera position score is determined from the global camera positions to select the target global camera position.
18. A device for displaying a game screen, It is characterized in that The game screen is obtained by shooting the game scene with a camera in the game, and the device includes: A global camera position acquisition module is configured to acquire a global camera position in a game scene, wherein the global camera position is predetermined according to a camera position restriction condition, and the global camera position includes a camera position that always exists during the entire game process; A target global camera position selection module is configured to determine the camera position score of each global camera position according to the camera scoring parameter, and select a target global camera position whose camera position score meets a preset condition; A game screen display module is configured to control the camera to shoot the game scene based on the target global camera position, and display the captured game screen; The target global camera position updating module is configured to update the target global camera position at preset time intervals.
19. A computer readable medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method for displaying a game screen according to any one of claims 1 to 17 is implemented.
20. An electronic device, It is characterized in that include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the method for displaying a game screen as described in any one of claims 1 to 17.
Citation Information
Patent Citations
Method and device for generating model of object in three-dimensional scene and terminal
CN110827400A
Game picture shooting method and device, equipment and storage medium
CN112843735A