CN111013144B - Game picture drawing and rendering method and device and mobile terminal - Google Patents

Game picture drawing and rendering method and device and mobile terminal Download PDF

Info

Publication number
CN111013144B
CN111013144B CN201911312307.4A CN201911312307A CN111013144B CN 111013144 B CN111013144 B CN 111013144B CN 201911312307 A CN201911312307 A CN 201911312307A CN 111013144 B CN111013144 B CN 111013144B
Authority
CN
China
Prior art keywords
display element
display
rendering
display elements
intersection
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201911312307.4A
Other languages
Chinese (zh)
Other versions
CN111013144A (en
Inventor
王麒俨
王恺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ELEX Technology Co Ltd
Original Assignee
Beijing ELEX Technology Co Ltd
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 Beijing ELEX Technology Co Ltd filed Critical Beijing ELEX Technology Co Ltd
Priority to CN201911312307.4A priority Critical patent/CN111013144B/en
Publication of CN111013144A publication Critical patent/CN111013144A/en
Application granted granted Critical
Publication of CN111013144B publication Critical patent/CN111013144B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management

Abstract

The application relates to the technical field of mobile phone games, in particular to a game picture drawing and rendering method and device and a mobile terminal. The method comprises the following steps: acquiring first picture data, wherein the first picture data comprises data for drawing and rendering each display element in a first display element set; rendering each display element in the first display element set according to the first picture data, wherein each display element in the first display element set is respectively positioned on different layers; synthesizing a first game picture according to each display element in the first display element set so as to refresh and display a screen, and transmitting each display element in the first display element set to a first storage space, wherein the display elements in the first storage space are used for participating in the synthesis of a subsequent game picture.

Description

Game picture drawing and rendering method and device and mobile terminal
Technical Field
The application relates to the technical field of mobile phone games, in particular to a game picture drawing and rendering method and device and a mobile terminal.
Background
The mobile game refers to game software running on the mobile phone, and comprises a stand-alone game and a network game. With the development of science and technology, the functions of the mobile phone game are more and more powerful, and the mobile phone game is a web game comparable to a computer game.
With the increase of functions of mobile phone games, the requirements on the performance of mobile phones are higher and higher. Wherein, the drawing and rendering of the game picture of the mobile game require larger computing resources. If the computing resources of the mobile phone are insufficient, the high frame rate mode of the mobile phone game cannot be supported, and the user game experience is poor.
Disclosure of Invention
The application aims to provide a game picture drawing and rendering method, a game picture drawing and rendering device and a mobile terminal, which can utilize display elements of drawn and rendered to participate in the synthesis of a new game picture so as to reduce the calculation resources required for drawing and rendering the game picture.
The first aspect of the application provides a game picture drawing and rendering method, which comprises the following steps:
acquiring first picture data, wherein the first picture data comprises data for drawing and rendering each display element in a first display element set;
rendering each display element in the first display element set according to the first picture data, wherein each display element in the first display element set is respectively positioned on different layers;
synthesizing a first game picture according to each display element in the first display element set so as to refresh and display a screen, and transmitting each display element in the first display element set to a first storage space, wherein the display elements in the first storage space are used for participating in the synthesis of a subsequent game picture.
In one possible implementation, the method further includes: acquiring second picture data, wherein the second picture data comprises data for drawing and rendering each display element in a second display element set; when the second display element set and the first display element set have a first intersection, acquiring each display element in the first intersection from the first storage space; and rendering display elements of the second set of display elements other than the first intersection according to the data rendering of the display elements of the second set of display elements other than the first intersection; and synthesizing a second game picture according to the display elements in the second display element set except the first intersection and the display elements in the first intersection.
In one possible implementation, the display elements of the second set of display elements other than the first intersection are respectively located at different layers.
In one possible implementation, the method further includes: the display elements of the second set of display elements other than the first intersection are transferred to a first storage space.
In one possible implementation, the method further includes: and deleting the display elements except the first intersection in the first storage space.
In one possible implementation manner, the synthesizing the first game screen according to each display element in the first display element set for screen refreshing display includes:
and transmitting the first game picture to a second storage space so that the screen can acquire the first game picture from the second storage space.
In one possible implementation manner, a time interval between a drawing rendering time and a current time of the display element stored in the first storage space is smaller than a preset duration.
In one possible implementation, each display element in the first set of display elements has an element identification for identifying the corresponding display element.
In a second aspect of the present application, there is provided a game picture drawing and rendering apparatus, the apparatus comprising:
an acquisition unit configured to acquire first picture data including data for rendering each display element in a first set of display elements;
the drawing rendering unit is used for drawing and rendering each display element in the first display element set according to the first picture data, wherein each display element in the first display element set is respectively positioned on different layers;
and the composition transmission unit is used for compositing a first game picture according to each display element in the first display element set so as to refresh and display a screen, and transmitting each display element in the first display element set to a first storage space, wherein the display elements in the first storage space are used for participating in the composition of a subsequent game picture.
In a third aspect of the present application, a mobile terminal is provided, comprising a processor, a memory and a transceiver; wherein executable code is stored in the memory, and the method of the first aspect is implemented when the processor executes the executable code.
The application has the following advantages: different display elements in the game picture can be drawn and rendered in different layers, then the different display elements are stored in the storage space, and when the game picture needing drawing and rendering subsequently comprises the drawn and rendered display elements stored in the storage space, the drawn and rendered display elements can be taken out from the storage space and used for participating in the synthesis of a new game picture, so that the calculation resources required by the drawing and rendering of the image can be reduced.
Drawings
Fig. 1 is an application architecture diagram of a game picture drawing and rendering method according to an embodiment of the present application.
Fig. 2 is a flowchart of a game picture drawing and rendering method according to an embodiment of the present application.
Fig. 3 is a schematic structural diagram of a game frame drawing and rendering device according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Detailed Description
The following examples are illustrative of the application and are not intended to limit the scope of the application.
As shown in fig. 1, an application architecture diagram of a game picture drawing and rendering method provided by an embodiment of the present application includes a mobile terminal and a mobile game server. The mobile terminal can be a mobile phone, an IPAD (Internet protocol ad) and other terminals; the mobile terminal is provided with a client of the mobile game.
The mobile terminal and the mobile game server are connected through a network. The mobile game client installed on the mobile terminal can perform information interaction with the mobile game server to acquire picture data of the mobile game. And the mobile game client draws the rendered picture image according to the picture data by utilizing the computing resource provided by the mobile phone so as to refresh and display a screen of the mobile terminal. Rendering of a rendered picture image requires more computing resources, and therefore, a game picture is often stuck due to a shortage of computing resources.
In the embodiment of the application, when the mobile terminal receives the image data, a plurality of display elements in the image data can be respectively drawn and rendered to obtain a plurality of layers, and each layer corresponds to one drawn and rendered display element. The multiple layers can have preset storage space, and can participate in the composition of the subsequent game pictures.
Next, a specific description will be given of a game picture drawing rendering method provided by the embodiment of the present application.
Example 1
In this embodiment, a specific description is given of a game picture drawing rendering method provided by the present application with reference to fig. 2.
The execution subject of the method is a mobile game client on a mobile terminal. As shown in fig. 2, the method includes the following steps.
Step 200, obtaining first picture data, wherein the first picture data comprises data for rendering each display element in the first display element set.
When a user plays a game, the mobile game client side continuously acquires picture data from the server so as to draw a rendered game picture. It will be readily appreciated that a game screen may include multiple display elements, such as game characters, trees, hills, rivers, buildings, and the like.
In one illustrative example, each display element in the first set of display elements has an element identification that identifies the corresponding display element.
Step 202, rendering each display element in the first display element set according to the first picture data, wherein each display element in the first display element set is respectively located in different layers.
And the mobile game client draws and renders each display element according to the data of each display element. Each display element is located at a different layer.
Taking an android system as an example, usually, each frame of image is rendered through a dequeue process and an Enqueue process, wherein the dequeue process refers to a process that a mobile game client applies for an idle queue buffer from a buffer queue to render, and the Enqueue process refers to a process that data obtained by rendering is written into the queue buffer and put back to the buffer queue, and waiting for surface eFlink to synthesize. In the embodiment of the application, the mobile game client can apply for the idle queue buffer for each display element. Rendering the display element in the queue buffer of each display element, and after rendering, listing the display elements.
Step 204, synthesizing a first game picture according to each display element in the first display element set for screen refreshing display, and transmitting each display element in the first display element set to a first storage space, wherein the display elements in the first storage space are used for participating in synthesis of a subsequent game picture.
Still taking the android system as an example, the SurfaceFlinger may perform synthesis of the game frame according to each display element listed in step 202, synthesize a final game frame according to the synthesized game frame and status bar, and send the final synthesized game frame to a hardware buffer area of the display screen for refreshing and displaying by the display screen.
The first storage space is a storage space applied by the mobile game client from the memory space and is used for storing the drawn and rendered display elements. Specifically, the mobile phone game client side surfeflinger may simultaneously transfer the backup of each display element to the first storage space for storage when synthesizing the game screen according to each display element listed in step 202.
The mobile game client may compose a first game screen from each display element in the first set of display elements rendered at step 202. The first game picture can be transferred to a buffer corresponding to the screen for refreshing and displaying the screen. Each display element in the first display element set can be transferred to a preset storage space, and the process is stored.
It will be readily appreciated that the same display element tends to be unchanged if it appears in different game screens. Taking a game character as an example, the character of the same game character is generally unchanged in different game pictures, particularly in adjacent game pictures. Thus, the synthesized display elements stored in the preset storage space can be used for the synthesis of the subsequent game screen.
In one illustrative example, the method further comprises: acquiring second picture data, wherein the second picture data comprises data for drawing and rendering each display element in a second display element set; when the second display element set and the first display element set have a first intersection, acquiring each display element in the first intersection from the first storage space; and rendering display elements of the second set of display elements other than the first intersection according to the data rendering of the display elements of the second set of display elements other than the first intersection; and synthesizing a second game picture according to the display elements in the second display element set except the first intersection and the display elements in the first intersection.
Each display element in the second set of display elements also has an element identification. The identifiers of the display elements in the second display element set and the element identifiers of the synthesized display elements stored in the preset storage space can be matched, so that whether the second display element set comprises one or more synthesized display elements stored in the preset storage space or not can be judged, and whether the second display element set and the first display element set have intersection or not can be judged. If there is an intersection, display elements included in the intersection may be acquired from a preset storage space for participating in the composition of the second game screen. Because the display elements included in the intersection are the display elements which are drawn and rendered, the mobile game client does not need to draw and render, so that the computing resources required for drawing and rendering the second game picture can be greatly reduced.
In one example of this example, the display elements of the second set of display elements other than the first intersection are each located at a different layer. In this example, the rendering display elements are respectively rendered, and then the rendering display elements are synthesized, so that the second game picture can be obtained.
In a specific example of this example, the method further comprises: the display elements of the second set of display elements other than the first intersection are transferred to a first storage space. Display elements in the second display element set except the first intersection set can be stored in a preset storage space and can be used for synthesizing subsequent game pictures.
In another example of the example, the method further comprises: and deleting the display elements except the first intersection in the first storage space. As the game progresses, the current game screen and the game screen far before have few identical display elements, and therefore, display elements stored in a preset storage space for a long time can be deleted to save space.
In one illustrative example, the synthesizing the first game frame for screen refresh display from each display element in the first set of display elements includes: and transmitting the first game picture to a second storage space so that the screen can acquire the first game picture from the second storage space.
The second storage space can be a storage space corresponding to the screen, and when the screen needs to be refreshed, the game picture is acquired from the storage space to be refreshed and displayed.
In one illustrative example, a time interval between a drawing rendering time and a current time of the display element stored in the first storage space is less than a preset time period. Display elements stored in a preset storage space for a long time can be deleted to save space.
The method provided by the embodiment has the following advantages: different display elements in the game picture can be drawn and rendered in different layers, then the different display elements are stored in the storage space, and when the game picture needing drawing and rendering subsequently comprises the drawn and rendered display elements stored in the storage space, the drawn and rendered display elements can be taken out from the storage space and used for participating in the synthesis of a new game picture, so that the calculation resources required by the drawing and rendering of the image can be reduced.
Example 2
The embodiment provides a game picture drawing and rendering device. The device is described in detail in connection with fig. 3.
As shown in fig. 3, the apparatus includes:
an obtaining unit 310, configured to obtain first frame data, where the first frame data includes data for rendering each display element in the first display element set;
a drawing rendering unit 320, configured to draw and render each display element in the first display element set according to the first picture data, where each display element in the first display element set is located in a different layer;
and a composition transmitting unit 330, configured to compose a first game frame according to each display element in the first display element set, so as to allow the screen to refresh and display, and transmit each display element in the first display element set to a first storage space, where the display elements in the first storage space are used to participate in composition of a subsequent game frame.
The apparatus provided in this embodiment may be implemented with reference to the content described in embodiment 1, and will not be described herein.
The device provided by the embodiment has the following advantages: different display elements in the game picture can be drawn and rendered in different layers, then the different display elements are stored in the storage space, and when the game picture needing drawing and rendering subsequently comprises the drawn and rendered display elements stored in the storage space, the drawn and rendered display elements can be taken out from the storage space and used for participating in the synthesis of a new game picture, so that the calculation resources required by the drawing and rendering of the image can be reduced.
Example 3
The present embodiment provides a mobile terminal, as shown in fig. 4, including a processor 41, a memory 42, and a transceiver 43; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory 42 stores executable code, and the processor 41 implements the method described in embodiment 1 when executing the executable code.
The mobile terminal provided by the embodiment has the following advantages: different display elements in the game picture can be drawn and rendered in different layers, then the different display elements are stored in the storage space, and when the game picture needing drawing and rendering subsequently comprises the drawn and rendered display elements stored in the storage space, the drawn and rendered display elements can be taken out from the storage space and used for participating in the synthesis of a new game picture, so that the calculation resources required by the drawing and rendering of the image can be reduced.
While the application has been described in detail in the foregoing general description and specific examples, it will be apparent to those skilled in the art that modifications and improvements can be made thereto. Accordingly, such modifications or improvements may be made without departing from the spirit of the application and are intended to be within the scope of the application as claimed.

Claims (9)

1. A game picture drawing and rendering method, characterized by being applied to a mobile terminal, the method comprising:
acquiring first picture data, wherein the first picture data comprises data for drawing and rendering each display element in a first display element set;
rendering each display element in the first display element set according to the first picture data, wherein each display element in the first display element set is respectively positioned on different layers;
synthesizing a first game picture according to each display element in the first display element set so as to refresh and display a screen, and transmitting each display element in the first display element set to a first storage space, wherein the display elements in the first storage space are used for participating in the synthesis of a subsequent game picture;
the method further comprises the steps of:
acquiring second picture data, wherein the second picture data comprises data for drawing and rendering each display element in a second display element set;
when the second display element set and the first display element set have a first intersection, acquiring each display element in the first intersection from the first storage space; and rendering display elements of the second set of display elements other than the first intersection according to the data rendering of the display elements of the second set of display elements other than the first intersection;
and synthesizing a second game picture according to the display elements in the second display element set except the first intersection and the display elements in the first intersection.
2. The method of claim 1, wherein display elements of the second set of display elements other than the first intersection are each located at a different layer.
3. The method according to claim 2, wherein the method further comprises: the display elements of the second set of display elements other than the first intersection are transferred to a first storage space.
4. The method according to claim 1, wherein the method further comprises: and deleting the display elements except the first intersection in the first storage space.
5. The method of claim 1, wherein synthesizing the first game frame for screen refresh display from each display element in the first set of display elements comprises:
and transmitting the first game picture to a second storage space so that the screen can acquire the first game picture from the second storage space.
6. The method of claim 1, wherein a time interval between a rendering time and a current time of drawing of the display element stored in the first storage space is less than a preset time period.
7. The method of claim 1, wherein each display element in the first set of display elements has an element identification for identifying the corresponding display element.
8. A game picture drawing and rendering device, characterized by being provided in a mobile terminal, comprising:
an acquisition unit configured to acquire first picture data including data for rendering each display element in a first set of display elements;
the drawing rendering unit is used for drawing and rendering each display element in the first display element set according to the first picture data, wherein each display element in the first display element set is respectively positioned on different layers;
the composition transfer unit is used for compositing a first game picture according to each display element in the first display element set so as to enable a screen to be refreshed and displayed, and transferring each display element in the first display element set to a first storage space, wherein the display elements in the first storage space are used for participating in the composition of a subsequent game picture;
acquiring second picture data, wherein the second picture data comprises data for drawing and rendering each display element in a second display element set;
when the second display element set and the first display element set have a first intersection, acquiring each display element in the first intersection from the first storage space; and rendering display elements of the second set of display elements other than the first intersection according to the data rendering of the display elements of the second set of display elements other than the first intersection;
and synthesizing the second game picture according to the display elements except the first intersection set in the second display element set and the display elements in the first intersection set.
9. A mobile terminal comprising a processor, a memory, and a transceiver; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory has stored therein executable code which, when executed by the processor, implements the method of any of claims 1-7.
CN201911312307.4A 2019-12-18 2019-12-18 Game picture drawing and rendering method and device and mobile terminal Active CN111013144B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911312307.4A CN111013144B (en) 2019-12-18 2019-12-18 Game picture drawing and rendering method and device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911312307.4A CN111013144B (en) 2019-12-18 2019-12-18 Game picture drawing and rendering method and device and mobile terminal

Publications (2)

Publication Number Publication Date
CN111013144A CN111013144A (en) 2020-04-17
CN111013144B true CN111013144B (en) 2023-10-27

Family

ID=70210397

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911312307.4A Active CN111013144B (en) 2019-12-18 2019-12-18 Game picture drawing and rendering method and device and mobile terminal

Country Status (1)

Country Link
CN (1) CN111013144B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101847269A (en) * 2009-03-27 2010-09-29 上海科泰世纪科技有限公司 Multi-layer cartoon rendering system and method
CN102346916A (en) * 2011-09-26 2012-02-08 深圳市万兴软件有限公司 Image layer rendering method and device
CN103678631A (en) * 2013-12-19 2014-03-26 华为技术有限公司 Page rendering method and device
CN104299253A (en) * 2013-07-19 2015-01-21 广州欧划动画技术有限公司 Intelligent rendering method and device for full-high-definition digital film animation
CN105389090A (en) * 2015-11-06 2016-03-09 网易(杭州)网络有限公司 Game interaction interface displaying method and apparatus, mobile terminal and computer terminal
WO2018000372A1 (en) * 2016-06-30 2018-01-04 华为技术有限公司 Picture display method and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101847269A (en) * 2009-03-27 2010-09-29 上海科泰世纪科技有限公司 Multi-layer cartoon rendering system and method
CN102346916A (en) * 2011-09-26 2012-02-08 深圳市万兴软件有限公司 Image layer rendering method and device
CN104299253A (en) * 2013-07-19 2015-01-21 广州欧划动画技术有限公司 Intelligent rendering method and device for full-high-definition digital film animation
CN103678631A (en) * 2013-12-19 2014-03-26 华为技术有限公司 Page rendering method and device
CN105389090A (en) * 2015-11-06 2016-03-09 网易(杭州)网络有限公司 Game interaction interface displaying method and apparatus, mobile terminal and computer terminal
WO2018000372A1 (en) * 2016-06-30 2018-01-04 华为技术有限公司 Picture display method and terminal

Also Published As

Publication number Publication date
CN111013144A (en) 2020-04-17

Similar Documents

Publication Publication Date Title
CN112004086B (en) Video data processing method and device
CN111433743B (en) APP remote control method and related equipment
JP5620506B2 (en) Application image display method and apparatus
CN108173742B (en) Image data processing method and device
CN103283250B (en) Method, device and system of video redirection
CN109309842B (en) Live broadcast data processing method and device, computer equipment and storage medium
WO2022257699A1 (en) Image picture display method and apparatus, device, storage medium and program product
CN110098998B (en) Method and apparatus for processing information
WO2018107628A1 (en) Display method and device
CN112843676B (en) Data processing method, device, terminal, server and storage medium
CN113542757A (en) Image transmission method and device for cloud application, server and storage medium
CN113900754A (en) Desktop sharing method and device, computer equipment and storage medium
CN105487640A (en) Image pre-loading and caching method of Android watch
CN112689168A (en) Dynamic effect processing method, dynamic effect display method and dynamic effect processing device
CN112486620A (en) Cross-process off-screen rendering method and device, electronic equipment and storage medium
CN113521728A (en) Cloud application implementation method and device, electronic equipment and storage medium
CN111359220B (en) Game advertisement generation method and device and computer equipment
CN112689012A (en) Cross-network proxy communication method and device
CN111013144B (en) Game picture drawing and rendering method and device and mobile terminal
CN109803153B (en) Live video whiteboard drawing method and device
CN105183288B (en) Single-window multi-task display method and intelligent mobile terminal thereof
WO2016066056A1 (en) Image remote projection method, server and client
CN115700484A (en) Rendering method, device, equipment and storage medium
CN114398018A (en) Picture display method, device, storage medium and electronic equipment
CN114265714A (en) Drive control method and device based on cloud mobile phone and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant