CN113209615A - Method for adapting folding screen to game - Google Patents

Method for adapting folding screen to game Download PDF

Info

Publication number
CN113209615A
CN113209615A CN202110588914.4A CN202110588914A CN113209615A CN 113209615 A CN113209615 A CN 113209615A CN 202110588914 A CN202110588914 A CN 202110588914A CN 113209615 A CN113209615 A CN 113209615A
Authority
CN
China
Prior art keywords
screen
game
welt
resolution
fixed
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.)
Pending
Application number
CN202110588914.4A
Other languages
Chinese (zh)
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.)
Baobao Bus Co ltd
Original Assignee
Baobao Bus 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 Baobao Bus Co ltd filed Critical Baobao Bus Co ltd
Priority to CN202110588914.4A priority Critical patent/CN113209615A/en
Publication of CN113209615A publication Critical patent/CN113209615A/en
Pending legal-status Critical Current

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention relates to a method for adapting a folding screen to a game, which comprises the following steps: s1, dividing the operation content of the game into a welt display element and an operation area, and displaying the operation area in the middle of the screen according to a fixed display proportion; s2, acquiring the resolution of the current screen, and judging whether the resolution is greater than the width/height quotient of the preset resolution; if so, determining the position of the operation area in the current screen in a Fixed display proportion according to a Fixed _ Height screen adaptation method, and determining the position of the welt display element in the current screen according to a first preset distance of the welt display element; if not, determining the position of the operation area in the current screen in a Fixed display proportion according to a Fixed _ Width screen adaptation method, and determining the position of the welt display element in the current screen according to a second preset distance of the welt display element. The state of the folding screen is judged by obtaining the resolution of the current screen, and then the operation area of the game is displayed by using a corresponding screen adaptation method, so that the user experience is improved.

Description

