CN104090765A - Method and device for switching from mobile game to webgame - Google Patents

Method and device for switching from mobile game to webgame Download PDF

Info

Publication number
CN104090765A
CN104090765A CN201410338994.8A CN201410338994A CN104090765A CN 104090765 A CN104090765 A CN 104090765A CN 201410338994 A CN201410338994 A CN 201410338994A CN 104090765 A CN104090765 A CN 104090765A
Authority
CN
China
Prior art keywords
file
mobile phone
game
code
phone games
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410338994.8A
Other languages
Chinese (zh)
Inventor
刘德建
陈宏展
王明巍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian TQ Digital Co Ltd
Original Assignee
Fujian TQ Digital 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 Fujian TQ Digital Co Ltd filed Critical Fujian TQ Digital Co Ltd
Priority to CN201410338994.8A priority Critical patent/CN104090765A/en
Publication of CN104090765A publication Critical patent/CN104090765A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a method for switching from a mobile game to a webgame. The method comprises the steps that a framework code and a logical code are extracted from a code of the mobile game; the framework code is compiled, so that an executable file is generated; a script file is made from the logical code of the mobile game; the executable file and the script file are integrated. The invention further provides a device for correspondingly switching from the mobile game to the webgame. Different from the prior art, the method and device for switching from the mobile game to the webgame compile the part irrelevant to game logic by programming languages and tools of corresponding platforms to generate the executable file, and make the game logic written through scripting languages irrelevant to the platforms and dynamically loaded in the operation process of the executable file, as a result, dependency of codes of the game logic on the platforms is reduced, efficiency of the platform translation process of the same game is improved, error risks are reduced, and the requirement for developers is low.

Description

