CN112494929B - Implementation method of game controller serving cloud game scene - Google Patents

Implementation method of game controller serving cloud game scene Download PDF

Info

Publication number
CN112494929B
CN112494929B CN202011401461.1A CN202011401461A CN112494929B CN 112494929 B CN112494929 B CN 112494929B CN 202011401461 A CN202011401461 A CN 202011401461A CN 112494929 B CN112494929 B CN 112494929B
Authority
CN
China
Prior art keywords
screen
basic
component
game
cloud game
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
CN202011401461.1A
Other languages
Chinese (zh)
Other versions
CN112494929A (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.)
4399 NETWORK CO LTD
Original Assignee
4399 NETWORK 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 4399 NETWORK CO LTD filed Critical 4399 NETWORK CO LTD
Priority to CN202011401461.1A priority Critical patent/CN112494929B/en
Publication of CN112494929A publication Critical patent/CN112494929A/en
Application granted granted Critical
Publication of CN112494929B publication Critical patent/CN112494929B/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/20Input arrangements for video game devices
    • A63F13/23Input arrangements for video game devices for interfacing with the game device, e.g. specific interfaces between game controller and console
    • 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/20Input arrangements for video game devices
    • A63F13/22Setup operations, e.g. calibration, key configuration or button assignment
    • 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/20Input arrangements for video game devices
    • A63F13/24Constructional details thereof, e.g. game controllers with detachable joystick handles
    • 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/40Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • A63F13/42Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
    • A63F13/426Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle involving on-screen location information, e.g. screen coordinates of an area at which the player is aiming with a light gun

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention provides a realization method of a game controller serving a cloud game scene, which is applied to a system consisting of a cloud game operation end, a cloud game user end, a platform service end and a cloud game service end, and comprises the following steps: the cloud game operation end generates a configuration file corresponding to the target cloud game; generating a corresponding configuration file aiming at each cloud game, and uploading the configuration file to a platform server; and the cloud game user side downloads the configuration file and generates a game controller page which is matched with the screen height of the cloud game user side. The advantages are that: (1) The corresponding configuration page can be customized rapidly and efficiently, cloud game control with excellent control effect is realized, and the game experience of a cloud game user side is improved; (2) The position of the control button in the control interface is realized by adopting a specific algorithm, so that the optimal suitability of the control button and a cloud game user terminal screen is ensured, and the use experience of a user is further improved. The invention can realize the game experience with high coordination and compatible fragmentation in cloud game scenes.

Description

Implementation method of game controller serving cloud game scene
Technical Field
The invention belongs to the technical field of game controllers, and particularly relates to an implementation method of a game controller serving cloud game scenes.
Background
With the recent rapid development of the game industry, terminal technology and network bandwidth, online games have become an indispensable internet application in people's life. On the other hand, the growing maturity of cloud computing technology has spawned a "thin terminal-cloud" service mode, in which a user's terminal device is interconnected with cloud high-performance computing resources and enjoys high-quality services. Applying this mode to an online gaming environment spawns a new type of cloud computing service-cloud game. In a cloud game scenario, however, various modes of operation of the game, such as: the method comprises the steps of carrying out handle operation, keyboard operation, touch screen operation and the like on the terminal equipment, wherein the terminal equipment is not externally supported, and a user can use the touch screen function of the terminal equipment to carry out game operation.
The terminal device with the highest user holding rate is a mobile phone terminal nowadays. The main stream of smart phones include Google Android, apple iOS and the like. The operating systems currently applied to mobile phone terminals mainly include Android (google), iOS (apple), windows phone (microsoft), symbian (nokia), blackBerry OS (BlackBerry), web OS, windows mobile (microsoft), harmony (hong mony), and the like. Ai Mei consultation data shows that the market share of the Android operating system of the mobile phone end in 2019 reaches 68.63%, and the market share of the synchronous iOS operating system is only 30.99%. From the total amount, the Android and iOS operating systems of the mobile phone end occupy 99.62% of market share in 2019. With the increase of devices (mobile phones, flat panels, televisions, watches) supporting the Android system, the degrees of device fragmentation, brand fragmentation, system fragmentation, sensor fragmentation and screen fragmentation are also continuously increased.
In carrying out the invention, the inventors have found that the prior art suffers from at least the following problems:
(1) Because the screen sizes of the terminal devices of the users are different, when the cloud game downloaded from the platform server runs on the terminal devices of the users, the positions of important components such as operation buttons and the like on the screen are often not ideal, so that the use experience of the users is poor; (2) After the user terminal equipment downloads the cloud game from the platform server, the game operation mode needs to be configured at the user terminal equipment according to the operation requirement of the game peripheral equipment, so that the labor cost of the user terminal is increased, and the use load is increased.
Disclosure of Invention
Aiming at the defects existing in the prior art, the invention provides a realization method of a game controller serving a cloud game scene, which can effectively solve the problems.
The technical scheme adopted by the invention is as follows:
the invention provides a realization method of a game controller serving a cloud game scene, which is applied to a system consisting of a cloud game operation end, a cloud game user end, a platform service end and a cloud game service end, and comprises the following steps:
step 1, based on a game control mode of a cloud game server to a cloud game, an operation instruction protocol set of a game control event from a cloud game operation end to the cloud game server is formulated; the operation instruction protocol set of the game control event comprises an operation instruction protocol corresponding to a keyboard event, an operation instruction protocol corresponding to a handle event and an operation instruction protocol corresponding to a mouse event;
step 2, determining a basic UI component set related to cloud game manipulation; the basic UI component set comprises a key component, a rocker component, a mouse touch component and a mouse sliding component; wherein each of the basic UI components includes UI component attributes;
step 3, the operation instruction protocol set of the game control event determined in the step 1 and the basic UI component set determined in the step 2 are packaged into a game controller to form a game controller execution module;
step 4, aiming at a target cloud game W running on a cloud game server, the cloud game operation end generates a configuration file W corresponding to the target cloud game W by adopting the following modes:
the cloud game operation end runs the game controller execution module obtained in the step 3 to construct a configuration page of the game controller, wherein the configuration page of the game controller is associated with a basic UI component set in the game controller execution module; adding basic UI components corresponding to the target cloud game W in a configuration page of the game controller, and configuring the attribute of each added basic UI component; wherein the attribute of the basic UI component comprises a screen relative position value of the basic UI component and a region thereof in the screen; the area in the screen comprises a left area of the screen, a left area of the screen and a central line area of the screen, so that a configuration page of the game controller with the configured game controller is obtained;
wherein, the screen relative position value of each added basic UI component is determined by adopting the following method:
the added basic UI component is moved to the target position of the current screen by the finger, and the monitoring module moves along with the basic UI component in the moving process of the basic UI component; when the basic UI component moves to the target position, the monitoring module carries out boundary processing on the position of the basic UI component, so that the basic UI component is ensured not to exceed the screen range, and then the screen relative position value of the basic UI component at the target position is obtained;
step 5, traversing each basic UI component of the configuration page of the game controller which is configured by the cloud game operation end, converting each basic UI component configured at this time into a configuration file in json format, and transmitting the configuration file in json format to the platform server;
step 6, adopting the mode of step 4-step 5, generating a corresponding configuration file for each cloud game, and uploading the configuration file to a platform server;
step 7, when a certain cloud game user side needs to run a certain cloud game S, the cloud game user side acquires a json format configuration file S corresponding to the cloud game S from a platform server side, analyzes the json format configuration file S, and generates a game controller page which is matched with the screen height of the cloud game user side by adopting the following method:
step 7.1, the cloud game user terminal analyzes the json format configuration file S to generate a virtual control button of each basic UI component; generating a game controller initial page;
step 7.2, the cloud game user side obtains the actual position of the virtual control buttons on the initial page of the game controller according to the screen relative position value of each virtual control button and the area of each virtual control button in the screen;
step 7.3, displaying the virtual control buttons to the corresponding positions of the initial pages of the game controller according to the positions of the virtual control buttons determined in the step 7.2, thereby obtaining the controller pages;
and 8, monitoring a touch event on the virtual control button of each basic UI component in the controller page, generating a corresponding game control instruction according to an operation instruction protocol corresponding to the touch event when the touch event is monitored on the virtual control button of any basic UI component, and sending the game control instruction to the cloud game server to realize corresponding control of the cloud game S.
Preferably, in step 4, the screen relative position value (u 1 ,v 1 ): wherein u is 1 Is based onThe screen transverse relative position value, v, of the UI component 1 Screen longitudinal relative position values for the basic UI component;
step 4.1, establishing an xy coordinate system on a current screen, wherein x is the width direction of the screen, and y is the height direction of the screen; the origin of coordinates O is located in the upper left corner of the screen;
step 4.2, determining the basic adaptation size of the screen as W.H; wherein W is the basic size of the screen width; h is the basic size of the screen height;
step 4.3, setting the size of the basic UI component as W 1 *H 1 The method comprises the steps of carrying out a first treatment on the surface of the Wherein the basic UI component is rectangular, W 1 To the width of the basic UI component, H 1 Is the height of the basic UI component;
the actual coordinates of the basic UI component at the target position are (x 0 ,y 0 ) The method comprises the following steps: the upper left corner of the basic UI component is at the screen actual coordinates of the xy coordinate system;
dividing a screen area into a screen left side area, a screen left side area and a screen center line area by taking a longitudinal center line as a separation line; the screen transverse relative position value u of the basic UI component is determined by the following method 1
1) If the target position of the basic UI component is located in the left region of the screen, the screen transverse relative position value u of the basic UI component 1 =l1/H; wherein, L1 is: the left boundary of the basic UI component is a distance from the screen left boundary;
2) If the target position of the basic UI component is in the right region of the screen, the screen transverse relative position value u of the basic UI component 1 =l2/H; wherein, L2 is: the right boundary of the basic UI component is a distance from the screen right boundary, l2= (W-x) 0 -W 1 );
3) If the separation line passes through the target position of the basic UI component, adjusting the target position of the basic UI component so that the separation line passes through the center of the target position of the basic UI component, and thus, the basic UI component is positioned in the screen center line area; the screen lateral relative position value u of the basic UI component 1 Is a default value and does not need to be recorded;
the following method is adopted to determine the basic UI groupValue v of the screen longitudinal relative position of the piece 1 :v 1 =y 0 /H。
Preferably, in step 7.2, the cloud game client obtains the position of the virtual control button on the initial page of the game controller according to the screen relative position value of each virtual control button and the area thereof in the screen, specifically:
assume that the screen relative position value of the virtual control button is (u) 2 ,v 2 ) The method comprises the steps of carrying out a first treatment on the surface of the The virtual control button has a size W 2 *H 2
The size of the cloud game user side screen is W 1 *H 1 The method comprises the steps of carrying out a first treatment on the surface of the Wherein W is 1 Is the screen width dimension; h 1 Is the screen height dimension;
1) If the virtual control button is located in the left area of the screen of the initial page of the game controller, the virtual control button is displayed at the actual coordinates (x 2 ,y 2 ) Calculated by:
x 2 =u 2 H 1
y 2 =v 2 H 1
thereby obtaining the actual coordinates (x 2 ,y 2 );
2) If the virtual control button is located in the screen right region of the initial page of the game controller, the virtual control button is displayed at the actual coordinates (x 2 ,y 2 ) Calculated by:
x 2 =W 1 -u 2 H 1 -W 2
y 2 =v 2 H 1
3) If the virtual control button is located in the screen center line area of the initial page of the game controller, the virtual control button is located at the actual coordinates (x 2 ,y 2 ) Calculated by:
x 2 =(W 1 -W 2 )/2
y 2 =v 2 H 1
thereby obtaining the actual coordinates (x 2 ,y 2 )。
The realization method of the game controller serving the cloud game scene has the following advantages:
(1) The cloud game operation end can rapidly and efficiently customize a corresponding configuration page according to the characteristics of each cloud game and upload the configuration page to the platform server; therefore, the cloud game user side can realize the cloud game control with excellent control effect only by downloading the configuration file of the required cloud game from the platform service side, and the game experience of the cloud game user side is improved;
(2) In addition, the position of the control button in the control interface is realized by adopting a specific algorithm, so that the optimal suitability of the control button and a cloud game user terminal screen is ensured, and the use experience of a user is further improved. Therefore, the invention can realize the game experience with high coordination and compatible fragmentation in cloud game scenes.
Drawings
FIG. 1 is a flow chart of an implementation method of a game controller serving a cloud game scene provided by the present invention;
fig. 2 is a schematic diagram of calculation of a virtual control button in an actual display position of a screen.
Detailed Description
In order to make the technical problems, technical schemes and beneficial effects solved by the invention more clear, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The invention provides a realization method of a game controller serving a cloud game scene, which has the following advantages: (1) The cloud game operation end can rapidly and efficiently customize a corresponding configuration page according to the characteristics of each cloud game and upload the configuration page to the platform server; therefore, the cloud game user side can realize the cloud game control with excellent control effect only by downloading the configuration file of the required cloud game from the platform service side, and the game experience of the cloud game user side is improved; (2) In addition, the position of the control button in the control interface is realized by adopting a specific algorithm, so that the optimal suitability of the control button and a cloud game user terminal screen is ensured, and the use experience of a user is further improved. Therefore, the invention can realize the game experience with high coordination and compatible fragmentation in cloud game scenes.
According to the method, the influence of the game type on the user experience is fully considered, the requirements of different types of games on the cloud game controller are different, and compared with the traditional design scheme that each game corresponds to one layout, the method increases the dynamic configuration of the layout of the controller, and reduces a large amount of development cost. The operator can complete the customized controller layout of a game by simply operating the controller configuration page. Meanwhile, by using the method of adapting the page by taking the height as a reference, the user can achieve consistent game experience on terminal screens with different resolutions.
Referring to fig. 1, the implementation method of the game controller serving a cloud game scene provided by the invention is applied to a system consisting of a cloud game operation end, a cloud game user end, a platform service end and a cloud game service end.
The main conception of the invention is as follows: the cloud game user terminal uses different kinds of user terminals with different resolutions, for example, mobile phone terminals, so that the display effects of the game control interface on different user terminals are different, and the user experience is affected.
In addition, the operation modes of each cloud game user end on different types of cloud games are different, for example, the operation mode of a virtual handle is optimal for some cloud games, the operation mode of a virtual keyboard is optimal for some cloud games, and the operation mode of a touch screen is optimal for some cloud games.
Therefore, the implementation method of the game controller serving the cloud game scene is a terminal product running on the cloud game operation end and the cloud game user end, wherein the cloud game operation end and the cloud game user end are only different in roles and are clients in practice. Through the terminal product, comprehensively considering the game type and the screen size, and configuring a corresponding game configuration file; and when the configuration file is operated, generating a game controller page adapted to the terminal screen, so that the same configuration file is adopted to realize that consistent operation experience is provided on mobile phone terminals with different resolutions.
The method specifically comprises the following steps:
step 1, based on a game control mode of a cloud game server to a cloud game, an operation instruction protocol set of a game control event from a cloud game operation end to the cloud game server is formulated; the operation instruction protocol set of the game control event comprises an operation instruction protocol corresponding to a keyboard event, an operation instruction protocol corresponding to a handle event and an operation instruction protocol corresponding to a mouse event;
for example, the operation instruction protocol corresponding to the keyboard event and the operation instruction protocol corresponding to the mouse event may use API to make values; the operation instruction protocol corresponding to the handle event can adopt an Android system customized value and the like.
In practical application, in a cloud game server, the control modes of the game are many, and the operation instruction protocol of a client side (comprising a cloud game operation end and a cloud game user end) -the cloud game server side is customized. The KeyEvent class of the Android system can be used for reducing part of development cost, the KeyEvent class comprises keyboard event and handle event operation instruction protocols, and in addition, the operation instruction protocols only need to additionally formulate a set of mouse event operation instruction protocols.
Step 2, determining a basic UI component set related to cloud game manipulation; the basic UI component set comprises a key component, a rocker component, a mouse touch component and a mouse sliding component; wherein each of the basic UI components includes UI component attributes;
and the Android terminal realizes a basic UI component with handle and keyboard operation functions based on the custom view. Such as: rocker function, general button function, mouse function.
The key assembly can realize the key operation function of the keyboard and the key operation function of the handle; the rocker function in the handle can be realized through the rocker assembly, and the moving coordinate of the rocker is transmitted by adopting a custom view to simulate the operation mode of the rocker; the mouse touch control component realizes the functions of left and right keys of the mouse, and the left and right keys of the mouse can be packaged into a common button component. The mouse sliding component is implemented by listening for movement events of touch events.
Based on the basic UI component set, more operation modes can be expanded, such as mapping the movement event of the keyboard by the rocker component, monitoring the peripheral event of the terminal equipment, modifying the key value output, and achieving the purpose of operating the game limited by adopting the handle mode and only using the keyboard for operation. The method is highly configurable, meets the highly customized requirement of operators on game operation, and brings good game operation experience for users.
Step 3, the operation instruction protocol set of the game control event determined in the step 1 and the basic UI component set determined in the step 2 are packaged into a game controller to form a game controller execution module;
step 4, aiming at a target cloud game W running on a cloud game server, the cloud game operation end generates a configuration file W corresponding to the target cloud game W by adopting the following modes:
the cloud game operation end runs the game controller execution module obtained in the step 3 to construct a configuration page of the game controller, wherein the configuration page of the game controller is associated with a basic UI component set in the game controller execution module; adding basic UI components corresponding to the target cloud game W in a configuration page of the game controller, and configuring the attribute of each added basic UI component; wherein the attribute of the basic UI component comprises a screen relative position value of the basic UI component and a region thereof in the screen; the area in the screen comprises a left area of the screen, a left area of the screen and a central line area of the screen, so that a configuration page of the game controller with the configured game controller is obtained;
it can be seen that a configuration page of the game controller is constructed based on the basic UI component, the basic UI component is dynamically added on the page, the configurable attribute of the UI component is designed, the interactive operation is provided, and the attribute modification function is realized. Reference assignable properties include, but are not limited to: the sign (handle key, keyboard key, mouse key, etc.), key size, key icon, color, auxiliary description text, etc. to which the key operation mode belongs.
Specifically, in order to achieve good game operation experience for users under different games, operators are required to customize a proper operation interface for each game, so that a highly configurable and easy-to-operate controller configuration page needs to be provided. The configuration implementation method of the page comprises the following steps: providing a packaged UI component-based operation function corresponding to different operation modes, selecting a basic UI component for adding requirements, and modifying the attribute of the UI component, wherein the UI component-based operation function comprises the following steps: the size, color, text, offset, icon and the like of the component can be changed, so that the requirement of flexible configuration modification of operators is met. The implementation mode is as follows: the basic UI component is clicked on to enter a page that modifies the component properties. After adding the basic UI component, beautifying the controller page by touching the mobile component, detecting whether the boundary of the component is close to other components when the component moves, and performing automatic alignment operation.
Wherein, the screen relative position value of each added basic UI component is determined by adopting the following method:
the added basic UI component is moved to the target position of the current screen by the finger, and the monitoring module moves along with the basic UI component in the moving process of the basic UI component; when the basic UI component moves to the target position, the monitoring module carries out boundary processing on the position of the basic UI component, so that the basic UI component is ensured not to exceed the screen range, and then the screen relative position value of the basic UI component at the target position is obtained;
specifically, the screen relative position value (u 1 ,v 1 ): wherein u is 1 A screen lateral relative position value v for a basic UI component 1 Screen longitudinal relative position values for the basic UI component;
step 4.1, establishing an xy coordinate system on a current screen, wherein x is the width direction of the screen, and y is the height direction of the screen; the origin of coordinates O is located in the upper left corner of the screen;
step 4.2, determining the basic adaptation size of the screen as W.H; wherein W is the basic size of the screen width; h is the basic size of the screen height;
step 4.3, setting the size of the basic UI component as W 1 *H 1 The method comprises the steps of carrying out a first treatment on the surface of the Wherein the basic UI component is rectangular, W 1 To the width of the basic UI component, H 1 Is the height of the basic UI component;
the actual coordinates of the basic UI component at the target position are (x 0 ,y 0 ) The method comprises the following steps: the upper left corner of the basic UI component is at the screen actual coordinates of the xy coordinate system;
dividing a screen area into a screen left side area, a screen left side area and a screen center line area by taking a longitudinal center line as a separation line; the screen transverse relative position value u of the basic UI component is determined by the following method 1
1) If the target position of the basic UI component is located in the left region of the screen, the screen transverse relative position value u of the basic UI component 1 =l1/H; wherein, L1 is: the left boundary of the basic UI component is a distance from the screen left boundary;
2) If the target position of the basic UI component is in the right region of the screen, the screen transverse relative position value u of the basic UI component 1 =l2/H; wherein, L2 is: the right boundary of the basic UI component is a distance from the screen right boundary, l2= (W-x) 0 -W 1 );
3) If the separation line passes through the target position of the basic UI component, adjusting the target position of the basic UI component so that the separation line passes through the center of the target position of the basic UI component, and thus, the basic UI component is positioned in the screen center line area; the screen lateral relative position value u of the basic UI component 1 Is a default value and does not need to be recorded;
the screen longitudinal relative position value v of the basic UI component is determined by the following method 1 :v 1 =y 0 /H。
In practical application, to solve the problem of fragmentation of the android terminal, 640×360 may be a basic adaptation size, and then page adaptation is performed following the height 360. Namely: w is 640; h is 360.
In the invention, all descriptions related to screen coordinates refer to coordinates in a screen coordinate system xy in the upper left corner of a basic UI component.
Step 5, traversing each basic UI component of the configuration page of the game controller which is configured by the cloud game operation end, converting each basic UI component configured at this time into a configuration file in json format, and transmitting the configuration file in json format to the platform server;
step 6, adopting the mode of step 4-step 5, generating a corresponding configuration file for each cloud game, and uploading the configuration file to a platform server;
step 7, when a certain cloud game user side needs to run a certain cloud game S, the cloud game user side acquires a json format configuration file S corresponding to the cloud game S from a platform server side, analyzes the json format configuration file S, and generates a game controller page which is matched with the screen height of the cloud game user side by adopting the following method:
step 7.1, the cloud game user terminal analyzes the json format configuration file S to generate a virtual control button of each basic UI component; generating a game controller initial page;
step 7.2, the cloud game user side obtains the actual position of the virtual control buttons on the initial page of the game controller according to the screen relative position value of each virtual control button and the area of each virtual control button in the screen;
in step 7.2, the cloud game client obtains the position of the virtual control button on the initial page of the game controller according to the screen relative position value of each virtual control button and the area thereof in the screen, specifically:
assume that the screen relative position value of the virtual control button is (u) 2 ,v 2 ) The method comprises the steps of carrying out a first treatment on the surface of the The virtual control button has a size W 2 *H 2
The size of the cloud game user side screen is W 1 *H 1 The method comprises the steps of carrying out a first treatment on the surface of the Wherein W is 1 Is the screen width dimension; h 1 Is the screen height dimension;
1) If the virtual control button is located in the left area of the screen of the initial page of the game controller, the virtual control button is displayed at the actual coordinates (x 2 ,y 2 ) Calculated by:
x 2 =u 2 H 1
y 2 =v 2 H 1
thereby obtaining the actual coordinates (x 2 ,y 2 );
2) If the virtual control button is located in the screen right region of the initial page of the game controller, the virtual control button is displayed at the actual coordinates (x 2 ,y 2 ) Calculated by:
x 2 =W 1 -u 2 H 1 -W 2
y 2 =v 2 H 1
3) If the virtual control button is located in the screen center line area of the initial page of the game controller, the virtual control button is located at the actual coordinates (x 2 ,y 2 ) Calculated by:
x 2 =(W 1 -W 2 )/2
y 2 =v 2 H 1
thereby obtaining the actual coordinates (x 2 ,y 2 )。
Step 7.3, displaying the virtual control buttons to the corresponding positions of the initial pages of the game controller according to the positions of the virtual control buttons determined in the step 7.2, thereby obtaining the controller pages;
by the method, the basic UI component is realized, and the controller page is adapted to the height according to the relative position value of the screen. And realizing the optimal display of the controller page on the user side screen.
Specifically, when the cloud game operation terminal is configured, the 640 x 360 size is taken as the basic layout size, the pixel density (Display Metrics) value is set by using the height 360DP, at this time, most of screens can be compatible by using the DP as a unit in the numerical value of the height, and the relative position of each basic UI component on the configuration screen is saved by adopting the screen relative position value. Therefore, when the cloud game client runs, the screen relative position value of the basic UI component is matched with the actual screen size of the client, and even in the scene that the aspect ratio of the client is higher than 640/360, only the middle area is stretched. In the game scene, the layout of the keys is still kept at two sides of the screen, so that the operation of a user is convenient. Therefore, on the premise of not influencing user experience, the problem of inconsistent operation pages caused by screen fragmentation is solved.
And 8, monitoring a touch event on the virtual control button of each basic UI component in the controller page, generating a corresponding game control instruction according to an operation instruction protocol corresponding to the touch event when the touch event is monitored on the virtual control button of any basic UI component, and sending the game control instruction to the cloud game server to realize corresponding control of the cloud game S.
Therefore, by monitoring the touch event of each basic UI component, the key value protocol corresponding to different operation modes sends the corresponding event and state, and the operation on the cloud game is completed.
The invention relates to a remote game control method and an interface adaptation method of a controller in a cloud game scene, which comprises the following basic technologies: the cloud game platform architecture is characterized in that the client terminal is compatible with various game operation modes, the configuration of a controller interface and an adaptation method of a multi-size screen of the controller interface.
Aiming at cloud game application developers, the invention provides a game controller realization method which is used for cloud games, is compatible with various game peripheral operations and solves the problem of terminal fragmentation, and aims to reduce the labor cost of customizing game control pages one by one under the traditional scheme and meet the high-quality experience of user game operations. The invention fully considers various operation modes of the market games and is realized on the controller, and provides an adaptation tool of an operator controller to realize the custom adaptation of the operation interface of the multi-game. The operation interface under the multiple screens is automatically adapted to meet the good game experience of the user, and the operation cost is reduced.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which is also intended to be covered by the present invention.