Method for adapting folding screen to game
Technical Field
The invention relates to the field of computer software, in particular to a method for adapting a folding screen to a game.
Background
At present, mobile phones with folding screens such as samsung Fold and MateX appear in the market, and in order to improve 2D game experience of users, an adaptive scheme of a mobile phone screen must be solved, and a scheme of unfolding the folding screen for self adaptation is achieved. The screen adaptation scheme based on the Cocos2d-x engine includes methods of ExactFit (stretch adaptation), NoBorder (equal ratio enlargement), ShowAll (equal ratio scaling according to the minimum ratio of width and height, insufficient black edge preservation), FixedWidth (width is unchanged, height is enlarged according to the same ratio of width/design width) and FixedHeight (height is unchanged, width is enlarged according to the same ratio of height/design height).
The above screen adaptation method has the following disadvantages:
1. aiming at the ExactFit screen adaptation method, the screen adaptation method can stretch the scene and deform the scene.
2. For the NoBorder screen adaptation method, the screen adaptation method can enlarge in an equal proportion, and some scene elements can be truncated beyond the screen.
3. Aiming at the ShowAll screen adaptation method, the screen adaptation method has black edges, and user experience is influenced.
4. For the Fixed _ Width screen adaptation method, the screen adaptation method will be in the folded long screen because the Width ratio is large and the height exceeds the screen proportionally.
5. For the Fixed _ Height screen adaptation method, the screen adaptation method will be in the expanded wide screen because the Height ratio is too large and the width exceeds the screen on the same scale.
Any one of the above adaptation schemes must be set when a game scene is initialized, otherwise, the adaptation scheme cannot adapt to the adaptive operation of folding and unfolding, and the user experience is affected.
Disclosure of Invention
Technical problem to be solved
In order to solve the above problems in the prior art, the invention provides a method for adapting a folding screen to a game, which can improve the experience of a user playing the game by using the folding screen.
(II) technical scheme
In order to achieve the purpose, the invention adopts the technical scheme that: a method of game adapting a folding screen, comprising:
s1, dividing the operation content of the game into a welt display element and an operation area, wherein the operation area is displayed in the middle of the screen according to a fixed display scale;
s2, acquiring the resolution of the current screen, and judging whether the resolution is greater than the width/height quotient of the preset resolution;
if so, determining the position of the operation area in the current screen in the Fixed display proportion according to a Fixed _ Height screen adaptation method, and determining the position of the welt display element in the current screen according to a first preset distance of the welt display element;
if not, determining the position of the operation area in the current screen according to the Fixed display proportion by a Fixed _ Width screen adaptation method, and determining the position of the welt display element in the current screen according to a second preset distance of the welt display element.
(III) advantageous effects
The invention has the beneficial effects that: the method comprises the steps of judging whether a folding screen is in a folding state or an unfolding state by obtaining the resolution of a current screen, displaying an operation area of a game by using a Fixed _ Height/Fixed _ Width screen adapting method in an adaptive mode, and determining the position of a welt display element in the current screen according to a first preset distance and a second preset distance.
Drawings
FIG. 1 is a flow chart of a method for adapting a folding screen for a game according to the present invention.
Detailed Description
For the purpose of better explaining the present invention and to facilitate understanding, the present invention will be described in detail by way of specific embodiments with reference to the accompanying drawings.
Referring to fig. 1, a method for adapting a foldable screen to a game includes:
s1, dividing the operation content of the game into a welt display element and an operation area, wherein the operation area is displayed in the middle of the screen according to a fixed display scale;
s2, acquiring the resolution of the current screen, and judging whether the resolution is greater than the width/height quotient of the preset resolution;
if so, determining the position of the operation area in the current screen in the Fixed display proportion according to a Fixed _ Height screen adaptation method, and determining the position of the welt display element in the current screen according to a first preset distance of the welt display element;
if not, determining the position of the operation area in the current screen according to the Fixed display proportion by a Fixed _ Width screen adaptation method, and determining the position of the welt display element in the current screen according to a second preset distance of the welt display element.
From the above description, the beneficial effects of the present invention are: judging whether the folding screen is in a folding state or an unfolding state by obtaining the resolution of the current screen, displaying the operation area of the game by using a Fixed _ Height/Fixed _ Width screen adaptation method in an adaptive manner, and determining the position of the welt display element in the current screen according to the first/second preset distance.
Further, the preset resolution in S2 is 1334 × 750, and the fixed display scale is 16: 9.
Further, the display content of the game comprises a background image and operation content;
the acquiring of the resolution of the current screen in S2 includes:
and filling the background picture in the current screen.
As is apparent from the above description, the area other than the operation content in the display content of the game is thereby more beautiful.
Example one
Referring to fig. 1, a method for adapting a foldable screen to a game includes:
s1, dividing the operation content of the game into a welt display element and an operation area, wherein the operation area is displayed in the middle of the screen according to a fixed display scale;
s2, acquiring the resolution of the current screen, and judging whether the resolution is greater than the width/height quotient of the preset resolution;
if so, determining the position of the operation area in the current screen in the Fixed display proportion according to a Fixed _ Height screen adaptation method, and determining the position of the welt display element in the current screen according to a first preset distance of the welt display element;
if not, determining the position of the operation area in the current screen according to the Fixed display proportion by a Fixed _ Width screen adaptation method, and determining the position of the welt display element in the current screen according to a second preset distance of the welt display element.
For example, the welt display element can be set as an operation button such as a picture button, a return button and the like, so that the operation of a user in the game process is facilitated.
In addition, the positions of the welt display elements can be determined by respectively setting the margin of the welt display elements in the folded/unfolded states.
In addition, when setting the operation content of the game, the operation content of the game can be filled in an empty layer, wherein the layer is a node of a game layer and is the top parent container of all nodes of the operation content of the game, the operation content of the game is placed on the node, and the positions of all child nodes (namely the operation content of the game) can be changed by changing the positions of the layers. For example, the operation area is displayed in the middle of the screen in a fixed-scale centering manner, or is realized by displaying the operation area in a fixed-scale layer centering manner.
Wherein the preset resolution in S2 is 1334 × 750, and the fixed display scale is 16: 9; the 1334 × 750 resolution (screen resolution of iphone 6) is taken as a critical resolution, and above this resolution, the Fixed _ Height screen adaptation method is used, and below this resolution, the Fixed _ Width screen adaptation method is used.
Wherein, the display content of the game comprises a background picture and operation content;
the acquiring of the resolution of the current screen in S2 includes:
filling the background picture on a current screen; the ratio of the background image is 16:9, the resolution is larger than the resolution of the screen in the folding/unfolding state, namely the width/height of the background image is larger than the width/height of the screen in the folding/unfolding state, and in the process of filling the current screen with the background image, the display area of the current screen is positioned in the background image, so that the background can be perfectly displayed no matter what state the folding screen is, and the display of the whole screen is more attractive through the background image.
In summary, the method for adapting a folding screen to a game provided by the invention judges whether the folding screen is in a folded state or an unfolded state by obtaining the resolution of the current screen, and then adaptively displays the operation area of the game by using a Fixed _ Height/Fixed _ Width screen adaptation method, and determines the position of a welt display element in the current screen according to the first/second preset distance, so that the method can automatically adjust the UI picture of the 2D game, thereby solving the problems that the game scene is not stretched, the scene element does not exceed the screen and the scene element does not have a black edge, and improving the user experience.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (3)