A kind of mobile phone games turn method and the device of web game
Technical field
The present invention relates to game technology and cartoon technique field, particularly a kind of mobile phone games turn method and the device of web game.
Background technology
Development along with electronic game culture and technology, user requires also improving constantly to the each side of game, for example show that user wishes on webpage and mobile phone, to play with a game, so just there has been the demand of same game being carried out to different platform transplanting simultaneously.One of mode of platform transplantation is exactly for the game originally moving on mobile phone, it is supported on webpage and moves.For realizing this purpose, current common technology is the source code of writing with C++ on mobile phone to be rewritten into the source code of ActionScript, can support that FlashPlayer finally moves on webpage.C++ is a kind of use computer programming language very widely, can in kinds of platform, be compiled execution, but can not operate in the middle of browser.ActionScript is the script that can move on FlashPlayer, and FlashPlayer can move in the middle of browser.
In realizing process of the present invention, inventor finds now by technology, to have following problem:
1) code that the code of C++ is rewritten into ActionScript is a very time consuming process.
2) developer need to be very familiar and easily make mistakes to two kinds of programming languages.
Summary of the invention
For this reason, need to provide a kind of mobile phone games fast and convenient, that error rate is lower to turn method and the device of web game.
For achieving the above object, the technical scheme that inventor provides is as follows:
Mobile phone games turn a method for web game, comprise step:
From mobile phone games code, isolate skeleton code and logical code;
Compile described skeleton code, generate executable file;
The logical code of making mobile phone games is script file;
Integrate described executable file and script file.
Further, described mobile phone games turn in the method for web game, and step " compiles described skeleton code, generates executable file " and specifically comprises:
On mobile phone games platform, use XCODE compiler framework code, generate executable file; Or
On web game platform, use FlasCC or Flex compiler framework code, generate executable file.
Further, described mobile phone games turn in the method for web game, and step " is integrated described executable file and script file " and specifically comprised:
On mobile phone games platform, use XCODE that script file and executable file are integrated in to games installation kit; Or
Script file is placed in to website predetermined directory on web game platform.
Further, described mobile phone games turn in the method for web game, also comprise step after step " is integrated described executable file and script file ":
Carry out executable file and load game scripts file.
Further, described mobile phone games turn in the method for web game, and step " loads game scripts file " and specifically comprises:
On mobile phone games platform, obtain the script file data in internal memory, load game scripts file; Or
On web game platform, obtain the script file data under the predetermined directory of website, load game scripts file.
The device that inventor also provides a kind of mobile phone games to turn web game, comprises skeleton code separative element, executable file generation unit, script file generation unit and integral unit;
Described skeleton code separative element is for isolating skeleton code and logical code from mobile phone games code;
Described executable file generation unit is used for compiling described skeleton code, generates executable file;
Described script file generation unit is script file for making the logical code of mobile phone games;
Described integral unit is used for integrating described executable file and script file.
Further, described mobile phone games turn in the device of web game, and executable file generation unit, for for mobile phone games platform, is used XCODE compiler framework code, generates executable file; Or
For web game platform, use FlasCC or Flex compiler framework code, generate executable file.
8, the mobile phone games as described in claim 6 or 7 turn in the device of web game, and integral unit, for for mobile phone games platform, is used XCODE that script file and executable file are integrated in to games installation kit; Or
For web game platform, script file is placed in to website predetermined directory.
Further, described mobile phone games turn the device of web game, also comprise running unit, for carrying out executable file and loading game scripts file.
Further, described mobile phone games turn in the device of web game, and running unit, for for mobile phone games platform, is obtained the script file data in internal memory, load game scripts file; Or
For web game platform, obtain the script file data under the predetermined directory of website, load game scripts file.
Be different from prior art, technique scheme will be used the programming language of corresponding platform and instrument compiling to generate executable file with the irrelevant part of game logic, with writing game logic dynamic load when executable file moves with the script of platform independence, thereby reduce the code of game logic and the dependence of platform, so promoted same game implementation platform migration process efficiency, reduced the risk of makeing mistakes, lower to developer's requirement.
Accompanying drawing explanation
Fig. 1 is the process flow diagram that mobile phone games turn the method for web game described in an embodiment of the present invention;
Fig. 2 is the structural representation that mobile phone games turn the device of web game described in another embodiment of the present invention.
Description of reference numerals:
1-skeleton code separative element
2-executable file generation unit
3-script file generation unit
4-integral unit
5-running unit
Embodiment
By describe in detail technical scheme technology contents, structural attitude, realized object and effect, below in conjunction with specific embodiment and coordinate accompanying drawing to be explained in detail.
Refer to Fig. 1, for mobile phone games described in an embodiment of the present invention turn the process flow diagram of the method for web game; Described method comprises the steps:
S1, from mobile phone games code, isolate skeleton code and logical code.
The object of this step is separated for the irrelevant skeleton code of game content and the logical code relevant with game content.First, restriction to skeleton code is, the own content of this part code and game does not have direct relation, in different game, even in software, can share use, can, along with game content changes and changes, in whole development of games process, not need to change or change seldom.And correspondingly, game logic code is exactly the code of specifically controlling game logic and performance, this part code is constantly increase on stream and revise, use script to write code and can make game logic code and platform independence, because script is dynamic load in program operation process, the implementation of script is exactly the interpretation process to script, this does not need to use the compilation tool of corresponding platform, as long as be exactly identical to the identical execution result in different platform of the explanation of script.
S2, compile described skeleton code, generate executable file; The logical code of making mobile phone games is script file.
Particularly, skeleton code is used on mobile phone games platform XCODE compiling generate corresponding executable file; On web game platform, use FlasCC and Flex compiling to generate corresponding executable file.By the script file of logical code, on mobile phone games platform, with XCODE, be incorporated in the installation kit of games; On web game platform, games are placed in a webpage of website, script file is independent of games and is placed under a catalogue of website.
S3, integrate described executable file and script file.
Particularly, on mobile phone games platform, use XCODE that script file and executable file are integrated in to games installation kit; Script file is placed in to website predetermined directory on web game platform.
S4, execution executable file, load game scripts file.
While starting to play, carry out this step, loading scripts file is also realized game logic.Be specially: when game starts, when executable file is carried out by system, load the script file in resource.On mobile phone games platform, be exactly the data of obtaining in mobile phone EMS memory, be exactly the data of obtaining under directory web site on web game platform.Loaded after script file, by game logic, given script file and control, entered normal game process.
Refer to Fig. 2, for mobile phone games described in another embodiment of the present invention turn the structural representation of the device of web game.Described device comprises skeleton code separative element 1, executable file generation unit 2, script file generation unit 3, integral unit 4 and running unit 5.Described device is realized mobile phone games, and to turn the mode of web game function specific as follows:
Skeleton code separative element 1 is for isolating skeleton code and logical code from mobile phone games code.
The object of this operation is separated for the irrelevant skeleton code of game content and the logical code relevant with game content.First, restriction to skeleton code is, the own content of this part code and game does not have direct relation, in different game, even in software, can share use, can, along with game content changes and changes, in whole development of games process, not need to change or change seldom.And correspondingly, game logic code is exactly the code of specifically controlling game logic and performance, this part code is constantly increase on stream and revise, use script to write code and can make game logic code and platform independence, because script is dynamic load in program operation process, the implementation of script is exactly the interpretation process to script, this does not need to use the compilation tool of corresponding platform, as long as be exactly identical to the identical execution result in different platform of the explanation of script.
Executable file generation unit 2, for compiling described skeleton code, generates executable file; Script file generation unit 3 is script file for making the logical code of mobile phone games.
Particularly, executable file generation unit 2 is used skeleton code XCODE compiling to generate corresponding executable file on mobile phone games platform; On web game platform, use FlasCC and Flex compiling to generate corresponding executable file.
Integral unit 4 for being incorporated into the installation kit of games on mobile phone games platform with XCODE.On web game platform, integral unit 4 is placed on games in a webpage of website, and script file is independent of games and is placed under a catalogue of website.
Further, performance element 5, for carrying out executable file, loads game scripts file.
While starting to play, performance element 5 is carried out executable file, loading scripts file and realizes game logic.Be specially: when game starts, when executable file is carried out by system, load the script file in resource.On mobile phone games platform, obtain the data in mobile phone EMS memory, or on web game platform, obtain the data under directory web site.Loaded after script file, by game logic, given script file and control, entered normal game process.
Technical solution of the present invention will be used the programming language of corresponding platform and instrument compiling to generate executable file with the irrelevant part of game logic, with writing game logic dynamic load when executable file moves with the script of platform independence, thereby reduce the code of game logic and the dependence of platform, so promoted same game implementation platform migration process efficiency, reduced the risk of makeing mistakes, lower to developer's requirement.
It should be noted that, in this article, relational terms such as the first and second grades is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply and between these entities or operation, have the relation of any this reality or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby the process, method, article or the terminal device that make to comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or be also included as the intrinsic key element of this process, method, article or terminal device.The in the situation that of more restrictions not, by the key element limiting statement " comprising ... " or " comprising ... ", and be not precluded within process, method, article or the terminal device that comprises described key element and also have other key element.In addition, in this article, " being greater than ", " being less than ", " surpassing " etc. are interpreted as and do not comprise given figure; " more than ", " below ", " in " etc. be interpreted as and comprise given figure.
Those skilled in the art should understand, the various embodiments described above can be provided as method, device or computer program.These embodiment can adopt complete hardware implementation example, implement software example or in conjunction with the form of the embodiment of software and hardware aspect completely.All or part of step in the method that the various embodiments described above relate to can come the hardware that instruction is relevant to complete by program, described program can be stored in the storage medium that computer equipment can read, for carrying out all or part of step described in the various embodiments described above method.Described computer equipment, includes but not limited to: personal computer, server, multi-purpose computer, special purpose computer, the network equipment, embedded device, programmable device, intelligent mobile terminal, intelligent home device, wearable intelligent equipment, vehicle intelligent equipment etc.; Described storage medium, includes but not limited to: RAM, ROM, magnetic disc, tape, CD, flash memory, USB flash disk, portable hard drive, storage card, memory stick, webserver stores, network cloud storage etc.
The various embodiments described above are with reference to describing according to process flow diagram and/or the block scheme of the method described in embodiment, equipment (system) and computer program.Should understand can be in computer program instructions realization flow figure and/or block scheme each flow process and/or the flow process in square frame and process flow diagram and/or block scheme and/or the combination of square frame.Can provide these computer program instructions to the processor of computer equipment to produce a machine, the instruction of carrying out by the processor of computer equipment is produced for realizing the device in the function of flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame appointments.
These computer program instructions also can be stored in the computer equipment readable memory of energy vectoring computer equipment with ad hoc fashion work, the instruction that makes to be stored in this computer equipment readable memory produces the manufacture that comprises command device, and this command device is realized the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame.
These computer program instructions also can be loaded on computer equipment, make to carry out sequence of operations step to produce computer implemented processing on computer equipment, thereby the instruction of carrying out is provided for realizing the step of the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame on computer equipment.
Although the various embodiments described above are described; once but those skilled in the art obtain the basic creative concept of cicada; can make other change and modification to these embodiment; so the foregoing is only embodiments of the invention; not thereby limit scope of patent protection of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes instructions of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, within being all in like manner included in scope of patent protection of the present invention.

Claims (10)

1. mobile phone games turn a method for web game, comprise step:
From mobile phone games code, isolate skeleton code and logical code;
Compile described skeleton code, generate executable file;
The logical code of making mobile phone games is script file;
Integrate described executable file and script file.
2. mobile phone games as claimed in claim 1 turn in the method for web game, and step " compiles described skeleton code, generates executable file " and specifically comprises:
On mobile phone games platform, use XCODE compiler framework code, generate executable file; Or
On web game platform, use FlasCC or Flex compiler framework code, generate executable file.
3. mobile phone games as claimed in claim 1 or 2 turn in the method for web game, and step " is integrated described executable file and script file " and specifically comprised:
On mobile phone games platform, use XCODE that script file and executable file are integrated in to games installation kit; Or
Script file is placed in to website predetermined directory on web game platform.
4. mobile phone games as claimed in claim 1 or 2 turn in the method for web game, also comprise step after step " is integrated described executable file and script file ":
Carry out executable file and load game scripts file.
5. mobile phone games as claimed in claim 4 turn in the method for web game, and step " loads game scripts file " and specifically comprises:
On mobile phone games platform, obtain the script file data in internal memory, load game scripts file; Or
On web game platform, obtain the script file data under the predetermined directory of website, load game scripts file.
6. mobile phone games turn a device for web game, comprise skeleton code separative element, executable file generation unit, script file generation unit and integral unit;
Described skeleton code separative element is for isolating skeleton code and logical code from mobile phone games code;
Described executable file generation unit is used for compiling described skeleton code, generates executable file;
Described script file generation unit is script file for making the logical code of mobile phone games;
Described integral unit is used for integrating described executable file and script file.
7. mobile phone games as claimed in claim 6 turn in the device of web game, and executable file generation unit, for for mobile phone games platform, is used XCODE compiler framework code, generates executable file; Or
For web game platform, use FlasCC or Flex compiler framework code, generate executable file.
8. the mobile phone games as described in claim 6 or 7 turn in the device of web game, and integral unit, for for mobile phone games platform, is used XCODE that script file and executable file are integrated in to games installation kit; Or
For web game platform, script file is placed in to website predetermined directory.
9. the mobile phone games as described in claim 6 or 7 turn the device of web game, also comprise running unit, for carrying out executable file and loading game scripts file.
10. mobile phone games as claimed in claim 9 turn in the device of web game, and running unit, for for mobile phone games platform, is obtained the script file data in internal memory, load game scripts file; Or
For web game platform, obtain the script file data under the predetermined directory of website, load game scripts file.
CN201410338994.8A 2014-07-16 2014-07-16 Method and device for switching from mobile game to webgame Pending CN104090765A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410338994.8A CN104090765A (en) 2014-07-16 2014-07-16 Method and device for switching from mobile game to webgame

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410338994.8A CN104090765A (en) 2014-07-16 2014-07-16 Method and device for switching from mobile game to webgame

