Game picture display method, device, equipment and storage medium

文档序号:1317912 发布日期:2020-07-14 浏览:18次 中文

阅读说明:本技术 一种游戏画面显示方法、装置、设备和存储介质 (Game picture display method, device, equipment and storage medium ) 是由 邓共 余林路 于 2020-02-17 设计创作,主要内容包括:本申请提供了一种游戏画面显示方法、装置、设备和存储介质,其中,该方法包括:在第一人称视角下,当拍摄视角发生变化时,确定当前虚拟相机的第一方向变化值和第一速度变化值;根据第一方向变化值和第一速度变化值,确定在当前拍摄视角下虚拟角色的偏移动作姿态;将偏移动作姿态叠加到在当前拍摄视角下虚拟角色的基础动作姿态上;将当前拍摄视角下虚拟相机拍摄到的游戏画面作为当前帧显示到显示装置上,通过上述方法使得虚拟武器的朝向和拍摄视角表现出一定的惯性滞后效果,从而使得连续的游戏画面更加平滑更加接近于真实情况,进而有利于提高玩家在游戏过程中对手持武器的操作手感。(The application provides a game picture display method, a game picture display device, equipment and a storage medium, wherein the method comprises the following steps: under a first person visual angle, when a shooting visual angle changes, determining a first direction change value and a first speed change value of a current virtual camera; determining the offset action posture of the virtual character under the current shooting visual angle according to the first direction change value and the first speed change value; superposing the offset action posture on the basic action posture of the virtual character under the current shooting visual angle; the game picture shot by the virtual camera under the current shooting visual angle is displayed on the display device as the current frame, and the orientation and the shooting visual angle of the virtual weapon show a certain inertial lag effect by the method, so that the continuous game picture is smoother and closer to the real situation, and the operation hand feeling of a player on the handheld weapon in the game process is further improved.)

1. A game screen display method for displaying a game screen shot by a virtual camera through a display device, the game screen displaying a part of a game scene, the game screen at least including a virtual weapon, a partially presented virtual character, and an aiming centroid, the aiming centroid and a shooting angle of view of the virtual camera changing synchronously in the game scene, the game screen display method comprising:

under a first person visual angle, when the shooting visual angle changes, determining a first direction change value and a first speed change value of the virtual camera at present;

determining the offset action posture of the virtual character under the current shooting visual angle according to the first direction change value and the first speed change value;

superposing the offset action posture to the basic action posture of the virtual character under the current shooting visual angle;

and displaying the game picture shot by the virtual camera under the current shooting visual angle as a current frame on the display device.

2. The game screen display method according to claim 1, wherein the obtaining of the shift motion posture of the virtual character at the current photographing angle of view based on the first direction change value and the first speed change value comprises:

respectively smoothing the first direction change value and the first speed change value, replacing a first direction change value exceeding a preset direction change value in the first direction change value with the preset direction change value, and replacing a first speed change value exceeding a preset speed change value in the first speed change value with the preset speed change value;

and obtaining the offset action attitude of the virtual character under the current shooting visual angle according to the first direction change value subjected to the smoothing processing and the first speed change value subjected to the smoothing processing.

3. The game screen display method according to claim 1, wherein the obtaining of the shift motion posture of the virtual character at the current photographing angle of view based on the first direction change value and the first speed change value comprises:

mapping a target two-dimensional coordinate formed by the first direction change value and the first speed change value to a specified two-dimensional graph to obtain the two-dimensional graph containing a target point;

determining a preset number of key frame points which are closest to the target point in the two-dimensional graph, wherein the two-dimensional graph comprises a plurality of key frame points, different key frame points correspond to different action key frames, key frame data in each action key frame comprise a standard deviation action attitude of the virtual character under the action key frame, a second direction change value of the shooting visual angle under the action key frame and a second speed change value of the shooting visual angle under the action key frame, and each action key frame is mapped into the two-dimensional graph based on the second direction change value and the second speed change value corresponding to the action key frame;

and obtaining the migration action posture of the virtual character under the current shooting view angle according to the target point and the preset number of key frame points.

4. The game screen display method according to claim 3, wherein the preset number is three, and the obtaining of the shift action pose of the virtual character at the current shooting view angle according to the target point and the preset number of the key frame points comprises:

determining the distances between the target point and the three key frame points respectively;

and based on each distance, carrying out weighted average processing on the standard deviation action postures corresponding to the three key frame points to obtain the deviation action postures.

5. The game screen display method according to claim 3, wherein the key frame corresponding to each key frame point included in the two-dimensional map is selected from consecutive image frames generated when a photographing angle of view of the virtual camera is changed according to a specified operation.

6. The game screen display method according to claim 5, wherein the consecutive image frames are obtained by performing a moving view angle operation within a range of 360 ° with respect to a photographing view angle of the virtual camera, the number of the moving view angle operation being at least one.

