WO2019105396A1 - Picture rendering method, electronic device and storage medium - Google Patents

Picture rendering method, electronic device and storage medium Download PDF

Info

Publication number
WO2019105396A1
WO2019105396A1 PCT/CN2018/118030 CN2018118030W WO2019105396A1 WO 2019105396 A1 WO2019105396 A1 WO 2019105396A1 CN 2018118030 W CN2018118030 W CN 2018118030W WO 2019105396 A1 WO2019105396 A1 WO 2019105396A1
Authority
WO
WIPO (PCT)
Prior art keywords
target object
rendering
current
logical
operation instruction
Prior art date
Application number
PCT/CN2018/118030
Other languages
French (fr)
Chinese (zh)
Inventor
邓君
杨国谦
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2019105396A1 publication Critical patent/WO2019105396A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation
    • G06T15/205Image-based rendering
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene

Definitions

  • the present application relates to the field of data processing, and in particular, to a picture rendering method, an electronic device, and a storage medium.
  • the frame synchronization technology is a network game data synchronization technology, in which game logic (such as a virtual character moving operation instruction or a virtual character skill operation instruction, etc.) is completely calculated on the client side, and each game terminal in the same game is completed by a game logic frame. Synchronization of online game data. In each game logical frame, each game terminal has the same initial state, and calculation is performed based on the same input data, and a completely consistent result can be obtained, and the result is used as the initial state of the next game logical frame.
  • game logic such as a virtual character moving operation instruction or a virtual character skill operation instruction, etc.
  • T1 to T5 are set as the time points of the evenly spaced time period.
  • game client A generates a logical frame with an execution time of T2-T4, and the game server receives the logical frame at time T3, and the game server will be at time T4.
  • the logical frame and the T2-T4 time receive logical frames of other game clients in the same game scene, and then synchronize to all game clients in the game scene, and finally all game clients simultaneously execute the above logical frame at time T5. And play the game screen.
  • the existing frame synchronization technology often buffers the received logical frame, that is, the above logical frame is delayed by A time execution, that is, the game client performs the above at (T5+A) time.
  • Logical frames so that even if the network environment of the game client is jittery, the A time buffer can better ensure the smooth running of the game on all game clients.
  • the above-mentioned setting of the delay A time can ensure the smooth running of the game, if the setting of A is large, the delay of the user's game operation is also increased, that is, the user feels that the game operation has a feeling of delay.
  • a picture rendering method, an electronic device, and a storage medium are provided according to various embodiments of the present application.
  • a picture rendering method is performed by an electronic device, the electronic device comprising a memory and a processor, the method comprising:
  • An electronic device comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor, such that the processor performs the following steps:
  • a non-transitory computer readable storage medium storing computer readable instructions, when executed by one or more processors, causes the one or more processors to perform the following steps:
  • FIG. 1 is a flowchart of a method for rendering a picture in an embodiment of the present application
  • FIG. 2 is a flowchart of a method for rendering a picture in an embodiment of the present application
  • FIG. 3 is a flowchart of a rendering position correction step in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of rendering position correction in an embodiment of the present application.
  • FIG. 5 is a flowchart of steps of rendering position correction in an embodiment of the present application.
  • FIG. 6 is a schematic diagram of rendering position correction in an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a screen rendering apparatus according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a screen rendering apparatus according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a position gradient picture rendering module in a picture rendering apparatus according to an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a position gradient picture rendering module in a picture rendering apparatus according to an embodiment of the present application.
  • FIG. 11 is a schematic diagram showing changes in a logical position, a rendering position, and a trend position of a target object in an embodiment of the present application;
  • FIG. 12 is a schematic structural diagram of a working environment of an electronic device in which a picture rendering device of the present application is located.
  • the picture rendering method and the picture rendering apparatus of the present invention may be provided in any electronic device for performing a rendering operation on a game screen of the game terminal.
  • the electronic device includes, but is not limited to, a wearable device, a headset, a healthcare platform, a personal computer, a server computer, a handheld or laptop device, a mobile device (such as a mobile phone, a personal digital assistant (PDA), a media player) And so on), multiprocessor systems, consumer electronics, small computers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like.
  • the picture rendering device is preferably a personal mobile device terminal.
  • the screen rendering method and the screen rendering device of the present invention ensure the immediate execution of the user's game operation by the positional gradient screen rendering operation, that is, the interpolation rendering operation, thereby eliminating the delay of the user's game operation and simultaneously
  • a good response to the jitter of the network environment ensures that the game runs smoothly on all game clients.
  • FIG. 1 is a flowchart of a method for rendering a picture in an embodiment of the present application.
  • the picture rendering method in this embodiment may be implemented by using the foregoing electronic device.
  • Step S101 Acquire a current target object movement operation instruction.
  • Step S102 calculating a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction according to the current target object moving operation instruction and the preset algorithm.
  • Step S103 determining a next logical position of the target object according to the moving direction, the moving speed, and the current logical position of the target object.
  • Step S104 determining a next trend position of the target object according to the moving direction, the moving speed, and the next logical position of the target object.
  • Step S105 Perform a position gradient picture rendering operation of the target object according to the next trend position of the target object and the current rendering position of the target object; wherein the position gradient picture rendering operation triggers generating a plurality of position gradient rendering frames of the target object.
  • the electronic device receives a current target object movement operation instruction issued by the terminal user.
  • the current target object movement operation instruction refers to an instruction that the user controls the movement of the target object.
  • the current target object movement operation instruction needs to include a moving direction of the target object, a moving speed of the target object, and a set execution time of the corresponding logical frame (the set execution time and the actual execution time are not It must be the same, but all logical frames must be set in accordance with the set execution time of the logical frame to set the logical position of the target object).
  • the interval between setting execution times of adjacent logical frames should be the same.
  • the target object here may be a virtual character or the like in the game application screen.
  • the current target object movement operation instruction may directly include the moving direction of the target object and the moving speed, for example, the target object moves at a speed of 10 cm per second in the true north direction.
  • the current target object movement operation instruction may also be a direction adjustment instruction based on the moving direction of the current target object, and a speed adjustment instruction based on the moving speed of the current target object, such as turning the target object's moving direction clockwise by 10 degrees to the target.
  • the moving speed of the object is increased by 10%, or the moving speed of the target object is increased by 100%, and gradually reduced to the normal moving speed in the next 3 seconds.
  • the current target object movement operation instruction may also include only an adjustment instruction of the movement direction and an adjustment adjustment instruction of the movement speed, that is, a plurality of movement direction adjustment mechanisms have been set in the personal mobile device terminal, such as
  • the target object releases the "displacement skill”
  • the current target object movement operation instruction is only executed to execute the displacement skill. If the target object releases the "return to the city skill”, the current target object movement operation instruction only sets the logical position of the target object to be the base origin position after executing the set time.
  • step S102 the electronic device calculates a target corresponding to the current target object movement operation instruction according to the current target object movement operation instruction acquired in step S101 and a preset algorithm set in the electronic device personal mobile device terminal. The direction in which the object moves and the speed at which it moves.
  • the electronic device generates a target object movement model according to the current target object movement operation instruction and the preset algorithm. That is, the current target object movement operation instruction is executed by a preset algorithm to obtain a target object movement model for calculating a moving direction and a moving speed of the target object corresponding to the current target object movement operation instruction.
  • the target object moving model is not a fixed value, but includes all moving directions of the target object during the corresponding logical frame and A function of all moving speeds during the corresponding logical frame.
  • step S103 the electronic device determines the next logical position of the target object according to the target object movement model acquired in step S102 (ie, the moving direction of the target object, the moving speed) and the current logical position of the target object.
  • the logical position of the target object herein refers to the position in the game screen of the target object determined by the target object movement operation instruction corresponding to the target object in strict accordance with the set execution time of the logical frame.
  • the logical position corresponding to each logical frame is determined by the logical position corresponding to the previous logical frame and the target object movement model corresponding to the current target object moving operation instruction of the current logical frame.
  • the electronic device may be the current logical position of the target object as the motion starting point, the target object moving model is the motion parameter, and the fixed interval time (ie, the set execution time difference of the adjacent logical frame) is the motion time, and the first motion of the target object is calculated. End point and set the first motion end point to the next logical position of the target object.
  • step S104 the electronic device determines the target object according to the target object movement model acquired in step S102 (ie, the moving direction and moving speed of the target object) and the next logical position of the target object acquired in step S103.
  • Next trend location refers to the next logical position of the target object, and the default logical position of the target object in the future is based on the difference between the next target object movement operation instruction and the current target object movement operation instruction. Forecast location.
  • the virtual position corresponding to each logical frame is determined by the logical position corresponding to the logical frame and the target object movement model corresponding to the current target object moving operation instruction of the logical frame.
  • the electronic device may set the next logical position of the target object as the motion starting point, the target object movement model as the motion parameter, the preset trend time as the motion time, calculate the second motion end point of the target object, and set the second motion end point.
  • the next trend position for the target object can be adjusted according to the requirements of the user. As long as it is greater than the set execution time difference of the adjacent logical frame, the motion track of the target object can be predicted.
  • step S105 the electronic device performs position gradient screen rendering of the target object according to the next trend position of the target object acquired in step S104 and the current rendering position of the target object.
  • the current rendering position here refers to the rendering position of the target object in the current game screen. Due to problems such as network environment jitter, the target object movement operation instruction may not be executed strictly according to the set execution time of the logical frame, and thus may cause the target object movement operation instruction to be executed at 110 ms, and the electronic device is reached at 120 ms. In this way, even if the electronic device performs the screen rendering of the target object according to the target object moving operation instruction, the current rendering position cannot be strictly consistent with the current logical position.
  • the game user can accept a certain range of differences between the current rendering position and the current logical position.
  • the electronic device directly performs the target object according to the next trend position of the target object and the current rendering position of the target object.
  • Position gradient screen rendering operation that is, generating multiple position gradient rendering frames of the target object.
  • the frame interval of the rendered frame is the rendering interval time
  • the current rendering position and the connection direction of the next trend position are the moving directions.
  • the rendering position corresponding to each position gradient rendering frame is generated, and
  • the position gradient rendering frame of the target object is generated at the rendering position.
  • the position difference value between the current rendering position of the target object and the next logical position is greater than a larger first setting value, that is, the deviation between the rendering position of the target object and the logical position is too large, such as using a position gradient screen rendering operation.
  • a larger first setting value that is, the deviation between the rendering position of the target object and the logical position is too large
  • the current rendering position of the target object can be directly corrected by the next logical position of the target object, that is, the target object directly jumps to the next logical position at the rendering position at the time point set by the current target object moving operation instruction.
  • the picture rendering method does not perform the rendering of the picture frame according to the receiving time of the logical frame, but directly performs the position gradient picture rendering operation according to the next trend position of the target object and the current rendering position of the target object, so as to try to On the basis of not affecting the user experience, the smooth running of the game is guaranteed.
  • the picture rendering method since there is no problem that the game runs stuck, there is no need to perform a delay buffering operation on the logical frame, thereby eliminating the delay of the user's game operation.
  • FIG. 2 is a flowchart of a method for rendering a picture in an embodiment of the present application.
  • the method for rendering a picture in this embodiment may be implemented by using the foregoing electronic device.
  • the method for rendering a picture in this embodiment includes:
  • Step S201 setting an initial rendering position of the target object and an initial logical position; and setting an initial trend position of the target object according to the initial logical position and the initial target object moving operation instruction;
  • Step S202 acquiring a current target object moving operation instruction
  • Step S203 calculating a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction according to the current target object moving operation instruction and the preset algorithm;
  • Step S204 determining a next logical position of the target object according to the moving direction, the moving speed, and the current logical position of the target object;
  • Step S205 determining a next trend position of the target object according to the moving direction, the moving speed, and the next logical position of the target object;
  • Step S206 performing a position gradient picture rendering operation of the target object according to the next trend position of the target object and the current rendering position of the target object; wherein the position gradient picture rendering operation triggers generating a plurality of position gradient rendering frames of the target object.
  • step S201 the electronic device sets an initial rendering position of the target object and an initial logical position, and the initial rendering position of the general target object and the initial logical position are both located at the game starting position in the game start screen.
  • the electronic device then acquires an initial target object movement operation instruction (ie, a first target object movement operation instruction issued by the game user), and then the electronic device sets an initial trend position of the target object according to the initial logical position and the initial target object movement operation instruction. That is, the starting point of the initial logical position of the target object is moved, the target object moving model corresponding to the initial target object moving operation instruction is a motion parameter, the preset trend time is the motion time, the motion end point of the target object is calculated, and the motion end point is set to The initial trend position of the target object.
  • an initial target object movement operation instruction ie, a first target object movement operation instruction issued by the game user
  • step S202 since the initial logical position, the initial rendering position, and the initial trend position of the target object have been acquired in step S201, the electronic device may subsequently receive the current target object movement operation instruction issued by the terminal user.
  • the current target object movement operation instruction refers to an instruction that the user controls the movement of the target object.
  • step S101 please refer to step S101 in the foregoing screen rendering method.
  • step S203 the electronic device calculates a target corresponding to the current target object movement operation instruction according to the current target object movement operation instruction acquired in step S202 and a preset algorithm set in the personal mobile device terminal where the electronic device is located. The direction in which the object moves and the speed at which it moves.
  • the electronic device generates a target object movement model according to the current target object movement operation instruction and the preset algorithm, that is, executing the current target object movement operation instruction by using a preset algorithm to obtain a corresponding operation target for calculating the current target object movement operation instruction.
  • the moving direction of the target object and the target object movement model of the moving speed please refer to step S102 in the above-described screen rendering method.
  • step S204 the electronic device determines the next logical position of the target object according to the target object movement model acquired in step S203 (ie, the moving direction of the target object, the moving speed) and the current logical position of the target object.
  • the logical position of the target object herein refers to the position in the game screen of the target object determined by the target object movement operation instruction corresponding to the target object in strict accordance with the set execution time of the logical frame.
  • the logical position corresponding to each logical frame is determined by the logical position corresponding to the previous logical frame and the target object movement model corresponding to the current target object moving operation instruction of the current logical frame.
  • the target object movement model corresponding to the current target object moving operation instruction of the current logical frame.
  • step S205 the electronic device determines the next trend position of the target object according to the target object movement model acquired in step S203 (ie, the moving direction of the target object, the moving speed) and the next logical position of the target object acquired in step S204.
  • the trend position of the target object herein refers to the next logical position of the target object, and the default logical position of the target object in the future is based on the difference between the next target object movement operation instruction and the current target object movement operation instruction. Forecast location.
  • the virtual position corresponding to each logical frame is determined by the logical position corresponding to the logical frame and the target object movement model corresponding to the current target object moving operation instruction of the logical frame.
  • the target object movement model corresponding to the current target object moving operation instruction of the logical frame please refer to step S104 in the above-described screen rendering method.
  • step S206 the electronic device performs position gradient screen rendering of the target object according to the next trend position of the target object acquired in step S205 and the current rendering position of the target object.
  • the electronic device In order to prevent the difference between the current rendering position and the next logical position corresponding to the next target object moving operation instruction from continuing to increase, the electronic device directly performs the target according to the next trend position of the target object and the current rendering position of the target object.
  • the position of the object is a gradient screen rendering operation, that is, a plurality of position gradient rendering frames of the target object are generated.
  • the frame interval of the rendered frame is the rendering interval time
  • the current rendering position and the connection direction of the next trend position are moving directions
  • the electronic device generates a rendering position corresponding to each position gradient rendering frame based on the target object moving model. And generating a position gradient rendering frame of the target object at the rendering position.
  • These positionally rendered frames can implement a picture rendering operation of the rendered picture from the current rendering position to the next trend position. That is, the position difference value between the rendering position and the next logical position is always small, so that the game user still feels that the following logical position of the target object is the direction and moves toward the next trend position.
  • the electronic device may further correct the rendering position of the position gradient rendering frame according to the current rendering position and the connection direction of the next trend position, the next logical position, and the target object movement model.
  • FIG. 3 is a flowchart of a rendering position correction step in an embodiment of the present application
  • FIG. 4 is a schematic diagram of rendering position correction in an embodiment of the present application.
  • the flow of the rendering position correction step includes:
  • Step S301 the electronic device acquires a logical projection position at a set time interval, wherein the logical projection position is a projection position of a line where the connection of the current logical position and the current trend position is the next logical position.
  • the logical projection position can be used to obtain the distance between the next logical position and the next trend position, and the difference between the current rendering position and the next trend position.
  • the set time interval here can be the frame interval time of the rendered frame to correct the rendering position of each position gradient rendered frame.
  • Step S302 when the logical projection position is on the line connecting the current rendering position and the next trend position, indicating that the distance between the current rendering position and the next trend position is larger, and between the next logical position and the next trend position. The distance is small.
  • the electronic device calculates the rendering position of the position gradient rendering frame according to the target object movement model acquired in step S203, and then the electronic device uses the preset increasing coefficient to increase the spacing between the rendering positions of the adjacent position gradient rendering frames, so that the target object The rendering position and the logical position of the target object move to the next trend position at approximately the same speed.
  • Step S303 when the logical projection position is outside the line connecting the current rendering position and the next trend position, indicating that the distance between the current rendering position and the next trend position is small, and between the next logical position and the next trend position. Specifically larger.
  • the electronic device calculates the rendering position of the position gradient rendering frame according to the target object movement model acquired in step S203, and then the electronic device uses the preset reduction coefficient to reduce the spacing between the rendering positions of the adjacent position gradient rendering frames, so that the target The render position of the object and the logical position of the target object move to the next trend position at approximately the same speed.
  • the rendering position of the next position gradient rendering frame is calculated based on the rendering position of the current position gradient rendering frame, the next trend position, and the next logical position. Therefore, the preset increase coefficient and the preset reduction coefficient can be set to a small fixed value, and the rendering position of the target object and the logic of the target object are made on the basis that the game user does not perceive the change of the moving speed of the target object. Position as close as possible.
  • the preset increase coefficient and the preset decrease coefficient may also be set to be based on the difference between the distance between the current rendering position and the next trend position and the distance between the next logical position and the next trend position. A change value causes the target object's rendering position to be closer to the corresponding logical position.
  • the current rendering position is R1
  • the next trend position is Q1 (used to indicate the moving direction of the rendering position)
  • the next logical position is L1
  • R1-Q1 can be connected to the Y-axis, after R1 A line perpendicular to the line R1-Q1 establishes a coordinate system for the X axis.
  • the projection of the next logical position L1 on the Y axis is on the R1-Q1 line, that is, the next logical position L1 is in the first and fourth quadrants of the coordinate system, it indicates that the current rendering position R1 lags behind the next logical position L1. You need to increase the spacing between the rendering positions of the adjacent position gradient rendered frames.
  • next logical position L1 on the Y axis When the projection of the next logical position L1 on the Y axis is outside the R1-Q1 connection, that is, the next logical position L1 is in the second and third quadrants of the coordinate system, it indicates that the current rendering position R1 is ahead of the next logical position L1, You need to reduce the spacing between the rendering positions of the adjacent position gradient rendered frames.
  • the electronic device By correcting the rendering position of the gradient rendering frame for each position, the electronic device tries to keep the position difference between the current rendering position and the current logical position within an acceptable range, the specific preset increasing coefficient and the preset reducing coefficient. It can be adjusted according to the type of game and network conditions.
  • FIG. 5 is a flowchart of a step of rendering position correction in an embodiment of the present application
  • FIG. 6 is a schematic diagram of rendering position correction in an embodiment of the present application.
  • the flow of the rendering position correction step includes:
  • Step S501 The electronic device acquires, at a set time interval, a first connection length of a current rendering position and a next trend position connection, and a second connection length of a connection between the next logical position and the next trend position. In this way, the difference between the distance between the next logical position and the next trend position and the distance between the current rendering position and the next trend position can be obtained by the difference between the length of the first connection line and the length of the second connection line.
  • the set time interval here can be the frame interval time of the rendered frame to correct the rendering position of each position gradient rendered frame.
  • Step S502 the electronic device calculates the spacing of the rendering positions of the adjacent position gradient rendering frames according to the length ratio of the first connection length and the second connection length and the target object movement model.
  • the electronic device calculates the rendering position of the position gradient rendering frame according to the target object movement model acquired in step S203, and then the electronic device uses the length ratio of the first connection length and the second connection length as an increase coefficient to increase the adjacent position gradient.
  • the spacing between the rendered positions of the rendered frames is such that the rendering position of the target object and the logical position of the target object move to the next trend position at approximately the same speed.
  • the electronic device calculates the rendering position of the position gradient rendering frame according to the target object movement model acquired in step S203, and then the electronic device uses the length ratio of the first connection length and the second connection length as a reduction coefficient to reduce the adjacent position.
  • the spacing between the rendering positions of the gradient rendered frames is such that the rendering position of the target object and the logical position of the target object move to the next trend position at approximately the same speed.
  • the rendering position of the next position gradient rendering frame is calculated based on the rendering position of the current position gradient rendering frame, the next trend position, and the next logical position. Therefore, the increase coefficient and the reduction coefficient are set here according to the length ratio of the first connection length and the second connection length, so that the rendering position of the target object is closer to the corresponding logical position.
  • the electronic device sets the length of the connection of the R2-Q2 connection to the length of the first connection, and sets the length of the connection of the L2-Q2 connection to the length of the second connection.
  • the length of the first connection is greater than the length of the second connection, it indicates that the current rendering position R2 lags behind the next logical position L2, and the increase coefficient needs to be set according to the length ratio of the first connection length and the second connection length.
  • the reduction coefficient needs to be set according to the length ratio of the first connection length and the second connection length.
  • the electronic device By correcting the rendering position of the gradient rendering frame for each position, the electronic device tries to keep the position difference between the current rendering position and the current logical position within an acceptable range, and the specific increase coefficient and reduction coefficient may be according to the game type. Adjust with network conditions.
  • the position difference value between the current rendering position of the target object and the next logical position is greater than a larger first setting value, that is, the deviation between the rendering position of the target object and the logical position is too large, such as using a position gradient screen rendering operation.
  • a larger first setting value that is, the deviation between the rendering position of the target object and the logical position is too large
  • the current rendering position of the target object can be directly corrected by the next logical position of the target object, that is, the target object directly jumps to the next logical position at the rendering position at the time point set by the current target object moving operation instruction.
  • the picture rendering method in the above embodiment may further correct the rendering position of each position gradient rendering frame based on the current rendering position and the connection direction of the next trend position, the next logical position, and the target object movement model, so that the game user is Unconsciously, the rendering position of the target object is closer to the corresponding logical position, which further improves the accuracy of the rendering of the game image of the target object.
  • FIG. 7 is a schematic structural diagram of a screen rendering apparatus according to an embodiment of the present disclosure.
  • the screen rendering apparatus 70 includes a mobile operation instruction acquiring module 71, a target object movement model generating module 72, and a next logical position determining module 73.
  • the next trend position determining module 74, the position gradient screen rendering module 75, and the rendering position correction module 76 is included in the screen rendering apparatus 70.
  • the movement operation instruction acquisition module 71 is configured to acquire a current target object movement operation instruction; the target object movement model generation module 72 is configured to calculate the movement of the target object corresponding to the current target object movement operation instruction according to the current target object movement operation instruction and the preset algorithm.
  • a target object movement model generating module 72 configured to generate a target object movement model according to the current target object movement operation instruction and the preset algorithm, wherein the target object movement model is used to calculate a current target object movement operation instruction correspondingly The moving direction of the target object and the moving speed;
  • the next logical position determining module 73 is configured to determine the next logical position of the target object according to the moving direction, the moving speed and the current logical position of the target object;
  • the next trend position determining module 74 Determining a next trend position of the target object according to the moving direction, the moving speed, and the next logical position of the target object;
  • the position gradient picture rendering module 75 is configured to use the next trend position of the target object and the current rendering position of the target object a position gradient screen rendering operation of the target object; wherein the position gradient screen rendering operation triggers generating a plurality of position gradient rendering frames of the target object;
  • the rendering position correction module 76 is configured to use the current rendering position of the target object and the next logic When the position difference
  • the first mobile operation instruction acquisition module 71 receives the current target object movement operation instruction issued by the terminal user.
  • the current target object movement operation instruction refers to an instruction that the user controls the movement of the target object.
  • the current target object movement operation instruction needs to include a moving direction of the target object, a moving speed of the target object, and a set execution time of the corresponding logical frame (the set execution time and the actual execution time are not It must be the same, but all logical frames must be set in accordance with the set execution time of the logical frame to set the logical position of the target object).
  • the interval between setting execution times of adjacent logical frames should be the same.
  • the target object here may be a virtual character or the like in the game application screen.
  • the current target object movement operation instruction may directly include the moving direction of the target object and the moving speed, for example, the target object moves at a speed of 10 cm per second in the true north direction.
  • the current target object movement operation instruction may also be a direction adjustment instruction based on the moving direction of the current target object, and a speed adjustment instruction based on the moving speed of the current target object, such as turning the target object's moving direction clockwise by 10 degrees to the target.
  • the moving speed of the object is increased by 10%, or the moving speed of the target object is increased by 100%, and gradually reduced to the normal moving speed in the next 3 seconds.
  • the current target object movement operation instruction may also include only an adjustment instruction of the movement direction and an adjustment adjustment instruction of the movement speed, that is, a plurality of movement direction adjustment mechanisms have been set in the personal mobile device terminal, such as
  • the target object releases the "displacement skill”
  • the current target object movement operation instruction is only executed to execute the displacement skill. If the target object releases the "return to the city skill”, the current target object movement operation instruction only sets the logical position of the target object to be the base origin position after executing the set time.
  • the target object movement model generation module 72 calculates the current target object movement operation instruction acquired by the movement operation instruction acquisition module 71 and the preset algorithm set in the personal mobile device terminal where the screen rendering device is located, and calculates the target object corresponding to the current target object movement operation instruction. The direction of movement and the speed of movement.
  • the target object movement model generating module 72 generates a target object movement model according to the current target object movement operation instruction and the preset algorithm, that is, executing the current target object movement operation instruction by using a preset algorithm to obtain a current target object for calculation.
  • the target object moving model is not a fixed value, but includes all moving directions of the target object during the corresponding logical frame and A function of all moving speeds during the corresponding logical frame.
  • the next logical position determining module 73 determines the next logical position of the target object based on the target object movement model acquired by the target object movement model generation module 72 (ie, the moving direction of the target object, the moving speed) and the current logical position of the target object.
  • the logical position of the target object herein refers to the position in the game screen of the target object determined by the target object movement operation instruction corresponding to the target object in strict accordance with the set execution time of the logical frame.
  • the logical position corresponding to each logical frame is determined by the logical position corresponding to the previous logical frame and the target object movement model corresponding to the current target object moving operation instruction of the current logical frame.
  • the next logical position determining module 73 may be the current logical position of the target object as the motion starting point, the target object moving model as the motion parameter, and the fixed interval time (ie, the set execution time difference of the adjacent logical frame) is the motion time, and the calculation target is calculated.
  • the first motion end point of the object and the first motion end point is set to the next logical position of the target object.
  • the next trend position determining module 74 according to the target object movement model acquired by the target object movement model generating module 72 (ie, the moving direction of the target object, the moving speed) and the next logical position of the target object acquired by the next logical position determining module 73. , determine the next trend position of the target object.
  • the trend position of the target object herein refers to the next logical position of the target object, and the default logical position of the target object in the future is based on the difference between the next target object movement operation instruction and the current target object movement operation instruction. Forecast location.
  • the virtual position corresponding to each logical frame is determined by the logical position corresponding to the logical frame and the target object movement model corresponding to the current target object moving operation instruction of the logical frame.
  • the next trend position determining module 74 may be: the next logical position of the target object is a motion starting point, the target object moving model is a motion parameter, the preset trend time is a motion time, and the second motion end point of the target object is calculated, and the first The second motion end point is set to the next trend position of the target object.
  • the preset trend time here can be adjusted according to the requirements of the user. As long as it is greater than the set execution time difference of the adjacent logical frame, the motion track of the target object can be predicted.
  • the final position gradient picture rendering module 75 performs position gradient picture rendering of the target object according to the next trend position of the target object acquired by the next trend position determining module 74 and the current rendering position of the target object.
  • the current rendering position here refers to the rendering position of the target object in the current game screen. Due to problems such as network environment jitter, the target object movement operation instruction may not be executed strictly according to the set execution time of the logical frame, and thus may cause the target object movement operation instruction to be executed at 110 ms, and the screen rendering device is reached at 120 ms. Therefore, even if the screen rendering device performs the screen rendering of the target object according to the target object moving operation instruction, the current rendering position cannot be strictly consistent with the current logical position.
  • the game user can accept a certain range of differences between the current rendering position and the current logical position.
  • the position gradient screen rendering module 75 directly according to the next trend position of the target object and the current rendering position of the target object, Perform a positional gradient screen rendering operation on the target object, that is, generate a plurality of position gradient rendering frames of the target object.
  • the frame interval of the rendered frame is the rendering interval time
  • the current rendering position and the connection direction of the next trend position are the moving directions.
  • the rendering position corresponding to each position gradient rendering frame is generated, and
  • the position gradient rendering frame of the target object is generated at the rendering position.
  • the rendering position correction module can directly correct the current rendering position of the target object with the next logical position of the target object, that is, the target object directly jumps to the rendering position at the time point set by the current target object moving operation instruction.
  • the next logical position to avoid excessive positional difference between the render position and the corresponding logical position.
  • the picture rendering apparatus of this embodiment does not perform rendering of the picture frame according to the receiving time of the logical frame, but directly performs the position gradation picture rendering operation according to the next trend position of the target object and the current rendering position of the target object, so as to try not to On the basis of affecting the user experience, the smooth running of the game is guaranteed.
  • the smooth running of the game is guaranteed.
  • since there is no problem that the game runs stuck there is no need to perform a delay buffering operation on the logical frame, thereby eliminating the delay of the user's game operation.
  • FIG. 8 is a schematic structural diagram of a screen rendering apparatus according to an embodiment of the present invention.
  • the screen rendering apparatus 80 includes an initial setting module 81, a moving operation instruction acquiring module 82, a target object moving model generating module 83, and a next step.
  • the initial setting module 81 is configured to set an initial rendering position of the target object and an initial logical position; and set an initial trend position of the target object according to the initial logical position and the initial target object moving operation instruction;
  • the mobile operation instruction acquiring module 82 is configured to acquire the current target
  • the object movement operation instruction module 83 is configured to calculate a movement direction and a movement speed of the target object corresponding to the current target object movement operation instruction according to the current target object movement operation instruction and the preset algorithm, specifically, the target object movement
  • the model generation module 83 is configured to generate a target object movement model according to the current target object movement operation instruction and a preset algorithm; wherein the target object movement model is used to calculate a moving direction and a moving speed of the target object corresponding to the current target object movement operation instruction;
  • a logical position determining module 84 is configured to determine a next logical position of the target object according to the moving direction, the moving speed, and the current logical position of the target object; the next trend position determining module 85 is configured to move
  • the rendering position correction module 87 is configured to: when the position difference value of the current rendering position of the target object and the next logical position is greater than the first setting When the value is used, the current rendering position of the target object is corrected using the next logical position of the target object.
  • FIG. 9 is a schematic structural diagram of a position gradient screen rendering module in a screen rendering apparatus according to an embodiment of the present application.
  • the position gradient picture rendering module 86 includes a logical projection position acquisition unit 91, a rendering position spacing increasing unit 92, and a rendering position spacing reducing unit 93.
  • the logical projection position obtaining unit 91 is configured to acquire a logical projection position at a set time interval, wherein the logical projection position is a projection position of a line where the connection of the current logical position and the current trend position is the next logical position; the pitch of the rendering position is increased.
  • the unit 92 is configured to calculate a rendering position of the position gradient rendering frame based on the target object movement model when the logical projection position is on the line connecting the current rendering position and the next trend position, and increase the adjacent position gradient by using the preset increasing coefficient pair.
  • the spacing between the rendering positions of the rendered frames; the rendering position spacing reducing unit 93 is configured to calculate the rendering position of the position gradient rendering frame based on the target object movement model when the logical projection position is outside the line connecting the current rendering position and the next trend position . And use the preset reduction factor pair to reduce the spacing between the rendering positions of the adjacent position gradient rendered frames.
  • FIG. 10 is a schematic structural diagram of a position gradient screen rendering module in a screen rendering apparatus according to an embodiment of the present application.
  • the position gradient picture rendering module 86 includes a wire length acquisition unit 101 and a rendering position spacing calculation unit 12.
  • the connection length obtaining unit 101 is configured to acquire, at a set time interval, a first connection length of a current rendering position and a next trend position connection, and a second connection length of a connection between the next logical position and the next trend position.
  • the rendering position spacing calculation unit 102 is configured to calculate the spacing of the rendering positions of the adjacent position gradient rendering frames according to the length ratio of the first connection length and the second connection length and the target object movement model.
  • the initial setting module 81 first sets the initial rendering position and the initial logical position of the target object, and the initial rendering position of the general target object and the initial logical position are both located at the game starting position in the game start screen. .
  • the initial setting module 81 acquires an initial target object moving operation instruction (ie, the first target object moving operation instruction issued by the game user), and then the initial setting module sets the initial of the target object according to the initial logical position and the initial target object moving operation instruction.
  • Trend location That is, the starting point of the initial logical position of the target object is moved, the target object moving model corresponding to the initial target object moving operation instruction is a motion parameter, the preset trend time is the motion time, the motion end point of the target object is calculated, and the motion end point is set to The initial trend position of the target object.
  • the mobile operation instruction acquisition module 82 may subsequently receive the current target object movement operation instruction issued by the terminal user.
  • the current target object movement operation instruction refers to an instruction that the user controls the movement of the target object.
  • the target object movement model generation module 83 calculates the current target object movement operation instruction acquired by the movement operation instruction acquisition module 82 and the preset algorithm set in the personal mobile device terminal where the screen rendering device is located, and calculates the target object corresponding to the current target object movement operation instruction. The direction of movement and the speed of movement.
  • the target object movement model generation module 83 generates a target object movement model according to the current target object movement operation instruction and the preset algorithm. That is, the current target object movement operation instruction is executed by a preset algorithm to obtain a target object movement model for calculating a moving direction and a moving speed of the target object corresponding to the current target object movement operation instruction.
  • the next logical position determining module 84 determines the next logical position of the target object based on the target object movement model acquired by the target object movement model generation module 83 (ie, the moving direction of the target object, the moving speed) and the current logical position of the target object.
  • the logical position of the target object herein refers to the position in the game screen of the target object determined by the target object movement operation instruction corresponding to the target object in strict accordance with the set execution time of the logical frame.
  • the logical position corresponding to each logical frame is determined by the logical position corresponding to the previous logical frame and the target object movement model corresponding to the current target object moving operation instruction of the current logical frame.
  • the next trend position determining module 85 according to the target object movement model acquired by the target object movement model generation module 83 (ie, the moving direction of the target object, the moving speed) and the next logical position of the target object acquired by the next logical position determining module 84. , determine the next trend position of the target object.
  • the trend position of the target object herein refers to the next logical position of the target object, and the default logical position of the target object in the future is based on the difference between the next target object movement operation instruction and the current target object movement operation instruction. Forecast location.
  • the virtual position corresponding to each logical frame is determined by the logical position corresponding to the logical frame and the target object movement model corresponding to the current target object moving operation instruction of the logical frame.
  • the final position gradient picture rendering module 86 performs the position gradient picture rendering of the target object according to the next trend position of the target object acquired by the next trend position determining module 85 and the current rendering position of the target object.
  • the position gradient screen rendering module 86 directly according to the next trend position of the target object and the current rendering of the target object.
  • Position the position of the target object is a gradient screen rendering operation, that is, a plurality of position gradient rendering frames of the target object are generated.
  • the position gradient picture rendering module 86 uses the frame interval of the rendered frame as the rendering interval time, and the current rendering position and the connection direction of the next trend position are the moving directions. Based on the target object moving model, each position gradient rendering frame is generated. The rendering position, and the gradient rendering frame of the position of the target object is generated at the rendering position. These positionally rendered frames can implement a picture rendering operation of the rendered picture from the current rendering position to the next trend position. That is, the position difference value between the rendering position and the next logical position is always small, so that the game user still feels that the following logical position of the target object is the direction and moves toward the next trend position.
  • the position gradient picture rendering module 86 may further correct the rendering position of the position gradient rendering frame according to the current rendering position and the connection direction of the next trend position, the next logical position, and the target object movement model. If the logically transparent position is used to correct the rendering position of the position gradient rendering frame, the rendering position correction process includes:
  • the logical projection position acquiring unit 91 of the position gradient screen rendering module 86 acquires a logical projection position at a set time interval, wherein the logical projection position is a projection position of a line where the connection of the current logical position and the current trend position is at the next logical position. . In this way, the logical projection position can be used to obtain the distance between the next logical position and the next trend position, and the difference between the current rendering position and the next trend position.
  • the set time interval here can be the frame interval time of the rendered frame to correct the rendering position of each position gradient rendering frame.
  • the rendering position spacing increasing unit 92 of the position gradient screen rendering module 86 calculates the rendering position of the position gradient rendering frame according to the target object movement model acquired by the target object movement model generation module, and then the rendering position spacing increasing unit 92 uses the preset increasing coefficient. Increase the spacing between the rendering positions of the adjacent position gradient rendering frames such that the rendering position of the target object and the logical position of the target object move to the next trend position at approximately the same speed.
  • the rendering position spacing reducing unit 93 of the position gradient screen rendering module 86 calculates the rendering position of the position gradient rendering frame according to the target object movement model acquired by the target object movement model generation module, and then the rendering position spacing reducing unit 93 uses the preset reduction coefficient. The spacing between the rendering positions of the adjacent position gradient rendering frames is reduced such that the rendering position of the target object and the logical position of the target object move to the next trend position at substantially the same speed.
  • the rendering position of the next position gradient rendering frame is calculated based on the rendering position of the current position gradient rendering frame, the next trend position, and the next logical position. Therefore, the preset increase coefficient and the preset reduction coefficient can be set to a small fixed value, and the rendering position of the target object and the logic of the target object are made on the basis that the game user does not perceive the change of the moving speed of the target object. Position as close as possible.
  • the preset increase coefficient and the preset decrease coefficient may also be set to be based on the difference between the distance between the current rendering position and the next trend position and the distance between the next logical position and the next trend position. A change value causes the target object's rendering position to be closer to the corresponding logical position.
  • the rendering position correction process includes:
  • the connection length obtaining unit 101 of the position gradient picture rendering module 86 acquires the first connection length of the current rendering position and the next trend position connection line, and the next logical position and the next trend position connection at a set time interval. The length of the second connection. Thus, by the difference between the length of the first line and the length of the second line, the distance between the next logical position and the next trend position, and the difference between the current rendering position and the distance of the next trend position are obtained.
  • the set time interval here can be the frame interval time of the rendered frame to correct the rendering position of each position gradient rendered frame.
  • the rendering position spacing calculation unit 102 of the position gradient screen rendering module 86 calculates the spacing of the rendering positions of the adjacent position gradient rendering frames based on the length ratio of the first connection length and the second connection length and the target object movement model.
  • the rendering position interval calculation unit calculates the rendering position of the position gradient rendering frame according to the target object movement model acquired by the target object movement model generation module, and then the rendering position spacing calculation unit uses the length ratio of the first connection length and the second connection length. To increase the coefficient, the spacing between the rendering positions of the adjacent position gradient rendering frames is increased such that the rendering position of the target object and the logical position of the target object move to the next trend position at approximately the same speed.
  • the rendering position interval calculation unit calculates the rendering position of the position gradient rendering frame according to the target object movement model acquired by the target object movement model generation module, and then the rendering position spacing calculation unit uses the length ratio of the first connection length and the second connection length. To reduce the coefficient, the spacing between the rendering positions of the adjacent position gradient rendering frames is reduced such that the rendering position of the target object and the logical position of the target object move to the next trend position at approximately the same speed.
  • the rendering position of the next position gradient rendering frame is calculated based on the rendering position of the current position gradient rendering frame, the next trend position, and the next logical position. Therefore, the increase coefficient and the reduction coefficient are set here according to the length ratio of the first connection length and the second connection length, so that the rendering position of the target object is closer to the corresponding logical position.
  • the rendering position correction module can directly correct the current rendering position of the target object with the next logical position of the target object, that is, the target object directly jumps to the rendering position at the time point set by the current target object moving operation instruction.
  • the next logical position to avoid excessive positional difference between the render position and the corresponding logical position.
  • the screen rendering apparatus in the above embodiment may further correct the rendering position of each position gradient rendering frame based on the current rendering position and the connection direction of the next trend position, the next logical position, and the target object movement model, so that the game user is Unconsciously, the rendering position of the target object is closer to the corresponding logical position, which further improves the accuracy of the rendering of the game image of the target object.
  • FIG. 11 is a schematic diagram showing changes of a logical position, a rendering position, and a trend position of a target object according to an embodiment of the present application.
  • the electronic device in this specific embodiment may specifically be a personal mobile device terminal.
  • l1 - l5 are logical positions corresponding to five consecutive logical frames a to logical frames e of the target object
  • r1 - r10 are rendering positions corresponding to 11 consecutive rendered frames (position gradient rendering frames) of the target object
  • T2-t5 is the trend position corresponding to the logical frame b to the logical frame e of the target object.
  • Step S1101 the logical position start point l1 of the target object and the rendering position start point r1 coincide.
  • Step S1102 When receiving the target object movement operation instruction corresponding to the logical frame a, the target object movement operation instruction is a target object, moving in the direction and speed of v1, and the electronic device moves the operation instruction and the logical position starting point according to the target object. L1, calculate the next logical position l2 of the target object.
  • L2 l1+v1*n, where n is the set execution time difference of adjacent logical frames.
  • the electronic device then calculates the next trend position t2 of the target object according to the target object movement operation instruction and the next logical position l2.
  • T2 l2+v1*N, where N is the preset trend time.
  • Step S1103 After receiving the target object movement operation instruction corresponding to the logical frame a, before receiving the target object operation instruction corresponding to the logical frame b, the electronic device uses the frame interval of the rendered frame as the rendering interval time, and the current rendering position r1 and The line direction of the next trend position t2 is the moving direction, and based on the speed of v1, a corresponding rendered frame is generated at the rendering position r2.
  • Step S1104 When receiving the target object movement operation instruction corresponding to the logical frame b, the target object movement operation instruction moves the target object in the direction and speed of v1, and the electronic device moves the operation instruction and the logical position l2 according to the target object. The next logical position l3 of the target object is calculated.
  • L3 l2+v1*n, where n is the set execution time difference of adjacent logical frames.
  • the electronic device then calculates the next trend position t3 of the target object according to the target object movement operation instruction and the next logical position l3.
  • T3 l3+v1*N, where N is the preset trend time.
  • Step S1105 After receiving the target object movement operation instruction corresponding to the logical frame b, before receiving the target object operation instruction corresponding to the logical frame c, the electronic device uses the frame interval of the rendered frame as the rendering interval time, and the current rendering position r2 and The line direction of the next trend position t3 is the moving direction, and based on the speed of v1, the corresponding rendered frame is generated at the rendering positions r3 and r4.
  • Step S1106 If the network environment is jittery, the electronic device does not receive the target object movement operation instruction corresponding to the logical frame c at the corresponding time point, and the electronic device uses the frame interval of the rendered frame as the rendering interval time to the current rendering position.
  • the connection direction of r4 and the next trend position t3 is the moving direction, and based on the speed of v1, corresponding rendering frames are generated at the rendering positions r5 and r6.
  • Step S1107 When the target object movement operation instruction corresponding to the logical frame c is delayed, the target object movement operation instruction moves the target object in the direction and speed of v2, and the electronic device operates the instruction according to the target object and the logical position l3. The next logical position l4 of the target object is calculated.
  • L4 l3+v2*n, where n is the set execution time difference of adjacent logical frames.
  • the electronic device then calculates the next trend position t4 of the target object according to the target object movement operation instruction and the next logical position l4.
  • T4 l4+v2*N, where N is the preset trend time.
  • Step S1108 After receiving the target object movement operation instruction corresponding to the logical frame c, before receiving the target object operation instruction corresponding to the logical frame d, the electronic device uses the frame interval of the rendered frame as the rendering interval time, and the current rendering position r6 and The line direction of the next trend position t4 is the moving direction, and based on the speed of v2, a corresponding rendered frame is generated at the rendering position r7.
  • the electronic device detects the relative trend position t4, the current rendering position r6 relatively lags behind the next logical position l4 (due to the network environment jitter), so the spacing between the rendering position r6 and the rendering position r7 can be increased here to Reduce the spacing between the current rendering position and the next logical position.
  • Step S1109 When receiving the target object movement operation instruction corresponding to the logical frame d, the target object movement operation instruction moves the target object in the direction and speed of v2, and the electronic device calculates according to the target object motion operation instruction and the logical position l4. The next logical position of the target object is l5.
  • L5 l4+v2*n, where n is the set execution time difference of adjacent logical frames.
  • the electronic device then calculates the next trend position t5 of the target object according to the target object movement operation instruction and the next logical position l5.
  • T5 l5+v2*N, where N is the preset trend time.
  • Step S1110 After receiving the target object movement operation instruction corresponding to the logical frame d, before receiving the target object operation instruction corresponding to the logical frame e, the electronic device uses the frame interval of the rendered frame as the rendering interval time, and the current rendering position r7 and The line direction of the next trend position t5 is the moving direction, and based on the speed of v2, corresponding rendering frames are generated at the rendering positions r8, r9, and r10.
  • the rendering position r9 since the electronic device detects the relative trend position t5, the rendering position r9 is relatively ahead of the next logical position l5 (due to the correction of the rendering position spacing in step S1108), so the rendering position r9 and the rendering position can be reduced here. R8, and the spacing between the rendering position r9 and the rendering position r10 to reduce the spacing between the current rendering position and the next logical position.
  • step S1107 the delay time of the target object movement operation instruction corresponding to the logical frame c is too long, that is, the distance between the next logical position l4 and the current rendering position r6 is too large, and the rendering position r7 can be directly performed. Corrected to the next logical position l4 to avoid excessive positional difference between the rendered position and the corresponding logical position.
  • the picture rendering method, device and storage medium of the invention ensure the immediate execution of the user's game operation by means of the positional gradual picture rendering operation, thereby eliminating the delay of the user's game operation, and better coping with the network environment.
  • the jitter ensures the smooth running of the game on all game clients; effectively solves the technical problems of the existing picture rendering method and the device running fluency of the game or the delay of the game operation.
  • FIG. 11 is a schematic flowchart diagram of a method according to an embodiment of the present application. It should be understood that although the various steps in the flowchart of FIG. 11 are sequentially displayed as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and may be performed in other sequences. Moreover, at least some of the steps in FIG. 11 may include a plurality of sub-steps or stages, which are not necessarily performed at the same time, but may be executed at different times, and the order of execution thereof is not necessarily This may be performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of the other steps.
  • an electronic device comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor, causing the processor to perform the step of: acquiring a current target object movement An operation instruction; calculating a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction according to the current target object moving operation instruction and a preset algorithm; determining the target object according to the moving direction, the moving speed, and the current logical position of the target object The next logical position; determining the next trend position of the target object according to the moving direction, the moving speed, and the next logical position of the target object; and performing the target object according to the next trend position of the target object and the current rendering position of the target object
  • the position gradient screen rendering operation wherein the position gradient screen rendering operation triggers generation of multiple position gradient rendering frames of the target object.
  • the computer readable instructions when executed by the processor, causing the processor to calculate a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction, according to the current target object moving operation instruction and the preset algorithm.
  • the following steps are performed: generating a target object movement model according to the current target object movement operation instruction and a preset algorithm; wherein the target object movement model is used to calculate a moving direction and a moving speed of the target object corresponding to the current target object movement operation instruction.
  • the processor when the computer readable instructions are executed by the processor, causing the processor to perform the step of performing a positional gradient picture rendering operation of the target object in accordance with a next trend position of the target object and a current rendering position of the target object, Perform the following steps: the frame interval of the rendered frame is the rendering interval, the current rendering position and the connection direction of the next trend position are the moving directions, and the rendering position corresponding to each position gradient rendering frame is generated based on the target object moving model, and A position gradient rendering frame that produces the target object at the render position.
  • the processor when the computer readable instructions are executed by the processor, the processor further causes the step of: using when the position difference value of the current rendering position of the target object and the next logical position is greater than the first set value, The next logical position of the target object corrects the current render position of the target object.
  • the computer readable instructions are executed by the processor such that the processor further performs the steps of: setting an initial rendering position of the target object and an initial logical position; and setting according to the initial logical position and the initial target object movement operation instruction The initial trend position of the target object.
  • the processor when the computer readable instructions are executed by the processor, causing the processor to perform the step of determining the next logical position of the target object based on the direction of movement, the speed of movement, and the current logical position of the target object, performing the following steps :
  • the current logical position of the target object is the starting point of the motion
  • the moving model of the target object is the motion parameter
  • the fixed interval time is the motion time
  • the first motion end point of the target object is calculated
  • the first motion end point is set as the next target object. Logical location.
  • the processor when the computer readable instructions are executed by the processor, causing the processor to perform the step of determining the next logical position of the target object based on the direction of movement, the speed of movement, and the current logical position of the target object, performing the following steps : the next logical position of the target object is the motion starting point, the target object moving model is the motion parameter, the preset trend time is the motion time, the second motion end point of the target object is calculated, and the second motion end point is set as the target object. Next trend location.
  • the computer readable instructions are executed by the processor such that the processor performs the frame interval of the rendered frame as the rendering interval, and the current rendering position and the direction of the next trend position are the moving direction, based on the target The object movement model, generating a rendering position corresponding to each position gradient rendering frame, and generating a position gradient rendering frame of the target object at the rendering position, performing the following steps: according to the current rendering position and the connection direction of the next trend position , the next logical position and the target object movement model, the rendering position of the position gradient rendering frame is corrected.
  • the computer readable instructions when executed by the processor, causing the processor to perform a rendering of the position gradient based on the current rendering position and the line direction of the next trend position, the next logical position, and the target object movement model
  • the following steps are performed: at a set time interval, a logical projection position is obtained, wherein the logical projection position is a projection position of a line where the connection of the current logical position and the next trend position of the next logical position is next.
  • the rendering position of the position gradient rendering frame is calculated based on the target object movement model, and the rendering of the adjacent position gradient rendering frame is increased by using the preset increasing coefficient.
  • the spacing between the positions; and when the logical projection position is outside the line connecting the current rendering position and the next trend position, calculating the rendering position of the position gradient rendering frame based on the target object movement model, and reducing the phase using the preset reduction coefficient The position between the rendering positions of the adjacent position gradient rendering frames.
  • the computer readable instructions when executed by the processor, causing the processor to perform a rendering of the position gradient based on the current rendering position and the line direction of the next trend position, the next logical position, and the target object movement model
  • the following steps are performed: at the set time interval, the first connection length of the current rendering position and the next trend position connection line, and the next logical position and the next trend position are connected. a second connection length; and calculating a spacing of the rendering positions of the adjacent position gradient rendering frames according to the length ratio of the first connection length and the second connection length and the target object movement model.
  • a non-transitory computer readable storage medium storing computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of: acquiring a current target object moving operation instruction; calculating a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction according to the current target object moving operation instruction and a preset algorithm; according to the moving direction, the moving speed, and the current logical position of the target object Determining a next logical position of the target object; determining a next trend position of the target object according to the moving direction, moving speed, and next logical position of the target object; and determining a next trend position of the target object and a current rendering position of the target object And performing a position gradient picture rendering operation on the target object; wherein the position gradient picture rendering operation triggers generating a plurality of position gradient rendering frames of the target object.
  • the computer readable instructions when executed by the processor, causing the processor to calculate a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction, according to the current target object moving operation instruction and the preset algorithm.
  • the following steps are performed: generating a target object movement model according to the current target object movement operation instruction and a preset algorithm; wherein the target object movement model is used to calculate a moving direction and a moving speed of the target object corresponding to the current target object movement operation instruction.
  • the processor when the computer readable instructions are executed by the processor, causing the processor to perform the step of performing a positional gradient picture rendering operation of the target object in accordance with a next trend position of the target object and a current rendering position of the target object, Perform the following steps: the frame interval of the rendered frame is the rendering interval, the current rendering position and the connection direction of the next trend position are the moving directions, and the rendering position corresponding to each position gradient rendering frame is generated based on the target object moving model, and A position gradient rendering frame that produces the target object at the render position.
  • the processor when the computer readable instructions are executed by the processor, the processor further causes the step of: using when the position difference value of the current rendering position of the target object and the next logical position is greater than the first set value, The next logical position of the target object corrects the current render position of the target object.
  • the computer readable instructions are executed by the processor such that the processor further performs the steps of: setting an initial rendering position of the target object and an initial logical position; and setting according to the initial logical position and the initial target object movement operation instruction The initial trend position of the target object.
  • the processor when the computer readable instructions are executed by the processor, causing the processor to perform the step of determining the next logical position of the target object based on the direction of movement, the speed of movement, and the current logical position of the target object, performing the following steps :
  • the current logical position of the target object is the starting point of the motion
  • the moving model of the target object is the motion parameter
  • the fixed interval time is the motion time
  • the first motion end point of the target object is calculated
  • the first motion end point is set as the next target object. Logical location.
  • the processor when the computer readable instructions are executed by the processor, causing the processor to perform the step of determining the next logical position of the target object based on the direction of movement, the speed of movement, and the current logical position of the target object, performing the following steps : the next logical position of the target object is the motion starting point, the target object moving model is the motion parameter, the preset trend time is the motion time, the second motion end point of the target object is calculated, and the second motion end point is set as the target object. Next trend location.
  • the computer readable instructions are executed by the processor such that the processor performs the frame interval of the rendered frame as the rendering interval, and the current rendering position and the direction of the next trend position are the moving direction, based on the target The object movement model, generating a rendering position corresponding to each position gradient rendering frame, and generating a position gradient rendering frame of the target object at the rendering position, performing the following steps: according to the current rendering position and the connection direction of the next trend position , the next logical position and the target object movement model, the rendering position of the position gradient rendering frame is corrected.
  • the computer readable instructions when executed by the processor, causing the processor to perform a rendering of the position gradient based on the current rendering position and the line direction of the next trend position, the next logical position, and the target object movement model
  • the following steps are performed: at a set time interval, a logical projection position is obtained, wherein the logical projection position is a projection position of a line where the connection of the current logical position and the next trend position of the next logical position is next.
  • the rendering position of the position gradient rendering frame is calculated based on the target object movement model, and the rendering of the adjacent position gradient rendering frame is increased by using the preset increasing coefficient.
  • the spacing between the positions; and when the logical projection position is outside the line connecting the current rendering position and the next trend position, calculating the rendering position of the position gradient rendering frame based on the target object movement model, and reducing the phase using the preset reduction coefficient The position between the rendering positions of the adjacent position gradient rendering frames.
  • the computer readable instructions when executed by the processor, causing the processor to perform a rendering of the position gradient based on the current rendering position and the line direction of the next trend position, the next logical position, and the target object movement model
  • the following steps are performed: at the set time interval, the first connection length of the current rendering position and the next trend position connection line, and the next logical position and the next trend position are connected. a second connection length; and calculating a spacing of the rendering positions of the adjacent position gradient rendering frames according to the length ratio of the first connection length and the second connection length and the target object movement model.
  • ком ⁇ онент can be, but is not limited to being, a process running on a processor, a processor, an object, an executable application, a thread of execution, a program, and/or a computer.
  • a component can be, but is not limited to being, a process running on a processor, a processor, an object, an executable application, a thread of execution, a program, and/or a computer.
  • an application running on a controller and the controller can be a component.
  • One or more components can reside within a process and/or thread of execution, and a component can be located on a computer and/or distributed between two or more computers.
  • Example electronic device 1212 includes, but is not limited to, a wearable device, a headset, a healthcare platform, a personal computer, a server computer, a handheld or laptop device, a mobile device (such as a mobile phone, a personal digital assistant (PDA), media playback) And so on), multiprocessor systems, consumer electronics, small computers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like.
  • Computer readable instructions may be distributed via computer readable media (discussed below).
  • Computer readable instructions may be implemented as program modules, such as functions, objects, application programming interfaces (APIs), data structures, etc. that perform particular tasks or implement particular abstract data types.
  • program modules such as functions, objects, application programming interfaces (APIs), data structures, etc. that perform particular tasks or implement particular abstract data types.
  • APIs application programming interfaces
  • data structures such as lists, etc. that perform particular tasks or implement particular abstract data types.
  • the functionality of the computer readable instructions can be combined or distributed at will in various environments.
  • FIG. 12 illustrates an example of an electronic device 1212 that includes one or more of the screen rendering devices of the present invention.
  • electronic device 1212 includes at least one processing unit 1216 and memory 1218.
  • memory 1218 can be volatile (such as RAM), non-volatile (such as ROM, flash memory, etc.) or some combination of the two. This configuration is illustrated in Figure 12 by dashed line 1214.
  • electronic device 1212 may include additional features and/or functionality.
  • device 1212 may also include additional storage devices (eg, removable and/or non-removable) including, but not limited to, magnetic storage devices, optical storage devices, and the like.
  • additional storage is illustrated by storage device 1220 in FIG.
  • computer readable instructions for implementing one or more embodiments provided herein may be in storage device 1220.
  • Storage device 1220 can also store other computer readable instructions for implementing an operating system, applications, and the like.
  • Computer readable instructions may be loaded into memory 1218 for execution by, for example, processing unit 1216.
  • Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions or other data.
  • Memory 1218 and storage device 1220 are examples of computer storage media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical storage device, magnetic tape cassette, magnetic tape, magnetic disk storage device or other magnetic storage device, Or any other medium that can be used to store desired information and that can be accessed by electronic device 1212. Any such computer storage media may be part of the electronic device 1212.
  • Electronic device 1212 may also include a communication connection 1226 that allows electronic device 1212 to communicate with other devices.
  • Communication connection 1226 may include, but is not limited to, a modem, a network interface card (NIC), an integrated network interface, a radio frequency transmitter/receiver, an infrared port, a USB connection, or other interface for connecting electronic device 1212 to other electronic devices.
  • Communication connection 1226 can include a wired connection or a wireless connection.
  • Communication connection 1226 can transmit and/or receive communication media.
  • Computer readable medium can include a communication medium.
  • Communication media typically embodies computer readable instructions or other data in "modulated data signals" such as carrier waves or other transport mechanisms, and includes any information delivery media.
  • modulated data signal can include a signal that one or more of the signal characteristics are set or changed in such a manner as to encode the information into the signal.
  • the electronic device 1212 can include an input device 1224 such as a keyboard, mouse, pen, voice input device, touch input device, infrared camera, video input device, and/or any other input device.
  • Output device 1222 such as one or more displays, speakers, printers, and/or any other output device, may also be included in device 1212.
  • Input device 1224 and output device 1222 can be coupled to electronic device 1212 via a wired connection, a wireless connection, or any combination thereof.
  • an input device or output device from another electronic device can be used as input device 1224 or output device 1222 of electronic device 1212.
  • the components of electronic device 1212 can be connected by various interconnects, such as a bus.
  • interconnects may include Peripheral Component Interconnect (PCI) (such as Fast PCI), Universal Serial Bus (USB), Firewire (IEEE 1394), optical bus architecture, and the like.
  • PCI Peripheral Component Interconnect
  • USB Universal Serial Bus
  • Firewire IEEE 1394
  • optical bus architecture and the like.
  • the components of electronic device 1212 may be interconnected by a network.
  • memory 1218 can be comprised of multiple physical memory units that are interconnected by a network located in different physical locations.
  • storage devices for storing computer readable instructions may be distributed across a network.
  • electronic device 1230 accessible via network 1228 can store computer readable instructions for implementing one or more embodiments of the present disclosure.
  • the electronic device 1212 can access the electronic device 1230 and download a portion or all of the computer readable instructions for execution.
  • electronic device 1212 can download a plurality of computer readable instructions as needed, or some of the instructions can be executed at electronic device 1212 and some of the instructions can be executed at electronic device 1230.
  • the one or more operations may constitute computer readable instructions stored on one or more computer readable media that, when executed by an electronic device, cause the computing device to perform the operations.
  • the order in which some or all of the operations are described should not be construed as implying that the operations must be sequential. Those skilled in the art will appreciate alternative rankings that have the benefit of this specification. Moreover, it should be understood that not all operations must be present in every embodiment provided herein.
  • Each functional unit in the embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
  • the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

