CN108654090B - Method and device for interaction between operating system and game application - Google Patents

Method and device for interaction between operating system and game application Download PDF

Info

Publication number
CN108654090B
CN108654090B CN201810472759.8A CN201810472759A CN108654090B CN 108654090 B CN108654090 B CN 108654090B CN 201810472759 A CN201810472759 A CN 201810472759A CN 108654090 B CN108654090 B CN 108654090B
Authority
CN
China
Prior art keywords
game
application
operating system
script
custom
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
CN201810472759.8A
Other languages
Chinese (zh)
Other versions
CN108654090A (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 Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201810472759.8A priority Critical patent/CN108654090B/en
Publication of CN108654090A publication Critical patent/CN108654090A/en
Application granted granted Critical
Publication of CN108654090B publication Critical patent/CN108654090B/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/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • 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/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • A63F13/67Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor adaptively or by learning from player actions, e.g. skill level adjustment or by storing successful combat sequences for re-use
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/6009Methods for processing data by generating or executing the game program for importing or creating game content, e.g. authoring tools during game development, adapting content to different platforms, use of a scripting language to create content
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/6027Methods for processing data by generating or executing the game program using adaptive systems learning from user actions, e.g. for skill level adjustment

Abstract

The invention relates to the technical field of information processing, in particular to a method and a device for interaction between an operating system and a game application, wherein the method comprises the following steps: acquiring an application program function in a mono virtual machine in a game engine corresponding to the game application; calling the application program function to inject a custom game script into the mono virtual machine, wherein the custom game script is used for controlling interaction between the operating system and the game application; executing the custom game script causes the operating system to interact with the game application. The invention realizes the interaction between the operating system and the game application, thereby enabling the operating system to obtain the game parameters in the game application and modify the game logic of the game application.

Description

Method and device for interaction between operating system and game application
Technical Field
The invention relates to the technical field of information processing, in particular to a method and a device for interaction between an operating system and a game application.
Background
The game engine is a basic and core component of a game application, the game engine generally refers to a core component of a written editable computer game system or an interactive real-time image application program, the game application can not run away from the game engine, and the game engine can perform functions of physical calculus, collision operation, image rendering, input control, audio and video output and the like in a game. In the prior art, the operating system with the game application installed and the game application cannot interact with each other.
Disclosure of Invention
In view of the above, the present invention has been developed to provide a method and apparatus for operating system interaction with a gaming application that overcomes, or at least partially solves, the above-mentioned problems.
According to a first aspect of the present invention, there is provided a method for an operating system to interact with a game application, the method being applied to the operating system installed with the game application, the method comprising:
acquiring an application program function in a mono virtual machine in a game engine corresponding to the game application;
calling the application program function to inject a custom game script into the mono virtual machine, wherein the custom game script is used for controlling interaction between the operating system and the game application;
executing the custom game script causes the operating system to interact with the game application.
Preferably, before the obtaining of the application function in the mono virtual machine in the game engine corresponding to the game application, the method further includes:
so file is loaded into a game process of the game application;
wherein the acquiring an application function in a mono virtual machine in a game engine corresponding to the game application includes:
so file is utilized to analyze the executable file of the game application, and the application program function in the mono virtual machine in the game engine corresponding to the game application is obtained from the executable file.
Preferably, the acquiring an application function in a mono virtual machine in a game engine corresponding to the game application includes:
obtaining a libmono.
So, obtaining the application program function from the libmono.
Preferably, the application function includes:
mono_assembly_get_image;
mono_class_from_name;
mono_method_desc_search_in_class;
mono_runtime_invoke;
mono_image_open_from_data;
mono_assembly_load_from_full;
mono_image_open_from_data_with_name。
preferably, the executing the custom game script causes the operating system to interact with the game application, including:
and executing the custom game script, controlling the operating system to acquire game information in the game application, and/or controlling the operating system to modify the game logic of the game application.
Preferably, the compiling language of the custom game script is C #.
Preferably, the operating system is an android system, and the game engine is a Unity3D game engine.
According to a second aspect of the present invention, there is provided an apparatus for an operating system to interact with a game application, the apparatus being applied to the operating system installed with the game application, the apparatus comprising:
the acquisition module is used for acquiring an application program function in a mono virtual machine in a game engine corresponding to the game application;
the calling module is used for calling the application program function to inject a custom game script into the mono virtual machine, wherein the custom game script is used for controlling interaction between the operating system and the game application;
and the execution module is used for executing the custom game script to enable the operating system to interact with the game application.
Preferably, the apparatus further comprises:
so file is loaded to the game process of the game application;
the obtaining module is specifically configured to:
so file is utilized to analyze the executable file of the game application, and the application program function in the mono virtual machine in the game engine corresponding to the game application is obtained from the executable file.
Preferably, the obtaining module includes:
a first obtaining unit, configured to obtain a libmono.
A second obtaining unit, configured to obtain the application function from the libmono.
Preferably, the application function includes:
mono_assembly_get_image;
mono_class_from_name;
mono_method_desc_search_in_class;
mono_runtime_invoke;
mono_image_open_from_data;
mono_assembly_load_from_full;
mono_image_open_from_data_with_name。
preferably, the execution module is specifically configured to:
and executing the custom game script, controlling the operating system to acquire game information in the game application, and/or controlling the operating system to modify the game logic of the game application.
Preferably, the compiling language of the custom game script is C #.
Preferably, the operating system is an android system, and the game engine is a Unity3D game engine.
According to a third aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring an application program function in a mono virtual machine in a game engine corresponding to the game application;
calling the application program function to inject a custom game script into the mono virtual machine, wherein the custom game script is used for controlling interaction between the operating system and the game application;
executing the custom game script causes the operating system to interact with the game application.
According to a fourth aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the program:
acquiring an application program function in a mono virtual machine in a game engine corresponding to the game application;
calling the application program function to inject a custom game script into the mono virtual machine, wherein the custom game script is used for controlling interaction between the operating system and the game application;
executing the custom game script causes the operating system to interact with the game application.
According to the method and the device for interaction between the operating system and the game application, the application program function in the mono virtual machine in the game engine corresponding to the game application is obtained, the customized game script for controlling the interaction between the operating system and the game application is injected into the mono virtual machine by using the application program function, and the customized game script is executed finally, so that the interaction between the operating system and the game application is realized, and further, the operating system can obtain the game parameters in the game application and modify the game logic of the game application.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 illustrates a flow chart of a method of operating system interaction with a gaming application in an embodiment of the invention;
FIG. 2 is a block diagram illustrating an apparatus for operating system interaction with a gaming application in an embodiment of the present invention;
fig. 3 shows a block diagram of a computer device in an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The embodiment of the invention provides a method for interaction between an operating system and a game application, which is applied to electronic equipment, wherein the electronic equipment can be a mobile phone, a tablet computer, a computer or the like, the operating system in the electronic equipment can be an android system, the game application is installed in the electronic equipment, and the game application is installed in the operating system.
Referring to fig. 1, a method for an operating system to interact with a game application in an embodiment of the present invention includes:
step 101: an application function in a mono virtual machine in a game engine corresponding to a game application is obtained.
Step 102: and calling an application program function to inject a custom game script into the mono virtual machine, wherein the custom game script is used for controlling the interaction between the operating system and the game application.
Step 103: executing the custom game script causes the operating system to interact with the game application.
In the embodiment of the invention, the operating system is provided with Game application, the Game application is correspondingly provided with a Game engine, the Game engine can be a Unity3D Game engine, the Unity3D Game engine is a comprehensive Game development tool for a user to create multi-platform interactive contents such as three-dimensional video games, building visualizations, real-time three-dimensional animations and the like, the Game development tool is similar to software which takes interactive graphical development environments such as Director, Blender, Virtools or Torque Game Builder and the like as a primary mode, an editor runs under Windows and Mac OS X, and the Game application developed by the Game engine can be released to Windows, Mac, Wii, iPhone and Android platforms. Further, the Unity3D game engine includes a mono virtual machine that includes a real-time compilation engine operable with the following processors: x86, SPARC, PowerPC, ARM, S390, x86-x64, IA64, and 64-bit pattern SPARC, which may compile or pre-compile code into native code in real time.
In the embodiment of the invention, the interaction between the operating system and the game application is realized by acquiring the application program function in the mono virtual machine in the game engine corresponding to the game application, injecting the self-defined game script for controlling the interaction between the operating system and the game application into the mono virtual machine by utilizing the application program function and finally executing the self-defined game script, so that the operating system can obtain the game parameters in the game application and modify the game logic of the game application.
Specifically, before step 101, the method for the operating system to interact with the game application of the embodiment of the present invention further comprises the steps of:
so file is loaded into the game process of the game application.
In a specific implementation process, a library object.so file can be loaded into a game process in a process injection mode, and the library object.so file is used for acquiring an application program function in a mono virtual machine. So the injection process of the library file is essentially library injection under Linux, firstly, a memory is allocated in a game process and used for writing shellcode and parameters, then, the shellcode is written in the game process, the shellcode calls dlopen to load the library, and finally, the shellcode in the game process is operated.
Further, after loading the libinj.so file into the game process of the game application, in step 101, the executable file of the game application is parsed by using the libinj.so file, and the application program function in the mono virtual machine in the game engine corresponding to the game application is obtained from the executable file, wherein the executable file is the elf file of the game application, the elf file is a file used for binary files, executable files, object codes, shared libraries and core dump formats, the elf file usually contains an elf header, a program header table, a section and a section header table, the position of the elf header is fixed, and the position, the size and other information of the rest parts are determined by the values in the elf header.
Further, in the embodiment of the present invention, acquiring an application function in the mono virtual machine specifically includes: so, the application program function in libmono. Further, the obtained application program functions include: mono _ association _ get _ image; mono _ class _ from _ name; mono _ method _ desc _ search _ in _ class; mono _ runtimeinvoke; mono _ image _ open _ from _ data; mono _ assembly _ load _ from _ full; mono _ image _ open _ from _ data _ with _ name. Further, after the application program function is acquired, a custom game script can be injected into the mono virtual machine by calling the application program function.
Specifically, in the embodiment of the invention, the custom game script is a script compiled by the user and used for controlling the interaction of the operating system and the game application, and the interaction logic of the custom game script can be determined by the user. In the embodiment of the invention, the custom game script is in-script.dll, which is a dynamic link library file, the function implementation process of a program is stored in the dynamic link library file, when the program needs to call the function, the dynamic link library file needs to be loaded firstly, then the address of the function is obtained, and then the call is carried out, and the compiling language of the custom game script is C #.
Further, after the custom game script is injected into the mono virtual machine, the custom game script is executed by calling the entry of the custom game script, thereby enabling the operating system to interact with the game application.
In the first embodiment of the present invention, the custom game script may be used to control the operating system to obtain game information in the game application, so that the operating system is controlled to obtain game information in the game application by executing the custom game script, where the game information includes scene information and character information in the game application, for example, parameters of a game scene and parameters of a game player. In a second embodiment of the present invention, the custom game script can be used to control the operating system to modify the game logic of the game application, such that the operating system is controlled to modify the game logic of the game application by executing the custom game script, wherein the game logic comprises game rules of the game application. In addition, the custom game script can also be used to control the operating system to obtain game information in the game application and to control the operating system to modify the game logic of the game application, so that the operating system is controlled to obtain game information in the game application and to modify the game logic of the game application by executing the custom game script.
In the following, a detailed description is given to the method for interaction between the operating system and the game application with reference to a specific embodiment, in this specific embodiment, the operating system is an android system, an engine used by the game application is a Unity3D game engine, and the custom game script is a script compiled by a user and used for controlling the android system to acquire game information of the game application and controlling the android system to modify game logic of the game application, that is, a compilation language of the entry-script.dll and the entry-script.dll is C #.
So file is loaded into the game process of the game application. Then, analyzing an elf file of the game application by using the library, and acquiring an application program function in the library in the Unity3D game engine, wherein the application program function comprises mono _ assembly _ get _ image; mono _ class _ from _ name; mono _ method _ desc _ search _ in _ class; mono _ runtimeinvoke; mono _ image _ open _ from _ data; mono _ assembly _ load _ from _ full; mono _ image _ open _ from _ data _ with _ name. And calling the application program function to inject the inject-script.dll into the mono virtual machine. And finally, executing the inj-script.dll by calling an entry of the inj-script.dll, and controlling the android system to acquire the game information of the game application and modify the game logic of the game application.
Based on the same inventive concept, an embodiment of the present invention further provides an apparatus for interaction between an operating system and a game application, as shown in fig. 2, where the apparatus is applied to the operating system installed with the game application, and the apparatus includes:
an obtaining module 201, configured to obtain an application function in a mono virtual machine in a game engine corresponding to the game application;
a calling module 202, configured to call the application program function to inject a custom game script into the mono virtual machine, where the custom game script is used to control interaction between the operating system and the game application;
and the execution module 203 is configured to execute the custom game script to enable the operating system to interact with the game application.
Preferably, the apparatus further comprises:
so file is loaded to the game process of the game application;
the obtaining module 201 is specifically configured to:
so file is utilized to analyze the executable file of the game application, and the application program function in the mono virtual machine in the game engine corresponding to the game application is obtained from the executable file.
Preferably, the obtaining module 201 includes:
a first obtaining unit, configured to obtain a libmono.
A second obtaining unit, configured to obtain the application function from the libmono.
Preferably, the application function includes:
mono_assembly_get_image;
mono_class_from_name;
mono_method_desc_search_in_class;
mono_runtime_invoke;
mono_image_open_from_data;
mono_assembly_load_from_full;
mono_image_open_from_data_with_name。
preferably, the executing module 203 is specifically configured to:
and executing the custom game script, controlling the operating system to acquire game information in the game application, and/or controlling the operating system to modify the game logic of the game application.
Preferably, the compiling language of the custom game script is C #.
Preferably, the operating system is an android system, and the game engine is a Unity3D game engine.
Based on the same inventive concept, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the following steps:
acquiring an application program function in a mono virtual machine in a game engine corresponding to the game application;
calling the application program function to inject a custom game script into the mono virtual machine, wherein the custom game script is used for controlling interaction between the operating system and the game application;
executing the custom game script causes the operating system to interact with the game application.
Based on the same inventive concept, an embodiment of the present invention further provides a computer apparatus, as shown in fig. 3, for convenience of description, only the portion related to the embodiment of the present invention is shown, and details of the specific technology are not disclosed, please refer to the method portion of the embodiment of the present invention. The computer device may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, etc., taking the computer device as the mobile phone as an example:
fig. 3 is a block diagram illustrating a partial structure associated with a computer device provided by an embodiment of the present invention. Referring to fig. 3, the computer apparatus includes: a memory 301 and a processor 302. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 3 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components.
The following describes the components of the computer device in detail with reference to fig. 3:
the memory 301 may be used to store software programs and modules, and the processor 302 executes various functional applications and data processing by operating the software programs and modules stored in the memory 301. The memory 301 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.), and the like. Further, the memory 301 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 302 is a control center of the computer device, and performs various functions and processes data by operating or executing software programs and/or modules stored in the memory 301 and calling data stored in the memory 301. Alternatively, processor 302 may include one or more processing units; preferably, the processor 302 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications.
In an embodiment of the present invention, the processor 302 included in the computer device may have the following functions:
acquiring an application program function in a mono virtual machine in a game engine corresponding to the game application;
calling the application program function to inject a custom game script into the mono virtual machine, wherein the custom game script is used for controlling interaction between the operating system and the game application;
executing the custom game script causes the operating system to interact with the game application.
In summary, according to the method and apparatus for interaction between an operating system and a game application of the present invention, an application program function in a mono virtual machine in a game engine corresponding to the game application is first obtained, a customized game script for controlling interaction between the operating system and the game application is then injected into the mono virtual machine using the application program function, and finally the customized game script is executed, so that interaction between the operating system and the game application is realized, and further, the operating system can obtain game parameters in the game application and modify game logic of the game application.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components in accordance with embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
A1, a method for interaction between an operating system and a game application, applied to the operating system with the game application installed, the method comprising:
acquiring an application program function in a mono virtual machine in a game engine corresponding to the game application;
calling the application program function to inject a custom game script into the mono virtual machine, wherein the custom game script is used for controlling interaction between the operating system and the game application;
executing the custom game script causes the operating system to interact with the game application.
A2, the method for interacting with a game application according to the operating system of A1, before the obtaining an application function in a mono virtual machine in a game engine corresponding to the game application, the method further comprising:
so file is loaded into a game process of the game application;
wherein the acquiring an application function in a mono virtual machine in a game engine corresponding to the game application includes:
so file is utilized to analyze the executable file of the game application, and the application program function in the mono virtual machine in the game engine corresponding to the game application is obtained from the executable file.
A3, the method for interacting with a game application according to the operating system of A1, wherein the obtaining of an application program function in a mono virtual machine in a game engine corresponding to the game application comprises:
obtaining a libmono.
So, obtaining the application program function from the libmono.
A4, method for interacting with a gaming application according to the operating system of A3, the application program functions comprising:
mono_assembly_get_image;
mono_class_from_name;
mono_method_desc_search_in_class;
mono_runtime_invoke;
mono_image_open_from_data;
mono_assembly_load_from_full;
mono_image_open_from_data_with_name。
a5, the method for interacting with a gaming application according to the operating system of A1, the executing the custom game script causing the operating system to interact with the gaming application, comprising:
and executing the custom game script, controlling the operating system to acquire game information in the game application, and/or controlling the operating system to modify the game logic of the game application.
A6, the method for interacting with game application according to the operating system of A1, wherein the compiling language of the custom game script is C #.
A7, the method for interaction with the game application according to the operating system A1, wherein the operating system is an android system, and the game engine is a Unity3D game engine.
B8, an apparatus for interaction between an operating system and a game application, applied to the operating system installed with the game application, the apparatus comprising:
the acquisition module is used for acquiring an application program function in a mono virtual machine in a game engine corresponding to the game application;
the calling module is used for calling the application program function to inject a custom game script into the mono virtual machine, wherein the custom game script is used for controlling interaction between the operating system and the game application;
and the execution module is used for executing the custom game script to enable the operating system to interact with the game application.
B9, an apparatus for interacting with a gaming application according to the operating system of B8, the apparatus further comprising:
so file is loaded to the game process of the game application;
the obtaining module is specifically configured to:
so file is utilized to analyze the executable file of the game application, and the application program function in the mono virtual machine in the game engine corresponding to the game application is obtained from the executable file.
B10, means for interacting with a game application according to the operating system of B8, the obtaining module comprising:
a first obtaining unit, configured to obtain a libmono.
A second obtaining unit, configured to obtain the application function from the libmono. B11, means for interacting with a gaming application according to the operating system of B10, the application functions comprising:
mono_assembly_get_image;
mono_class_from_name;
mono_method_desc_search_in_class;
mono_runtime_invoke;
mono_image_open_from_data;
mono_assembly_load_from_full;
mono_image_open_from_data_with_name。
b12, the device for interaction with a game application according to the operating system of B8, wherein the execution module is specifically configured to:
and executing the custom game script, controlling the operating system to acquire game information in the game application, and/or controlling the operating system to modify the game logic of the game application.
B13, means for interacting with a game application according to the operating system of B8, the compiling language of the custom game script is C #.
B14, and interacting with a game application according to the operating system of B8, wherein the operating system is an android system, and the game engine is a Unity3D game engine.
C15, a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring an application program function in a mono virtual machine in a game engine corresponding to the game application;
calling the application program function to inject a custom game script into the mono virtual machine, wherein the custom game script is used for controlling interaction between the operating system and the game application;
executing the custom game script causes the operating system to interact with the game application.
D16, a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the program:
acquiring an application program function in a mono virtual machine in a game engine corresponding to the game application;
calling the application program function to inject a custom game script into the mono virtual machine, wherein the custom game script is used for controlling interaction between the operating system and the game application;
executing the custom game script causes the operating system to interact with the game application.

Claims (10)

1. A method for an operating system to interact with a game application, the method being applied to the operating system installed with the game application, the method comprising:
acquiring an application program function in a mono virtual machine in a game engine corresponding to the game application;
calling the application program function to inject a custom game script into the mono virtual machine, wherein the custom game script is used for controlling interaction between the operating system and the game application;
executing the custom game script to enable the operating system to interact with the game application;
prior to the obtaining an application function in a mono virtual machine in a game engine corresponding to the game application, the method further comprises:
so file is loaded into a game process of the game application;
wherein the acquiring an application function in a mono virtual machine in a game engine corresponding to the game application includes:
so file is utilized to analyze the executable file of the game application, and an application program function in a mono virtual machine in a game engine corresponding to the game application is obtained from the executable file;
the executing the custom game script causes the operating system to interact with the game application, including:
and executing the custom game script, controlling the operating system to acquire game information in the game application, and/or controlling the operating system to modify the game logic of the game application.
2. The method of claim 1, wherein the obtaining application program functions in a mono virtual machine in a game engine corresponding to the game application, comprises:
obtaining a libmono.
So, obtaining the application program function from the libmono.
3. The method of operating system interaction with a gaming application of claim 1, wherein the compilation language of the custom game script is C #.
4. A method of operating system interaction with a gaming application as claimed in claim 1, wherein the operating system is an android system and the gaming engine is a Unity3D gaming engine.
5. An apparatus for interaction between an operating system and a game application, the apparatus being applied to the operating system in which the game application is installed, the apparatus comprising:
the acquisition module is used for acquiring an application program function in a mono virtual machine in a game engine corresponding to the game application;
the calling module is used for calling the application program function to inject a custom game script into the mono virtual machine, wherein the custom game script is used for controlling interaction between the operating system and the game application;
the execution module is used for executing the custom game script to enable the operating system to interact with the game application;
the device further comprises:
so file is loaded to the game process of the game application;
the obtaining module is specifically configured to:
so file is utilized to analyze the executable file of the game application, and an application program function in a mono virtual machine in a game engine corresponding to the game application is obtained from the executable file;
the execution module is specifically configured to:
and executing the custom game script, controlling the operating system to acquire game information in the game application, and/or controlling the operating system to modify the game logic of the game application.
6. The apparatus for interaction of an operating system with a gaming application of claim 5, wherein the obtaining module comprises:
a first obtaining unit, configured to obtain a libmono.
A second obtaining unit, configured to obtain the application function from the libmono.
7. An apparatus for an operating system to interact with a gaming application as defined in claim 5, wherein the custom game script has a compilation language of C #.
8. An apparatus as defined in claim 5, wherein the operating system is an android system and the game engine is a Unity3D game engine.
9. A computer-readable storage medium, on which a computer program is stored, which program, when executed by a processor, carries out the steps of:
acquiring an application program function in a mono virtual machine in a game engine corresponding to a game application;
calling the application program function to inject a custom game script into the mono virtual machine, wherein the custom game script is used for controlling interaction between an operating system and the game application;
executing the custom game script to enable the operating system to interact with the game application;
before the obtaining of the application program function in the mono virtual machine in the game engine corresponding to the game application, the step implemented when the processor executes the program further includes:
so file is loaded into a game process of the game application;
wherein the acquiring an application function in a mono virtual machine in a game engine corresponding to the game application includes:
so file is utilized to analyze the executable file of the game application, and an application program function in a mono virtual machine in a game engine corresponding to the game application is obtained from the executable file;
wherein the executing the custom game script causes the operating system to interact with the game application, comprising:
and executing the custom game script, controlling the operating system to acquire game information in the game application, and/or controlling the operating system to modify the game logic of the game application.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program performs the steps of:
acquiring an application program function in a mono virtual machine in a game engine corresponding to a game application;
calling the application program function to inject a custom game script into the mono virtual machine, wherein the custom game script is used for controlling interaction between an operating system and the game application;
executing the custom game script to enable the operating system to interact with the game application;
before the obtaining of the application program function in the mono virtual machine in the game engine corresponding to the game application, the step implemented when the processor executes the program further includes:
so file is loaded into a game process of the game application;
wherein the acquiring an application function in a mono virtual machine in a game engine corresponding to the game application includes:
so file is utilized to analyze the executable file of the game application, and an application program function in a mono virtual machine in a game engine corresponding to the game application is obtained from the executable file;
wherein the executing the custom game script causes the operating system to interact with the game application, comprising:
and executing the custom game script, controlling the operating system to acquire game information in the game application, and/or controlling the operating system to modify the game logic of the game application.
CN201810472759.8A 2018-05-17 2018-05-17 Method and device for interaction between operating system and game application Active CN108654090B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810472759.8A CN108654090B (en) 2018-05-17 2018-05-17 Method and device for interaction between operating system and game application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810472759.8A CN108654090B (en) 2018-05-17 2018-05-17 Method and device for interaction between operating system and game application