Claims (3)

1. The implementation method of the game controller serving the cloud game scene is characterized by being applied to a system consisting of a cloud game operation end, a cloud game user end, a platform service end and a cloud game service end, and comprising the following steps of:
step 1, based on a game control mode of a cloud game server to a cloud game, an operation instruction protocol set of a game control event from a cloud game operation end to the cloud game server is formulated; the operation instruction protocol set of the game control event comprises an operation instruction protocol corresponding to a keyboard event, an operation instruction protocol corresponding to a handle event and an operation instruction protocol corresponding to a mouse event;
step 2, determining a basic UI component set related to cloud game manipulation; the basic UI component set comprises a key component, a rocker component, a mouse touch component and a mouse sliding component; wherein each of the basic UI components includes UI component attributes;
step 3, the operation instruction protocol set of the game control event determined in the step 1 and the basic UI component set determined in the step 2 are packaged into a game controller to form a game controller execution module;
step 4, aiming at a target cloud game W running on a cloud game server, the cloud game operation end generates a configuration file W corresponding to the target cloud game W by adopting the following modes:
the cloud game operation end runs the game controller execution module obtained in the step 3 to construct a configuration page of the game controller, wherein the configuration page of the game controller is associated with a basic UI component set in the game controller execution module; adding basic UI components corresponding to the target cloud game W in a configuration page of the game controller, and configuring the attribute of each added basic UI component; wherein the attribute of the basic UI component comprises a screen relative position value of the basic UI component and a region thereof in the screen; the area in the screen comprises a left area of the screen, a left area of the screen and a central line area of the screen, so that a configuration page of the game controller with the configured game controller is obtained;
wherein, the screen relative position value of each added basic UI component is determined by adopting the following method:
the added basic UI component is moved to the target position of the current screen by the finger, and the monitoring module moves along with the basic UI component in the moving process of the basic UI component; when the basic UI component moves to the target position, the monitoring module carries out boundary processing on the position of the basic UI component, so that the basic UI component is ensured not to exceed the screen range, and then the screen relative position value of the basic UI component at the target position is obtained;
step 5, traversing each basic UI component of the configuration page of the game controller which is configured by the cloud game operation end, converting each basic UI component configured at this time into a configuration file in json format, and transmitting the configuration file in json format to the platform server;
step 6, adopting the mode of step 4-step 5, generating a corresponding configuration file for each cloud game, and uploading the configuration file to a platform server;
step 7, when a certain cloud game user side needs to run a certain cloud game S, the cloud game user side acquires a json format configuration file S corresponding to the cloud game S from a platform server side, analyzes the json format configuration file S, and generates a game controller page which is matched with the screen height of the cloud game user side by adopting the following method:
step 7.1, the cloud game user terminal analyzes the json format configuration file S to generate a virtual control button of each basic UI component; generating a game controller initial page;
step 7.2, the cloud game user side obtains the actual position of the virtual control buttons on the initial page of the game controller according to the screen relative position value of each virtual control button and the area of each virtual control button in the screen;
step 7.3, displaying the virtual control buttons to the corresponding positions of the initial pages of the game controller according to the positions of the virtual control buttons determined in the step 7.2, thereby obtaining the controller pages;
and 8, monitoring a touch event on the virtual control button of each basic UI component in the controller page, generating a corresponding game control instruction according to an operation instruction protocol corresponding to the touch event when the touch event is monitored on the virtual control button of any basic UI component, and sending the game control instruction to the cloud game server to realize corresponding control of the cloud game S.
2. The method of implementing a game controller serving a cloud game scenario as claimed in claim 1, wherein in step 4, the screen relative position value (u 1 ,v 1 ): wherein u is 1 A screen lateral relative position value v for a basic UI component 1 Screen longitudinal relative position values for the basic UI component;
step 4.1, establishing an xy coordinate system on a current screen, wherein x is the width direction of the screen, and y is the height direction of the screen; the origin of coordinates O is located in the upper left corner of the screen;
step 4.2, determining the basic adaptation size of the screen as W.H; wherein W is the basic size of the screen width; h is the basic size of the screen height;
step 4.3, setting the size of the basic UI component as W 1 *H 1 The method comprises the steps of carrying out a first treatment on the surface of the Wherein the basic UI component is rectangular, W 1 To the width of the basic UI component, H 1 Is the height of the basic UI component;
the actual coordinates of the basic UI component at the target position are (x 0 ,y 0 ) The method comprises the following steps: the upper left corner of the basic UI component is at the screen actual coordinates of the xy coordinate system;
dividing a screen area into a screen left side area, a screen left side area and a screen center line area by taking a longitudinal center line as a separation line; the screen transverse relative position value u of the basic UI component is determined by the following method 1
1) If the target position of the basic UI component is located in the left region of the screen, the screen transverse relative position value u of the basic UI component 1 =l1/H; wherein, L1 is: basic UIThe left boundary of the component is a left boundary distance from the screen;
2) If the target position of the basic UI component is in the right region of the screen, the screen transverse relative position value u of the basic UI component 1 =l2/H; wherein, L2 is: the right boundary of the basic UI component is a distance from the screen right boundary, l2= (W-x) 0 -W 1 );
3) If the separation line passes through the target position of the basic UI component, adjusting the target position of the basic UI component so that the separation line passes through the center of the target position of the basic UI component, and thus, the basic UI component is positioned in the screen center line area; the screen lateral relative position value u of the basic UI component 1 Is a default value and does not need to be recorded;
the screen longitudinal relative position value v of the basic UI component is determined by the following method 1 :v 1 =y 0 /H。
3. The method for implementing a game controller serving a cloud game scene as claimed in claim 2, wherein in step 7.2, the cloud game client obtains the position of the virtual control button on the initial page of the game controller according to the screen relative position value of each virtual control button and the area thereof in the screen, specifically:
assume that the screen relative position value of the virtual control button is (u) 2 ,v 2 ) The method comprises the steps of carrying out a first treatment on the surface of the The virtual control button has a size W 2 *H 2
The size of the cloud game user side screen is W 1 *H 1 The method comprises the steps of carrying out a first treatment on the surface of the Wherein W is 1 Is the screen width dimension; h 1 Is the screen height dimension;
1) If the virtual control button is located in the left area of the screen of the initial page of the game controller, the virtual control button is displayed at the actual coordinates (x 2 ,y 2 ) Calculated by:
x 2 =u 2 H 1
y 2 =v 2 H 1
thereby obtaining the initial page of the virtual control button on the game controllerActual coordinates of the face (x 2 ,y 2 );
2) If the virtual control button is located in the screen right region of the initial page of the game controller, the virtual control button is displayed at the actual coordinates (x 2 ,y 2 ) Calculated by:
x 2 =W 1 -u 2 H 1 -W 2
y 2 =v 2 H 1
3) If the virtual control button is located in the screen center line area of the initial page of the game controller, the virtual control button is located at the actual coordinates (x 2 ,y 2 ) Calculated by:
x 2 =(W 1 -W 2 )/2
y 2 =v 2 H 1
thereby obtaining the actual coordinates (x 2 ,y 2 )。
CN202011401461.1A 2020-12-04 2020-12-04 Implementation method of game controller serving cloud game scene Active CN112494929B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011401461.1A CN112494929B (en) 2020-12-04 2020-12-04 Implementation method of game controller serving cloud game scene

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011401461.1A CN112494929B (en) 2020-12-04 2020-12-04 Implementation method of game controller serving cloud game scene