Provided is a picture rendering method, comprising: acquiring a current target object movement operation instruction; according to the current target object movement operation instruction and a pre-set algorithm, calculating a movement direction and movement speed of a target object corresponding to the current target object movement operation instruction; according to the movement direction, movement speed and current logical position of the target object, determining the next logical position of the target object; according to the movement direction, movement speed and next logical position of the target object, determining the next trend position of the target position; and according to the next trend position of the target object and a current rendering position of the target object, performing a positional gradient picture rendering operation of the target object, wherein the positional gradient picture rendering operation is used for generating multiple positional gradient rendering frames of the target object.

Description

画面渲染方法、电子设备及存储介质Picture rendering method, electronic device and storage medium
相关申请的交叉引用Cross-reference to related applications
本申请要求于2017年11月30日提交中国专利局,申请号为201711244459.6、发明名称为“画面渲染方法、装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201711244459.6, entitled "Screen Rendering Method, Apparatus, and Storage Medium", which is incorporated herein by reference. in.
技术领域Technical field
本申请涉及数据处理领域,特别是涉及一种画面渲染方法、电子设备及存储介质。The present application relates to the field of data processing, and in particular, to a picture rendering method, an electronic device, and a storage medium.
背景技术Background technique
帧同步技术是一种网络游戏数据同步技术,其中游戏逻辑(如虚拟人物移动操作指令或虚拟人物技能操作指令等)完全在客户端进行计算,同一游戏下的每个游戏终端通过游戏逻辑帧完成网络游戏数据的同步。在每一个游戏逻辑帧中,每个游戏终端具有相同的初始状态,根据相同的输入数据进行计算,能够得到完全一致的结果,并以此结果作为下一个游戏逻辑帧的初始状态。The frame synchronization technology is a network game data synchronization technology, in which game logic (such as a virtual character moving operation instruction or a virtual character skill operation instruction, etc.) is completely calculated on the client side, and each game terminal in the same game is completed by a game logic frame. Synchronization of online game data. In each game logical frame, each game terminal has the same initial state, and calculation is performed based on the same input data, and a completely consistent result can be obtained, and the result is used as the initial state of the next game logical frame.
这里设定T1至T5为均匀间隔时间段的时间点,如游戏客户端A生成执行时间为T2-T4的逻辑帧,游戏服务器会在T3时刻接收到该逻辑帧,游戏服务器会在T4时刻将该逻辑帧以及T2-T4时刻接收到同一游戏场景中其他游戏客户端的逻辑帧进行打包,然后同步给该游戏场景中的所有游戏客户端,最后所有游戏客户端在T5时刻同时执行上述逻辑帧,并进行游戏画面渲染。Here, T1 to T5 are set as the time points of the evenly spaced time period. For example, game client A generates a logical frame with an execution time of T2-T4, and the game server receives the logical frame at time T3, and the game server will be at time T4. The logical frame and the T2-T4 time receive logical frames of other game clients in the same game scene, and then synchronize to all game clients in the game scene, and finally all game clients simultaneously execute the above logical frame at time T5. And play the game screen.
由于上述逻辑帧会严格按照时间轴依次执行,如某个游戏客户端的网络环境发生抖动,则很难保证该游戏客户端可在T5时刻完整接收到上述逻辑帧。因此为了保证游戏的流畅运行,现有的帧同步技术往往会对接收到的逻辑帧进行缓冲操作,即上述逻辑帧会延迟A时间执行,即游戏客户端会在(T5+A)时刻执行上述逻辑帧,这样即使游戏客户端的网络环境发生抖动,通过A时间的缓冲,也能较好的保证游戏在所有游戏客户端的流畅运行。Since the above logical frames are executed strictly in accordance with the time axis, such as the jitter of the network environment of a game client, it is difficult to ensure that the game client can completely receive the above logical frame at time T5. Therefore, in order to ensure the smooth running of the game, the existing frame synchronization technology often buffers the received logical frame, that is, the above logical frame is delayed by A time execution, that is, the game client performs the above at (T5+A) time. Logical frames, so that even if the network environment of the game client is jittery, the A time buffer can better ensure the smooth running of the game on all game clients.
但是上述延迟A时间的设置虽然可以保证游戏的流畅运行,但是如A设置的较大,用户游戏操作时的手感延迟也会增大,即用户会感觉游戏操作有延迟感。However, although the above-mentioned setting of the delay A time can ensure the smooth running of the game, if the setting of A is large, the delay of the user's game operation is also increased, that is, the user feels that the game operation has a feeling of delay.
发明内容Summary of the invention
根据本申请的各种实施例提供一种画面渲染方法、电子设备及存储介质。A picture rendering method, an electronic device, and a storage medium are provided according to various embodiments of the present application.
一种画面渲染方法,由电子设备执行,所述电子设备包括存储器和处理器所述方法包括:A picture rendering method is performed by an electronic device, the electronic device comprising a memory and a processor, the method comprising:
获取当前目标对象移动操作指令;Obtaining a current target object moving operation instruction;
根据所述当前目标对象移动操作指令以及预设算法,计算所述当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度;Calculating a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction according to the current target object moving operation instruction and a preset algorithm;
根据所述目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置;Determining a next logical position of the target object according to the moving direction, the moving speed, and the current logical position of the target object;
根据所述目标对象的移动方向、移动速度和下一逻辑位置,确定目标对象的下一趋势位置;以及Determining a next trend position of the target object according to the moving direction, the moving speed, and the next logical position of the target object;
根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行所述目标对象的位置渐变画面渲染操作;其中,所述位置渐变画面渲染操作触发生成所述目标对象的多个位置渐变渲染帧。Performing a position gradient picture rendering operation of the target object according to a next trend position of the target object and a current rendering position of the target object; wherein the position gradient picture rendering operation triggers generating a plurality of position gradient rendering frames of the target object .
一种电子设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:An electronic device comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor, such that the processor performs the following steps:
获取当前目标对象移动操作指令;Obtaining a current target object moving operation instruction;
根据所述当前目标对象移动操作指令以及预设算法,计算所述当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度;Calculating a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction according to the current target object moving operation instruction and a preset algorithm;
根据所述目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置;Determining a next logical position of the target object according to the moving direction, the moving speed, and the current logical position of the target object;
根据所述目标对象的移动方向、移动速度和下一逻辑位置,确定目标对象的下一趋势位置;以及Determining a next trend position of the target object according to the moving direction, the moving speed, and the next logical position of the target object;
根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行所述 目标对象的位置渐变画面渲染操作;其中,所述位置渐变画面渲染操作触发生成所述目标对象的多个位置渐变渲染帧。Performing a position gradient picture rendering operation of the target object according to a next trend position of the target object and a current rendering position of the target object; wherein the position gradient picture rendering operation triggers generating a plurality of position gradient rendering frames of the target object .
一种非易失性的计算机可读存储介质,存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:A non-transitory computer readable storage medium storing computer readable instructions, when executed by one or more processors, causes the one or more processors to perform the following steps:
获取当前目标对象移动操作指令;Obtaining a current target object moving operation instruction;
根据所述当前目标对象移动操作指令以及预设算法,计算所述当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度;Calculating a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction according to the current target object moving operation instruction and a preset algorithm;
根据所述目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置;Determining a next logical position of the target object according to the moving direction, the moving speed, and the current logical position of the target object;
根据所述目标对象的移动方向、移动速度和下一逻辑位置,确定目标对象的下一趋势位置;以及Determining a next trend position of the target object according to the moving direction, the moving speed, and the next logical position of the target object;
根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行所述目标对象的位置渐变画面渲染操作;其中,所述位置渐变画面渲染操作触发生成所述目标对象的多个位置渐变渲染帧。Performing a position gradient picture rendering operation of the target object according to a next trend position of the target object and a current rendering position of the target object; wherein the position gradient picture rendering operation triggers generating a plurality of position gradient rendering frames of the target object .
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。Details of one or more embodiments of the present application are set forth in the accompanying drawings and description below. Other features, objects, and advantages of the invention will be apparent from the description and appended claims.
附图说明DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings to be used in the embodiments will be briefly described below. Obviously, the drawings in the following description are only some embodiments of the present application, Those skilled in the art can also obtain other drawings based on these drawings without any creative work.
图1为本申请一个实施例中画面渲染方法的流程图;1 is a flowchart of a method for rendering a picture in an embodiment of the present application;
图2为本申请一个实施例中画面渲染方法的流程图;2 is a flowchart of a method for rendering a picture in an embodiment of the present application;
图3为本申请一个实施例中渲染位置修正步骤的流程图;3 is a flowchart of a rendering position correction step in an embodiment of the present application;
图4为本申请一个实施例中渲染位置修正示意图;4 is a schematic diagram of rendering position correction in an embodiment of the present application;
图5为本申请一个实施例中渲染位置修正的步骤的流程图;FIG. 5 is a flowchart of steps of rendering position correction in an embodiment of the present application; FIG.
图6为本申请一个实施例中渲染位置修正示意图;6 is a schematic diagram of rendering position correction in an embodiment of the present application;
图7为本申请一个实施例中画面渲染装置的结构示意图;FIG. 7 is a schematic structural diagram of a screen rendering apparatus according to an embodiment of the present application; FIG.
图8为本申请一个实施例中画面渲染装置的结构示意图;FIG. 8 is a schematic structural diagram of a screen rendering apparatus according to an embodiment of the present application; FIG.
图9为本申请一个实施例中画面渲染装置中的位置渐变画面渲染模块的结构示意图;FIG. 9 is a schematic structural diagram of a position gradient picture rendering module in a picture rendering apparatus according to an embodiment of the present application;
图10为本申请一个实施例中画面渲染装置中的位置渐变画面渲染模块的结构示意图;FIG. 10 is a schematic structural diagram of a position gradient picture rendering module in a picture rendering apparatus according to an embodiment of the present application;
图11为本申请一个实施例中目标对象的逻辑位置、渲染位置以及趋势位置的变化示意图;11 is a schematic diagram showing changes in a logical position, a rendering position, and a trend position of a target object in an embodiment of the present application;
图12为本申请的画面渲染装置所在的电子设备的工作环境结构示意图。FIG. 12 is a schematic structural diagram of a working environment of an electronic device in which a picture rendering device of the present application is located.
具体实施方式Detailed ways
请参照图式,其中相同的组件符号代表相同的组件,本发明的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本发明具体实施例,其不应被视为限制本发明未在此详述的其它具体实施例。Referring to the drawings, wherein like reference numerals refer to the same components, the principles of the invention are illustrated in the context of a suitable computing environment. The following description is based on the specific embodiments of the invention, which are not to be construed as limiting the invention.
在以下的说明中,本发明的具体实施例将参考由一部或多部计算机所执行之作业的步骤及符号来说明,除非另有述明。因此,其将可了解到这些步骤及操作,其中有数次提到为由计算机执行,包括了由代表了以一结构化型式中的数据之电子信号的计算机处理单元所操纵。此操纵转换该数据或将其维持在该计算机之内存系统中的位置处,其可重新配置或另外以本领域技术人员所熟知的方式来改变该计算机之运作。该数据所维持的数据结构为该内存之实体位置,其具有由该数据格式所定义的特定特性。但是,本发明原理以上述文字来说明,其并不代表为一种限制,本领域技术人员将可了解到以下所述的多种步骤及操作亦可实施在硬件当中。In the following description, the specific embodiments of the present invention will be described with reference to the steps and symbols of the operations performed by one or more computers, unless otherwise stated. Thus, it will be appreciated that these steps and operations, several of which are referred to as being performed by a computer, include manipulation by a computer processing unit that represents an electronic signal of data in a structured version. This manipulation converts the data or maintains it at a location in the memory system of the computer, which can be reconfigured or otherwise alter the operation of the computer in a manner well known to those skilled in the art. The data structure maintained by the data is the physical location of the memory, which has specific characteristics defined by the data format. However, the principles of the present invention are described in the above text, which is not intended to be a limitation, and those skilled in the art will appreciate that the various steps and operations described below can also be implemented in hardware.
本发明的画面渲染方法以及画面渲染装置可设置在任何的电子设备中,用于对游戏终端的游戏画面进行渲染操作。该电子设备包括但不限于可穿戴设备、头戴设备、医疗健康平台、个人计算机、服务器计算机、手持式或膝上型设备、移动设备(比如移动电话、个人数字助理(PDA)、媒体播放器等等)、多处理器系统、消费型电子设备、小型计算机、大型计算机、包括上述任意系统或设备的分布式计算环境,等等。该画面渲染装置优选为个人移动设备 终端。本发明的画面渲染方法及画面渲染装置通过位置渐变画面渲染操作,即插值渲染操作的方式,最大程度的保证了用户游戏操作的即时执行,消除了用户游戏操作时的手感延迟,同时还可以较好的应对网络环境的抖动,保证了游戏在所有游戏客户端的流畅运行。The picture rendering method and the picture rendering apparatus of the present invention may be provided in any electronic device for performing a rendering operation on a game screen of the game terminal. The electronic device includes, but is not limited to, a wearable device, a headset, a healthcare platform, a personal computer, a server computer, a handheld or laptop device, a mobile device (such as a mobile phone, a personal digital assistant (PDA), a media player) And so on), multiprocessor systems, consumer electronics, small computers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The picture rendering device is preferably a personal mobile device terminal. The screen rendering method and the screen rendering device of the present invention ensure the immediate execution of the user's game operation by the positional gradient screen rendering operation, that is, the interpolation rendering operation, thereby eliminating the delay of the user's game operation and simultaneously A good response to the jitter of the network environment ensures that the game runs smoothly on all game clients.
请参照图1,图1为本申请一个实施例中画面渲染方法的流程图,本实施例的画面渲染方法可使用上述的电子设备进行实施,本实施例的画面渲染方法包括:Please refer to FIG. 1. FIG. 1 is a flowchart of a method for rendering a picture in an embodiment of the present application. The picture rendering method in this embodiment may be implemented by using the foregoing electronic device.
步骤S101,获取当前目标对象移动操作指令。Step S101: Acquire a current target object movement operation instruction.
步骤S102,根据当前目标对象移动操作指令以及预设算法,计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度。Step S102, calculating a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction according to the current target object moving operation instruction and the preset algorithm.
步骤S103,根据目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置。Step S103, determining a next logical position of the target object according to the moving direction, the moving speed, and the current logical position of the target object.
步骤S104,根据目标对象的移动方向、移动速度和下一逻辑位置,确定目标对象的下一趋势位置。Step S104, determining a next trend position of the target object according to the moving direction, the moving speed, and the next logical position of the target object.
步骤S105,根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行目标对象的位置渐变画面渲染操作;其中,位置渐变画面渲染操作触发生成目标对象的多个位置渐变渲染帧。Step S105: Perform a position gradient picture rendering operation of the target object according to the next trend position of the target object and the current rendering position of the target object; wherein the position gradient picture rendering operation triggers generating a plurality of position gradient rendering frames of the target object.
下面详细说明本实施例的画面渲染方法的游戏画面渲染过程。The game screen rendering process of the screen rendering method of the present embodiment will be described in detail below.
在一个实施例中,在步骤S101中,电子设备(也可称作个人移动设备终端)接收终端用户发出的当前目标对象移动操作指令。该当前目标对象移动操作指令是指用户控制目标对象移动的指令。如这里为帧同步网络游戏,则该当前目标对象移动操作指令需要包括目标对象的移动方向、目标对象的移动速度以及对应的逻辑帧的设定执行时间(该设定执行时间与实际执行时间不一定相同,但是所有的逻辑帧必须严格按照逻辑帧的设定执行时间进行目标对象逻辑位置的设定)。相邻逻辑帧的设定执行时间的间隔应该是相同的。这里的目标对象可为游戏应用画面中的虚拟人物等。In one embodiment, in step S101, the electronic device (also referred to as a personal mobile device terminal) receives a current target object movement operation instruction issued by the terminal user. The current target object movement operation instruction refers to an instruction that the user controls the movement of the target object. For example, here is a frame synchronization network game, the current target object movement operation instruction needs to include a moving direction of the target object, a moving speed of the target object, and a set execution time of the corresponding logical frame (the set execution time and the actual execution time are not It must be the same, but all logical frames must be set in accordance with the set execution time of the logical frame to set the logical position of the target object). The interval between setting execution times of adjacent logical frames should be the same. The target object here may be a virtual character or the like in the game application screen.
这里的当前目标对象移动操作指令可以直接包括目标对象的移动方向以及移动速度,如目标对象按正北方向以每秒10厘米的速度进行移动。Here, the current target object movement operation instruction may directly include the moving direction of the target object and the moving speed, for example, the target object moves at a speed of 10 cm per second in the true north direction.
该当前目标对象移动操作指令也可以是基于当前目标对象的移动方向的方向调整指令,以及基于当前目标对象的移动速度的速度调整指令,如将目标对象的移动方向顺时针转动10度,将目标对象的移动速度提高10%,或将目标对象移动速度提高100%,在未来3秒钟逐步降低到正常移动速度等。The current target object movement operation instruction may also be a direction adjustment instruction based on the moving direction of the current target object, and a speed adjustment instruction based on the moving speed of the current target object, such as turning the target object's moving direction clockwise by 10 degrees to the target The moving speed of the object is increased by 10%, or the moving speed of the target object is increased by 100%, and gradually reduced to the normal moving speed in the next 3 seconds.
在一个实施例中,该当前目标对象移动操作指令也可仅包括移动方向的调整调取指令以及移动速度的调整调取指令,即个人移动设备终端中已经内设好多种移动方向调整机制,如目标对象释放“位移技能”,则该当前目标对象移动操作指令仅仅执行为执行该位移技能即可。如目标对象释放“回城技能”,则当前目标对象移动操作指令仅仅执行设定时间后,将目标对象的逻辑位置设置会基地原点位置。In an embodiment, the current target object movement operation instruction may also include only an adjustment instruction of the movement direction and an adjustment adjustment instruction of the movement speed, that is, a plurality of movement direction adjustment mechanisms have been set in the personal mobile device terminal, such as The target object releases the "displacement skill", and the current target object movement operation instruction is only executed to execute the displacement skill. If the target object releases the "return to the city skill", the current target object movement operation instruction only sets the logical position of the target object to be the base origin position after executing the set time.
在一个实施例中,在步骤S102中,电电子设备根据步骤S101中获取的当前目标对象移动操作指令以及电子设备个人移动设备终端内设的预设算法,计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度。In an embodiment, in step S102, the electronic device calculates a target corresponding to the current target object movement operation instruction according to the current target object movement operation instruction acquired in step S101 and a preset algorithm set in the electronic device personal mobile device terminal. The direction in which the object moves and the speed at which it moves.
具体的,电子设备根据当前目标对象移动操作指令以及上述预设算法生成目标对象移动模型。也就是通过预设算法执行上述当前目标对象移动操作指令,以获得用于计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度的目标对象移动模型。Specifically, the electronic device generates a target object movement model according to the current target object movement operation instruction and the preset algorithm. That is, the current target object movement operation instruction is executed by a preset algorithm to obtain a target object movement model for calculating a moving direction and a moving speed of the target object corresponding to the current target object movement operation instruction.
由于该当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度不一定固定,因此该目标对象移动模型并非是一个定值,而是包含了目标对象在对应逻辑帧期间的所有移动方向以及在对应逻辑帧期间的所有移动速度的函数。Since the moving direction and the moving speed of the target object corresponding to the current target object moving operation instruction are not necessarily fixed, the target object moving model is not a fixed value, but includes all moving directions of the target object during the corresponding logical frame and A function of all moving speeds during the corresponding logical frame.
在一个实施例中,在步骤S103中,电子设备根据步骤S102获取的目标对象移动模型(即目标对象的移动方向、移动速度)以及目标对象的当前逻辑位置,确定目标对象的下一逻辑位置。这里的目标对象的逻辑位置是指严格按照逻辑帧的设定执行时间对目标对象执行对应的目标对象移动操作指令确定的目标对象的在游戏画面中的位置。In an embodiment, in step S103, the electronic device determines the next logical position of the target object according to the target object movement model acquired in step S102 (ie, the moving direction of the target object, the moving speed) and the current logical position of the target object. The logical position of the target object herein refers to the position in the game screen of the target object determined by the target object movement operation instruction corresponding to the target object in strict accordance with the set execution time of the logical frame.
这样每一逻辑帧对应的逻辑位置,均由上一逻辑帧对应的逻辑位置以及当前逻辑帧的当前目标对象移动操作指令对应的目标对象移动模型来确定。Thus, the logical position corresponding to each logical frame is determined by the logical position corresponding to the previous logical frame and the target object movement model corresponding to the current target object moving operation instruction of the current logical frame.
具体的,电子设备可以目标对象的当前逻辑位置为运动起点,目标对象移动模型为运动参数,固定间隔时间(即相邻逻辑帧的设定执行时间差)为运动时间,计算目标对象的第一运动终点,并将第一运动终点设定为目标对象的下一逻辑位置。Specifically, the electronic device may be the current logical position of the target object as the motion starting point, the target object moving model is the motion parameter, and the fixed interval time (ie, the set execution time difference of the adjacent logical frame) is the motion time, and the first motion of the target object is calculated. End point and set the first motion end point to the next logical position of the target object.
在一个实施例中,在步骤S104中,电子设备根据步骤S102获取的目标对象移动模型(即目标对象的移动方向、移动速度)以及步骤S103获取的目标对象的下一逻辑位置,确定目标对象的下一趋势位置。这里的目标对象的趋势位置是指基于目标对象的下一逻辑位置,并默认下一目标对象移动操作指令与当前目标对象移动操作指令的差异较小的基础上,对目标对象未来的逻辑位置的预测位置。In an embodiment, in step S104, the electronic device determines the target object according to the target object movement model acquired in step S102 (ie, the moving direction and moving speed of the target object) and the next logical position of the target object acquired in step S103. Next trend location. The trend position of the target object herein refers to the next logical position of the target object, and the default logical position of the target object in the future is based on the difference between the next target object movement operation instruction and the current target object movement operation instruction. Forecast location.
这样每一逻辑帧对应的虚拟位置,均有逻辑帧对应的逻辑位置以及逻辑帧的当前目标对象移动操作指令对应的目标对象移动模型来确定。Thus, the virtual position corresponding to each logical frame is determined by the logical position corresponding to the logical frame and the target object movement model corresponding to the current target object moving operation instruction of the logical frame.
具体的,电子设备可以目标对象的下一逻辑位置为运动起点,目标对象移动模型为运动参数,预设趋势时间为运动时间,计算目标对象的第二运动终点,并将第二运动终点设定为目标对象的下一趋势位置。这里的预设趋势时间可根据用户的要求进行调整,只要大于相邻逻辑帧的设定执行时间差,可以对目标对象的运动轨迹进行一定的预测即可。Specifically, the electronic device may set the next logical position of the target object as the motion starting point, the target object movement model as the motion parameter, the preset trend time as the motion time, calculate the second motion end point of the target object, and set the second motion end point. The next trend position for the target object. The preset trend time here can be adjusted according to the requirements of the user. As long as it is greater than the set execution time difference of the adjacent logical frame, the motion track of the target object can be predicted.
在一个实施例中,在步骤S105中,电子设备根据步骤S104获取的目标对象的下一趋势位置以及目标对象的当前渲染位置,进行目标对象的位置渐变画面渲染。In an embodiment, in step S105, the electronic device performs position gradient screen rendering of the target object according to the next trend position of the target object acquired in step S104 and the current rendering position of the target object.
这里的当前渲染位置是指目标对象在当前游戏画面中的渲染位置。由于网络环境抖动等问题,目标对象移动操作指令并非可以严格按照逻辑帧的设定执行时间进行执行,因此可能会导致在110ms时应该执行的目标对象移动操作指令,在120ms时才到达电子设备,这样即使电子设备按该目标对象移动操作指令进行目标对象的画面渲染,也无法实现当前渲染位置与当前逻辑位置严格一致。The current rendering position here refers to the rendering position of the target object in the current game screen. Due to problems such as network environment jitter, the target object movement operation instruction may not be executed strictly according to the set execution time of the logical frame, and thus may cause the target object movement operation instruction to be executed at 110 ms, and the electronic device is reached at 120 ms. In this way, even if the electronic device performs the screen rendering of the target object according to the target object moving operation instruction, the current rendering position cannot be strictly consistent with the current logical position.
但是如当前渲染位置与当前逻辑位置(或下一逻辑位置)差异不大时,由于游戏用户对目标对象的表现位置、重叠碰撞以及打击动作精度等细节的要求不高,游戏用户对上述差异是具有一定容忍度的。因此游戏用户是可以 接受当前渲染位置与当前逻辑位置之间具有一定范围内的差异。However, if the current rendering position is not much different from the current logical position (or the next logical position), since the game user's requirements for the target object's performance position, overlapping collision, and striking motion accuracy are not high, the game user is different for the above difference. Have a certain tolerance. Therefore, the game user can accept a certain range of differences between the current rendering position and the current logical position.
但是在本步骤中,为了使得下一渲染位置和下一逻辑位置之间的差异不会继续增大,电子设备直接根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行目标对象的位置渐变画面渲染操作,即生成目标对象的多个位置渐变渲染帧。However, in this step, in order to prevent the difference between the next rendering position and the next logical position from continuing to increase, the electronic device directly performs the target object according to the next trend position of the target object and the current rendering position of the target object. Position gradient screen rendering operation, that is, generating multiple position gradient rendering frames of the target object.
具体为:以渲染帧的帧间隔为渲染间隔时间,当前渲染位置以及下一趋势位置的连线方向为移动方向,基于目标对象移动模型,生成每个位置渐变渲染帧对应的渲染位置,并在该渲染位置上生成该目标对象的位置渐变渲染帧。这些位置渐变渲染帧可以实现由当前渲染位置至下一趋势位置之间的渲染画面的画面渲染操作。即渲染位置与下一逻辑位置之间的位置差异值一直较小,这样游戏用户还是感觉目标对象以下一逻辑位置为方向,朝着下一趋势位置移动的。Specifically, the frame interval of the rendered frame is the rendering interval time, and the current rendering position and the connection direction of the next trend position are the moving directions. Based on the target object moving model, the rendering position corresponding to each position gradient rendering frame is generated, and The position gradient rendering frame of the target object is generated at the rendering position. These positionally rendered frames can implement a picture rendering operation of the rendered picture from the current rendering position to the next trend position. That is, the position difference value between the rendering position and the next logical position is always small, so that the game user still feels that the following logical position of the target object is the direction and moves toward the next trend position.
如目标对象的当前渲染位置与下一逻辑位置的位置差异值大于一较大的第一设定值,即目标对象的渲染位置与逻辑位置的偏差过大,如采用位置渐变画面渲染操作,则会出现目标对象的移动速度异常,影响游戏用户的体验。这时则可直接以目标对象的下一逻辑位置对目标对象的当前渲染位置进行修正,即使得目标对象在当前目标对象移动操作指令设定的时间点的渲染位置直接跳变到下一逻辑位置,以避免渲染位置与对应的逻辑位置之间的位置差异值过大。For example, if the position difference value between the current rendering position of the target object and the next logical position is greater than a larger first setting value, that is, the deviation between the rendering position of the target object and the logical position is too large, such as using a position gradient screen rendering operation, There will be an abnormal movement speed of the target object, which affects the experience of the game user. At this time, the current rendering position of the target object can be directly corrected by the next logical position of the target object, that is, the target object directly jumps to the next logical position at the rendering position at the time point set by the current target object moving operation instruction. To avoid excessive value difference between the rendering position and the corresponding logical position.
这样即完成本实施例的画面渲染方法的游戏画面渲染过程。This completes the game screen rendering process of the screen rendering method of the present embodiment.
上述实施例中,画面渲染方法不是根据逻辑帧的接收时间进行画面帧的渲染,而是直接根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行位置渐变画面渲染操作,这样在尽量不影响用户体验的基础上,保证了游戏的流畅运行。同时由于不存在游戏运行卡顿的问题,这里也不需要对逻辑帧进行延时缓冲操作,从而消除了用户游戏操作时的手感延迟。In the above embodiment, the picture rendering method does not perform the rendering of the picture frame according to the receiving time of the logical frame, but directly performs the position gradient picture rendering operation according to the next trend position of the target object and the current rendering position of the target object, so as to try to On the basis of not affecting the user experience, the smooth running of the game is guaranteed. At the same time, since there is no problem that the game runs stuck, there is no need to perform a delay buffering operation on the logical frame, thereby eliminating the delay of the user's game operation.
请参照图2,图2为本申请一个实施例中画面渲染方法的流程图,本实施例的画面渲染方法可使用上述的电子设备进行实施,本实施例的画面渲染方法包括:Referring to FIG. 2, FIG. 2 is a flowchart of a method for rendering a picture in an embodiment of the present application. The method for rendering a picture in this embodiment may be implemented by using the foregoing electronic device. The method for rendering a picture in this embodiment includes:
步骤S201,设置目标对象的初始渲染位置以及初始逻辑位置;并根据初始逻辑位置以及初始目标对象移动操作指令,设置目标对象的初始趋势位置;Step S201, setting an initial rendering position of the target object and an initial logical position; and setting an initial trend position of the target object according to the initial logical position and the initial target object moving operation instruction;
步骤S202,获取当前目标对象移动操作指令;Step S202, acquiring a current target object moving operation instruction;
步骤S203,根据当前目标对象移动操作指令以及预设算法,计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度;Step S203, calculating a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction according to the current target object moving operation instruction and the preset algorithm;
步骤S204,根据目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置;Step S204, determining a next logical position of the target object according to the moving direction, the moving speed, and the current logical position of the target object;
步骤S205,根据目标对象的移动方向、移动速度和下一逻辑位置,确定目标对象的下一趋势位置;Step S205, determining a next trend position of the target object according to the moving direction, the moving speed, and the next logical position of the target object;
步骤S206,根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行目标对象的位置渐变画面渲染操作;其中,位置渐变画面渲染操作触发生成目标对象的多个位置渐变渲染帧。Step S206, performing a position gradient picture rendering operation of the target object according to the next trend position of the target object and the current rendering position of the target object; wherein the position gradient picture rendering operation triggers generating a plurality of position gradient rendering frames of the target object.
下面详细说明本实施例的画面渲染方法的游戏画面渲染过程。The game screen rendering process of the screen rendering method of the present embodiment will be described in detail below.
在一个实施例中,在步骤S201中,电子设备设置目标对象的初始渲染位置以及初始逻辑位置,一般目标对象的初始渲染位置以及初始逻辑位置均位于游戏开始画面中的游戏起始位置。In one embodiment, in step S201, the electronic device sets an initial rendering position of the target object and an initial logical position, and the initial rendering position of the general target object and the initial logical position are both located at the game starting position in the game start screen.
随后电子设备获取初始目标对象移动操作指令(即游戏用户发出的第一个目标对象移动操作指令),随后电子设备根据上述初始逻辑位置以及初始目标对象移动操作指令,设置目标对象的初始趋势位置。即以目标对象的初始逻辑位置运动起点,初始目标对象移动操作指令对应的目标对象移动模型为运动参数,预设趋势时间为运动时间,计算目标对象的运动终点,并将该运动终点设定为目标对象的初始趋势位置。The electronic device then acquires an initial target object movement operation instruction (ie, a first target object movement operation instruction issued by the game user), and then the electronic device sets an initial trend position of the target object according to the initial logical position and the initial target object movement operation instruction. That is, the starting point of the initial logical position of the target object is moved, the target object moving model corresponding to the initial target object moving operation instruction is a motion parameter, the preset trend time is the motion time, the motion end point of the target object is calculated, and the motion end point is set to The initial trend position of the target object.
在一个实施例中,在步骤S202中,由于在步骤S201中已经获取了目标对象的初始逻辑位置、初始渲染位置以及初始趋势位置,电子设备后续可接收终端用户发出的当前目标对象移动操作指令。该当前目标对象移动操作指令是指用户控制目标对象移动的指令。具体请参照前述画面渲染方法中的步骤S101。In an embodiment, in step S202, since the initial logical position, the initial rendering position, and the initial trend position of the target object have been acquired in step S201, the electronic device may subsequently receive the current target object movement operation instruction issued by the terminal user. The current target object movement operation instruction refers to an instruction that the user controls the movement of the target object. For details, please refer to step S101 in the foregoing screen rendering method.
在一个实施例中,在步骤S203中,电子设备根据步骤S202中获取的当前目标对象移动操作指令以及电子设备所在个人移动设备终端内设的预设算 法,计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度。In an embodiment, in step S203, the electronic device calculates a target corresponding to the current target object movement operation instruction according to the current target object movement operation instruction acquired in step S202 and a preset algorithm set in the personal mobile device terminal where the electronic device is located. The direction in which the object moves and the speed at which it moves.
具体的,电子设备根据当前目标对象移动操作指令以及上述预设算法生成目标对象移动模型,即通过预设算法执行上述当前目标对象移动操作指令,以获得用于计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度的目标对象移动模型。具体请参照上述画面渲染方法中的步骤S102。Specifically, the electronic device generates a target object movement model according to the current target object movement operation instruction and the preset algorithm, that is, executing the current target object movement operation instruction by using a preset algorithm to obtain a corresponding operation target for calculating the current target object movement operation instruction. The moving direction of the target object and the target object movement model of the moving speed. For details, please refer to step S102 in the above-described screen rendering method.
在一个实施例中,在步骤S204中,电子设备根据步骤S203获取的目标对象移动模型(即目标对象的移动方向、移动速度)以及目标对象的当前逻辑位置,确定目标对象的下一逻辑位置。这里的目标对象的逻辑位置是指严格按照逻辑帧的设定执行时间对目标对象执行对应的目标对象移动操作指令确定的目标对象的在游戏画面中的位置。In an embodiment, in step S204, the electronic device determines the next logical position of the target object according to the target object movement model acquired in step S203 (ie, the moving direction of the target object, the moving speed) and the current logical position of the target object. The logical position of the target object herein refers to the position in the game screen of the target object determined by the target object movement operation instruction corresponding to the target object in strict accordance with the set execution time of the logical frame.
这样每一逻辑帧对应的逻辑位置,均由上一逻辑帧对应的逻辑位置以及当前逻辑帧的当前目标对象移动操作指令对应的目标对象移动模型来确定。具体请参照上述画面渲染方法中的步骤S103。Thus, the logical position corresponding to each logical frame is determined by the logical position corresponding to the previous logical frame and the target object movement model corresponding to the current target object moving operation instruction of the current logical frame. For details, please refer to step S103 in the above-described screen rendering method.
在步骤S205中,电子设备根据步骤S203获取的目标对象移动模型(即目标对象的移动方向、移动速度)以及步骤S204获取的目标对象的下一逻辑位置,确定目标对象的下一趋势位置。这里的目标对象的趋势位置是指基于目标对象的下一逻辑位置,并默认下一目标对象移动操作指令与当前目标对象移动操作指令的差异较小的基础上,对目标对象未来的逻辑位置的预测位置。In step S205, the electronic device determines the next trend position of the target object according to the target object movement model acquired in step S203 (ie, the moving direction of the target object, the moving speed) and the next logical position of the target object acquired in step S204. The trend position of the target object herein refers to the next logical position of the target object, and the default logical position of the target object in the future is based on the difference between the next target object movement operation instruction and the current target object movement operation instruction. Forecast location.
这样每一逻辑帧对应的虚拟位置,均有逻辑帧对应的逻辑位置以及逻辑帧的当前目标对象移动操作指令对应的目标对象移动模型来确定。具体请参照上述画面渲染方法中的步骤S104。Thus, the virtual position corresponding to each logical frame is determined by the logical position corresponding to the logical frame and the target object movement model corresponding to the current target object moving operation instruction of the logical frame. For details, please refer to step S104 in the above-described screen rendering method.
在一个实施例中,在步骤S206中,电子设备根据步骤S205获取的目标对象的下一趋势位置以及目标对象的当前渲染位置,进行目标对象的位置渐变画面渲染。In an embodiment, in step S206, the electronic device performs position gradient screen rendering of the target object according to the next trend position of the target object acquired in step S205 and the current rendering position of the target object.
为了使得下一目标对象移动操作指令对应的当前渲染位置和下一逻辑位置之间的差异不会继续增大,电子设备直接根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行目标对象的位置渐变画面渲染操作,即生 成目标对象的多个位置渐变渲染帧。In order to prevent the difference between the current rendering position and the next logical position corresponding to the next target object moving operation instruction from continuing to increase, the electronic device directly performs the target according to the next trend position of the target object and the current rendering position of the target object. The position of the object is a gradient screen rendering operation, that is, a plurality of position gradient rendering frames of the target object are generated.
具体为:以渲染帧的帧间隔为渲染间隔时间,当前渲染位置以及下一趋势位置的连线方向为移动方向,电子设备基于目标对象移动模型,生成每个位置渐变渲染帧对应的渲染位置,并在该渲染位置上生成该目标对象的位置渐变渲染帧。这些位置渐变渲染帧可以实现由当前渲染位置至下一趋势位置之间的渲染画面的画面渲染操作。即渲染位置与下一逻辑位置之间的位置差异值一直较小,这样游戏用户还是感觉目标对象以下一逻辑位置为方向,朝着下一趋势位置移动的。Specifically, the frame interval of the rendered frame is the rendering interval time, and the current rendering position and the connection direction of the next trend position are moving directions, and the electronic device generates a rendering position corresponding to each position gradient rendering frame based on the target object moving model. And generating a position gradient rendering frame of the target object at the rendering position. These positionally rendered frames can implement a picture rendering operation of the rendered picture from the current rendering position to the next trend position. That is, the position difference value between the rendering position and the next logical position is always small, so that the game user still feels that the following logical position of the target object is the direction and moves toward the next trend position.
在一个实施例中,电子设备还可根据当前渲染位置以及下一趋势位置的连线方向、下一逻辑位置以及目标对象移动模型,对上述位置渐变渲染帧的渲染位置进行修正。请参照图3和图4,图3本申请一个实施例中渲染位置修正步骤的流程图,图4为本申请一个实施例中渲染位置修正示意图。该渲染位置修正步骤的流程包括:In an embodiment, the electronic device may further correct the rendering position of the position gradient rendering frame according to the current rendering position and the connection direction of the next trend position, the next logical position, and the target object movement model. Referring to FIG. 3 and FIG. 4, FIG. 3 is a flowchart of a rendering position correction step in an embodiment of the present application, and FIG. 4 is a schematic diagram of rendering position correction in an embodiment of the present application. The flow of the rendering position correction step includes:
步骤S301,电子设备以设定时间间隔,获取逻辑投影位置,其中逻辑投影位置为下一逻辑位置在当前渲染位置和下一趋势位置的连线所在直线的投影位置。这样可通过逻辑投影位置可获取下一逻辑位置与下一趋势位置的距离,和当前渲染位置与下一趋势位置的距离的差异。Step S301, the electronic device acquires a logical projection position at a set time interval, wherein the logical projection position is a projection position of a line where the connection of the current logical position and the current trend position is the next logical position. In this way, the logical projection position can be used to obtain the distance between the next logical position and the next trend position, and the difference between the current rendering position and the next trend position.
这里的设定时间间隔可为渲染帧的帧间隔时间,以便对每个位置渐变渲染帧的渲染位置进行修正。The set time interval here can be the frame interval time of the rendered frame to correct the rendering position of each position gradient rendered frame.
步骤S302,当逻辑投影位置位于当前渲染位置和下一趋势位置的连线上时,说明当前渲染位置与下一趋势位置之间的距离较大,下一逻辑位置与下一趋势位置之间的距离较小。这时电子设备根据步骤S203获取的目标对象移动模型计算位置渐变渲染帧的渲染位置,随后电子设备使用预设增大系数,增加相邻位置渐变渲染帧的渲染位置之间的间距,使得目标对象的渲染位置和目标对象的逻辑位置以大致相同的速度向下一趋势位置移动。Step S302, when the logical projection position is on the line connecting the current rendering position and the next trend position, indicating that the distance between the current rendering position and the next trend position is larger, and between the next logical position and the next trend position. The distance is small. At this time, the electronic device calculates the rendering position of the position gradient rendering frame according to the target object movement model acquired in step S203, and then the electronic device uses the preset increasing coefficient to increase the spacing between the rendering positions of the adjacent position gradient rendering frames, so that the target object The rendering position and the logical position of the target object move to the next trend position at approximately the same speed.
步骤S303,当逻辑投影位置位于当前渲染位置和下一趋势位置的连线外时,说明当前渲染位置与下一趋势位置之间的距离较小,下一逻辑位置与下一趋势位置之间的具体较大。这时电子设备根据步骤S203获取的目标对象移动模型计算位置渐变渲染帧的渲染位置,随后电子设备使用预设减小系数, 减小相邻位置渐变渲染帧的渲染位置之间的间距,使得目标对象的渲染位置和目标对象的逻辑位置以大致相同的速度向下一趋势位置移动。Step S303, when the logical projection position is outside the line connecting the current rendering position and the next trend position, indicating that the distance between the current rendering position and the next trend position is small, and between the next logical position and the next trend position. Specifically larger. At this time, the electronic device calculates the rendering position of the position gradient rendering frame according to the target object movement model acquired in step S203, and then the electronic device uses the preset reduction coefficient to reduce the spacing between the rendering positions of the adjacent position gradient rendering frames, so that the target The render position of the object and the logical position of the target object move to the next trend position at approximately the same speed.
由于每一个位置渐变渲染帧形成时,均会基于当前位置渐变渲染帧的渲染位置、下一趋势位置以及下一逻辑位置,对下一个位置渐变渲染帧的渲染位置进行计算。因此这里可将预设增大系数和预设减小系数设置为一较小的定值,在游戏用户感知不到目标对象移动速度变化的基础上,使得目标对象的渲染位置与目标对象的逻辑位置尽可能的靠近。当然这里也可根据当前渲染位置与下一趋势位置之间的距离、和下一逻辑位置与下一趋势位置之间的距离的差异,将预设增大系数和预设减小系数设定为一变化值,使得目标对象的渲染位置更加靠近对应的逻辑位置。Since each position gradient rendering frame is formed, the rendering position of the next position gradient rendering frame is calculated based on the rendering position of the current position gradient rendering frame, the next trend position, and the next logical position. Therefore, the preset increase coefficient and the preset reduction coefficient can be set to a small fixed value, and the rendering position of the target object and the logic of the target object are made on the basis that the game user does not perceive the change of the moving speed of the target object. Position as close as possible. Of course, the preset increase coefficient and the preset decrease coefficient may also be set to be based on the difference between the distance between the current rendering position and the next trend position and the distance between the next logical position and the next trend position. A change value causes the target object's rendering position to be closer to the corresponding logical position.
请参照图4,其中当前渲染位置为R1,下一趋势位置为Q1(用于表示渲染位置的移动方向),下一逻辑位置为L1,这里可以R1-Q1连线为Y轴,经过R1的与R1-Q1连线垂直的直线为X轴建立一坐标系。当下一逻辑位置L1在Y轴上的投影位于R1-Q1连线上,即下一逻辑位置L1处于该坐标系的第一、四象限,则表示当前渲染位置R1滞后于下一逻辑位置L1,则需要增加相邻位置渐变渲染帧的渲染位置之间的间距。当下一逻辑位置L1在Y轴上的投影位于R1-Q1连线外,即下一逻辑位置L1处于该坐标系的第二、三象限,则表示当前渲染位置R1超前于下一逻辑位置L1,则需要减小相邻位置渐变渲染帧的渲染位置之间的间距。Please refer to FIG. 4, where the current rendering position is R1, the next trend position is Q1 (used to indicate the moving direction of the rendering position), and the next logical position is L1, where R1-Q1 can be connected to the Y-axis, after R1 A line perpendicular to the line R1-Q1 establishes a coordinate system for the X axis. When the projection of the next logical position L1 on the Y axis is on the R1-Q1 line, that is, the next logical position L1 is in the first and fourth quadrants of the coordinate system, it indicates that the current rendering position R1 lags behind the next logical position L1. You need to increase the spacing between the rendering positions of the adjacent position gradient rendered frames. When the projection of the next logical position L1 on the Y axis is outside the R1-Q1 connection, that is, the next logical position L1 is in the second and third quadrants of the coordinate system, it indicates that the current rendering position R1 is ahead of the next logical position L1, You need to reduce the spacing between the rendering positions of the adjacent position gradient rendered frames.
通过对每个位置渐变渲染帧的渲染位置的修正,电子设备尽量让当前渲染位置和当前逻辑位置的位置差异保持在一个可接受的范围内,具体的预设增大系数和预设减小系数可根据游戏类型和网络状况进行调整。By correcting the rendering position of the gradient rendering frame for each position, the electronic device tries to keep the position difference between the current rendering position and the current logical position within an acceptable range, the specific preset increasing coefficient and the preset reducing coefficient. It can be adjusted according to the type of game and network conditions.
请参照图5,图5为本申请一个实施例中渲染位置修正的步骤的流程图,图6为本申请一个实施例中渲染位置修正示意图。该渲染位置修正步骤的流程包括:Please refer to FIG. 5. FIG. 5 is a flowchart of a step of rendering position correction in an embodiment of the present application, and FIG. 6 is a schematic diagram of rendering position correction in an embodiment of the present application. The flow of the rendering position correction step includes:
步骤S501,电子设备以设定时间间隔,获取当前渲染位置和下一趋势位置连线的第一连线长度、以及下一逻辑位置和下一趋势位置连线的第二连线长度。这样可通过第一连线长度和第二连线长度的差异,获取下一逻辑位置与下一趋势位置的距离,和当前渲染位置与下一趋势位置的距离的差异。Step S501: The electronic device acquires, at a set time interval, a first connection length of a current rendering position and a next trend position connection, and a second connection length of a connection between the next logical position and the next trend position. In this way, the difference between the distance between the next logical position and the next trend position and the distance between the current rendering position and the next trend position can be obtained by the difference between the length of the first connection line and the length of the second connection line.
这里的设定时间间隔可为渲染帧的帧间隔时间,以便对每个位置渐变渲染帧的渲染位置进行修正。The set time interval here can be the frame interval time of the rendered frame to correct the rendering position of each position gradient rendered frame.
步骤S502,电子设备根据第一连线长度和第二连线长度的长度比值以及目标对象移动模型,计算相邻位置渐变渲染帧的渲染位置的间距。Step S502, the electronic device calculates the spacing of the rendering positions of the adjacent position gradient rendering frames according to the length ratio of the first connection length and the second connection length and the target object movement model.
当第一连线长度大于第二连线长度时,说明当前渲染位置与下一趋势位置之间的距离较大,下一逻辑位置与下一趋势位置之间的距离较小。这时电子设备根据步骤S203获取的目标对象移动模型计算位置渐变渲染帧的渲染位置,随后电子设备使用第一连线长度和第二连线长度的长度比值为增大系数,增加相邻位置渐变渲染帧的渲染位置之间的间距,使得目标对象的渲染位置和目标对象的逻辑位置以大致相同的速度向下一趋势位置移动。When the length of the first connection is greater than the length of the second connection, the distance between the current rendering position and the next trend position is larger, and the distance between the next logical position and the next trend position is smaller. At this time, the electronic device calculates the rendering position of the position gradient rendering frame according to the target object movement model acquired in step S203, and then the electronic device uses the length ratio of the first connection length and the second connection length as an increase coefficient to increase the adjacent position gradient. The spacing between the rendered positions of the rendered frames is such that the rendering position of the target object and the logical position of the target object move to the next trend position at approximately the same speed.
当第一连线长度小于第二连线长度时,说明当前渲染位置与下一趋势位置之间的距离较小,下一逻辑位置与下一趋势位置之间的距离较大。这时电子设备根据步骤S203获取的目标对象移动模型计算位置渐变渲染帧的渲染位置,随后电子设备使用第一连线长度和第二连线长度的长度比值为减小系数,减小相邻位置渐变渲染帧的渲染位置之间的间距,使得目标对象的渲染位置和目标对象的逻辑位置以大致相同的速度向下一趋势位置移动。When the length of the first connection is smaller than the length of the second connection, it indicates that the distance between the current rendering position and the next trend position is small, and the distance between the next logical position and the next trend position is large. At this time, the electronic device calculates the rendering position of the position gradient rendering frame according to the target object movement model acquired in step S203, and then the electronic device uses the length ratio of the first connection length and the second connection length as a reduction coefficient to reduce the adjacent position. The spacing between the rendering positions of the gradient rendered frames is such that the rendering position of the target object and the logical position of the target object move to the next trend position at approximately the same speed.
由于每一个位置渐变渲染帧形成时,均会基于当前位置渐变渲染帧的渲染位置、下一趋势位置以及下一逻辑位置,对下一个位置渐变渲染帧的渲染位置进行计算。因此这里根据第一连线长度和第二连线长度的长度比值来设定增大系数以及减小系数,使得目标对象的渲染位置更加靠近对应的逻辑位置。Since each position gradient rendering frame is formed, the rendering position of the next position gradient rendering frame is calculated based on the rendering position of the current position gradient rendering frame, the next trend position, and the next logical position. Therefore, the increase coefficient and the reduction coefficient are set here according to the length ratio of the first connection length and the second connection length, so that the rendering position of the target object is closer to the corresponding logical position.
请参照图6,其中当前渲染位置为R2,下一趋势位置为Q2(用于表示渲染位置的移动方向),下一逻辑位置为L2。这里电子设备将R2-Q2连线的连线长度设定为第一连线长度,将L2-Q2连线的连线长度设定为第二连线长度。当第一连线长度大于第二连线长度,则表示当前渲染位置R2滞后于下一逻辑位置L2,则需要根据第一连线长度和第二连线长度的长度比值来设定增大系数,以增加相邻位置渐变渲染帧的渲染位置之间的间距。当第一连线长度小于第二连线长度,则表示当前渲染位置R2超前于下一逻辑位置L2,则需要根据第一连线长度和第二连线长度的长度比值来设定减小系数,以减小相邻 位置渐变渲染帧的渲染位置之间的间距。Please refer to FIG. 6 , where the current rendering position is R2, the next trend position is Q2 (used to indicate the moving direction of the rendering position), and the next logical position is L2. Here, the electronic device sets the length of the connection of the R2-Q2 connection to the length of the first connection, and sets the length of the connection of the L2-Q2 connection to the length of the second connection. When the length of the first connection is greater than the length of the second connection, it indicates that the current rendering position R2 lags behind the next logical position L2, and the increase coefficient needs to be set according to the length ratio of the first connection length and the second connection length. To increase the spacing between render positions of progressively rendered frames in adjacent positions. When the length of the first connection is smaller than the length of the second connection, it indicates that the current rendering position R2 is ahead of the next logical position L2, and the reduction coefficient needs to be set according to the length ratio of the first connection length and the second connection length. To reduce the spacing between render positions of progressively rendered frames in adjacent positions.
通过对每个位置渐变渲染帧的渲染位置的修正,电子设备尽量让当前渲染位置和当前逻辑位置的位置差异保持在一个可接受的范围内,具体的增大系数和减小系数可根据游戏类型和网络状况进行调整。By correcting the rendering position of the gradient rendering frame for each position, the electronic device tries to keep the position difference between the current rendering position and the current logical position within an acceptable range, and the specific increase coefficient and reduction coefficient may be according to the game type. Adjust with network conditions.
如目标对象的当前渲染位置与下一逻辑位置的位置差异值大于一较大的第一设定值,即目标对象的渲染位置与逻辑位置的偏差过大,如采用位置渐变画面渲染操作,则会出现目标对象的移动速度异常,影响游戏用户的体验。这时则可直接以目标对象的下一逻辑位置对目标对象的当前渲染位置进行修正,即使得目标对象在当前目标对象移动操作指令设定的时间点的渲染位置直接跳变到下一逻辑位置,以避免渲染位置与对应的逻辑位置之间的位置差异值过大。For example, if the position difference value between the current rendering position of the target object and the next logical position is greater than a larger first setting value, that is, the deviation between the rendering position of the target object and the logical position is too large, such as using a position gradient screen rendering operation, There will be an abnormal movement speed of the target object, which affects the experience of the game user. At this time, the current rendering position of the target object can be directly corrected by the next logical position of the target object, that is, the target object directly jumps to the next logical position at the rendering position at the time point set by the current target object moving operation instruction. To avoid excessive value difference between the rendering position and the corresponding logical position.
这样即完成了本实施例的画面渲染方法的游戏画面渲染过程。This completes the game screen rendering process of the screen rendering method of the present embodiment.
上述实施例中的画面渲染方法还可基于当前渲染位置以及下一趋势位置的连线方向、下一逻辑位置以及目标对象移动模型对每个位置渐变渲染帧的渲染位置进行修正,使得在游戏用户不察觉的情况下,将目标对象的渲染位置更加靠近对应的逻辑位置,进一步提高了目标对象的游戏画面渲染的准确性。The picture rendering method in the above embodiment may further correct the rendering position of each position gradient rendering frame based on the current rendering position and the connection direction of the next trend position, the next logical position, and the target object movement model, so that the game user is Unconsciously, the rendering position of the target object is closer to the corresponding logical position, which further improves the accuracy of the rendering of the game image of the target object.
请参照图7,图7为本申请一个实施例中画面渲染装置的结构示意图,其中,画面渲染装置70包括移动操作指令获取模块71、目标对象移动模型生成模块72、下一逻辑位置确定模块73、下一趋势位置确定模块74、位置渐变画面渲染模块75以及渲染位置修正模块76。Please refer to FIG. 7. FIG. 7 is a schematic structural diagram of a screen rendering apparatus according to an embodiment of the present disclosure. The screen rendering apparatus 70 includes a mobile operation instruction acquiring module 71, a target object movement model generating module 72, and a next logical position determining module 73. The next trend position determining module 74, the position gradient screen rendering module 75, and the rendering position correction module 76.
移动操作指令获取模块71用于获取当前目标对象移动操作指令;目标对象移动模型生成模块72用于根据当前目标对象移动操作指令以及预设算法,计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度;具体的,目标对象移动模型生成模块72用于根据当前目标对象移动操作指令以及上述预设算法生成目标对象移动模型,其中目标对象移动模型用于计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度;下一逻辑位置确定模块73用于根据目标对象的移动方向、移动速度和当前逻辑位 置,确定目标对象的下一逻辑位置;下一趋势位置确定模块74用于根据目标对象的移动方向、移动速度和下一逻辑位置,确定目标对象的下一趋势位置;位置渐变画面渲染模块75用于根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行目标对象的位置渐变画面渲染操作;其中,位置渐变画面渲染操作触发生成所述目标对象的多个位置渐变渲染帧;渲染位置修正模块76用于当目标对象的当前渲染位置与下一逻辑位置的位置差异值大于第一设定值时,则使用目标对象的下一逻辑位置对目标对象的当前渲染位置进行修正。The movement operation instruction acquisition module 71 is configured to acquire a current target object movement operation instruction; the target object movement model generation module 72 is configured to calculate the movement of the target object corresponding to the current target object movement operation instruction according to the current target object movement operation instruction and the preset algorithm. And a target object movement model generating module 72, configured to generate a target object movement model according to the current target object movement operation instruction and the preset algorithm, wherein the target object movement model is used to calculate a current target object movement operation instruction correspondingly The moving direction of the target object and the moving speed; the next logical position determining module 73 is configured to determine the next logical position of the target object according to the moving direction, the moving speed and the current logical position of the target object; the next trend position determining module 74 Determining a next trend position of the target object according to the moving direction, the moving speed, and the next logical position of the target object; the position gradient picture rendering module 75 is configured to use the next trend position of the target object and the current rendering position of the target object a position gradient screen rendering operation of the target object; wherein the position gradient screen rendering operation triggers generating a plurality of position gradient rendering frames of the target object; the rendering position correction module 76 is configured to use the current rendering position of the target object and the next logic When the position difference value of the position is greater than the first set value, the current rendering position of the target object is corrected using the next logical position of the target object.
本实施例的画面渲染装置70使用时,首先移动操作指令获取模块71接收终端用户发出的当前目标对象移动操作指令。该当前目标对象移动操作指令是指用户控制目标对象移动的指令。如这里为帧同步网络游戏,则该当前目标对象移动操作指令需要包括目标对象的移动方向、目标对象的移动速度以及对应的逻辑帧的设定执行时间(该设定执行时间与实际执行时间不一定相同,但是所有的逻辑帧必须严格按照逻辑帧的设定执行时间进行目标对象逻辑位置的设定)。相邻逻辑帧的设定执行时间的间隔应该是相同的。这里的目标对象可为游戏应用画面中的虚拟人物等。When the screen rendering device 70 of the present embodiment is used, the first mobile operation instruction acquisition module 71 receives the current target object movement operation instruction issued by the terminal user. The current target object movement operation instruction refers to an instruction that the user controls the movement of the target object. For example, here is a frame synchronization network game, the current target object movement operation instruction needs to include a moving direction of the target object, a moving speed of the target object, and a set execution time of the corresponding logical frame (the set execution time and the actual execution time are not It must be the same, but all logical frames must be set in accordance with the set execution time of the logical frame to set the logical position of the target object). The interval between setting execution times of adjacent logical frames should be the same. The target object here may be a virtual character or the like in the game application screen.
这里的当前目标对象移动操作指令可以直接包括目标对象的移动方向以及移动速度,如目标对象按正北方向以每秒10厘米的速度进行移动。Here, the current target object movement operation instruction may directly include the moving direction of the target object and the moving speed, for example, the target object moves at a speed of 10 cm per second in the true north direction.
该当前目标对象移动操作指令也可以是基于当前目标对象的移动方向的方向调整指令,以及基于当前目标对象的移动速度的速度调整指令,如将目标对象的移动方向顺时针转动10度,将目标对象的移动速度提高10%,或将目标对象移动速度提高100%,在未来3秒钟逐步降低到正常移动速度等。The current target object movement operation instruction may also be a direction adjustment instruction based on the moving direction of the current target object, and a speed adjustment instruction based on the moving speed of the current target object, such as turning the target object's moving direction clockwise by 10 degrees to the target The moving speed of the object is increased by 10%, or the moving speed of the target object is increased by 100%, and gradually reduced to the normal moving speed in the next 3 seconds.
在一个实施例中,该当前目标对象移动操作指令也可仅包括移动方向的调整调取指令以及移动速度的调整调取指令,即个人移动设备终端中已经内设好多种移动方向调整机制,如目标对象释放“位移技能”,则该当前目标对象移动操作指令仅仅执行为执行该位移技能即可。如目标对象释放“回城技能”,则当前目标对象移动操作指令仅仅执行设定时间后,将目标对象的逻辑位置设置会基地原点位置。In an embodiment, the current target object movement operation instruction may also include only an adjustment instruction of the movement direction and an adjustment adjustment instruction of the movement speed, that is, a plurality of movement direction adjustment mechanisms have been set in the personal mobile device terminal, such as The target object releases the "displacement skill", and the current target object movement operation instruction is only executed to execute the displacement skill. If the target object releases the "return to the city skill", the current target object movement operation instruction only sets the logical position of the target object to be the base origin position after executing the set time.
随后目标对象移动模型生成模块72根据移动操作指令获取模块71获取 的当前目标对象移动操作指令以及画面渲染装置所在个人移动设备终端内设的预设算法,计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度。The target object movement model generation module 72 then calculates the current target object movement operation instruction acquired by the movement operation instruction acquisition module 71 and the preset algorithm set in the personal mobile device terminal where the screen rendering device is located, and calculates the target object corresponding to the current target object movement operation instruction. The direction of movement and the speed of movement.
具体的,目标对象移动模型生成模块72根据当前目标对象移动操作指令以及上述预设算法生成目标对象移动模型,即通过预设算法执行上述当前目标对象移动操作指令,以获得用于计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度的目标对象移动模型。Specifically, the target object movement model generating module 72 generates a target object movement model according to the current target object movement operation instruction and the preset algorithm, that is, executing the current target object movement operation instruction by using a preset algorithm to obtain a current target object for calculation. The moving direction of the target object corresponding to the movement operation command and the target object movement model of the moving speed.
由于该当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度不一定固定,因此该目标对象移动模型并非是一个定值,而是包含了目标对象在对应逻辑帧期间的所有移动方向以及在对应逻辑帧期间的所有移动速度的函数。Since the moving direction and the moving speed of the target object corresponding to the current target object moving operation instruction are not necessarily fixed, the target object moving model is not a fixed value, but includes all moving directions of the target object during the corresponding logical frame and A function of all moving speeds during the corresponding logical frame.
然后下一逻辑位置确定模块73根据目标对象移动模型生成模块72获取的目标对象移动模型(即目标对象的移动方向、移动速度)以及目标对象的当前逻辑位置,确定目标对象的下一逻辑位置。这里的目标对象的逻辑位置是指严格按照逻辑帧的设定执行时间对目标对象执行对应的目标对象移动操作指令确定的目标对象的在游戏画面中的位置。The next logical position determining module 73 then determines the next logical position of the target object based on the target object movement model acquired by the target object movement model generation module 72 (ie, the moving direction of the target object, the moving speed) and the current logical position of the target object. The logical position of the target object herein refers to the position in the game screen of the target object determined by the target object movement operation instruction corresponding to the target object in strict accordance with the set execution time of the logical frame.
这样每一逻辑帧对应的逻辑位置,均由上一逻辑帧对应的逻辑位置以及当前逻辑帧的当前目标对象移动操作指令对应的目标对象移动模型来确定。Thus, the logical position corresponding to each logical frame is determined by the logical position corresponding to the previous logical frame and the target object movement model corresponding to the current target object moving operation instruction of the current logical frame.
具体的,下一逻辑位置确定模块73可以目标对象的当前逻辑位置为运动起点,目标对象移动模型为运动参数,固定间隔时间(即相邻逻辑帧的设定执行时间差)为运动时间,计算目标对象的第一运动终点,并将第一运动终点设定为目标对象的下一逻辑位置。Specifically, the next logical position determining module 73 may be the current logical position of the target object as the motion starting point, the target object moving model as the motion parameter, and the fixed interval time (ie, the set execution time difference of the adjacent logical frame) is the motion time, and the calculation target is calculated. The first motion end point of the object and the first motion end point is set to the next logical position of the target object.
随后下一趋势位置确定模块74根据目标对象移动模型生成模块72获取的目标对象移动模型(即目标对象的移动方向、移动速度)以及下一逻辑位置确定模块73获取的目标对象的下一逻辑位置,确定目标对象的下一趋势位置。这里的目标对象的趋势位置是指基于目标对象的下一逻辑位置,并默认下一目标对象移动操作指令与当前目标对象移动操作指令的差异较小的基础上,对目标对象未来的逻辑位置的预测位置。Then, the next trend position determining module 74 according to the target object movement model acquired by the target object movement model generating module 72 (ie, the moving direction of the target object, the moving speed) and the next logical position of the target object acquired by the next logical position determining module 73. , determine the next trend position of the target object. The trend position of the target object herein refers to the next logical position of the target object, and the default logical position of the target object in the future is based on the difference between the next target object movement operation instruction and the current target object movement operation instruction. Forecast location.
这样每一逻辑帧对应的虚拟位置,均有逻辑帧对应的逻辑位置以及逻辑 帧的当前目标对象移动操作指令对应的目标对象移动模型来确定。Thus, the virtual position corresponding to each logical frame is determined by the logical position corresponding to the logical frame and the target object movement model corresponding to the current target object moving operation instruction of the logical frame.
具体的,下一趋势位置确定模块74可以目标对象的下一逻辑位置为运动起点,目标对象移动模型为运动参数,预设趋势时间为运动时间,计算目标对象的第二运动终点,并将第二运动终点设定为目标对象的下一趋势位置。这里的预设趋势时间可根据用户的要求进行调整,只要大于相邻逻辑帧的设定执行时间差,可以对目标对象的运动轨迹进行一定的预测即可。Specifically, the next trend position determining module 74 may be: the next logical position of the target object is a motion starting point, the target object moving model is a motion parameter, the preset trend time is a motion time, and the second motion end point of the target object is calculated, and the first The second motion end point is set to the next trend position of the target object. The preset trend time here can be adjusted according to the requirements of the user. As long as it is greater than the set execution time difference of the adjacent logical frame, the motion track of the target object can be predicted.
最后位置渐变画面渲染模块75根据下一趋势位置确定模块74获取的目标对象的下一趋势位置以及目标对象的当前渲染位置,进行目标对象的位置渐变画面渲染。The final position gradient picture rendering module 75 performs position gradient picture rendering of the target object according to the next trend position of the target object acquired by the next trend position determining module 74 and the current rendering position of the target object.
这里的当前渲染位置是指目标对象在当前游戏画面中的渲染位置。由于网络环境抖动等问题,目标对象移动操作指令并非可以严格按照逻辑帧的设定执行时间进行执行,因此可能会导致在110ms时应该执行的目标对象移动操作指令,在120ms时才到达画面渲染装置,这样即使画面渲染装置按该目标对象移动操作指令进行目标对象的画面渲染,也无法实现当前渲染位置与当前逻辑位置严格一致。The current rendering position here refers to the rendering position of the target object in the current game screen. Due to problems such as network environment jitter, the target object movement operation instruction may not be executed strictly according to the set execution time of the logical frame, and thus may cause the target object movement operation instruction to be executed at 110 ms, and the screen rendering device is reached at 120 ms. Therefore, even if the screen rendering device performs the screen rendering of the target object according to the target object moving operation instruction, the current rendering position cannot be strictly consistent with the current logical position.
但是如当前渲染位置与当前逻辑位置(或下一逻辑位置)差异不大时,由于游戏用户对目标对象的表现位置、重叠碰撞以及打击动作精度等细节的要求不高,游戏用户对上述差异是具有一定容忍度的。因此游戏用户是可以接受当前渲染位置与当前逻辑位置之间具有一定范围内的差异。However, if the current rendering position is not much different from the current logical position (or the next logical position), since the game user's requirements for the target object's performance position, overlapping collision, and striking motion accuracy are not high, the game user is different for the above difference. Have a certain tolerance. Therefore, the game user can accept a certain range of differences between the current rendering position and the current logical position.
但是在本步骤中,为了使得下一渲染位置和下一逻辑位置之间的差异不会继续增大,位置渐变画面渲染模块75直接根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行目标对象的位置渐变画面渲染操作,即生成目标对象的多个位置渐变渲染帧。However, in this step, in order to prevent the difference between the next rendering position and the next logical position from continuing to increase, the position gradient screen rendering module 75 directly according to the next trend position of the target object and the current rendering position of the target object, Perform a positional gradient screen rendering operation on the target object, that is, generate a plurality of position gradient rendering frames of the target object.
具体为:以渲染帧的帧间隔为渲染间隔时间,当前渲染位置以及下一趋势位置的连线方向为移动方向,基于目标对象移动模型,生成每个位置渐变渲染帧对应的渲染位置,并在该渲染位置上生成该目标对象的位置渐变渲染帧。这些位置渐变渲染帧可以实现由当前渲染位置至下一趋势位置之间的渲染画面的画面渲染操作。即渲染位置与下一逻辑位置之间的位置差异值一直较小,这样游戏用户还是感觉目标对象以下一逻辑位置为方向,朝着下一趋 势位置移动的。Specifically, the frame interval of the rendered frame is the rendering interval time, and the current rendering position and the connection direction of the next trend position are the moving directions. Based on the target object moving model, the rendering position corresponding to each position gradient rendering frame is generated, and The position gradient rendering frame of the target object is generated at the rendering position. These positionally rendered frames can implement a picture rendering operation of the rendered picture from the current rendering position to the next trend position. That is, the position difference value between the rendering position and the next logical position is always small, so that the game user still feels that the following logical position of the target object is the direction and moves toward the next trend position.
如目标对象的当前渲染位置与下一逻辑位置的位置差异值大于一较大的第一设定值,即目标对象的渲染位置与逻辑位置的偏差过大,如采用位置渐变画面渲染操作,则会出现目标对象的移动速度异常,影响游戏用户的体验。这时渲染位置修正模块则可直接以目标对象的下一逻辑位置对目标对象的当前渲染位置进行修正,即使得目标对象在当前目标对象移动操作指令设定的时间点的渲染位置直接跳变到下一逻辑位置,以避免渲染位置与对应的逻辑位置之间的位置差异值过大。For example, if the position difference value between the current rendering position of the target object and the next logical position is greater than a larger first setting value, that is, the deviation between the rendering position of the target object and the logical position is too large, such as using a position gradient screen rendering operation, There will be an abnormal movement speed of the target object, which affects the experience of the game user. At this time, the rendering position correction module can directly correct the current rendering position of the target object with the next logical position of the target object, that is, the target object directly jumps to the rendering position at the time point set by the current target object moving operation instruction. The next logical position to avoid excessive positional difference between the render position and the corresponding logical position.
这样即完成本实施例的画面渲染装置70的游戏画面渲染过程。Thus, the game screen rendering process of the screen rendering device 70 of the present embodiment is completed.
本实施例的画面渲染装置不是根据逻辑帧的接收时间进行画面帧的渲染,而是直接根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行位置渐变画面渲染操作,这样在尽量不影响用户体验的基础上,保证了游戏的流畅运行。同时由于不存在游戏运行卡顿的问题,这里也不需要对逻辑帧进行延时缓冲操作,从而消除了用户游戏操作时的手感延迟。The picture rendering apparatus of this embodiment does not perform rendering of the picture frame according to the receiving time of the logical frame, but directly performs the position gradation picture rendering operation according to the next trend position of the target object and the current rendering position of the target object, so as to try not to On the basis of affecting the user experience, the smooth running of the game is guaranteed. At the same time, since there is no problem that the game runs stuck, there is no need to perform a delay buffering operation on the logical frame, thereby eliminating the delay of the user's game operation.
请参照图8,图8为本申请一个实施例中画面渲染装置的结构示意图,其中,画面渲染装置80包括初始设置模块81、移动操作指令获取模块82、目标对象移动模型生成模块83、下一逻辑位置确定模块84、下一趋势位置确定模块85、位置渐变画面渲染模块86以及渲染位置修正模块87。Please refer to FIG. 8. FIG. 8 is a schematic structural diagram of a screen rendering apparatus according to an embodiment of the present invention. The screen rendering apparatus 80 includes an initial setting module 81, a moving operation instruction acquiring module 82, a target object moving model generating module 83, and a next step. The logical position determining module 84, the next trend position determining module 85, the position gradient screen rendering module 86, and the rendering position correction module 87.
初始设置模块81用于设置目标对象的初始渲染位置以及初始逻辑位置;并根据初始逻辑位置以及初始目标对象移动操作指令,设置目标对象的初始趋势位置;移动操作指令获取模块82用于获取当前目标对象移动操作指令;目标对象移动模型生成模块83用于根据当前目标对象移动操作指令以及预设算法,计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度,具体的,目标对象移动模型生成模块83用于根据当前目标对象移动操作指令以及预设算法,生成目标对象移动模型;其中目标对象移动模型用于计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度;下一逻辑位置确定模块84用于根据目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置;下一趋势位置确定模块85用于 根据目标对象的移动方向、移动速度和下一逻辑位置,确定目标对象的下一趋势位置;位置渐变画面渲染模块86用于根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行目标对象的位置渐变画面渲染操作;其中,位置渐变画面渲染操作触发生成目标对象的多个位置渐变渲染帧;渲染位置修正模块87用于当目标对象的当前渲染位置与下一逻辑位置的位置差异值大于第一设定值时,则使用目标对象的下一逻辑位置对目标对象的当前渲染位置进行修正。The initial setting module 81 is configured to set an initial rendering position of the target object and an initial logical position; and set an initial trend position of the target object according to the initial logical position and the initial target object moving operation instruction; the mobile operation instruction acquiring module 82 is configured to acquire the current target The object movement operation instruction module 83 is configured to calculate a movement direction and a movement speed of the target object corresponding to the current target object movement operation instruction according to the current target object movement operation instruction and the preset algorithm, specifically, the target object movement The model generation module 83 is configured to generate a target object movement model according to the current target object movement operation instruction and a preset algorithm; wherein the target object movement model is used to calculate a moving direction and a moving speed of the target object corresponding to the current target object movement operation instruction; A logical position determining module 84 is configured to determine a next logical position of the target object according to the moving direction, the moving speed, and the current logical position of the target object; the next trend position determining module 85 is configured to move according to the target object The direction, the moving speed and the next logical position determine the next trend position of the target object; the position gradient picture rendering module 86 is configured to perform the position grading picture of the target object according to the next trend position of the target object and the current rendering position of the target object. a rendering operation; wherein the position gradient picture rendering operation triggers generating a plurality of position gradient rendering frames of the target object; the rendering position correction module 87 is configured to: when the position difference value of the current rendering position of the target object and the next logical position is greater than the first setting When the value is used, the current rendering position of the target object is corrected using the next logical position of the target object.
请参照图9,图9为本申请一个实施例中画面渲染装置中的位置渐变画面渲染模块的结构示意图。该位置渐变画面渲染模块86包括逻辑投影位置获取单元91、渲染位置间距增加单元92以及渲染位置间距减少单元93。Please refer to FIG. 9. FIG. 9 is a schematic structural diagram of a position gradient screen rendering module in a screen rendering apparatus according to an embodiment of the present application. The position gradient picture rendering module 86 includes a logical projection position acquisition unit 91, a rendering position spacing increasing unit 92, and a rendering position spacing reducing unit 93.
逻辑投影位置获取单元91用于以设定时间间隔,获取逻辑投影位置,其中逻辑投影位置为下一逻辑位置在当前渲染位置和下一趋势位置的连线所在直线的投影位置;渲染位置间距增加单元92用于当逻辑投影位置位于当前渲染位置和下一趋势位置的连线上,则基于目标对象移动模型计算位置渐变渲染帧的渲染位置,并使用预设增大系数对增加相邻位置渐变渲染帧的渲染位置之间的间距;渲染位置间距减少单元93用于当逻辑投影位置位于当前渲染位置和下一趋势位置的连线外,则基于目标对象移动模型计算位置渐变渲染帧的渲染位置。并使用预设减小系数对减小相邻位置渐变渲染帧的渲染位置之间的间距。The logical projection position obtaining unit 91 is configured to acquire a logical projection position at a set time interval, wherein the logical projection position is a projection position of a line where the connection of the current logical position and the current trend position is the next logical position; the pitch of the rendering position is increased. The unit 92 is configured to calculate a rendering position of the position gradient rendering frame based on the target object movement model when the logical projection position is on the line connecting the current rendering position and the next trend position, and increase the adjacent position gradient by using the preset increasing coefficient pair. The spacing between the rendering positions of the rendered frames; the rendering position spacing reducing unit 93 is configured to calculate the rendering position of the position gradient rendering frame based on the target object movement model when the logical projection position is outside the line connecting the current rendering position and the next trend position . And use the preset reduction factor pair to reduce the spacing between the rendering positions of the adjacent position gradient rendered frames.
请参照图10,图10为本申请一个实施例中画面渲染装置中的位置渐变画面渲染模块的结构示意图。该位置渐变画面渲染模块86包括连线长度获取单元101以及渲染位置间距计算单元12。Please refer to FIG. 10. FIG. 10 is a schematic structural diagram of a position gradient screen rendering module in a screen rendering apparatus according to an embodiment of the present application. The position gradient picture rendering module 86 includes a wire length acquisition unit 101 and a rendering position spacing calculation unit 12.
连线长度获取单元101用于以设定时间间隔,获取当前渲染位置和下一趋势位置连线的第一连线长度、以及下一逻辑位置和下一趋势位置连线的第二连线长度;渲染位置间距计算单元102用于根据第一连线长度和第二连线长度的长度比值以及目标对象移动模型,计算相邻位置渐变渲染帧的渲染位置的间距。The connection length obtaining unit 101 is configured to acquire, at a set time interval, a first connection length of a current rendering position and a next trend position connection, and a second connection length of a connection between the next logical position and the next trend position. The rendering position spacing calculation unit 102 is configured to calculate the spacing of the rendering positions of the adjacent position gradient rendering frames according to the length ratio of the first connection length and the second connection length and the target object movement model.
本实施例的画面渲染装置80使用时,首先初始设置模块81设置目标对象的初始渲染位置以及初始逻辑位置,一般目标对象的初始渲染位置以及初 始逻辑位置均位于游戏开始画面中的游戏起始位置。When the screen rendering device 80 of the present embodiment is used, the initial setting module 81 first sets the initial rendering position and the initial logical position of the target object, and the initial rendering position of the general target object and the initial logical position are both located at the game starting position in the game start screen. .
随后初始设置模块81获取初始目标对象移动操作指令(即游戏用户发出的第一个目标对象移动操作指令),然后初始设置模块根据上述初始逻辑位置以及初始目标对象移动操作指令,设置目标对象的初始趋势位置。即以目标对象的初始逻辑位置运动起点,初始目标对象移动操作指令对应的目标对象移动模型为运动参数,预设趋势时间为运动时间,计算目标对象的运动终点,并将该运动终点设定为目标对象的初始趋势位置。Then, the initial setting module 81 acquires an initial target object moving operation instruction (ie, the first target object moving operation instruction issued by the game user), and then the initial setting module sets the initial of the target object according to the initial logical position and the initial target object moving operation instruction. Trend location. That is, the starting point of the initial logical position of the target object is moved, the target object moving model corresponding to the initial target object moving operation instruction is a motion parameter, the preset trend time is the motion time, the motion end point of the target object is calculated, and the motion end point is set to The initial trend position of the target object.
随后由于初始设置模块81已经获取了目标对象的初始逻辑位置、初始渲染位置以及初始趋势位置,移动操作指令获取模块82后续可接收终端用户发出的当前目标对象移动操作指令。该当前目标对象移动操作指令是指用户控制目标对象移动的指令。Then, since the initial setting module 81 has acquired the initial logical position, the initial rendering position, and the initial trend position of the target object, the mobile operation instruction acquisition module 82 may subsequently receive the current target object movement operation instruction issued by the terminal user. The current target object movement operation instruction refers to an instruction that the user controls the movement of the target object.
然后目标对象移动模型生成模块83根据移动操作指令获取模块82获取的当前目标对象移动操作指令以及画面渲染装置所在个人移动设备终端内设的预设算法,计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度。Then, the target object movement model generation module 83 calculates the current target object movement operation instruction acquired by the movement operation instruction acquisition module 82 and the preset algorithm set in the personal mobile device terminal where the screen rendering device is located, and calculates the target object corresponding to the current target object movement operation instruction. The direction of movement and the speed of movement.
具体的,目标对象移动模型生成模块83根据当前目标对象移动操作指令以及上述预设算法生成目标对象移动模型。即通过预设算法执行上述当前目标对象移动操作指令,以获得用于计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度的目标对象移动模型。Specifically, the target object movement model generation module 83 generates a target object movement model according to the current target object movement operation instruction and the preset algorithm. That is, the current target object movement operation instruction is executed by a preset algorithm to obtain a target object movement model for calculating a moving direction and a moving speed of the target object corresponding to the current target object movement operation instruction.
随后下一逻辑位置确定模块84根据目标对象移动模型生成模块83获取的目标对象移动模型(即目标对象的移动方向、移动速度)以及目标对象的当前逻辑位置,确定目标对象的下一逻辑位置。这里的目标对象的逻辑位置是指严格按照逻辑帧的设定执行时间对目标对象执行对应的目标对象移动操作指令确定的目标对象的在游戏画面中的位置。The next logical position determining module 84 then determines the next logical position of the target object based on the target object movement model acquired by the target object movement model generation module 83 (ie, the moving direction of the target object, the moving speed) and the current logical position of the target object. The logical position of the target object herein refers to the position in the game screen of the target object determined by the target object movement operation instruction corresponding to the target object in strict accordance with the set execution time of the logical frame.
这样每一逻辑帧对应的逻辑位置,均由上一逻辑帧对应的逻辑位置以及当前逻辑帧的当前目标对象移动操作指令对应的目标对象移动模型来确定。Thus, the logical position corresponding to each logical frame is determined by the logical position corresponding to the previous logical frame and the target object movement model corresponding to the current target object moving operation instruction of the current logical frame.
然后下一趋势位置确定模块85根据目标对象移动模型生成模块83获取的目标对象移动模型(即目标对象的移动方向、移动速度)以及下一逻辑位置确定模块84获取的目标对象的下一逻辑位置,确定目标对象的下一趋势位 置。这里的目标对象的趋势位置是指基于目标对象的下一逻辑位置,并默认下一目标对象移动操作指令与当前目标对象移动操作指令的差异较小的基础上,对目标对象未来的逻辑位置的预测位置。Then, the next trend position determining module 85 according to the target object movement model acquired by the target object movement model generation module 83 (ie, the moving direction of the target object, the moving speed) and the next logical position of the target object acquired by the next logical position determining module 84. , determine the next trend position of the target object. The trend position of the target object herein refers to the next logical position of the target object, and the default logical position of the target object in the future is based on the difference between the next target object movement operation instruction and the current target object movement operation instruction. Forecast location.
这样每一逻辑帧对应的虚拟位置,均有逻辑帧对应的逻辑位置以及逻辑帧的当前目标对象移动操作指令对应的目标对象移动模型来确定。Thus, the virtual position corresponding to each logical frame is determined by the logical position corresponding to the logical frame and the target object movement model corresponding to the current target object moving operation instruction of the logical frame.
最后位置渐变画面渲染模块86根据下一趋势位置确定模块85获取的目标对象的下一趋势位置以及目标对象的当前渲染位置,进行目标对象的位置渐变画面渲染。The final position gradient picture rendering module 86 performs the position gradient picture rendering of the target object according to the next trend position of the target object acquired by the next trend position determining module 85 and the current rendering position of the target object.
为了使得下一目标对象移动操作指令对应的当前渲染位置和下一逻辑位置之间的差异不会继续增大,位置渐变画面渲染模块86直接根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行目标对象的位置渐变画面渲染操作,即生成目标对象的多个位置渐变渲染帧。In order to prevent the difference between the current rendering position and the next logical position corresponding to the next target object moving operation instruction from continuing to increase, the position gradient screen rendering module 86 directly according to the next trend position of the target object and the current rendering of the target object. Position, the position of the target object is a gradient screen rendering operation, that is, a plurality of position gradient rendering frames of the target object are generated.
具体为:位置渐变画面渲染模块86以渲染帧的帧间隔为渲染间隔时间,当前渲染位置以及下一趋势位置的连线方向为移动方向,基于目标对象移动模型,生成每个位置渐变渲染帧对应的渲染位置,并在该渲染位置上生成该目标对象的位置渐变渲染帧。这些位置渐变渲染帧可以实现由当前渲染位置至下一趋势位置之间的渲染画面的画面渲染操作。即渲染位置与下一逻辑位置之间的位置差异值一直较小,这样游戏用户还是感觉目标对象以下一逻辑位置为方向,朝着下一趋势位置移动的。Specifically, the position gradient picture rendering module 86 uses the frame interval of the rendered frame as the rendering interval time, and the current rendering position and the connection direction of the next trend position are the moving directions. Based on the target object moving model, each position gradient rendering frame is generated. The rendering position, and the gradient rendering frame of the position of the target object is generated at the rendering position. These positionally rendered frames can implement a picture rendering operation of the rendered picture from the current rendering position to the next trend position. That is, the position difference value between the rendering position and the next logical position is always small, so that the game user still feels that the following logical position of the target object is the direction and moves toward the next trend position.
进一步的,位置渐变画面渲染模块86还可根据当前渲染位置以及下一趋势位置的连线方向、下一逻辑位置以及目标对象移动模型,对上述位置渐变渲染帧的渲染位置进行修正。如采用逻辑透明位置来进行位置渐变渲染帧的渲染位置的修正,则该渲染位置修正的流程包括:Further, the position gradient picture rendering module 86 may further correct the rendering position of the position gradient rendering frame according to the current rendering position and the connection direction of the next trend position, the next logical position, and the target object movement model. If the logically transparent position is used to correct the rendering position of the position gradient rendering frame, the rendering position correction process includes:
位置渐变画面渲染模块86的逻辑投影位置获取单元91以设定时间间隔,获取逻辑投影位置,其中逻辑投影位置为下一逻辑位置在当前渲染位置和下一趋势位置的连线所在直线的投影位置。这样可通过逻辑投影位置可获取下一逻辑位置与下一趋势位置的距离,和当前渲染位置与下一趋势位置的距离的差异。The logical projection position acquiring unit 91 of the position gradient screen rendering module 86 acquires a logical projection position at a set time interval, wherein the logical projection position is a projection position of a line where the connection of the current logical position and the current trend position is at the next logical position. . In this way, the logical projection position can be used to obtain the distance between the next logical position and the next trend position, and the difference between the current rendering position and the next trend position.
这里的设定时间间隔可为渲染帧的帧间隔时间,以便对每个位置渐变渲 染帧的渲染位置进行修正。The set time interval here can be the frame interval time of the rendered frame to correct the rendering position of each position gradient rendering frame.
当逻辑投影位置位于当前渲染位置和下一趋势位置的连线上时,说明当前渲染位置与下一趋势位置之间的距离较大,下一逻辑位置与下一趋势位置之间的距离较小。这时位置渐变画面渲染模块86的渲染位置间距增加单元92根据目标对象移动模型生成模块获取的目标对象移动模型计算位置渐变渲染帧的渲染位置,随后渲染位置间距增加单元92使用预设增大系数,增加相邻位置渐变渲染帧的渲染位置之间的间距,使得目标对象的渲染位置和目标对象的逻辑位置以大致相同的速度向下一趋势位置移动。When the logical projection position is on the line between the current rendering position and the next trend position, the distance between the current rendering position and the next trend position is larger, and the distance between the next logical position and the next trend position is smaller. . At this time, the rendering position spacing increasing unit 92 of the position gradient screen rendering module 86 calculates the rendering position of the position gradient rendering frame according to the target object movement model acquired by the target object movement model generation module, and then the rendering position spacing increasing unit 92 uses the preset increasing coefficient. Increase the spacing between the rendering positions of the adjacent position gradient rendering frames such that the rendering position of the target object and the logical position of the target object move to the next trend position at approximately the same speed.
当逻辑投影位置位于当前渲染位置和下一趋势位置的连线外时,说明当前渲染位置与下一趋势位置之间的距离较小,下一逻辑位置与下一趋势位置之间的具体较大。这时位置渐变画面渲染模块86的渲染位置间距减少单元93根据目标对象移动模型生成模块获取的目标对象移动模型计算位置渐变渲染帧的渲染位置,随后渲染位置间距减少单元93使用预设减小系数,减小相邻位置渐变渲染帧的渲染位置之间的间距,使得目标对象的渲染位置和目标对象的逻辑位置以大致相同的速度向下一趋势位置移动。When the logical projection position is outside the line connecting the current rendering position and the next trend position, the distance between the current rendering position and the next trend position is small, and the specific distance between the next logical position and the next trend position is larger. . At this time, the rendering position spacing reducing unit 93 of the position gradient screen rendering module 86 calculates the rendering position of the position gradient rendering frame according to the target object movement model acquired by the target object movement model generation module, and then the rendering position spacing reducing unit 93 uses the preset reduction coefficient. The spacing between the rendering positions of the adjacent position gradient rendering frames is reduced such that the rendering position of the target object and the logical position of the target object move to the next trend position at substantially the same speed.
由于每一个位置渐变渲染帧形成时,均会基于当前位置渐变渲染帧的渲染位置、下一趋势位置以及下一逻辑位置,对下一个位置渐变渲染帧的渲染位置进行计算。因此这里可将预设增大系数和预设减小系数设置为一较小的定值,在游戏用户感知不到目标对象移动速度变化的基础上,使得目标对象的渲染位置与目标对象的逻辑位置尽可能的靠近。当然这里也可根据当前渲染位置与下一趋势位置之间的距离、和下一逻辑位置与下一趋势位置之间的距离的差异,将预设增大系数和预设减小系数设定为一变化值,使得目标对象的渲染位置更加靠近对应的逻辑位置。Since each position gradient rendering frame is formed, the rendering position of the next position gradient rendering frame is calculated based on the rendering position of the current position gradient rendering frame, the next trend position, and the next logical position. Therefore, the preset increase coefficient and the preset reduction coefficient can be set to a small fixed value, and the rendering position of the target object and the logic of the target object are made on the basis that the game user does not perceive the change of the moving speed of the target object. Position as close as possible. Of course, the preset increase coefficient and the preset decrease coefficient may also be set to be based on the difference between the distance between the current rendering position and the next trend position and the distance between the next logical position and the next trend position. A change value causes the target object's rendering position to be closer to the corresponding logical position.
如采用当前渲染位置和下一趋势位置连线以及下一逻辑位置和下一趋势位置连线的连线长度来进行位置渐变渲染帧的渲染位置的修正,则该渲染位置修正的流程包括:If the current rendering position and the next trend position line and the connection length of the next logical position and the next trend position are used to correct the rendering position of the position gradient rendering frame, the rendering position correction process includes:
位置渐变画面渲染模块86的连线长度获取单元101以设定时间间隔,获取当前渲染位置和下一趋势位置连线的第一连线长度、以及下一逻辑位置和下一趋势位置连线的第二连线长度。这样可通过第一连线长度和第二连线长 度的差异,获取下一逻辑位置与下一趋势位置的距离,和当前渲染位置与下一趋势位置的距离的差异。The connection length obtaining unit 101 of the position gradient picture rendering module 86 acquires the first connection length of the current rendering position and the next trend position connection line, and the next logical position and the next trend position connection at a set time interval. The length of the second connection. Thus, by the difference between the length of the first line and the length of the second line, the distance between the next logical position and the next trend position, and the difference between the current rendering position and the distance of the next trend position are obtained.
这里的设定时间间隔可为渲染帧的帧间隔时间,以便对每个位置渐变渲染帧的渲染位置进行修正。The set time interval here can be the frame interval time of the rendered frame to correct the rendering position of each position gradient rendered frame.
位置渐变画面渲染模块86的渲染位置间距计算单元102根据第一连线长度和第二连线长度的长度比值以及目标对象移动模型,计算相邻位置渐变渲染帧的渲染位置的间距。The rendering position spacing calculation unit 102 of the position gradient screen rendering module 86 calculates the spacing of the rendering positions of the adjacent position gradient rendering frames based on the length ratio of the first connection length and the second connection length and the target object movement model.
当第一连线长度大于第二连线长度时,说明当前渲染位置与下一趋势位置之间的距离较大,下一逻辑位置与下一趋势位置之间的距离较小。这时渲染位置间距计算单元根据目标对象移动模型生成模块获取的目标对象移动模型计算位置渐变渲染帧的渲染位置,随后渲染位置间距计算单元使用第一连线长度和第二连线长度的长度比值为增大系数,增加相邻位置渐变渲染帧的渲染位置之间的间距,使得目标对象的渲染位置和目标对象的逻辑位置以大致相同的速度向下一趋势位置移动。When the length of the first connection is greater than the length of the second connection, the distance between the current rendering position and the next trend position is larger, and the distance between the next logical position and the next trend position is smaller. At this time, the rendering position interval calculation unit calculates the rendering position of the position gradient rendering frame according to the target object movement model acquired by the target object movement model generation module, and then the rendering position spacing calculation unit uses the length ratio of the first connection length and the second connection length. To increase the coefficient, the spacing between the rendering positions of the adjacent position gradient rendering frames is increased such that the rendering position of the target object and the logical position of the target object move to the next trend position at approximately the same speed.
当第一连线长度小于第二连线长度时,说明当前渲染位置与下一趋势位置之间的距离较小,下一逻辑位置与下一趋势位置之间的距离较大。这时渲染位置间距计算单元根据目标对象移动模型生成模块获取的目标对象移动模型计算位置渐变渲染帧的渲染位置,随后渲染位置间距计算单元使用第一连线长度和第二连线长度的长度比值为减小系数,减小相邻位置渐变渲染帧的渲染位置之间的间距,使得目标对象的渲染位置和目标对象的逻辑位置以大致相同的速度向下一趋势位置移动。When the length of the first connection is smaller than the length of the second connection, it indicates that the distance between the current rendering position and the next trend position is small, and the distance between the next logical position and the next trend position is large. At this time, the rendering position interval calculation unit calculates the rendering position of the position gradient rendering frame according to the target object movement model acquired by the target object movement model generation module, and then the rendering position spacing calculation unit uses the length ratio of the first connection length and the second connection length. To reduce the coefficient, the spacing between the rendering positions of the adjacent position gradient rendering frames is reduced such that the rendering position of the target object and the logical position of the target object move to the next trend position at approximately the same speed.
由于每一个位置渐变渲染帧形成时,均会基于当前位置渐变渲染帧的渲染位置、下一趋势位置以及下一逻辑位置,对下一个位置渐变渲染帧的渲染位置进行计算。因此这里根据第一连线长度和第二连线长度的长度比值来设定增大系数以及减小系数,使得目标对象的渲染位置更加靠近对应的逻辑位置。Since each position gradient rendering frame is formed, the rendering position of the next position gradient rendering frame is calculated based on the rendering position of the current position gradient rendering frame, the next trend position, and the next logical position. Therefore, the increase coefficient and the reduction coefficient are set here according to the length ratio of the first connection length and the second connection length, so that the rendering position of the target object is closer to the corresponding logical position.
如目标对象的当前渲染位置与下一逻辑位置的位置差异值大于一较大的第一设定值,即目标对象的渲染位置与逻辑位置的偏差过大,如采用位置渐变画面渲染操作,则会出现目标对象的移动速度异常,影响游戏用户的体验。 这时渲染位置修正模块则可直接以目标对象的下一逻辑位置对目标对象的当前渲染位置进行修正,即使得目标对象在当前目标对象移动操作指令设定的时间点的渲染位置直接跳变到下一逻辑位置,以避免渲染位置与对应的逻辑位置之间的位置差异值过大。For example, if the position difference value between the current rendering position of the target object and the next logical position is greater than a larger first setting value, that is, the deviation between the rendering position of the target object and the logical position is too large, such as using a position gradient screen rendering operation, There will be an abnormal movement speed of the target object, which affects the experience of the game user. At this time, the rendering position correction module can directly correct the current rendering position of the target object with the next logical position of the target object, that is, the target object directly jumps to the rendering position at the time point set by the current target object moving operation instruction. The next logical position to avoid excessive positional difference between the render position and the corresponding logical position.
这样即完成了本实施例的画面渲染装置80的游戏画面渲染过程。Thus, the game screen rendering process of the screen rendering device 80 of the present embodiment is completed.
上述实施例中的画面渲染装置还可基于当前渲染位置以及下一趋势位置的连线方向、下一逻辑位置以及目标对象移动模型对每个位置渐变渲染帧的渲染位置进行修正,使得在游戏用户不察觉的情况下,将目标对象的渲染位置更加靠近对应的逻辑位置,进一步提高了目标对象的游戏画面渲染的准确性。The screen rendering apparatus in the above embodiment may further correct the rendering position of each position gradient rendering frame based on the current rendering position and the connection direction of the next trend position, the next logical position, and the target object movement model, so that the game user is Unconsciously, the rendering position of the target object is closer to the corresponding logical position, which further improves the accuracy of the rendering of the game image of the target object.
下面通过一具体实施例说明本发明的画面渲染方法及画面渲染装置的具体工作原理。请参照图11,图11为本申请一个实施例的目标对象的逻辑位置、渲染位置以及趋势位置的变化示意图。本具体实施例中的电子设备具体可以为个人移动设备终端。The specific working principle of the picture rendering method and the picture rendering apparatus of the present invention will be described below by way of a specific embodiment. Please refer to FIG. 11. FIG. 11 is a schematic diagram showing changes of a logical position, a rendering position, and a trend position of a target object according to an embodiment of the present application. The electronic device in this specific embodiment may specifically be a personal mobile device terminal.
在图11中l1-l5为目标对象的五个连续的逻辑帧a至逻辑帧e对应的逻辑位置,r1-r10为目标对象11个连续的渲染帧(位置渐变渲染帧)对应的渲染位置,t2-t5为目标对象的逻辑帧b至逻辑帧e对应的趋势位置。In FIG. 11 , l1 - l5 are logical positions corresponding to five consecutive logical frames a to logical frames e of the target object, and r1 - r10 are rendering positions corresponding to 11 consecutive rendered frames (position gradient rendering frames) of the target object, T2-t5 is the trend position corresponding to the logical frame b to the logical frame e of the target object.
下面具体说明图11中的逻辑位置、渲染位置以及趋势位置的生成过程。The generation process of the logical position, the rendering position, and the trend position in FIG. 11 will be specifically described below.
步骤S1101、目标对象的逻辑位置起点l1和渲染位置起点r1重合。Step S1101, the logical position start point l1 of the target object and the rendering position start point r1 coincide.
步骤S1102、当接收到逻辑帧a对应的目标对象移动操作指令时,该目标对象移动操作指令为目标对象,以v1的方向以及速度进行移动,电子设备根据该目标对象移动操作指令以及逻辑位置起点l1,计算出目标对象的下一逻辑位置l2。Step S1102: When receiving the target object movement operation instruction corresponding to the logical frame a, the target object movement operation instruction is a target object, moving in the direction and speed of v1, and the electronic device moves the operation instruction and the logical position starting point according to the target object. L1, calculate the next logical position l2 of the target object.
l2=l1+v1*n,其中n为相邻逻辑帧的设定执行时间差。L2=l1+v1*n, where n is the set execution time difference of adjacent logical frames.
随后电子设备根据目标对象移动操作指令以及下一逻辑位置l2,计算出目标对象的下一趋势位置t2。The electronic device then calculates the next trend position t2 of the target object according to the target object movement operation instruction and the next logical position l2.
t2=l2+v1*N,其中N为预设趋势时间。T2=l2+v1*N, where N is the preset trend time.
步骤S1103、在接收到逻辑帧a对应的目标对象移动操作指令之后,接 收到逻辑帧b对应的目标对象操作指令之前,电子设备以渲染帧的帧间隔为渲染间隔时间,以当前渲染位置r1以及下一趋势位置t2的连线方向为移动方向,基于v1的速度,在渲染位置r2生成对应的渲染帧。Step S1103: After receiving the target object movement operation instruction corresponding to the logical frame a, before receiving the target object operation instruction corresponding to the logical frame b, the electronic device uses the frame interval of the rendered frame as the rendering interval time, and the current rendering position r1 and The line direction of the next trend position t2 is the moving direction, and based on the speed of v1, a corresponding rendered frame is generated at the rendering position r2.
步骤S1104、当接收到逻辑帧b对应的目标对象移动操作指令时,该目标对象移动操作指令为目标对象以v1的方向以及速度进行移动,电子设备根据该目标对象移动操作指令以及逻辑位置l2,计算出目标对象的下一逻辑位置l3。Step S1104: When receiving the target object movement operation instruction corresponding to the logical frame b, the target object movement operation instruction moves the target object in the direction and speed of v1, and the electronic device moves the operation instruction and the logical position l2 according to the target object. The next logical position l3 of the target object is calculated.
l3=l2+v1*n,其中n为相邻逻辑帧的设定执行时间差。L3=l2+v1*n, where n is the set execution time difference of adjacent logical frames.
随后电子设备根据目标对象移动操作指令以及下一逻辑位置l3,计算出目标对象的下一趋势位置t3。The electronic device then calculates the next trend position t3 of the target object according to the target object movement operation instruction and the next logical position l3.
t3=l3+v1*N,其中N为预设趋势时间。T3=l3+v1*N, where N is the preset trend time.
步骤S1105、在接收到逻辑帧b对应的目标对象移动操作指令之后,接收到逻辑帧c对应的目标对象操作指令之前,电子设备以渲染帧的帧间隔为渲染间隔时间,以当前渲染位置r2以及下一趋势位置t3的连线方向为移动方向,基于v1的速度,在渲染位置r3以及r4生成对应的渲染帧。Step S1105: After receiving the target object movement operation instruction corresponding to the logical frame b, before receiving the target object operation instruction corresponding to the logical frame c, the electronic device uses the frame interval of the rendered frame as the rendering interval time, and the current rendering position r2 and The line direction of the next trend position t3 is the moving direction, and based on the speed of v1, the corresponding rendered frame is generated at the rendering positions r3 and r4.
步骤S1106、如这时网络环境出现抖动,电子设备并未在对应的时间点接收到逻辑帧c对应的目标对象移动操作指令,电子设备以渲染帧的帧间隔为渲染间隔时间,以当前渲染位置r4以及下一趋势位置t3的连线方向为移动方向,基于v1的速度,在渲染位置r5以及r6生成对应的渲染帧。Step S1106: If the network environment is jittery, the electronic device does not receive the target object movement operation instruction corresponding to the logical frame c at the corresponding time point, and the electronic device uses the frame interval of the rendered frame as the rendering interval time to the current rendering position. The connection direction of r4 and the next trend position t3 is the moving direction, and based on the speed of v1, corresponding rendering frames are generated at the rendering positions r5 and r6.
步骤S1107、延迟接收到逻辑帧c对应的目标对象移动操作指令时,该目标对象移动操作指令为目标对象以v2的方向以及速度进行移动,电子设备根据该目标对象动操作指令以及逻辑位置l3,计算出目标对象的下一逻辑位置l4。Step S1107: When the target object movement operation instruction corresponding to the logical frame c is delayed, the target object movement operation instruction moves the target object in the direction and speed of v2, and the electronic device operates the instruction according to the target object and the logical position l3. The next logical position l4 of the target object is calculated.
l4=l3+v2*n,其中n为相邻逻辑帧的设定执行时间差。L4=l3+v2*n, where n is the set execution time difference of adjacent logical frames.
随后电子设备根据目标对象移动操作指令以及下一逻辑位置l4,计算出目标对象的下一趋势位置t4。The electronic device then calculates the next trend position t4 of the target object according to the target object movement operation instruction and the next logical position l4.
t4=l4+v2*N,其中N为预设趋势时间。T4=l4+v2*N, where N is the preset trend time.
步骤S1108、在接收到逻辑帧c对应的目标对象移动操作指令之后,接收到逻辑帧d对应的目标对象操作指令之前,电子设备以渲染帧的帧间隔为 渲染间隔时间,以当前渲染位置r6以及下一趋势位置t4的连线方向为移动方向,基于v2的速度,在渲染位置r7生成对应的渲染帧。Step S1108: After receiving the target object movement operation instruction corresponding to the logical frame c, before receiving the target object operation instruction corresponding to the logical frame d, the electronic device uses the frame interval of the rendered frame as the rendering interval time, and the current rendering position r6 and The line direction of the next trend position t4 is the moving direction, and based on the speed of v2, a corresponding rendered frame is generated at the rendering position r7.
优选的,由于电子设备检测到相对趋势位置t4,当前渲染位置r6相对滞后于下一逻辑位置l4(由于网络环境抖动),因此这里可增大渲染位置r6和渲染位置r7之间的间距,以减小当前渲染位置与下一逻辑位置之间的间距。Preferably, since the electronic device detects the relative trend position t4, the current rendering position r6 relatively lags behind the next logical position l4 (due to the network environment jitter), so the spacing between the rendering position r6 and the rendering position r7 can be increased here to Reduce the spacing between the current rendering position and the next logical position.
步骤S1109、接收到逻辑帧d对应的目标对象移动操作指令时,该目标对象移动操作指令为目标对象以v2的方向以及速度进行移动,电子设备根据该目标对象动操作指令以及逻辑位置l4,计算出目标对象的下一逻辑位置l5。Step S1109: When receiving the target object movement operation instruction corresponding to the logical frame d, the target object movement operation instruction moves the target object in the direction and speed of v2, and the electronic device calculates according to the target object motion operation instruction and the logical position l4. The next logical position of the target object is l5.
l5=l4+v2*n,其中n为相邻逻辑帧的设定执行时间差。L5=l4+v2*n, where n is the set execution time difference of adjacent logical frames.
随后电子设备根据目标对象移动操作指令以及下一逻辑位置l5,计算出目标对象的下一趋势位置t5。The electronic device then calculates the next trend position t5 of the target object according to the target object movement operation instruction and the next logical position l5.
t5=l5+v2*N,其中N为预设趋势时间。T5=l5+v2*N, where N is the preset trend time.
步骤S1110、在接收到逻辑帧d对应的目标对象移动操作指令之后,接收到逻辑帧e对应的目标对象操作指令之前,电子设备以渲染帧的帧间隔为渲染间隔时间,以当前渲染位置r7以及下一趋势位置t5的连线方向为移动方向,基于v2的速度,在渲染位置r8、r9以及r10生成对应的渲染帧。Step S1110: After receiving the target object movement operation instruction corresponding to the logical frame d, before receiving the target object operation instruction corresponding to the logical frame e, the electronic device uses the frame interval of the rendered frame as the rendering interval time, and the current rendering position r7 and The line direction of the next trend position t5 is the moving direction, and based on the speed of v2, corresponding rendering frames are generated at the rendering positions r8, r9, and r10.
在一个实施例中,由于电子设备检测到相对趋势位置t5,渲染位置r9相对超前于下一逻辑位置l5(由于步骤S1108中的渲染位置间距修正),因此这里可减小渲染位置r9与渲染位置r8,以及渲染位置r9以及渲染位置r10之间的间距,以减小当前渲染位置与下一逻辑位置之间的间距。In one embodiment, since the electronic device detects the relative trend position t5, the rendering position r9 is relatively ahead of the next logical position l5 (due to the correction of the rendering position spacing in step S1108), so the rendering position r9 and the rendering position can be reduced here. R8, and the spacing between the rendering position r9 and the rendering position r10 to reduce the spacing between the current rendering position and the next logical position.
当然,如在步骤S1107中,逻辑帧c对应的目标对象移动操作指令的延迟时间过长,即导致下一逻辑位置l4与当前渲染位置r6之间的距离过大,则可直接将渲染位置r7修正为下一逻辑位置l4,以避免渲染位置与对应的逻辑位置之间的位置差异值过大。Of course, as in step S1107, the delay time of the target object movement operation instruction corresponding to the logical frame c is too long, that is, the distance between the next logical position l4 and the current rendering position r6 is too large, and the rendering position r7 can be directly performed. Corrected to the next logical position l4 to avoid excessive positional difference between the rendered position and the corresponding logical position.
这样即完成了本具体实施例的画面渲染方法以及画面渲染装置的游戏画面渲染过程。Thus, the screen rendering method of the specific embodiment and the game screen rendering process of the screen rendering device are completed.
本发明的画面渲染方法、装置及存储介质通过位置渐变画面渲染操作的方式,最大程度的保证了用户游戏操作的即时执行,消除了用户游戏操作时的手感延迟;同时可以较好的应对网络环境的抖动,保证了游戏在所有游戏 客户端的流畅运行;有效的解决了现有的画面渲染方法及装置的游戏运行流畅度较差或游戏操作的延迟感较大的技术问题。The picture rendering method, device and storage medium of the invention ensure the immediate execution of the user's game operation by means of the positional gradual picture rendering operation, thereby eliminating the delay of the user's game operation, and better coping with the network environment. The jitter ensures the smooth running of the game on all game clients; effectively solves the technical problems of the existing picture rendering method and the device running fluency of the game or the delay of the game operation.
图11为本申请一个实施例的方法的流程示意图。应该理解的是,虽然图11的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,图11中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。FIG. 11 is a schematic flowchart diagram of a method according to an embodiment of the present application. It should be understood that although the various steps in the flowchart of FIG. 11 are sequentially displayed as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and may be performed in other sequences. Moreover, at least some of the steps in FIG. 11 may include a plurality of sub-steps or stages, which are not necessarily performed at the same time, but may be executed at different times, and the order of execution thereof is not necessarily This may be performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of the other steps.
在一个实施例中,提供了一种电子设备,包括存储器和处理器,存储器中存储有计算机可读指令,计算机可读指令被处理器执行时,使得处理器执行以下步骤:获取当前目标对象移动操作指令;根据当前目标对象移动操作指令以及预设算法,计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度;根据目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置;根据目标对象的移动方向、移动速度和下一逻辑位置,确定目标对象的下一趋势位置;以及根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行目标对象的位置渐变画面渲染操作;其中,位置渐变画面渲染操作触发生成目标对象的多个位置渐变渲染帧。In one embodiment, an electronic device is provided, comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor, causing the processor to perform the step of: acquiring a current target object movement An operation instruction; calculating a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction according to the current target object moving operation instruction and a preset algorithm; determining the target object according to the moving direction, the moving speed, and the current logical position of the target object The next logical position; determining the next trend position of the target object according to the moving direction, the moving speed, and the next logical position of the target object; and performing the target object according to the next trend position of the target object and the current rendering position of the target object The position gradient screen rendering operation; wherein the position gradient screen rendering operation triggers generation of multiple position gradient rendering frames of the target object.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器在执行根据当前目标对象移动操作指令以及预设算法,计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度的步骤时,执行以下步骤:根据当前目标对象移动操作指令以及预设算法生成目标对象移动模型;其中目标对象移动模型用于计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度。In one embodiment, when the computer readable instructions are executed by the processor, causing the processor to calculate a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction, according to the current target object moving operation instruction and the preset algorithm. In the step of step, the following steps are performed: generating a target object movement model according to the current target object movement operation instruction and a preset algorithm; wherein the target object movement model is used to calculate a moving direction and a moving speed of the target object corresponding to the current target object movement operation instruction.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器在执行根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行目标对象的位置渐变画面渲染操作的步骤时,执行以下步骤:以渲染帧的帧间隔为渲 染间隔时间,当前渲染位置以及下一趋势位置的连线方向为移动方向,基于目标对象移动模型,生成每个位置渐变渲染帧对应的渲染位置,并在渲染位置上生成目标对象的位置渐变渲染帧。In one embodiment, when the computer readable instructions are executed by the processor, causing the processor to perform the step of performing a positional gradient picture rendering operation of the target object in accordance with a next trend position of the target object and a current rendering position of the target object, Perform the following steps: the frame interval of the rendered frame is the rendering interval, the current rendering position and the connection direction of the next trend position are the moving directions, and the rendering position corresponding to each position gradient rendering frame is generated based on the target object moving model, and A position gradient rendering frame that produces the target object at the render position.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器还执行以下步骤:当目标对象的当前渲染位置与下一逻辑位置的位置差异值大于第一设定值时,则使用目标对象的下一逻辑位置对目标对象的当前渲染位置进行修正。In one embodiment, when the computer readable instructions are executed by the processor, the processor further causes the step of: using when the position difference value of the current rendering position of the target object and the next logical position is greater than the first set value, The next logical position of the target object corrects the current render position of the target object.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器还执行以下步骤:设置目标对象的初始渲染位置以及初始逻辑位置;并根据初始逻辑位置以及初始目标对象移动操作指令,设置目标对象的初始趋势位置。In one embodiment, the computer readable instructions are executed by the processor such that the processor further performs the steps of: setting an initial rendering position of the target object and an initial logical position; and setting according to the initial logical position and the initial target object movement operation instruction The initial trend position of the target object.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器在执行根据目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置的步骤时,执行以下步骤:以目标对象的当前逻辑位置为运动起点,目标对象移动模型为运动参数,固定间隔时间为运动时间,计算目标对象的第一运动终点,并将第一运动终点设定为目标对象的下一逻辑位置。In one embodiment, when the computer readable instructions are executed by the processor, causing the processor to perform the step of determining the next logical position of the target object based on the direction of movement, the speed of movement, and the current logical position of the target object, performing the following steps : The current logical position of the target object is the starting point of the motion, the moving model of the target object is the motion parameter, the fixed interval time is the motion time, the first motion end point of the target object is calculated, and the first motion end point is set as the next target object. Logical location.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器在执行根据目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置的步骤时,执行以下步骤:以目标对象的下一逻辑位置为运动起点,目标对象移动模型为运动参数,预设趋势时间为运动时间,计算目标对象的第二运动终点,并将第二运动终点设定为目标对象的下一趋势位置。In one embodiment, when the computer readable instructions are executed by the processor, causing the processor to perform the step of determining the next logical position of the target object based on the direction of movement, the speed of movement, and the current logical position of the target object, performing the following steps : the next logical position of the target object is the motion starting point, the target object moving model is the motion parameter, the preset trend time is the motion time, the second motion end point of the target object is calculated, and the second motion end point is set as the target object. Next trend location.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器在执行以渲染帧的帧间隔为渲染间隔时间,当前渲染位置以及下一趋势位置的连线方向为移动方向,基于目标对象移动模型,生成每个位置渐变渲染帧对应的渲染位置,并在渲染位置上生成目标对象的位置渐变渲染帧的步骤时,执行以下步骤:根据当前渲染位置以及下一趋势位置的连线方向、下一逻辑位置以及目标对象移动模型,对位置渐变渲染帧的渲染位置进行修正。In one embodiment, the computer readable instructions are executed by the processor such that the processor performs the frame interval of the rendered frame as the rendering interval, and the current rendering position and the direction of the next trend position are the moving direction, based on the target The object movement model, generating a rendering position corresponding to each position gradient rendering frame, and generating a position gradient rendering frame of the target object at the rendering position, performing the following steps: according to the current rendering position and the connection direction of the next trend position , the next logical position and the target object movement model, the rendering position of the position gradient rendering frame is corrected.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器在执行根据当前渲染位置以及下一趋势位置的连线方向、下一逻辑位置以及目标对象移动模型,对位置渐变渲染帧的渲染位置进行修正的步骤时,执行以下步 骤:以设定时间间隔,获取逻辑投影位置,其中逻辑投影位置为下一逻辑位置在当前渲染位置和下一趋势位置的连线所在直线的投影位置;当逻辑投影位置位于当前渲染位置和下一趋势位置的连线上,则基于目标对象移动模型计算位置渐变渲染帧的渲染位置,并使用预设增大系数增加相邻位置渐变渲染帧的渲染位置之间的间距;以及当逻辑投影位置位于当前渲染位置和下一趋势位置的连线外,则基于目标对象移动模型计算位置渐变渲染帧的渲染位置,并使用预设减小系数减小相邻位置渐变渲染帧的渲染位置之间的间距。In one embodiment, when the computer readable instructions are executed by the processor, causing the processor to perform a rendering of the position gradient based on the current rendering position and the line direction of the next trend position, the next logical position, and the target object movement model When the rendering position is to be corrected, the following steps are performed: at a set time interval, a logical projection position is obtained, wherein the logical projection position is a projection position of a line where the connection of the current logical position and the next trend position of the next logical position is next. When the logical projection position is on the line connecting the current rendering position and the next trend position, the rendering position of the position gradient rendering frame is calculated based on the target object movement model, and the rendering of the adjacent position gradient rendering frame is increased by using the preset increasing coefficient. The spacing between the positions; and when the logical projection position is outside the line connecting the current rendering position and the next trend position, calculating the rendering position of the position gradient rendering frame based on the target object movement model, and reducing the phase using the preset reduction coefficient The position between the rendering positions of the adjacent position gradient rendering frames.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器在执行根据当前渲染位置以及下一趋势位置的连线方向、下一逻辑位置以及目标对象移动模型,对位置渐变渲染帧的渲染位置进行修正的步骤时,执行以下步骤:以设定时间间隔,获取当前渲染位置和下一趋势位置连线的第一连线长度、以及下一逻辑位置和下一趋势位置连线的第二连线长度;以及根据第一连线长度和第二连线长度的长度比值以及目标对象移动模型,计算相邻位置渐变渲染帧的渲染位置的间距。In one embodiment, when the computer readable instructions are executed by the processor, causing the processor to perform a rendering of the position gradient based on the current rendering position and the line direction of the next trend position, the next logical position, and the target object movement model When the rendering position is to be corrected, the following steps are performed: at the set time interval, the first connection length of the current rendering position and the next trend position connection line, and the next logical position and the next trend position are connected. a second connection length; and calculating a spacing of the rendering positions of the adjacent position gradient rendering frames according to the length ratio of the first connection length and the second connection length and the target object movement model.
一种非易失性的计算机可读存储介质,存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:获取当前目标对象移动操作指令;根据当前目标对象移动操作指令以及预设算法,计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度;根据目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置;根据目标对象的移动方向、移动速度和下一逻辑位置,确定目标对象的下一趋势位置;以及根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行目标对象的位置渐变画面渲染操作;其中,位置渐变画面渲染操作触发生成目标对象的多个位置渐变渲染帧。A non-transitory computer readable storage medium storing computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of: acquiring a current target object moving operation instruction; calculating a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction according to the current target object moving operation instruction and a preset algorithm; according to the moving direction, the moving speed, and the current logical position of the target object Determining a next logical position of the target object; determining a next trend position of the target object according to the moving direction, moving speed, and next logical position of the target object; and determining a next trend position of the target object and a current rendering position of the target object And performing a position gradient picture rendering operation on the target object; wherein the position gradient picture rendering operation triggers generating a plurality of position gradient rendering frames of the target object.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器在执行根据当前目标对象移动操作指令以及预设算法,计算当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度的步骤时,执行以下步骤:根据当前目标对象移动操作指令以及预设算法生成目标对象移动模型;其中目标对象移动模型用于计算当前目标对象移动操作指令对应的目标对象的移动 方向以及移动速度。In one embodiment, when the computer readable instructions are executed by the processor, causing the processor to calculate a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction, according to the current target object moving operation instruction and the preset algorithm. In the step of step, the following steps are performed: generating a target object movement model according to the current target object movement operation instruction and a preset algorithm; wherein the target object movement model is used to calculate a moving direction and a moving speed of the target object corresponding to the current target object movement operation instruction.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器在执行根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行目标对象的位置渐变画面渲染操作的步骤时,执行以下步骤:以渲染帧的帧间隔为渲染间隔时间,当前渲染位置以及下一趋势位置的连线方向为移动方向,基于目标对象移动模型,生成每个位置渐变渲染帧对应的渲染位置,并在渲染位置上生成目标对象的位置渐变渲染帧。In one embodiment, when the computer readable instructions are executed by the processor, causing the processor to perform the step of performing a positional gradient picture rendering operation of the target object in accordance with a next trend position of the target object and a current rendering position of the target object, Perform the following steps: the frame interval of the rendered frame is the rendering interval, the current rendering position and the connection direction of the next trend position are the moving directions, and the rendering position corresponding to each position gradient rendering frame is generated based on the target object moving model, and A position gradient rendering frame that produces the target object at the render position.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器还执行以下步骤:当目标对象的当前渲染位置与下一逻辑位置的位置差异值大于第一设定值时,则使用目标对象的下一逻辑位置对目标对象的当前渲染位置进行修正。In one embodiment, when the computer readable instructions are executed by the processor, the processor further causes the step of: using when the position difference value of the current rendering position of the target object and the next logical position is greater than the first set value, The next logical position of the target object corrects the current render position of the target object.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器还执行以下步骤:设置目标对象的初始渲染位置以及初始逻辑位置;并根据初始逻辑位置以及初始目标对象移动操作指令,设置目标对象的初始趋势位置。In one embodiment, the computer readable instructions are executed by the processor such that the processor further performs the steps of: setting an initial rendering position of the target object and an initial logical position; and setting according to the initial logical position and the initial target object movement operation instruction The initial trend position of the target object.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器在执行根据目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置的步骤时,执行以下步骤:以目标对象的当前逻辑位置为运动起点,目标对象移动模型为运动参数,固定间隔时间为运动时间,计算目标对象的第一运动终点,并将第一运动终点设定为目标对象的下一逻辑位置。In one embodiment, when the computer readable instructions are executed by the processor, causing the processor to perform the step of determining the next logical position of the target object based on the direction of movement, the speed of movement, and the current logical position of the target object, performing the following steps : The current logical position of the target object is the starting point of the motion, the moving model of the target object is the motion parameter, the fixed interval time is the motion time, the first motion end point of the target object is calculated, and the first motion end point is set as the next target object. Logical location.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器在执行根据目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置的步骤时,执行以下步骤:以目标对象的下一逻辑位置为运动起点,目标对象移动模型为运动参数,预设趋势时间为运动时间,计算目标对象的第二运动终点,并将第二运动终点设定为目标对象的下一趋势位置。In one embodiment, when the computer readable instructions are executed by the processor, causing the processor to perform the step of determining the next logical position of the target object based on the direction of movement, the speed of movement, and the current logical position of the target object, performing the following steps : the next logical position of the target object is the motion starting point, the target object moving model is the motion parameter, the preset trend time is the motion time, the second motion end point of the target object is calculated, and the second motion end point is set as the target object. Next trend location.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器在执行以渲染帧的帧间隔为渲染间隔时间,当前渲染位置以及下一趋势位置的连线方向为移动方向,基于目标对象移动模型,生成每个位置渐变渲染帧对应的渲染位置,并在渲染位置上生成目标对象的位置渐变渲染帧的步骤时,执行以下步骤:根据当前渲染位置以及下一趋势位置的连线方向、下一逻辑位置 以及目标对象移动模型,对位置渐变渲染帧的渲染位置进行修正。In one embodiment, the computer readable instructions are executed by the processor such that the processor performs the frame interval of the rendered frame as the rendering interval, and the current rendering position and the direction of the next trend position are the moving direction, based on the target The object movement model, generating a rendering position corresponding to each position gradient rendering frame, and generating a position gradient rendering frame of the target object at the rendering position, performing the following steps: according to the current rendering position and the connection direction of the next trend position , the next logical position and the target object movement model, the rendering position of the position gradient rendering frame is corrected.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器在执行根据当前渲染位置以及下一趋势位置的连线方向、下一逻辑位置以及目标对象移动模型,对位置渐变渲染帧的渲染位置进行修正的步骤时,执行以下步骤:以设定时间间隔,获取逻辑投影位置,其中逻辑投影位置为下一逻辑位置在当前渲染位置和下一趋势位置的连线所在直线的投影位置;当逻辑投影位置位于当前渲染位置和下一趋势位置的连线上,则基于目标对象移动模型计算位置渐变渲染帧的渲染位置,并使用预设增大系数增加相邻位置渐变渲染帧的渲染位置之间的间距;以及当逻辑投影位置位于当前渲染位置和下一趋势位置的连线外,则基于目标对象移动模型计算位置渐变渲染帧的渲染位置,并使用预设减小系数减小相邻位置渐变渲染帧的渲染位置之间的间距。In one embodiment, when the computer readable instructions are executed by the processor, causing the processor to perform a rendering of the position gradient based on the current rendering position and the line direction of the next trend position, the next logical position, and the target object movement model When the rendering position is to be corrected, the following steps are performed: at a set time interval, a logical projection position is obtained, wherein the logical projection position is a projection position of a line where the connection of the current logical position and the next trend position of the next logical position is next. When the logical projection position is on the line connecting the current rendering position and the next trend position, the rendering position of the position gradient rendering frame is calculated based on the target object movement model, and the rendering of the adjacent position gradient rendering frame is increased by using the preset increasing coefficient. The spacing between the positions; and when the logical projection position is outside the line connecting the current rendering position and the next trend position, calculating the rendering position of the position gradient rendering frame based on the target object movement model, and reducing the phase using the preset reduction coefficient The position between the rendering positions of the adjacent position gradient rendering frames.
在一个实施例中,计算机可读指令被处理器执行时,使得处理器在执行根据当前渲染位置以及下一趋势位置的连线方向、下一逻辑位置以及目标对象移动模型,对位置渐变渲染帧的渲染位置进行修正的步骤时,执行以下步骤:以设定时间间隔,获取当前渲染位置和下一趋势位置连线的第一连线长度、以及下一逻辑位置和下一趋势位置连线的第二连线长度;以及根据第一连线长度和第二连线长度的长度比值以及目标对象移动模型,计算相邻位置渐变渲染帧的渲染位置的间距。In one embodiment, when the computer readable instructions are executed by the processor, causing the processor to perform a rendering of the position gradient based on the current rendering position and the line direction of the next trend position, the next logical position, and the target object movement model When the rendering position is to be corrected, the following steps are performed: at the set time interval, the first connection length of the current rendering position and the next trend position connection line, and the next logical position and the next trend position are connected. a second connection length; and calculating a spacing of the rendering positions of the adjacent position gradient rendering frames according to the length ratio of the first connection length and the second connection length and the target object movement model.
如本申请所使用的术语“组件”、“模块”、“系统”、“接口”、“进程”等等一般地旨在指计算机相关实体:硬件、硬件和软件的组合、软件或执行中的软件。例如,组件可以是但不限于是运行在处理器上的进程、处理器、对象、可执行应用、执行的线程、程序和/或计算机。通过图示,运行在控制器上的应用和该控制器二者都可以是组件。一个或多个组件可以有在于执行的进程和/或线程内,并且组件可以位于一个计算机上和/或分布在两个或更多计算机之间。The terms "component," "module," "system," "interface," "process," and the like, as used herein, are generally intended to mean a computer-related entity: hardware, a combination of hardware and software, software, or in execution. software. For example, a component can be, but is not limited to being, a process running on a processor, a processor, an object, an executable application, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a controller and the controller can be a component. One or more components can reside within a process and/or thread of execution, and a component can be located on a computer and/or distributed between two or more computers.
图12和随后的讨论提供了对实现本发明所述的画面渲染装置所在的电子设备的工作环境的简短、概括的描述。图12的工作环境仅仅是适当的工作环境的一个实例并且不旨在建议关于工作环境的用途或功能的范围的任何限 制。实例电子设备1212包括但不限于可穿戴设备、头戴设备、医疗健康平台、个人计算机、服务器计算机、手持式或膝上型设备、移动设备(比如移动电话、个人数字助理(PDA)、媒体播放器等等)、多处理器系统、消费型电子设备、小型计算机、大型计算机、包括上述任意系统或设备的分布式计算环境,等等。Figure 12 and the following discussion provide a brief, general description of the working environment of an electronic device in which the picture rendering apparatus of the present invention is implemented. The working environment of Figure 12 is only one example of a suitable working environment and is not intended to suggest any limitation as to the scope of use or function of the working environment. Example electronic device 1212 includes, but is not limited to, a wearable device, a headset, a healthcare platform, a personal computer, a server computer, a handheld or laptop device, a mobile device (such as a mobile phone, a personal digital assistant (PDA), media playback) And so on), multiprocessor systems, consumer electronics, small computers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like.
尽管没有要求,但是在“计算机可读指令”被一个或多个电子设备执行的通用背景下描述实施例。计算机可读指令可以经由计算机可读介质来分布(下文讨论)。计算机可读指令可以实现为程序模块,比如执行特定任务或实现特定抽象数据类型的功能、对象、应用编程接口(API)、数据结构等等。典型地,该计算机可读指令的功能可以在各种环境中随意组合或分布。Although not required, embodiments are described in the general context in which "computer readable instructions" are executed by one or more electronic devices. Computer readable instructions may be distributed via computer readable media (discussed below). Computer readable instructions may be implemented as program modules, such as functions, objects, application programming interfaces (APIs), data structures, etc. that perform particular tasks or implement particular abstract data types. Typically, the functionality of the computer readable instructions can be combined or distributed at will in various environments.
图12图示了包括本发明的画面渲染装置中的一个或多个实施例的电子设备1212的实例。在一种配置中,电子设备1212包括至少一个处理单元1216和存储器1218。根据电子设备的确切配置和类型,存储器1218可以是易失性的(比如RAM)、非易失性的(比如ROM、闪存等)或二者的某种组合。该配置在图12中由虚线1214图示。FIG. 12 illustrates an example of an electronic device 1212 that includes one or more of the screen rendering devices of the present invention. In one configuration, electronic device 1212 includes at least one processing unit 1216 and memory 1218. Depending on the exact configuration and type of electronic device, memory 1218 can be volatile (such as RAM), non-volatile (such as ROM, flash memory, etc.) or some combination of the two. This configuration is illustrated in Figure 12 by dashed line 1214.
在其他实施例中,电子设备1212可以包括附加特征和/或功能。例如,设备1212还可以包括附加的存储装置(例如可移除和/或不可移除的),其包括但不限于磁存储装置、光存储装置等等。这种附加存储装置在图12中由存储装置1220图示。在一个实施例中,用于实现本文所提供的一个或多个实施例的计算机可读指令可以在存储装置1220中。存储装置1220还可以存储用于实现操作系统、应用程序等的其他计算机可读指令。计算机可读指令可以载入存储器1218中由例如处理单元1216执行。In other embodiments, electronic device 1212 may include additional features and/or functionality. For example, device 1212 may also include additional storage devices (eg, removable and/or non-removable) including, but not limited to, magnetic storage devices, optical storage devices, and the like. Such additional storage is illustrated by storage device 1220 in FIG. In one embodiment, computer readable instructions for implementing one or more embodiments provided herein may be in storage device 1220. Storage device 1220 can also store other computer readable instructions for implementing an operating system, applications, and the like. Computer readable instructions may be loaded into memory 1218 for execution by, for example, processing unit 1216.
本文所使用的术语“计算机可读介质”包括计算机存储介质。计算机存储介质包括以用于存储诸如计算机可读指令或其他数据之类的信息的任何方法或技术实现的易失性和非易失性、可移除和不可移除介质。存储器1218和存储装置1220是计算机存储介质的实例。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字通用盘(DVD)或其他光存储装置、盒式磁带、磁带、磁盘存储装置或其他磁存储设备、或可以用于存储期望信息并可以被电子设备1212访问的任何其他介质。任意这样 的计算机存储介质可以是电子设备1212的一部分。The term "computer readable medium" as used herein includes computer storage media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions or other data. Memory 1218 and storage device 1220 are examples of computer storage media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical storage device, magnetic tape cassette, magnetic tape, magnetic disk storage device or other magnetic storage device, Or any other medium that can be used to store desired information and that can be accessed by electronic device 1212. Any such computer storage media may be part of the electronic device 1212.
电子设备1212还可以包括允许电子设备1212与其他设备通信的通信连接1226。通信连接1226可以包括但不限于调制解调器、网络接口卡(NIC)、集成网络接口、射频发射器/接收器、红外端口、USB连接或用于将电子设备1212连接到其他电子设备的其他接口。通信连接1226可以包括有线连接或无线连接。通信连接1226可以发射和/或接收通信媒体。 Electronic device 1212 may also include a communication connection 1226 that allows electronic device 1212 to communicate with other devices. Communication connection 1226 may include, but is not limited to, a modem, a network interface card (NIC), an integrated network interface, a radio frequency transmitter/receiver, an infrared port, a USB connection, or other interface for connecting electronic device 1212 to other electronic devices. Communication connection 1226 can include a wired connection or a wireless connection. Communication connection 1226 can transmit and/or receive communication media.
术语“计算机可读介质”可以包括通信介质。通信介质典型地包含计算机可读指令或诸如载波或其他传输机构之类的“己调制数据信号”中的其他数据,并且包括任何信息递送介质。术语“己调制数据信号”可以包括这样的信号:该信号特性中的一个或多个按照将信息编码到信号中的方式来设置或改变。The term "computer readable medium" can include a communication medium. Communication media typically embodies computer readable instructions or other data in "modulated data signals" such as carrier waves or other transport mechanisms, and includes any information delivery media. The term "modulated data signal" can include a signal that one or more of the signal characteristics are set or changed in such a manner as to encode the information into the signal.
电子设备1212可以包括输入设备1224,比如键盘、鼠标、笔、语音输入设备、触摸输入设备、红外相机、视频输入设备和/或任何其他输入设备。设备1212中也可以包括输出设备1222,比如一个或多个显示器、扬声器、打印机和/或任意其他输出设备。输入设备1224和输出设备1222可以经由有线连接、无线连接或其任意组合连接到电子设备1212。在一个实施例中,来自另一个电子设备的输入设备或输出设备可以被用作电子设备1212的输入设备1224或输出设备1222。The electronic device 1212 can include an input device 1224 such as a keyboard, mouse, pen, voice input device, touch input device, infrared camera, video input device, and/or any other input device. Output device 1222, such as one or more displays, speakers, printers, and/or any other output device, may also be included in device 1212. Input device 1224 and output device 1222 can be coupled to electronic device 1212 via a wired connection, a wireless connection, or any combination thereof. In one embodiment, an input device or output device from another electronic device can be used as input device 1224 or output device 1222 of electronic device 1212.
电子设备1212的组件可以通过各种互连(比如总线)连接。这样的互连可以包括外围组件互连(PCI)(比如快速PCI)、通用串行总线(USB)、火线(IEEE 1394)、光学总线结构等等。在另一个实施例中,电子设备1212的组件可以通过网络互连。例如,存储器1218可以由位于不同物理位置中的、通过网络互连的多个物理存储器单元构成。The components of electronic device 1212 can be connected by various interconnects, such as a bus. Such interconnects may include Peripheral Component Interconnect (PCI) (such as Fast PCI), Universal Serial Bus (USB), Firewire (IEEE 1394), optical bus architecture, and the like. In another embodiment, the components of electronic device 1212 may be interconnected by a network. For example, memory 1218 can be comprised of multiple physical memory units that are interconnected by a network located in different physical locations.
本领域技术人员将认识到,用于存储计算机可读指令的存储设备可以跨越网络分布。例如,可经由网络1228访问的电子设备1230可以存储用于实现本发明所提供的一个或多个实施例的计算机可读指令。电子设备1212可以访问电子设备1230并且下载计算机可读指令的一部分或所有以供执行。可替代地,电子设备1212可以按需要下载多条计算机可读指令,或者一些指令可以在电子设备1212处执行并且一些指令可以在电子设备1230处执行。Those skilled in the art will recognize that storage devices for storing computer readable instructions may be distributed across a network. For example, electronic device 1230 accessible via network 1228 can store computer readable instructions for implementing one or more embodiments of the present disclosure. The electronic device 1212 can access the electronic device 1230 and download a portion or all of the computer readable instructions for execution. Alternatively, electronic device 1212 can download a plurality of computer readable instructions as needed, or some of the instructions can be executed at electronic device 1212 and some of the instructions can be executed at electronic device 1230.
本文提供了实施例的各种操作。在一个实施例中,所述的一个或多个操作可以构成一个或多个计算机可读介质上存储的计算机可读指令,其在被电子设备执行时将使得计算设备执行所述操作。描述一些或所有操作的顺序不应当被解释为暗示这些操作必需是顺序相关的。本领域技术人员将理解具有本说明书的益处的可替代的排序。而且,应当理解,不是所有操作必需在本文所提供的每个实施例中存在。Various operations of the embodiments are provided herein. In one embodiment, the one or more operations may constitute computer readable instructions stored on one or more computer readable media that, when executed by an electronic device, cause the computing device to perform the operations. The order in which some or all of the operations are described should not be construed as implying that the operations must be sequential. Those skilled in the art will appreciate alternative rankings that have the benefit of this specification. Moreover, it should be understood that not all operations must be present in every embodiment provided herein.
而且,尽管已经相对于一个或多个实现方式示出并描述了本公开,但是本领域技术人员基于对本说明书和附图的阅读和理解将会想到等价变型和修改。本公开包括所有这样的修改和变型,并且仅由所附权利要求的范围限制。特别地关于由上述组件(例如元件、资源等)执行的各种功能,用于描述这样的组件的术语旨在对应于执行所述组件的指定功能(例如其在功能上是等价的)的任意组件(除非另外指示),即使在结构上与执行本文所示的本公开的示范性实现方式中的功能的公开结构不等同。此外,尽管本公开的特定特征已经相对于若干实现方式中的仅一个被公开,但是这种特征可以与如可以对给定或特定应用而言是期望和有利的其他实现方式的一个或多个其他特征组合。而且,就术语“包括”、“具有”、“含有”或其变形被用在具体实施方式或权利要求中而言,这样的术语旨在以与术语“包含”相似的方式包括。Rather, the present invention has been shown and described with respect to the embodiments of the present invention. The present disclosure includes all such modifications and variations, and is only limited by the scope of the appended claims. With particular regard to various functions performed by the above-described components (e.g., elements, resources, etc.), the terms used to describe such components are intended to correspond to performing the specified functions of the components (e.g., they are functionally equivalent). Any component (unless otherwise indicated) is not equivalent in structure to the disclosed structure for performing the functions in the exemplary implementations of the present disclosure as shown herein. Moreover, although certain features of the present disclosure have been disclosed with respect to only one of several implementations, such features may be combined with one or more other implementations as may be desired and advantageous for a given or particular application. Other feature combinations. Furthermore, the terms "comprising," "having," "having," or "include" or "comprising" are used in the particular embodiments or claims, and such terms are intended to be encompassed in a manner similar to the term "comprising."
本发明实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。上述提到的存储介质可以是只读存储器,磁盘或光盘等。上述的各装置或系统,可以执行相应方法实施例中的方法。Each functional unit in the embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. The integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium. The above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like. Each of the above described devices or systems can perform the methods of the corresponding method embodiments.
综上所述,虽然本发明已以实施例揭露如上,实施例前的序号仅为描述方便而使用,对本发明各实施例的顺序不造成限制。并且,上述实施例并非用以限制本发明,本领域的普通技术人员,在不脱离本发明的精神和范围内,均可作各种更动与润饰,因此本发明的保护范围以权利要求界定的范围为准。In the above, the present invention has been disclosed in the above embodiments, and the serial numbers before the embodiments are used for convenience only, and the order of the embodiments of the present invention is not limited. In addition, the above embodiments are not intended to limit the invention, and various modifications and refinements can be made by those skilled in the art without departing from the spirit and scope of the invention. The scope is subject to.