Publications (2)

Publication Number Publication Date
CN108654090A CN108654090A (en) 2018-10-16
CN108654090B true CN108654090B (en) 2022-03-11

Family

ID=63778674

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810472759.8A Active CN108654090B (en) 2018-05-17 2018-05-17 Method and device for interaction between operating system and game application

Country Status (1)

Country Link
CN (1) CN108654090B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111111206B (en) * 2018-10-30 2024-04-05 阿里巴巴集团控股有限公司 Game running method and device and terminal equipment
CN109766203A (en) * 2019-01-24 2019-05-17 重庆爱奇艺智能科技有限公司 A kind of method and apparatus for realizing Unified Communication between joint end and Android end
CN110807191B (en) * 2019-09-30 2022-12-06 奇安信科技集团股份有限公司 Safe operation method and device of application program
CN111158797A (en) * 2019-12-26 2020-05-15 第四范式(北京)技术有限公司 Method, system and engine device for operating artificial intelligence application
CN113680068A (en) * 2021-07-23 2021-11-23 广州三七互娱科技有限公司 Game development engine and Docker interaction method, device and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105413176A (en) * 2015-11-10 2016-03-23 内蒙古工业大学 3D engine system applied to games
US9463386B1 (en) * 2011-11-08 2016-10-11 Zynga Inc. State machine scripting in computer-implemented games
CN106294166A (en) * 2016-08-16 2017-01-04 腾讯科技(深圳)有限公司 A kind of game data monitoring method and apparatus
CN106293880A (en) * 2016-08-10 2017-01-04 北京奇虎科技有限公司 Windows system is run the method and device of Android application program
CN106528263A (en) * 2016-10-21 2017-03-22 郑州云海信息技术有限公司 A method for injecting metainformation into virtual machines and performing initialization in a virtualization environment
CN106850650A (en) * 2017-02-21 2017-06-13 网易(杭州)网络有限公司 The method and client games system of data are accessed for game client
CN107704376A (en) * 2016-08-11 2018-02-16 福建省天奕网络科技有限公司 Game automated testing method and its system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9463386B1 (en) * 2011-11-08 2016-10-11 Zynga Inc. State machine scripting in computer-implemented games
CN105413176A (en) * 2015-11-10 2016-03-23 内蒙古工业大学 3D engine system applied to games
CN106293880A (en) * 2016-08-10 2017-01-04 北京奇虎科技有限公司 Windows system is run the method and device of Android application program
CN107704376A (en) * 2016-08-11 2018-02-16 福建省天奕网络科技有限公司 Game automated testing method and its system
CN106294166A (en) * 2016-08-16 2017-01-04 腾讯科技(深圳)有限公司 A kind of game data monitoring method and apparatus
CN106528263A (en) * 2016-10-21 2017-03-22 郑州云海信息技术有限公司 A method for injecting metainformation into virtual machines and performing initialization in a virtualization environment
CN106850650A (en) * 2017-02-21 2017-06-13 网易(杭州)网络有限公司 The method and client games system of data are accessed for game client