Publications (2)

Publication Number Publication Date
CN112494929A CN112494929A (en) 2021-03-16
CN112494929B true CN112494929B (en) 2023-05-16

Family

ID=74968243

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011401461.1A Active CN112494929B (en) 2020-12-04 2020-12-04 Implementation method of game controller serving cloud game scene

Country Status (1)

Country Link
CN (1) CN112494929B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113018851B (en) * 2021-05-28 2021-08-06 腾讯科技(深圳)有限公司 Game processing method, device, computer equipment and storage medium
CN113546407A (en) * 2021-07-30 2021-10-26 网易(杭州)网络有限公司 Game picture processing method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530149A (en) * 2013-09-27 2014-01-22 深圳市同洲电子股份有限公司 Configuration method for gamepad simulation configuration file and terminal
CN110548281A (en) * 2019-08-19 2019-12-10 广州点云科技有限公司 virtual key pressing method based on cloud game terminal
CN110559651A (en) * 2019-09-16 2019-12-13 网易(杭州)网络有限公司 Control method and device of cloud game, computer storage medium and electronic equipment
CN111309357A (en) * 2020-02-24 2020-06-19 腾讯科技(成都)有限公司 Cloud game software updating method and device, storage medium and cloud game system
CN111467791A (en) * 2020-04-13 2020-07-31 西安万像电子科技有限公司 Target object control method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
HK1198731A2 (en) * 2014-03-26 2015-05-29 United Intellectuals Internat Ltd A system and method for gaming

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530149A (en) * 2013-09-27 2014-01-22 深圳市同洲电子股份有限公司 Configuration method for gamepad simulation configuration file and terminal
CN110548281A (en) * 2019-08-19 2019-12-10 广州点云科技有限公司 virtual key pressing method based on cloud game terminal
CN110559651A (en) * 2019-09-16 2019-12-13 网易(杭州)网络有限公司 Control method and device of cloud game, computer storage medium and electronic equipment
CN111309357A (en) * 2020-02-24 2020-06-19 腾讯科技(成都)有限公司 Cloud game software updating method and device, storage medium and cloud game system
CN111467791A (en) * 2020-04-13 2020-07-31 西安万像电子科技有限公司 Target object control method, device and system