7. The game screen display method according to claim 6, wherein a direction change value at the time of performing the movement angle operation is not more than a preset direction change value, and a speed change value at the time of performing the movement angle operation is not more than a preset speed change value.

8. The game screen display method according to claim 1, wherein a virtual item associated with the virtual weapon in the game screen and a shooting angle of view of the virtual camera change in synchronization in the game scene.

9. A game screen display device for displaying a game screen captured by a virtual camera through a display device, the game screen displaying a part of a game scene, the game screen including at least a virtual weapon, a partially presented virtual character, and an aiming centroid, the aiming centroid and a capturing angle of view of the virtual camera changing synchronously in the game scene, the game screen display device comprising:

the first determining unit is used for determining a first direction change value and a first speed change value of the current virtual camera when the shooting visual angle changes under a first person visual angle;

a second determining unit, configured to determine, according to the first direction change value and the first speed change value, a shift action posture of the virtual character at a current shooting view angle;

the posture superposition unit is used for superposing the shifting action posture to the basic action posture of the virtual character under the current shooting visual angle;

and the display unit is used for displaying the game picture shot by the virtual camera under the current shooting visual angle as a current frame on the display device.

10. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the game screen display method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that a computer program is stored thereon, which, when being executed by a processor, performs the steps of the game screen display method according to any one of claims 1 to 8.

Technical Field

The present application relates to the field of computer technologies, and in particular, to a game screen display method, apparatus, device, and storage medium.

Background

In existing first-person shooter games, the orientation of a handheld weapon (e.g., a gun) of a virtual character and the orientation of a virtual camera are tied, i.e.: the pointing direction of the hand-held weapon and the shooting direction of the virtual camera are the same at the same time, and when any one of the pointing direction of the hand-held weapon and the shooting direction of the virtual camera changes, the other changes the same.

The player can control the virtual camera to change the shooting direction in the process of playing a game at the first person perspective, so that the game picture can display all directions of a game scene, when the shooting direction of the virtual camera is changed (namely the direction of the first person perspective in the game scene is changed), the direction of the handheld weapon is synchronously changed, and the game effect displayed by the game picture is relatively hard due to the arrangement that the direction of the handheld weapon and the direction of the virtual camera are bound.

Disclosure of Invention

In view of this, embodiments of the present application provide a game screen display method, apparatus, device and storage medium to improve a game effect exhibited by a game screen.

In a first aspect, an embodiment of the present application provides a game screen display method, where a game screen captured by a virtual camera is displayed through a display device, where the game screen displays a part of a game scene, the game screen at least includes a virtual weapon, a partially presented virtual character, and an aiming centroid, and the aiming centroid and a capturing angle of view of the virtual camera change synchronously in the game scene, and the game screen display method includes:

under a first person visual angle, when the shooting visual angle changes, determining a first direction change value and a first speed change value of the virtual camera at present;

determining the offset action posture of the virtual character under the current shooting visual angle according to the first direction change value and the first speed change value;

superposing the offset action posture to the basic action posture of the virtual character under the current shooting visual angle;

and displaying the game picture shot by the virtual camera under the current shooting visual angle as a current frame on the display device.

Optionally, the obtaining, according to the first direction change value and the first speed change value, a shift action posture of the virtual character at a current shooting view angle includes:

respectively smoothing the first direction change value and the first speed change value, replacing a first direction change value exceeding a preset direction change value in the first direction change value with the preset direction change value, and replacing a first speed change value exceeding a preset speed change value in the first speed change value with the preset speed change value;

and obtaining the offset action attitude of the virtual character under the current shooting visual angle according to the first direction change value subjected to the smoothing processing and the first speed change value subjected to the smoothing processing.

Optionally, the obtaining, according to the first direction change value and the first speed change value, a shift action posture of the virtual character at a current shooting view angle includes:

mapping a target two-dimensional coordinate formed by the first direction change value and the first speed change value to a specified two-dimensional graph to obtain the two-dimensional graph containing a target point;

determining a preset number of key frame points which are closest to the target point in the two-dimensional graph, wherein the two-dimensional graph comprises a plurality of key frame points, different key frame points correspond to different action key frames, key frame data in each action key frame comprise a standard deviation action attitude of the virtual character under the action key frame, a second direction change value of the shooting visual angle under the action key frame and a second speed change value of the shooting visual angle under the action key frame, and each action key frame is mapped into the two-dimensional graph based on the second direction change value and the second speed change value corresponding to the action key frame;

and obtaining the migration action posture of the virtual character under the current shooting view angle according to the target point and the preset number of key frame points.

Optionally, the preset number is three, and obtaining the migration action posture of the virtual character under the current shooting view angle according to the target point and the preset number of the key frame points includes:

determining the distances between the target point and the three key frame points respectively;

and based on each distance, carrying out weighted average processing on the standard deviation action postures corresponding to the three key frame points to obtain the deviation action postures.

Optionally, the key frame corresponding to each key frame point included in the two-dimensional map is selected from consecutive image frames generated when the shooting angle of view of the virtual camera is changed according to a specified operation.

Optionally, the consecutive image frames are obtained by performing a moving view angle operation within a range of 360 ° on a shooting view angle of the virtual camera, and the number of the moving view angle operations is at least one.

Optionally, the direction change value when the moving view angle operation is performed is not greater than a preset direction change value, and the speed change value when the moving view angle operation is performed is not greater than a preset speed change value.

Optionally, the virtual item associated with the virtual weapon in the game screen and the shooting angle of view of the virtual camera change synchronously in the game scene.

In a second aspect, an embodiment of the present application provides a game screen display device, which displays a game screen shot by a virtual camera through a display device, where the game screen displays a part of a game scene, and the game screen at least includes a virtual weapon, a partially-presented virtual character, and an aiming centroid, and the aiming centroid and a shooting perspective of the virtual camera change synchronously in the game scene, and the game screen display device includes:

the first determining unit is used for determining a first direction change value and a first speed change value of the current virtual camera when the shooting visual angle changes under a first person visual angle;

a second determining unit, configured to determine, according to the first direction change value and the first speed change value, a shift action posture of the virtual character at a current shooting view angle;

the posture superposition unit is used for superposing the shifting action posture to the basic action posture of the virtual character under the current shooting visual angle;

and the display unit is used for displaying the game picture shot by the virtual camera under the current shooting visual angle as a current frame on the display device.

Optionally, the second determining unit, when configured to obtain the offset action posture of the virtual character at the current shooting view angle according to the first direction change value and the first speed change value, includes:

respectively smoothing the first direction change value and the first speed change value, replacing a first direction change value exceeding a preset direction change value in the first direction change value with the preset direction change value, and replacing a first speed change value exceeding a preset speed change value in the first speed change value with the preset speed change value;

and obtaining the offset action attitude of the virtual character under the current shooting visual angle according to the first direction change value subjected to the smoothing processing and the first speed change value subjected to the smoothing processing.

Optionally, the second determining unit, when configured to obtain the offset action posture of the virtual character at the current shooting view angle according to the first direction change value and the first speed change value, includes:

mapping a target two-dimensional coordinate formed by the first direction change value and the first speed change value to a specified two-dimensional graph to obtain the two-dimensional graph containing a target point;

determining a preset number of key frame points which are closest to the target point in the two-dimensional graph, wherein the two-dimensional graph comprises a plurality of key frame points, different key frame points correspond to different action key frames, key frame data in each action key frame comprise a standard deviation action attitude of the virtual character under the action key frame, a second direction change value of the shooting visual angle under the action key frame and a second speed change value of the shooting visual angle under the action key frame, and each action key frame is mapped into the two-dimensional graph based on the second direction change value and the second speed change value corresponding to the action key frame;

and obtaining the migration action posture of the virtual character under the current shooting view angle according to the target point and the preset number of key frame points.

Optionally, the preset number is three, and the configuration of the second determining unit is configured to obtain the offset action posture of the virtual character under the current shooting view angle according to the target point and the preset number of the key frame points, and includes:

determining the distances between the target point and the three key frame points respectively;

and based on each distance, carrying out weighted average processing on the standard deviation action postures corresponding to the three key frame points to obtain the deviation action postures.

Optionally, the key frame corresponding to each key frame point included in the two-dimensional map is selected from consecutive image frames generated when the shooting angle of view of the virtual camera is changed according to a specified operation.

Optionally, the consecutive image frames are obtained by performing a moving view angle operation within a range of 360 ° on a shooting view angle of the virtual camera, and the number of the moving view angle operations is at least one.

Optionally, the direction change value when the moving view angle operation is performed is not greater than a preset direction change value, and the speed change value when the moving view angle operation is performed is not greater than a preset speed change value.

Optionally, the virtual item associated with the virtual weapon in the game screen and the shooting angle of view of the virtual camera change synchronously in the game scene.

In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when the electronic device runs, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to execute the steps of the game picture display method according to any one of the first aspect.

In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the game screen display method according to any one of the first aspect.

The technical scheme provided by the embodiment of the application can have the following beneficial effects:

in this application, under a first person's perspective, when a shooting perspective of a virtual camera changes, a first direction change value and a first speed change value of the current virtual camera are determined, and a direction change rate of the virtual camera can be determined by the first direction change value and the first speed change value, so that a shift action posture of a virtual character under the shooting perspective of the current virtual camera can be determined according to the first direction change value and the first speed change value, that is: when the shooting visual angle changes, the variation of the action posture of the virtual character occurs, and then the offset action posture is superposed on the basic action posture of the virtual character under the current shooting visual angle, at this time, the action posture of the virtual character after the change of the offset action posture under the current shooting visual angle by taking the basic action posture of the virtual character as a reference can be obtained, namely: the action attitude of the virtual character in the next frame of game picture can be obtained, at this time, the orientation of the aiming centroid in the next frame of game picture is the same as the orientation of the aiming centroid in the current frame of game picture, but the action attitude of the virtual character in the next frame of game picture is different from the action attitude of the virtual character in the current frame of game picture by the obtained offset action attitude, at this time, the orientation of the virtual weapon is not directed to the aiming centroid any more, but a deviation corresponding to the offset action attitude occurs, and the game effect of the multi-frame game pictures is that the aiming centroid also changes the same after the orientation of the virtual weapon changes, namely: the virtual weapon is followed by the aiming center, and the shooting visual angles of the aiming center and the virtual camera are synchronously changed, so that the game effect that the multi-frame game pictures are linked is that after the orientation of the virtual weapon is changed, the shooting visual angles of the aiming center and the virtual camera are changed in the same way, the orientation and the shooting visual angle of the virtual weapon show a certain inertial hysteresis effect, the continuous game pictures are smoother and closer to the real situation, and the operation hand feeling and the game experience of a player on the handheld weapon in the game process are improved.

In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.

Fig. 1 is a schematic flow chart illustrating a game screen display method according to an embodiment of the present disclosure;

fig. 2 is a schematic view of a game screen according to an embodiment of the present disclosure;

FIG. 3 is a schematic view of another game screen provided in the first embodiment of the present application;

FIG. 4 is a flowchart illustrating another game screen display method according to an embodiment of the present disclosure;

FIG. 5 is a flowchart illustrating another game screen display method according to an embodiment of the present disclosure;

FIG. 6 is a flowchart illustrating another game screen display method according to an embodiment of the present disclosure;

FIG. 7 is a schematic diagram of a two-dimensional map provided in accordance with an embodiment of the present application;

fig. 8 is a schematic structural diagram of a game screen display device according to a second embodiment of the present application;

fig. 9 is a schematic structural diagram of an electronic device according to a third embodiment of the present disclosure.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.

In existing first-person shooter games, the orientation of a handheld weapon (e.g., a gun) of a virtual character and the orientation of a virtual camera are tied, i.e.: the pointing direction of the handheld weapon is the same as the shooting direction of the virtual camera at the same time, and when any one of the pointing direction of the handheld weapon and the shooting direction of the virtual camera changes, the other one also changes the same, but the true situation is that the pointing direction of the handheld weapon changes, and the pointing direction of the handheld weapon is inertial, and the mode embodied in the game picture is that the shooting direction of the virtual camera changes after the change of the handheld weapon, so the setting that the pointing direction of the handheld weapon and the orientation of the virtual camera are bound in the prior art makes the game effect exhibited by the game picture harder, namely: the inertia lag effect is not shown, so that the game picture is not smooth, and the operation hand feeling of the player on the hand-held weapon in the game process is poor.

In order to enable a game picture to show an inertial lag effect and improve the flow of the game picture, the embodiment of the application provides a game picture display method, a device, equipment and a storage medium, in the application, a sighting center and a shooting visual angle of a virtual camera are synchronously changed in a game scene, under a first person visual angle, when the shooting visual angle is changed, a deviation action attitude of a virtual character under the current shooting visual angle is determined firstly, then the deviation action attitude is superposed on a basic action attitude of the virtual character under the current shooting visual angle, at the moment, the sighting center and the shooting visual angle are changed, namely: the action posture of the virtual character is changed before aiming at the center of sight and shooting visual angle, because the virtual weapon is held by the virtual character, therefore, after the action posture of the virtual character is changed, the orientation of the virtual weapon is synchronously changed, further, the orientation of the virtual weapon is changed before aiming at the center and shooting visual angle, the orientation of the virtual weapon in the game scene taken by the virtual camera is no longer directed towards the aiming centroid, further, the multi-frame game pictures are connected with each other in an animation effect that after the orientation of the virtual weapon is changed, the aiming center and the shooting visual angle of the virtual camera are changed in the same way, so that the orientation and the shooting visual angle of the virtual weapon show certain inertial lag effect, therefore, the continuous game pictures are smoother and closer to the real situation, and the operation hand feeling of the player on the hand-held weapon in the game process is further improved.

It should be noted in advance that the virtual weapon is hung on the virtual character, and the change of the action posture of the virtual character drives the change of the orientation of the virtual weapon.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:互动道具显示方法、装置、终端及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类