Also Published As

Publication number Publication date
CN108654090A (en) 2018-10-16

Similar Documents

Publication Publication Date Title
CN108654090B (en) Method and device for interaction between operating system and game application
CN109697060B (en) Video special effect system, generation method, device, equipment and storage medium thereof
CN110134386B (en) Program editing method and device
US20070174818A1 (en) Method and apparatus for generating application programs for multiple hardware and/or software platforms
WO2022083316A1 (en) Application running method and apparatus, and computer storage medium
US10846101B2 (en) Method and system for starting up application
JP2021192254A (en) Function extension method and system for package file
CN106850650B (en) Method for accessing data by game client and client game system
CN110673852B (en) Method, system and equipment for realizing control flow flattening based on front end of compiler
Silva Pro Android Games
Lott et al. ActionScript 3.0 Cookbook: Solutions for Flash Platform and Flex Application Developers
US7051323B2 (en) Method and apparatus for initializing romized system classes at virtual machine build time
CN112882690B (en) Application development method and device
JPH0773032A (en) Method for dynamic correction of software system
US9244664B1 (en) System for video development kits with control of executable size
CN111198690A (en) Modification method and device for installation package
CN107480479B (en) Application program reinforcing method and device, computing equipment and computer storage medium
CN114721735B (en) Program dynamic loading method and device and electronic equipment
CN107621939B (en) Application optimization method and device
US20160358356A1 (en) Asset catalog layered image support
CN111610966A (en) Program running method and device and computing equipment
CN111198708A (en) Method and device for solving conflict of jar packets
CN108845961B (en) Method and device for creating vertex buffer area and readable storage medium
CN114020278A (en) Data processing method, device, equipment and storage medium
Potts et al. Java programming language handbook

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