Also Published As

Publication number Publication date
CN112494929A (en) 2021-03-16

Similar Documents

Publication Publication Date Title
CN111544886B (en) Picture display method and related device
CN112494929B (en) Implementation method of game controller serving cloud game scene
CN109598749B (en) Parameter configuration method, device, equipment and medium for three-dimensional face model
WO2016173427A1 (en) Method, device and computer readable medium for creating motion blur effect
CN108491129B (en) Application program management method and terminal
CN111857457A (en) Cloud mobile phone control method and device, electronic equipment and readable storage medium
CN102207748B (en) Electronic equipment and input method
CN110096326A (en) A kind of screenshotss method, terminal device and computer readable storage medium
CN108513671B (en) Display method and terminal for 2D application in VR equipment
CN110032309B (en) Screen splitting method and terminal equipment
WO2021068885A1 (en) Control method and electronic device
CN103747308A (en) Method and system for controlling smart television with analog keys, and mobile terminal
CN108446156B (en) Application program control method and terminal
WO2022057407A1 (en) Widget dislay method and electronic device
CN110442279B (en) Message sending method and mobile terminal
CN109710127A (en) A kind of screenshotss method and mobile terminal
CN107682535B (en) Method for remotely controlling computer based on smart phone platform
WO2018103168A1 (en) Touch device and virtual reality system for vr devices
CN108469940B (en) Screenshot method and terminal
CN111880759A (en) Control method and device for multi-split screen display picture, display and storage medium
KR20210037080A (en) Electronic apparatus and control method of the electronic apparatus
US20140215347A1 (en) Portable device and control method thereof
CN105262880A (en) Mobile phone control demonstration system applied to WiFi network
WO2021043081A1 (en) Task management method and terminal device
CN110879685B (en) Interaction method of application program interface and electronic equipment

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