Claims (20)

  1. 一种画面渲染方法,由电子设备执行,所述电子设备包括存储器和处理器所述方法包括:A picture rendering method is performed by an electronic device, the electronic device comprising a memory and a processor, the method comprising:
    获取当前目标对象移动操作指令;Obtaining a current target object moving operation instruction;
    根据所述当前目标对象移动操作指令以及预设算法,计算所述当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度;Calculating a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction according to the current target object moving operation instruction and a preset algorithm;
    根据所述目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置;Determining a next logical position of the target object according to the moving direction, the moving speed, and the current logical position of the target object;
    根据所述目标对象的移动方向、移动速度和下一逻辑位置,确定目标对象的下一趋势位置;以及Determining a next trend position of the target object according to the moving direction, the moving speed, and the next logical position of the target object;
    根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行所述目标对象的位置渐变画面渲染操作;其中,所述位置渐变画面渲染操作触发生成所述目标对象的多个位置渐变渲染帧。Performing a position gradient picture rendering operation of the target object according to a next trend position of the target object and a current rendering position of the target object; wherein the position gradient picture rendering operation triggers generating a plurality of position gradient rendering frames of the target object .
  2. 根据权利要求1所述的画面渲染方法,其特征在于,所述根据所述当前目标对象移动操作指令以及预设算法,计算所述当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度的步骤为:The screen rendering method according to claim 1, wherein the calculating a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction according to the current target object moving operation instruction and a preset algorithm The steps are:
    根据所述当前目标对象移动操作指令以及预设算法生成目标对象移动模型;其中所述目标对象移动模型用于计算所述当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度。Generating a target object movement model according to the current target object movement operation instruction and a preset algorithm; wherein the target object movement model is used to calculate a moving direction and a moving speed of the target object corresponding to the current target object movement operation instruction.
  3. 根据权利要求2所述的画面渲染方法,其特征在于,所述根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行所述目标对象的位置渐变画面渲染操作的步骤包括:The picture rendering method according to claim 2, wherein the step of performing a position gradient picture rendering operation of the target object according to the next trend position of the target object and the current rendering position of the target object comprises:
    以渲染帧的帧间隔为渲染间隔时间,所述当前渲染位置以及下一趋势位置的连线方向为移动方向,基于所述目标对象移动模型,生成每个位置渐变渲染帧对应的渲染位置,并在所述渲染位置上生成所述目标对象的位置渐变渲染帧。The frame interval of the rendered frame is a rendering interval, the current rendering position and the connecting direction of the next trend position are moving directions, and a rendering position corresponding to each position gradient rendering frame is generated based on the target object movement model, and A position gradient rendering frame of the target object is generated at the rendering position.
  4. 根据权利要求3所述的画面渲染方法,其特征在于,所述方法还包括:The picture rendering method according to claim 3, wherein the method further comprises:
    当所述目标对象的当前渲染位置与下一逻辑位置的位置差异值大于第一设定值时,则使用所述目标对象的下一逻辑位置对所述目标对象的当前渲染 位置进行修正。When the position difference value of the current rendering position of the target object and the next logical position is greater than the first set value, the current rendering position of the target object is corrected using the next logical position of the target object.
  5. 根据权利要求1所述的画面渲染方法,其特征在于,所述画面渲染方法还包括:The picture rendering method according to claim 1, wherein the picture rendering method further comprises:
    设置所述目标对象的初始渲染位置以及初始逻辑位置;并根据所述初始逻辑位置以及初始目标对象移动操作指令,设置所述目标对象的初始趋势位置。Setting an initial rendering position of the target object and an initial logical position; and setting an initial trend position of the target object according to the initial logical position and an initial target object moving operation instruction.
  6. 根据权利要求2所述的画面渲染方法,其特征在于,所述根据所述目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置的步骤包括:The picture rendering method according to claim 2, wherein the determining the next logical position of the target object according to the moving direction, the moving speed and the current logical position of the target object comprises:
    以所述目标对象的当前逻辑位置为运动起点,所述目标对象移动模型为运动参数,固定间隔时间为运动时间,计算所述目标对象的第一运动终点,并将所述第一运动终点设定为目标对象的下一逻辑位置。Taking a current logical position of the target object as a motion starting point, the target object moving model is a motion parameter, a fixed interval time is a motion time, calculating a first motion end point of the target object, and setting the first motion end point The next logical location of the target object.
  7. 根据权利要求2所述的画面渲染方法,其特征在于,所述根据所述目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置的步骤包括:The picture rendering method according to claim 2, wherein the determining the next logical position of the target object according to the moving direction, the moving speed and the current logical position of the target object comprises:
    以所述目标对象的下一逻辑位置为运动起点,所述目标对象移动模型为运动参数,预设趋势时间为运动时间,计算所述目标对象的第二运动终点,并将所述第二运动终点设定为目标对象的下一趋势位置。Taking a next logical position of the target object as a motion starting point, the target object moving model is a motion parameter, a preset trend time is a motion time, calculating a second motion end point of the target object, and the second motion The end point is set to the next trend position of the target object.
  8. 根据权利要求3所述的画面渲染方法,其特征在于,所述以渲染帧的帧间隔为渲染间隔时间,所述当前渲染位置以及下一趋势位置的连线方向为移动方向,基于所述目标对象移动模型,生成每个位置渐变渲染帧对应的渲染位置,并在所述渲染位置上生成所述目标对象的位置渐变渲染帧的步骤包括:The picture rendering method according to claim 3, wherein the frame interval of the rendered frame is a rendering interval time, and the connection direction of the current rendering position and the next trend position is a moving direction, based on the target The object movement model generates a rendering position corresponding to each position gradient rendering frame, and generates a position gradient rendering frame of the target object at the rendering position, including:
    根据所述当前渲染位置以及下一趋势位置的连线方向、下一逻辑位置以及目标对象移动模型,对所述位置渐变渲染帧的渲染位置进行修正。Correcting the rendering position of the position gradient rendering frame according to the current rendering position and the connection direction of the next trend position, the next logical position, and the target object movement model.
  9. 根据权利要求8所述的画面渲染方法,其特征在于,所述根据所述当前渲染位置以及下一趋势位置的连线方向、下一逻辑位置以及目标对象移动模型,对所述位置渐变渲染帧的渲染位置进行修正的步骤包括:The picture rendering method according to claim 8, wherein the rendering frame is rendered to the position according to a connection direction of the current rendering position and a next trend position, a next logical position, and a target object movement model. The steps to correct the rendering position include:
    以设定时间间隔,获取逻辑投影位置,其中所述逻辑投影位置为下一逻 辑位置在当前渲染位置和下一趋势位置的连线所在直线的投影位置;Obtaining a logical projection position at a set time interval, wherein the logical projection position is a projection position of a line where the connection of the current logical position and the next trend position of the next logical position is located;
    当所述逻辑投影位置位于当前渲染位置和下一趋势位置的连线上,则基于所述目标对象移动模型计算所述位置渐变渲染帧的渲染位置,并使用预设增大系数增加相邻位置渐变渲染帧的渲染位置之间的间距;以及When the logical projection position is on a line connecting the current rendering position and the next trend position, calculating a rendering position of the position gradient rendering frame based on the target object movement model, and increasing the adjacent position by using a preset increasing coefficient The spacing between the rendered positions of the gradient rendered frames;
    当所述逻辑投影位置位于当前渲染位置和下一趋势位置的连线外,则基于所述目标对象移动模型计算所述位置渐变渲染帧的渲染位置,并使用预设减小系数减小相邻位置渐变渲染帧的渲染位置之间的间距。When the logical projection position is outside the line connecting the current rendering position and the next trend position, calculating a rendering position of the position gradient rendering frame based on the target object movement model, and reducing the adjacent by using a preset reduction coefficient Position The gradient between the rendered positions of the rendered frames.
  10. 根据权利要求8所述的画面渲染方法,其特征在于,所述根据所述当前渲染位置以及下一趋势位置的连线方向、下一逻辑位置以及目标对象移动模型,对所述位置渐变渲染帧的渲染位置进行修正的步骤包括:The picture rendering method according to claim 8, wherein the rendering frame is rendered to the position according to a connection direction of the current rendering position and a next trend position, a next logical position, and a target object movement model. The steps to correct the rendering position include:
    以设定时间间隔,获取当前渲染位置和下一趋势位置连线的第一连线长度、以及下一逻辑位置和下一趋势位置连线的第二连线长度;以及Obtaining, at a set time interval, a first connection length of a connection between the current rendering position and the next trend position, and a second connection length connecting the next logical position and the next trend position;
    根据所述第一连线长度和所述第二连线长度的长度比值以及所述目标对象移动模型,计算相邻所述位置渐变渲染帧的渲染位置的间距。And calculating a pitch of a rendering position of the adjacent position gradient rendering frame according to the length ratio of the first connection length and the second connection length and the target object movement model.
  11. 一种电子设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:An electronic device comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor, such that the processor performs the following steps:
    获取当前目标对象移动操作指令;Obtaining a current target object moving operation instruction;
    根据所述当前目标对象移动操作指令以及预设算法,计算所述当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度;Calculating a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction according to the current target object moving operation instruction and a preset algorithm;
    根据所述目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置;Determining a next logical position of the target object according to the moving direction, the moving speed, and the current logical position of the target object;
    根据所述目标对象的移动方向、移动速度和下一逻辑位置,确定目标对象的下一趋势位置;以及Determining a next trend position of the target object according to the moving direction, the moving speed, and the next logical position of the target object;
    根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行所述目标对象的位置渐变画面渲染操作;其中,所述位置渐变画面渲染操作触发生成所述目标对象的多个位置渐变渲染帧。Performing a position gradient picture rendering operation of the target object according to a next trend position of the target object and a current rendering position of the target object; wherein the position gradient picture rendering operation triggers generating a plurality of position gradient rendering frames of the target object .
  12. 根据权利要求11所述的电子设备,其特征在于,所述计算机可读指 令被所述处理器执行时,使得所述处理器在执行根据所述当前目标对象移动操作指令以及预设算法,计算所述当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度的步骤时,执行以下步骤:The electronic device according to claim 11, wherein the computer readable instructions are executed by the processor, such that the processor performs a calculation according to the current target object moving operation instruction and a preset algorithm. When the current target object moves the operation direction of the target object corresponding to the moving direction and the moving speed step, the following steps are performed:
    根据所述当前目标对象移动操作指令以及预设算法生成目标对象移动模型;其中所述目标对象移动模型用于计算所述当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度。Generating a target object movement model according to the current target object movement operation instruction and a preset algorithm; wherein the target object movement model is used to calculate a moving direction and a moving speed of the target object corresponding to the current target object movement operation instruction.
  13. 根据权利要求12所述的电子设备,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述处理器在执行根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行所述目标对象的位置渐变画面渲染操作的步骤时,执行以下步骤:The electronic device of claim 12, wherein the computer readable instructions are executed by the processor such that the processor is performing a next trend position according to a target object and a current rendering position of the target object When performing the step of the position gradient screen rendering operation of the target object, perform the following steps:
    以渲染帧的帧间隔为渲染间隔时间,所述当前渲染位置以及下一趋势位置的连线方向为移动方向,基于所述目标对象移动模型,生成每个位置渐变渲染帧对应的渲染位置,并在所述渲染位置上生成所述目标对象的位置渐变渲染帧。The frame interval of the rendered frame is a rendering interval, the current rendering position and the connecting direction of the next trend position are moving directions, and a rendering position corresponding to each position gradient rendering frame is generated based on the target object movement model, and A position gradient rendering frame of the target object is generated at the rendering position.
  14. 根据权利要求13所述的电子设备,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述处理器还执行以下步骤:The electronic device of claim 13 wherein said computer readable instructions are executed by said processor such that said processor further performs the steps of:
    当所述目标对象的当前渲染位置与下一逻辑位置的位置差异值大于第一设定值时,则使用所述目标对象的下一逻辑位置对所述目标对象的当前渲染位置进行修正。When the position difference value of the current rendering position of the target object and the next logical position is greater than the first set value, the current rendering position of the target object is corrected using the next logical position of the target object.
  15. 根据权利要求11所述的电子设备,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述处理器还执行以下步骤:The electronic device of claim 11 wherein said computer readable instructions are executed by said processor such that said processor further performs the steps of:
    设置所述目标对象的初始渲染位置以及初始逻辑位置;并根据所述初始逻辑位置以及初始目标对象移动操作指令,设置所述目标对象的初始趋势位置。Setting an initial rendering position of the target object and an initial logical position; and setting an initial trend position of the target object according to the initial logical position and an initial target object moving operation instruction.
  16. 一种非易失性的计算机可读存储介质,存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:A non-transitory computer readable storage medium storing computer readable instructions, when executed by one or more processors, causes the one or more processors to perform the following steps:
    获取当前目标对象移动操作指令;Obtaining a current target object moving operation instruction;
    根据所述当前目标对象移动操作指令以及预设算法,计算所述当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度;Calculating a moving direction and a moving speed of the target object corresponding to the current target object moving operation instruction according to the current target object moving operation instruction and a preset algorithm;
    根据所述目标对象的移动方向、移动速度和当前逻辑位置,确定目标对象的下一逻辑位置;Determining a next logical position of the target object according to the moving direction, the moving speed, and the current logical position of the target object;
    根据所述目标对象的移动方向、移动速度和下一逻辑位置,确定目标对象的下一趋势位置;以及Determining a next trend position of the target object according to the moving direction, the moving speed, and the next logical position of the target object;
    根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行所述目标对象的位置渐变画面渲染操作;其中,所述位置渐变画面渲染操作触发生成所述目标对象的多个位置渐变渲染帧。Performing a position gradient picture rendering operation of the target object according to a next trend position of the target object and a current rendering position of the target object; wherein the position gradient picture rendering operation triggers generating a plurality of position gradient rendering frames of the target object .
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述处理器在执行根据所述当前目标对象移动操作指令以及预设算法,计算所述当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度的步骤时,执行以下步骤:The computer readable storage medium of claim 16, wherein the computer readable instructions are executed by the processor such that the processor is executing an operation instruction and a preset according to the current target object The algorithm performs the following steps when calculating the moving direction and the moving speed of the target object corresponding to the current target object moving operation instruction:
    根据所述当前目标对象移动操作指令以及预设算法生成目标对象移动模型;其中所述目标对象移动模型用于计算所述当前目标对象移动操作指令对应的目标对象的移动方向以及移动速度。Generating a target object movement model according to the current target object movement operation instruction and a preset algorithm; wherein the target object movement model is used to calculate a moving direction and a moving speed of the target object corresponding to the current target object movement operation instruction.
  18. 根据权利要求17所述的计算机可读存储介质,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述处理器在执行根据目标对象的下一趋势位置以及目标对象的当前渲染位置,进行所述目标对象的位置渐变画面渲染操作的步骤时,执行以下步骤:A computer readable storage medium according to claim 17, wherein said computer readable instructions are executed by said processor such that said processor is performing a next trend location according to a target object and a target object The current rendering position, when performing the step of the positional gradient screen rendering operation of the target object, perform the following steps:
    以渲染帧的帧间隔为渲染间隔时间,所述当前渲染位置以及下一趋势位置的连线方向为移动方向,基于所述目标对象移动模型,生成每个位置渐变渲染帧对应的渲染位置,并在所述渲染位置上生成所述目标对象的位置渐变渲染帧。The frame interval of the rendered frame is a rendering interval, the current rendering position and the connecting direction of the next trend position are moving directions, and a rendering position corresponding to each position gradient rendering frame is generated based on the target object movement model, and A position gradient rendering frame of the target object is generated at the rendering position.
  19. 根据权利要求18所述的计算机可读存储介质,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述处理器还执行以下步骤:A computer readable storage medium according to claim 18, wherein said computer readable instructions are executed by said processor such that said processor further performs the steps of:
    当所述目标对象的当前渲染位置与下一逻辑位置的位置差异值大于第一设定值时,则使用所述目标对象的下一逻辑位置对所述目标对象的当前渲染位置进行修正。When the position difference value of the current rendering position of the target object and the next logical position is greater than the first set value, the current rendering position of the target object is corrected using the next logical position of the target object.
  20. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述处理器还执行以下步骤:A computer readable storage medium according to claim 16 wherein said computer readable instructions are executed by said processor such that said processor further performs the steps of:
    设置所述目标对象的初始渲染位置以及初始逻辑位置;并根据所述初始逻辑位置以及初始目标对象移动操作指令,设置所述目标对象的初始趋势位置。Setting an initial rendering position of the target object and an initial logical position; and setting an initial trend position of the target object according to the initial logical position and an initial target object moving operation instruction.
