CN111013144A - 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
CN111013144A
CN111013144A CN201911312307.4A CN201911312307A CN111013144A CN 111013144 A CN111013144 A CN 111013144A CN 201911312307 A CN201911312307 A CN 201911312307A CN 111013144 A CN111013144 A CN 111013144A
Authority
CN
China
Prior art keywords
display element
display
game
rendering
storage space
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.)
Granted
Application number
CN201911312307.4A
Other languages
Chinese (zh)
Other versions
CN111013144B (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

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Abstract

The invention relates to the technical field of mobile phone games, in particular to a method and a device for drawing and rendering game pictures and a mobile terminal. The method comprises the following steps: acquiring first picture data, wherein the first picture data comprises data used for drawing and rendering each display element in a first display element set; 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 in different layers; and synthesizing a first game picture according to each display element in the first display element set for screen refreshing display, 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 synthesis of subsequent game pictures.

Description

Game picture drawing and rendering method and device and mobile terminal
Technical Field
The invention relates to the technical field of mobile phone games, in particular to a method and a device for drawing and rendering game pictures and a mobile terminal.
Background
The mobile phone game refers to game software running on a mobile phone, and comprises a stand-alone game and an online game. With the development of science and technology, the functions of the mobile phone game are more and more powerful, which is comparable to the web game of the computer game.
With the increase of functions of mobile phone games, the requirements on the performance of the mobile phone are higher and higher. Among them, drawing and rendering of game pictures of a mobile game require a large amount of 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 invention aims to provide a game picture drawing and rendering method, a game picture drawing and rendering device and a mobile terminal, which can utilize drawn and rendered display elements to participate in the synthesis of a new game picture so as to reduce the computing resources required for drawing and rendering the game picture.
In a first aspect of the present invention, a method for rendering a game screen is provided, where the method includes:
acquiring first picture data, wherein the first picture data comprises data used for drawing and rendering each display element in a first display element set;
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 in different layers;
and synthesizing a first game picture according to each display element in the first display element set for screen refreshing display, 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 synthesis of subsequent game pictures.
In one possible implementation, the method further includes: acquiring second picture data, wherein the second picture data comprises data used 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; rendering the display elements in the second display element set except the first intersection according to the data drawing of the display elements in the second display element set except 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 a possible implementation manner, the display elements in the second display element set except for the first intersection are located in different layers respectively.
In one possible implementation, the method further includes: passing display elements in the second set of display elements other than the first intersection to a first storage space.
In one possible implementation, the method further includes: deleting the display elements in the first storage space except the first intersection.
In a possible implementation manner, the synthesizing a first game screen according to each display element in the first display element set for screen refresh 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 a possible implementation manner, a time interval between the drawing rendering time of the display element stored in the first storage space and the current time is less than a preset time length.
In one possible implementation manner, each display element in the first display element set has an element identifier, and the element identifier is used for identifying a corresponding display element.
In a second aspect of the present invention, there is provided a game screen drawing and rendering apparatus, comprising:
the display device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring first picture data which comprises data used for drawing and rendering each display element in a first display element set;
a rendering unit, configured to render, according to the first picture data, each display element in the first display element set, where each display element in the first display element set is located in a different layer;
and the composition transmission unit is used for synthesizing a first game picture according to each display element in the first display element set so as to refresh and display the 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 subsequent game pictures.
In a third aspect of the present invention, a mobile terminal is provided, which includes a processor, a memory, and a transceiver; wherein the memory has stored therein executable code, which when executed by the processor, implements the method of the first aspect.
The invention 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 subsequent game picture needing drawing and rendering comprises the drawn and rendered display elements stored in the storage space, the drawn and rendered display elements can be taken out of the storage space to participate in the synthesis of a new game picture, so that the computing resources needed by image drawing and rendering 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 invention.
Fig. 2 is a flowchart of a game picture drawing and rendering method according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a game picture drawing and rendering apparatus according to an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention.
Detailed Description
The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
As shown in fig. 1, an application architecture diagram of a game screen drawing and rendering method provided by the embodiment of the present invention includes a mobile terminal and a mobile game server. The mobile terminal can be a mobile phone, an IPAD 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 the picture data of the mobile game. And the mobile phone game client draws a rendered picture image according to the picture data by utilizing the computing resources provided by the mobile phone, so that the screen of the mobile terminal can be refreshed and displayed. Rendering the image of the rendering picture requires more computing resources, so that the game picture is often stuck due to the shortage of the computing resources.
In the embodiment of the invention, when the mobile terminal receives the image data, the mobile terminal can respectively perform drawing and rendering on a plurality of display elements in the image data to obtain a plurality of layers, and each layer corresponds to one drawn and rendered display element. The layers can have preset storage space, and can participate in the synthesis of subsequent game pictures.
Next, a game screen drawing and rendering method provided by an embodiment of the present invention will be specifically described.
Example 1
In this embodiment, a game picture drawing and rendering method provided by the present invention is specifically described with reference to fig. 2.
The execution main body of the method is a mobile game client on the mobile terminal. As shown in fig. 2, the method includes the following steps.
Step 200, acquiring first picture data, wherein the first picture data comprises data used for drawing and rendering each display element in a first display element set.
When a user plays a game, the mobile phone game client continuously acquires picture data from the server so as to draw and render a game picture. It is easily understood that one game screen may include a plurality of display elements such as game characters, trees, mountains, 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 located in a different layer.
And the mobile phone game client draws and renders each display element according to the data of each display element. And each display element is respectively positioned in different layers.
Taking the android system as an example, generally, rendering of each frame of image needs to go through a dequeue (dequeue) process and an Enqueue (Enqueue) process, where the dequeue process refers to a process in which a mobile game client applies for an idle queuebuffer from a BufferQueue for rendering, and the Enqueue process refers to a process in which data obtained by rendering is written into the queuebuffer and put back to the BufferQueue, and a surfefinger is waited for composition. In the embodiment of the application, the mobile game client can apply for the idle queue buffer for each display element. And drawing and rendering each display element in the queue buffer of the display element, and after the drawing and rendering are completed, 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 transferring 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 for participating in synthesis of subsequent game pictures.
Still taking the android system as an example, the surfefinger may perform composition of game screens according to each display element listed in step 202, and compose a final game screen according to the synthesized game screen, the status bar, and the like, and send the final synthesized game screen to a hardware buffer area of the display screen for the display screen to refresh and display.
The first storage space is a storage space applied by the mobile game client from the memory space and used for storing the rendered display elements. Specifically, the mobile game client surface flicker may 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 the display elements of the rendered first set of display elements in step 202 into a first game screen. The first game picture can be transmitted to a buffer area 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 is easy to understand that the same display element is often not changed if it appears in different game screens. Taking a game character as an example, the image of the same game character is generally not changed in different game pictures, especially in adjacent game pictures. Therefore, the synthesized display elements stored in the preset storage space can be used for synthesizing the subsequent game pictures.
In one illustrative example, the method further comprises: acquiring second picture data, wherein the second picture data comprises data used 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; rendering the display elements in the second display element set except the first intersection according to the data drawing of the display elements in the second display element set except 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.
The individual display elements in the second set of display elements also have an element identification. The identifiers of the display elements in the second display element set may be matched with the identifier of the synthesized display element stored in the preset storage space, so that whether the second display element set includes one or more synthesized display elements stored in the preset storage space may be determined, that is, whether the second display element set and the first display element set have an intersection may be determined. If there is an intersection, the 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 perform drawing and rendering, and therefore computing resources required for drawing and rendering the second game picture can be greatly reduced.
In one example of this example, the display elements in the second set of display elements, except for the first intersection, are located in different layers, respectively. In this example, the rendered display elements are drawn separately, and then the rendered display elements are synthesized, whereby the second game screen is obtained.
In a specific example of this example, the method further comprises: passing display elements in the second set of display elements other than the first intersection to a first storage space. The display elements in the second display element set except the first intersection can also be stored in a preset storage space and can be used for synthesizing subsequent game pictures.
In another example of this example, the method further comprises: deleting the display elements in the first storage space except the first intersection. With the progress of the game, the current game screen and the game screen before the game has few same display elements, and therefore, the display elements stored in the preset storage space for a long time can be deleted to save space.
In one illustrative example, said composing a first game screen for screen refresh display from display elements of said 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.
The second storage space may be a storage space corresponding to the screen, and when the screen needs to be refreshed, the game picture is obtained 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 a display element stored in the first storage space is less than a preset time length. 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 subsequent game picture needing drawing and rendering comprises the drawn and rendered display elements stored in the storage space, the drawn and rendered display elements can be taken out of the storage space to participate in the synthesis of a new game picture, so that the computing resources needed by image drawing and rendering can be reduced.
Example 2
The embodiment provides a game picture drawing and rendering device. The apparatus is described in detail with reference to fig. 3.
As shown in fig. 3, the apparatus includes:
an obtaining unit 310, configured to obtain first picture data, where the first picture data includes data used for rendering each display element in a first display element set;
a rendering unit 320, configured to render, according to the first image data, each display element in the first display element set, where each display element in the first display element set is located in a different layer;
and a composition transferring unit 330, configured to synthesize a first game screen according to each display element in the first display element set, so as to be displayed in a screen refreshing manner, and transfer each display element in the first display element set to a first storage space, where the display element in the first storage space is used to participate in composition of a subsequent game screen.
The apparatus provided in this embodiment can be implemented by referring to the contents described in embodiment 1, and details are not described here.
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 subsequent game picture needing drawing and rendering comprises the drawn and rendered display elements stored in the storage space, the drawn and rendered display elements can be taken out of the storage space to participate in the synthesis of a new game picture, so that the computing resources needed by image drawing and rendering 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 content of the first and second substances,
the memory 42 stores executable code, and the processor 41 implements the method of 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 subsequent game picture needing drawing and rendering comprises the drawn and rendered display elements stored in the storage space, the drawn and rendered display elements can be taken out of the storage space to participate in the synthesis of a new game picture, so that the computing resources needed by image drawing and rendering can be reduced.
Although the invention has been described in detail above with reference to a general description and specific examples, it will be apparent to one skilled in the art that modifications or improvements may be made thereto based on the invention. Accordingly, such modifications and improvements are intended to be within the scope of the invention as claimed.

Claims (10)

1. A game picture drawing and rendering method is applied to a mobile terminal, and comprises the following steps:
acquiring first picture data, wherein the first picture data comprises data used for drawing and rendering each display element in a first display element set;
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 in different layers;
and synthesizing a first game picture according to each display element in the first display element set for screen refreshing display, 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 synthesis of subsequent game pictures.
2. The method of claim 1, further comprising:
acquiring second picture data, wherein the second picture data comprises data used 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; rendering the display elements in the second display element set except the first intersection according to the data drawing of the display elements in the second display element set except 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.
3. The method of claim 2, wherein the display elements in the second set of display elements other than the first intersection are located in different layers respectively.
4. The method of claim 3, further comprising: passing display elements in the second set of display elements other than the first intersection to a first storage space.
5. The method of claim 2, further comprising: deleting the display elements in the first storage space except the first intersection.
6. The method of claim 1, wherein synthesizing a first game screen for screen refresh display according to display elements 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.
7. The method according to claim 1, wherein a time interval between a rendering time of the display element saved in the first storage space and a current time is less than a preset time length.
8. The method of claim 1, wherein each display element in the first set of display elements has an element identifier that identifies the corresponding display element.
9. A game picture drawing and rendering device is characterized by being arranged on a mobile terminal, and the device comprises:
the display device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring first picture data which comprises data used for drawing and rendering each display element in a first display element set;
a rendering unit, configured to render, according to the first picture data, each display element in the first display element set, where each display element in the first display element set is located in a different layer;
and the composition transmission unit is used for synthesizing a first game picture according to each display element in the first display element set so as to refresh and display the 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 subsequent game pictures.
10. A mobile terminal comprising a processor, a memory, and a transceiver; wherein the content of the first and second substances,
the memory has stored therein executable code that when executed by the processor implements the method of any of claims 1-8.
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 true CN111013144A (en) 2020-04-17
CN111013144B 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
CN111013144B (en) 2023-10-27

Similar Documents

Publication Publication Date Title
CN112004086B (en) Video data processing method and device
CN111433743B (en) APP remote control method and related equipment
CN113457160B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN108173742B (en) Image data processing method and device
WO2022257699A1 (en) Image picture display method and apparatus, device, storage medium and program product
JP2013508869A (en) Application image display method and apparatus
WO2018121557A1 (en) Live broadcast data display method, device, program and medium
CN113034629B (en) Image processing method, image processing device, computer equipment and storage medium
CN113064727B (en) Image display scheduling method, terminal and storage medium applied to Android system
CN111359220B (en) Game advertisement generation method and device and computer equipment
CN112689168A (en) Dynamic effect processing method, dynamic effect display method and dynamic effect processing device
CN108733356B (en) Texture sharing method, computer equipment and storage medium
CN112843676A (en) Data processing method, device, terminal, server and storage medium
CN114820272B (en) Data interaction method and device, storage medium and electronic equipment
CN109803153B (en) Live video whiteboard drawing method and device
CN111013144B (en) Game picture drawing and rendering method and device and mobile terminal
CN105183288B (en) Single-window multi-task display method and intelligent mobile terminal thereof
CN111111175A (en) Game picture generation method and device and mobile terminal
CN116527978A (en) Multi-screen interaction control method and device
CN115988265A (en) Rendering method and device of display picture and terminal equipment
US20110314412A1 (en) Compositing application content and system content for display
CN115700484A (en) Rendering method, device, equipment and storage medium
CN114398018A (en) Picture display method, device, storage medium and electronic equipment
CN111243069A (en) Scene switching method and system of Unity3D engine
CN110598035B (en) Mobile phone game virtual character image recommendation method and device and mobile terminal

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