1. A method of game adaptation to a folding screen, comprising:
s1, dividing the operation content of the game into a welt display element and an operation area, wherein the operation area is displayed in the middle of the screen according to a fixed display scale;
s2, acquiring the resolution of the current screen, and judging whether the resolution is greater than the width/height quotient of the preset resolution;
if so, determining the position of the operation area in the current screen in the Fixed display proportion according to a Fixed _ Height screen adaptation method, and determining the position of the welt display element in the current screen according to a first preset distance of the welt display element;
if not, determining the position of the operation area in the current screen according to the Fixed display proportion by a Fixed _ Width screen adaptation method, and determining the position of the welt display element in the current screen according to a second preset distance of the welt display element.
2. A method for adapting a game to a folding screen according to claim 1, wherein the predetermined resolution in S2 is 1334 x 750 and the fixed display ratio is 16: 9.
3. The method for adapting a folding screen for a game as claimed in claim 1, wherein the display content of the game comprises a background image and operation content;
the acquiring of the resolution of the current screen in S2 includes:
and filling the background picture in the current screen.
CN202110588914.4A 2021-05-28 2021-05-28 Method for adapting folding screen to game Pending CN113209615A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110588914.4A CN113209615A (en) 2021-05-28 2021-05-28 Method for adapting folding screen to game

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110588914.4A CN113209615A (en) 2021-05-28 2021-05-28 Method for adapting folding screen to game

Publications (1)

Publication Number Publication Date
CN113209615A true CN113209615A (en) 2021-08-06

Family

ID=77098972

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110588914.4A Pending CN113209615A (en) 2021-05-28 2021-05-28 Method for adapting folding screen to game

Country Status (1)

Country Link
CN (1) CN113209615A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100052227A (en) * 2008-11-10 2010-05-19 엘지전자 주식회사 Mobile terminal using flexible display and operation method thereof
CN111124561A (en) * 2019-11-08 2020-05-08 华为技术有限公司 Display method applied to electronic equipment with folding screen and electronic equipment
CN111190681A (en) * 2019-12-31 2020-05-22 华为技术有限公司 Display interface adaptation method, display interface adaptation design method and electronic equipment
CN112558951A (en) * 2020-12-24 2021-03-26 大唐互联科技(武汉)有限公司 Foldable screen webpage adaptation method, device and storage device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100052227A (en) * 2008-11-10 2010-05-19 엘지전자 주식회사 Mobile terminal using flexible display and operation method thereof
CN111124561A (en) * 2019-11-08 2020-05-08 华为技术有限公司 Display method applied to electronic equipment with folding screen and electronic equipment
CN111190681A (en) * 2019-12-31 2020-05-22 华为技术有限公司 Display interface adaptation method, display interface adaptation design method and electronic equipment
CN112558951A (en) * 2020-12-24 2021-03-26 大唐互联科技(武汉)有限公司 Foldable screen webpage adaptation method, device and storage device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SD.TEAM: "[COCOS2DX-LUA]0-005.cocos2dx中关于全面屏和折叠屏的适配的一些见解", 《HTTPS://WWW.BBSMAX.COM/A/GKZ1WJZJ5R/》 *

Similar Documents

Publication Publication Date Title
CN103823620B (en) Screen adaption method and device
CN111552530B (en) Terminal screen adaptation method, device and equipment of user interface
CN103576973B (en) Display panel, portable device and control method applied thereto
JP5291072B2 (en) Portable display device and method for controlling portable display device
CN102163216B (en) Picture display method and device thereof
US10339209B2 (en) Webpage display method and device
CN112558951B (en) Foldable screen webpage adaptation method, device and storage device
CN102073650A (en) Adaptive adjustment method and equipment for webpage
US20190324777A1 (en) System and methods for a run time configurable user interface controller
CN103974007B (en) The stacking method and device of screen menu type regulative mode information
CN103123581B (en) A kind of application interface replacing options of mobile terminal and device and mobile terminal
US8296685B2 (en) Graphics stack system and method
CN111265865A (en) Game interface display method and device, terminal equipment and storage medium
CN114924824B (en) Visual object blurring method, visual object rendering method and computing device
CN104423839A (en) Browser resource display method and device
CN113687753A (en) Split screen style configuration method and device, intelligent terminal and storage medium
CN109302629B (en) Method for switching picture frames for pictures and display terminal
CN113467689A (en) Bendable electronic equipment and interface adaptation method thereof
CN113209615A (en) Method for adapting folding screen to game
CN106528161B (en) Terminal device, page display processing device and method
CN107645591B (en) Display adjustment method and device and folding terminal
CN113835699A (en) Picture loading processing method and device, electronic equipment and storage medium
TW200424920A (en) Display apparatus having customized on-screen-display and method thereof
TWI267060B (en) Display apparatuses, methods and machine-readable storage medium for adjusting display parameter based on display content
WO2023071954A1 (en) Image correction method and apparatus, and electronic device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210806