PCT/CN2018/118030 2017-11-30 2018-11-28 Picture rendering method, electronic device and storage medium WO2019105396A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711244459.6A CN108022286B (en) 2017-11-30 2017-11-30 Picture rendering method, device and storage medium
CN201711244459.6 2017-11-30

Publications (1)

Publication Number Publication Date
WO2019105396A1 true WO2019105396A1 (en) 2019-06-06

Family

ID=62077867

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/118030 WO2019105396A1 (en) 2017-11-30 2018-11-28 Picture rendering method, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN108022286B (en)
WO (1) WO2019105396A1 (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108022286B (en) * 2017-11-30 2019-08-13 腾讯科技(深圳)有限公司 Picture rendering method, device and storage medium
CN109088786B (en) * 2018-06-26 2022-03-08 中国直升机设计研究所 Method for testing network delay of helicopter simulator
CN109499059B (en) * 2018-11-15 2020-08-11 腾讯科技(深圳)有限公司 Object rendering method and device, storage medium and electronic device
CN110300327B (en) * 2019-04-18 2021-06-15 深圳市腾讯网域计算机网络有限公司 Game client performance analysis method, device, terminal and storage medium
CN110139141B (en) * 2019-04-28 2021-10-15 腾讯科技(深圳)有限公司 Video picture rendering method and device, storage medium and electronic equipment
CN109966741B (en) * 2019-05-09 2022-06-10 腾讯科技(深圳)有限公司 Position updating method, device, equipment and storage medium
CN110478906B (en) * 2019-08-12 2023-05-16 网易(杭州)网络有限公司 Method and device for processing moving track of projection object
CN111167116B (en) * 2019-09-29 2022-01-18 腾讯科技(深圳)有限公司 Smooth display method, terminal and computer storage medium
CN110689597B (en) * 2019-09-30 2024-02-09 北京金山安全软件有限公司 Animation model display method and device
CN111161024B (en) * 2019-12-27 2020-10-20 珠海随变科技有限公司 Commodity model updating method and device, computer equipment and storage medium
CN111260762B (en) 2020-01-19 2023-03-28 腾讯科技(深圳)有限公司 Animation implementation method and device, electronic equipment and storage medium
CN113289330B (en) * 2020-02-21 2023-12-08 华为技术有限公司 Rendering method and device
CN113368492B (en) * 2020-02-25 2023-06-27 华为技术有限公司 Rendering method and device
CN111698425B (en) * 2020-06-22 2021-11-23 四川可易世界科技有限公司 Method for realizing consistency of real scene roaming technology
CN112190938B (en) * 2020-10-15 2021-06-22 广州巧趣信息技术有限公司 Game picture processing method and game platform based on data analysis and dynamic rendering
CN112402947B (en) * 2020-11-20 2022-08-26 上海莉莉丝网络科技有限公司 Game object control system, method and computer-readable storage medium
CN113867734A (en) * 2021-10-20 2021-12-31 北京思明启创科技有限公司 Code block interpretation execution method and device, electronic equipment and storage medium
CN114470786B (en) * 2022-01-27 2023-12-01 北京字跳网络技术有限公司 Frame synchronization data processing method and device, readable medium and electronic equipment
CN115797513B (en) * 2023-02-01 2023-05-09 腾讯科技(深圳)有限公司 Animation processing method, device, equipment, storage medium and program product

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6697071B2 (en) * 2000-01-28 2004-02-24 Kabushiki Kaisha Square Enix Method, game machine and recording medium for displaying motion in a video game
CN106302679A (en) * 2016-08-08 2017-01-04 腾讯科技(深圳)有限公司 A kind of virtual objects moves synchronous method, client and server
CN107124416A (en) * 2017-05-02 2017-09-01 广州爱九游信息技术有限公司 Many avatar position synchronization systems, method, device and electronic equipment and storage medium
CN108022286A (en) * 2017-11-30 2018-05-11 腾讯科技(深圳)有限公司 Picture rendering intent, device and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016065088A2 (en) * 2014-10-21 2016-04-28 Flir Systems, Inc. Pilot display systems and methods
US9390548B2 (en) * 2014-06-16 2016-07-12 Sap Se Three-dimensional volume rendering using an in-memory database
CN107370714A (en) * 2016-05-13 2017-11-21 吉林纪元时空动漫游戏科技集团股份有限公司 The high efficiency communication method that facing cloud renders
CN106101533B (en) * 2016-06-15 2019-09-13 努比亚技术有限公司 Render control method, device and mobile terminal
CN106127843B (en) * 2016-06-16 2019-05-17 福建数博讯信息科技有限公司 The rendering method and device of three-dimensional virtual scene
CN107045729B (en) * 2017-05-05 2018-09-18 腾讯科技(深圳)有限公司 A kind of image rendering method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6697071B2 (en) * 2000-01-28 2004-02-24 Kabushiki Kaisha Square Enix Method, game machine and recording medium for displaying motion in a video game
CN106302679A (en) * 2016-08-08 2017-01-04 腾讯科技(深圳)有限公司 A kind of virtual objects moves synchronous method, client and server
CN107124416A (en) * 2017-05-02 2017-09-01 广州爱九游信息技术有限公司 Many avatar position synchronization systems, method, device and electronic equipment and storage medium
CN108022286A (en) * 2017-11-30 2018-05-11 腾讯科技(深圳)有限公司 Picture rendering intent, device and storage medium

Also Published As

Publication number Publication date
CN108022286A (en) 2018-05-11
CN108022286B (en) 2019-08-13

Similar Documents

Publication Publication Date Title
WO2019105396A1 (en) Picture rendering method, electronic device and storage medium
US11722774B2 (en) Mobile zoom using multiple optical image stabilization cameras
US9992554B2 (en) Interpolated video tagging
US10264188B2 (en) Mobile zoom using multiple optical image stabilization cameras
US9888179B1 (en) Video stabilization for mobile devices
CN107680033B (en) Picture processing method and device
US20160007008A1 (en) Mobile camera system
JP6109413B2 (en) Image display method, image display apparatus, terminal, program, and recording medium
US11017747B2 (en) Systems and methods for adaptive calibration for dynamic rotation of computing device
CN107958439B (en) Image processing method and device
WO2021082241A1 (en) Image processing method and apparatus, electronic device and storage medium
US9357132B2 (en) Video rolling shutter correction for lens movement in optical image stabilization cameras
CN107408011B (en) Dynamically merging multiple screens into one viewport
US10154228B1 (en) Smoothing video panning
JP7395070B1 (en) Video processing methods and devices, electronic equipment and computer-readable storage media
WO2017133475A1 (en) Multimedia data playing method, apparatus and device, and interface rendering method, apparatus and device
JP7518168B2 (en) Method, device, electronic device, and computer-readable storage medium for displaying an object in a video
US11263814B2 (en) Method, apparatus, and storage medium for rendering virtual channel in multi-world virtual scene
WO2023143217A1 (en) Special effect prop display method, apparatus, device, and storage medium
CN112470164A (en) Attitude correction
US20230360333A1 (en) Systems and methods for augmented reality video generation
US20170069255A1 (en) Virtual Touch Overlay On Touchscreen for Control of Secondary Display
US9860447B1 (en) Calibration of optical image stabilization module with motion sensor using image comparisons
CN111970443A (en) Cloud deck control method and equipment and computer readable storage medium
EP3048524B1 (en) Document display support device, terminal, document display method, and computer-readable storage medium for computer program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18884489

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18884489

Country of ref document: EP

Kind code of ref document: A1