Publications (1)

Publication Number Publication Date
CN104090765A true CN104090765A (en) 2014-10-08

Family

ID=51638484

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410338994.8A Pending CN104090765A (en) 2014-07-16 2014-07-16 Method and device for switching from mobile game to webgame

Country Status (1)

Country Link
CN (1) CN104090765A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572218A (en) * 2015-01-28 2015-04-29 宇龙计算机通信科技(深圳)有限公司 Application operation control method and system and terminal
CN105045539A (en) * 2015-08-20 2015-11-11 百度在线网络技术(北京)有限公司 Control method and apparatus for data offline storage
CN105224363A (en) * 2015-09-23 2016-01-06 北京金山安全软件有限公司 Method and device for loading application program
CN105765569A (en) * 2014-11-05 2016-07-13 华为技术有限公司 Data distribution method, loader and storage system
CN105955731A (en) * 2016-04-26 2016-09-21 深圳市编玩边学教育科技有限公司 Quick compiling method and system of mobile game
CN106897076A (en) * 2017-03-24 2017-06-27 长沙趣动文化科技有限公司 Game services are provided and operation method, device
CN108984181A (en) * 2018-07-24 2018-12-11 合肥爱玩动漫有限公司 A kind of method of mobile phone games and web game intercommunication
CN112835543A (en) * 2021-01-11 2021-05-25 上海电气集团股份有限公司 Engineering drawing display method and device
CN113064591A (en) * 2021-02-22 2021-07-02 福建星云电子股份有限公司 WPF page dynamic generation method, system, equipment and medium
CN113535180A (en) * 2021-06-15 2021-10-22 杭州电魂网络科技股份有限公司 Cross-platform game publishing method, system and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101641690A (en) * 2007-01-22 2010-02-03 E3网络股份有限公司 Be used to generate the method and the middleware platform engine thereof of cross platform program
CN102541567A (en) * 2012-01-05 2012-07-04 深圳市天拓立方通讯科技有限公司 2D mobile game engine and compatible mobile operating system method
CN103049300A (en) * 2012-12-17 2013-04-17 福建天晴数码有限公司 Method for supporting running of FLASH on WEB platform by C and C++ codes
US8429604B1 (en) * 2008-05-05 2013-04-23 Adobe Systems Incorporated System and method for extracting behavioral code from a software code file

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101641690A (en) * 2007-01-22 2010-02-03 E3网络股份有限公司 Be used to generate the method and the middleware platform engine thereof of cross platform program
US8429604B1 (en) * 2008-05-05 2013-04-23 Adobe Systems Incorporated System and method for extracting behavioral code from a software code file
CN102541567A (en) * 2012-01-05 2012-07-04 深圳市天拓立方通讯科技有限公司 2D mobile game engine and compatible mobile operating system method
CN103049300A (en) * 2012-12-17 2013-04-17 福建天晴数码有限公司 Method for supporting running of FLASH on WEB platform by C and C++ codes

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
沙洁: "《基于事件的跨平台移动应用开发框架设计与实现》", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105765569A (en) * 2014-11-05 2016-07-13 华为技术有限公司 Data distribution method, loader and storage system
CN104572218B (en) * 2015-01-28 2019-02-01 宇龙计算机通信科技(深圳)有限公司 Progress control method, operation control system and the terminal of application program
CN104572218A (en) * 2015-01-28 2015-04-29 宇龙计算机通信科技(深圳)有限公司 Application operation control method and system and terminal
CN105045539A (en) * 2015-08-20 2015-11-11 百度在线网络技术(北京)有限公司 Control method and apparatus for data offline storage
CN105045539B (en) * 2015-08-20 2018-11-23 百度在线网络技术(北京)有限公司 The control method and device of off-line data storage
CN105224363A (en) * 2015-09-23 2016-01-06 北京金山安全软件有限公司 Method and device for loading application program
CN105224363B (en) * 2015-09-23 2019-04-05 北京金山安全软件有限公司 Method and device for loading application program
CN105955731A (en) * 2016-04-26 2016-09-21 深圳市编玩边学教育科技有限公司 Quick compiling method and system of mobile game
CN105955731B (en) * 2016-04-26 2019-05-14 深圳市编玩边学教育科技有限公司 A kind of quick write method of mobile phone games and system
CN106897076A (en) * 2017-03-24 2017-06-27 长沙趣动文化科技有限公司 Game services are provided and operation method, device
CN106897076B (en) * 2017-03-24 2021-03-02 长沙趣动文化科技有限公司 Game service providing and running method and device
CN108984181A (en) * 2018-07-24 2018-12-11 合肥爱玩动漫有限公司 A kind of method of mobile phone games and web game intercommunication
CN112835543A (en) * 2021-01-11 2021-05-25 上海电气集团股份有限公司 Engineering drawing display method and device
CN112835543B (en) * 2021-01-11 2024-04-12 上海电气集团股份有限公司 Engineering drawing display method and device
CN113064591A (en) * 2021-02-22 2021-07-02 福建星云电子股份有限公司 WPF page dynamic generation method, system, equipment and medium
CN113535180A (en) * 2021-06-15 2021-10-22 杭州电魂网络科技股份有限公司 Cross-platform game publishing method, system and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN104090765A (en) Method and device for switching from mobile game to webgame
CN110618876B (en) Linux and Android coexistence and interaction method based on Feiteng platform and shared kernel
KR102077360B1 (en) Generating native code from intermediate language code for an application
JP6122493B2 (en) Adaptively portable library
Charkaoui et al. Cross-platform mobile development approaches
CN109670128B (en) WebAssembly-based webpage application implementation method and device
CN106933610B (en) Application program installation package generation method and device and electronic equipment
US8200710B2 (en) System and method for runtime rendering of web-based user interfaces for master data management
CN102880452A (en) Programming language capable of cross-language reusing
CN102054217B (en) Entity morphing in metamodel-based tools
CN104714788A (en) Method and device for automatically generating software installation package
JP2014500564A (en) How to checkpoint and restore program state
CN101859244A (en) Multi-toolchain engineering construction method and system
Dearle Groovy for Domain-Specific Languages
CN103443763A (en) ISA bridging including support for call to overidding virtual functions
CN103473072A (en) Mobile cloud computing application program development method
CN104965687A (en) Big data processing method and apparatus based on instruction set generation
CN102004662A (en) Embedded scalable virtual machine
CN107391099B (en) Resource preprocessing method and device
CN103744331A (en) Education robot, controller thereof and programming method of controller
CN101944061A (en) Method and device for debugging codes
CN111158665B (en) Code generation method and device, electronic equipment and storage medium
CN102622213A (en) One-click upgrade tool generation system and manufacturing method thereof
CN109542494B (en) Extension control method and terminal for VR software peripheral
CN105446788B (en) A kind of information processing method and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20141008

WD01 Invention patent application deemed withdrawn after publication