CN106815002A - A kind of implementation method of cross-platform development of games instrument - Google Patents

A kind of implementation method of cross-platform development of games instrument Download PDF

Info

Publication number
CN106815002A
CN106815002A CN201510862453.XA CN201510862453A CN106815002A CN 106815002 A CN106815002 A CN 106815002A CN 201510862453 A CN201510862453 A CN 201510862453A CN 106815002 A CN106815002 A CN 106815002A
Authority
CN
China
Prior art keywords
cross
platform
games
platform development
development
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510862453.XA
Other languages
Chinese (zh)
Other versions
CN106815002B (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.)
Xiamen Yaji Software Co Ltd
Original Assignee
Beijing Chukong 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 Chukong Technology Co Ltd filed Critical Beijing Chukong Technology Co Ltd
Priority to CN201510862453.XA priority Critical patent/CN106815002B/en
Publication of CN106815002A publication Critical patent/CN106815002A/en
Application granted granted Critical
Publication of CN106815002B publication Critical patent/CN106815002B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a kind of implementation method of cross-platform development of games instrument, the rendering engine realized using C++ as cross-platform development of games instrument fabric;Realize that complexity efficiently renders and C++ function package class libraries is converted into C# function package class libraries using C++;Simple UI interfaces and function logic are realized using C#, and call above-mentioned C# function packages class libraries and the simple UI interfaces using C# realizations and function logic using C#, both the rendering efficiency of cross-platform development of games instrument had been ensure that, while reducing development of games cost.The present invention develops cross-platform development of games instrument using C++ and C# so that the software product of same version can be flexibly applied in Windows systems and Mac OS systems simultaneously.

Description

A kind of implementation method of cross-platform development of games instrument
Technical field
The present invention relates to network game development technical field, and in particular to a kind of implementation method of cross-platform development of games instrument.
Background technology
Mac OS systems are Macintosh dedicated system, cannot be installed in ordinary PC and used under normal circumstances.Mac based on Darwin OS system X enhances stability, performance and the responding ability of Mac OS systems, it can give full play to the advantage of dual processor by symmetric multi-processors technology, there is provided impayable 2D, 3D and multimedia graphic performance and extensive font are supported and integrated PDA functions.Mac OS X can almost support all of application programs of Mac OS 9 by Classic environment, and the intuitively Aqua user interfaces that it has make the ease for use of Mac OS systems reach a brand-new level again.
The Windows systems of Microsoft exploitations are that user is most in the world at present, and the most strong operating system of compatibility.Earliest Windows operating system was just proposed from 1985, and the operating system Windows1.0 for releasing at that time is the operating system based on DOS kernels.Windows1.0 improves the conventional command code system Microsoft Disk Operating Systerm of Microsoft(MS-DOS).Microsoft Windows is the operating system of color interface, supports key mouse function, and the platform of acquiescence is made up of taskbar and desktop icons.Taskbar is by showing the program being currently running, the Start menu, the time, quickly starting column, input method and lower right corner tray icon and constitute.And desktop icons are the approach for entering program, default desktop icon has " my computer ", " my document ", " recycle bin " etc..In addition, desktop can also show that system carries " Internet Explorer " icons.
With the lifting of the world market share of the decline and Mac OS systems of the world market share of Windows systems, present merchants for game software development needs to be the product of oneself version that application and development is different in Windows systems with Mac OS systems respectively, substantial amounts of manpower and materials are consumed, so as to the high cost for causing Games Software to develop.Therefore it is badly in need of a kind of solution of cross-platform development of games instrument to realize same version Games Software in Windows systems and Mac OS systematic differences, to reduce the development cost of product.
At present, various cross-platform development of games instruments have been occurred in that on the market, and external U3D has used script and built-in virtual machine, and domestic technical team realizes application of the same version Games Software in different operating system using Flash, JAVA and Html5.However, there is problems with cross-platform development of games instrument present in prior art:
One is that cross-platform development of games instrument is only developed using C++, and cross-platform development of games instrument rendering efficiency is high, but few using the alternative that C++ develops cross-platform development of games instrument, and high cost, the cycle is long;
Next to that only use C#, JAVA, Html5 to develop cross-platform development of games instrument, low cost, cycle is short, but cross-platform development of games instrument rendering efficiency is low.
The content of the invention
To solve the above problems, the invention provides a kind of implementation method of cross-platform development of games instrument, while developing cross-platform development of games instrument using C++ and C# so that the software product of same version can be flexibly applied in Windows systems and Mac OS systems.
The invention provides a kind of implementation method of cross-platform development of games instrument, methods described includes:
Using the rendering engine of C++ realizations as the fabric of cross-platform development of games instrument, the logical sum of cross-platform development of games instrument is supported to render;
Create C++ function packages class libraries and realize rendering for cross-platform development of games instrument;
Interfacing/artificial hand-written compiling is automatically generated using C++ and C#, C++ function package class libraries, C# function package class libraries is converted into;
Main body interface and the function logic of cross-platform development of games instrument are realized using C#;
By P/Invoke technologies, call C# function packages class libraries using C# and use main body interface and the function logic of the cross-platform development of games instrument of C# realizations.
Further, the establishment C++ function packages class libraries and rendering for cross-platform development of games instrument is realized, specially:
C++ function package class libraries is created, for the editting function provided in cross-platform development of games instrument, the class to software product carries out simplifying encapsulation, there is provided be more suitable for the interface of cross-platform development of games too development;
Using cross-platform synchronous method, for different platforms, establishment is visual to render region.
Further, described to use cross-platform synchronous method, for different platforms, establishment is visual to render region, specially:
The API of GTK call operation systems creates the graphical interface window of scene of game in UI editing machines;
UI editing machines call cross-platform shape library, and scene of game is rendered in the graphical interface window by the cross-platform shape library.
Preferably, the cross-platform shape library is OPENGL.
Preferably, the rendering engine that the application C++ is realized is cross-platform game engine Cocos2d-x or Orge or KlayGE.
Further, the exploitation of C# is supported under MAC platforms using Mono.net, the compiling of C++ is supported using LLVM.
Further, the exploitation of C# is supported under windows platform using Microsoft.net, the compiling of C++ is supported using VC++.
Advantageous Effects of the invention are:
The implementation method of a kind of cross-platform development of games instrument that the present invention is provided, while developing cross-platform development of games instrument using C++ and C# so that the software product of same version can be flexibly applied in Windows systems and Mac OS systems.Realize that complexity is efficiently rendered using C++, simple UI interfaces and function logic are realized using C#, the rendering efficiency of cross-platform development of games instrument had both been ensure that, while also reducing development of games cost.
Brief description of the drawings
Fig. 1 is a kind of schematic flow sheet of the implementation method of cross-platform development of games instrument provided in an embodiment of the present invention.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, below in conjunction with drawings and Examples, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is used only for explaining the present invention, it is impossible to be interpreted as the restriction to specific protection domain of the invention.
As shown in figure 1, the present embodiment is by taking particle effect system as an example, provides a kind of particle effect system that can make same version and be flexibly applied to method in Windows systems and Mac OS systems, comprise the following steps:
First, the logical sum of cross-platform development of games instrument is supported to render as the fabric of cross-platform development of games instrument using the rendering engine of C++ realizations.ParticIe system is built in rendering engine, it is ensured that particIe system can normally render 2D materials or 3D models, compiler engine storehouse.
Here the rendering engine that use C++ is realized, can be cross-platform game engine Cocos2d-x, Orge, KlayGE, or other rendering engines that C++ can be used to realize.
2nd, create C++ function packages class libraries and realize rendering for cross-platform development of games instrument, specially:
C++ function package class libraries is created, for the editting function provided in cross-platform development of games instrument, the class to particle effect system carries out simplifying encapsulation, necessary particle object and interface method, such as the initialization of particle, the resource loading of particle are provided, the broadcasting of particle, pause and stopping;
Using cross-platform synchronous method, for different platforms, establishment is visual to render region, specially:
The API of GTK call operation systems creates the graphical interface window of scene of game in UI editing machines;
Wherein, GTK is a kind of cross-platform development of games kit of cross-platform figure, it is also possible to which referred to as One function is powerful, a flexible design general graphical storehouse.It supports to create and is based on graphic user interface(Graphical User Interface, hereinafter referred to as GUI)Application program, can be found for creating the building block that many of GUI is already prepared to from this cross-platform development of games kit.It is that the main flow of the application program that graphical interfaces is developed under GNU/Linux develops one of cross-platform development of games instrument, is also applied for Windows systems or Mac systems.
Specifically, under Windows systems, GTK calls the API of Windows systems that the graphical interface window of scene of game is created in UI editing machines;Under Mac systems, GTK calls the API of Mac systems that the graphical interface window of scene of game is created in UI editing machines;But the embodiment of the present invention is not limited to both operations system, as long as the operating system that can complete the embodiment of the present invention is all suitable for.
UI editing machines call cross-platform shape library, and scene of game is rendered in the graphical interface window that GTK is created by cross-platform shape library.
In the embodiment of the present invention, cross-platform shape library is OpenGL.
3rd, interfacing is automatically generated using C++ and C#, C++ function package class libraries is automatically generated corresponding C# classes, create the encapsulation engineering of C#, the C# classes that loading is automatically generated are compiled into C# function package class libraries.
In the embodiment of the present invention, it would however also be possible to employ artificial hand-written compiling automatically generates interfacing replacing C++ and C#.
4th, realize main body interface and the function logic of cross-platform development of games instrument using C#, including particle establishment, the editor of particle property, the serializing related service logic of particle data file.
5th, by P/Invoke technologies, main body interface and the function logic of cross-platform development of games instrument are realized in C# function packages class libraries and four steps that generation in above-mentioned third step is called using C# using C#, create the encapsulated object of particle, and load the particle resource of acquiescence, setting particle is broadcast state, then starts the self-defined edit operation to particle object.
In the present embodiment, for different platforms, the exploitation as cross-platform development of games instrument and running environment using different components:The exploitation of C# is supported under MAC platforms using Mono.net, the compiling of C++ is supported using LLVM;The exploitation of C# is supported under windows platform with Microsoft.net, the compiling of C++ is supported using VC++.
Wherein, Mono.net is a project presided over by novell, inc..The target of the project is to create a series of .Net instruments for meeting standard ECMA (Ecma-334 and Ecma-335), including C # compilers and common language perform platform CLP (Common Language Platform)..Net from Microsoft is different, and Mono.net projects can not only run on windows platform, can also run on the platforms such as Linux, FreeBSD, Unix, Mac OS X and Solaris.
The above is only the preferred embodiment of the present invention; it is not intended to limit the invention; it should be understood that; for those skilled in the art; on the premise of the technology of the present invention principle is not departed from; some improvement and modification can also be made, these are improved and modification also should be regarded as protection scope of the present invention.

Claims (7)

1. a kind of implementation method of cross-platform development of games instrument, it is characterised in that methods described includes:
Using the rendering engine of C++ realizations as the fabric of cross-platform development of games instrument, the logical sum of cross-platform development of games instrument is supported to render;
Create C++ function packages class libraries and realize rendering for cross-platform development of games instrument;
Interfacing/artificial hand-written compiling is automatically generated using C++ and C#, the C++ function packages class libraries is converted into C# function package class libraries;
Main body interface and the function logic of cross-platform development of games instrument are realized using C#;
By P/Invoke technologies, call the C# function packages class libraries using C# and use main body interface and the function logic of the cross-platform development of games instrument of C# realizations.
2. the implementation method of cross-platform development of games instrument as claimed in claim 1, it is characterised in that the establishment C++ function packages class libraries simultaneously realizes rendering for cross-platform development of games instrument, specially:
C++ function package class libraries is created, for the editting function provided in cross-platform development of games instrument, the class to software product carries out simplifying encapsulation, there is provided be more suitable for the interface of cross-platform development of games too development;
Using cross-platform synchronous method, for different platforms, establishment is visual to render region.
3. the implementation method of cross-platform development of games instrument as claimed in claim 2, it is characterised in that described to use cross-platform synchronous method, for different platforms, create it is visual renders region, specially:
The API of GTK call operation systems creates the graphical interface window of scene of game in UI editing machines;
UI editing machines call cross-platform shape library, and scene of game is rendered in the graphical interface window by the cross-platform shape library.
4. the implementation method of cross-platform development of games instrument as claimed in claim 3, it is characterised in that the cross-platform shape library is OPENGL.
5. the implementation method of cross-platform development of games instrument as claimed in claim 1, it is characterised in that the rendering engine that the application C++ is realized is cross-platform game engine Cocos2d-x or Orge or KlayGE.
6. the implementation method of the cross-platform development of games instrument as any one of claim 1-5, it is characterised in that support the exploitation of C# under MAC platforms using Mono.net, uses LLVM to support the compiling of C++.
7. the implementation method of the cross-platform development of games instrument as any one of claim 1-5, it is characterised in that support the exploitation of C# under windows platform using Microsoft.net, uses VC++ to support the compiling of C++.
CN201510862453.XA 2015-12-01 2015-12-01 Method for realizing cross-platform game development tool Active CN106815002B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510862453.XA CN106815002B (en) 2015-12-01 2015-12-01 Method for realizing cross-platform game development tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510862453.XA CN106815002B (en) 2015-12-01 2015-12-01 Method for realizing cross-platform game development tool

Publications (2)

Publication Number Publication Date
CN106815002A true CN106815002A (en) 2017-06-09
CN106815002B CN106815002B (en) 2020-12-04

Family

ID=59107644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510862453.XA Active CN106815002B (en) 2015-12-01 2015-12-01 Method for realizing cross-platform game development tool

Country Status (1)

Country Link
CN (1) CN106815002B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107657154A (en) * 2017-09-18 2018-02-02 北京深思数盾科技股份有限公司 A kind of guard method of target program, device, equipment and storage medium
CN109697060A (en) * 2018-12-29 2019-04-30 广州华多网络科技有限公司 Special video effect software and its generation method, device, equipment and storage medium
CN110209449A (en) * 2019-05-21 2019-09-06 腾讯科技(深圳)有限公司 Cursor positioning method and device in a kind of game
CN111408138A (en) * 2019-01-04 2020-07-14 厦门雅基软件有限公司 Rendering method and device based on game engine and electronic equipment
CN113687879A (en) * 2021-07-22 2021-11-23 成都鲁易科技有限公司 Interaction method and device for cross-platform framework and platform interaction library
WO2022027600A1 (en) * 2020-08-07 2022-02-10 厦门雅基软件有限公司 Game engine resource processing method and apparatus, and electronic device and computer-readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541567A (en) * 2012-01-05 2012-07-04 深圳市天拓立方通讯科技有限公司 2D mobile game engine and compatible mobile operating system method
CN102880452A (en) * 2012-02-01 2013-01-16 日照市国软软件有限公司 Programming language capable of cross-language reusing
CN103886631A (en) * 2014-02-21 2014-06-25 浙江大学 Three-dimensional virtual indoor display system based on mobile equipment
CN105005484A (en) * 2015-08-12 2015-10-28 北京触控科技有限公司 Event dispatching method of cross-platform game development tool
CN105005473A (en) * 2015-06-29 2015-10-28 乐道互动(天津)科技有限公司 Game engine system for developing 3D game

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541567A (en) * 2012-01-05 2012-07-04 深圳市天拓立方通讯科技有限公司 2D mobile game engine and compatible mobile operating system method
CN102880452A (en) * 2012-02-01 2013-01-16 日照市国软软件有限公司 Programming language capable of cross-language reusing
CN103886631A (en) * 2014-02-21 2014-06-25 浙江大学 Three-dimensional virtual indoor display system based on mobile equipment
CN105005473A (en) * 2015-06-29 2015-10-28 乐道互动(天津)科技有限公司 Game engine system for developing 3D game
CN105005484A (en) * 2015-08-12 2015-10-28 北京触控科技有限公司 Event dispatching method of cross-platform game development tool

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
夏志海: "基于Cocos2d-x的手机游戏坦克大战的设计与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
罗云青: "C++语言下的跨平台软件开发", 《电子技术与软件工程》 *
遥望星空: "C#与C/C++的交互", 《HTTPS://WWW.CNBLOGS.COM/ZJOCH/P/4147153.HTML》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107657154A (en) * 2017-09-18 2018-02-02 北京深思数盾科技股份有限公司 A kind of guard method of target program, device, equipment and storage medium
CN107657154B (en) * 2017-09-18 2018-08-17 北京深思数盾科技股份有限公司 A kind of guard method of target program, device, equipment and storage medium
CN109697060A (en) * 2018-12-29 2019-04-30 广州华多网络科技有限公司 Special video effect software and its generation method, device, equipment and storage medium
CN111408138A (en) * 2019-01-04 2020-07-14 厦门雅基软件有限公司 Rendering method and device based on game engine and electronic equipment
CN110209449A (en) * 2019-05-21 2019-09-06 腾讯科技(深圳)有限公司 Cursor positioning method and device in a kind of game
WO2022027600A1 (en) * 2020-08-07 2022-02-10 厦门雅基软件有限公司 Game engine resource processing method and apparatus, and electronic device and computer-readable storage medium
CN113687879A (en) * 2021-07-22 2021-11-23 成都鲁易科技有限公司 Interaction method and device for cross-platform framework and platform interaction library
CN113687879B (en) * 2021-07-22 2023-05-05 成都鲁易科技有限公司 Interaction method and device for cross-platform framework and platform interaction library

Also Published As

Publication number Publication date
CN106815002B (en) 2020-12-04

Similar Documents

Publication Publication Date Title
CN106815002A (en) A kind of implementation method of cross-platform development of games instrument
US8745573B2 (en) Platform-independent application development framework
JP6122493B2 (en) Adaptively portable library
US9830176B2 (en) Methods, systems, and media for binary compatible graphics support in mobile operating systems
US9372680B2 (en) Methods and systems for producing, evaluating and simulating executable applications
Kramer et al. MobDSL: A Domain Specific Language for multiple mobile platform deployment
US20110247016A1 (en) Method for generating cross platform program and middleware platform engine thereof
US20060174215A1 (en) Method and system for a digital device menu editor
US8490117B1 (en) Bridging script engines
WO2012155631A1 (en) Method and apparatus for constructing cross-platform software running environment
CN111740948B (en) Data packet issuing method, dynamic updating method, device, equipment and medium
US20160077850A1 (en) Methods, systems, and media for binary compatibility
CN107818588B (en) Device and method for calling Qt drawing based on JNI multithreading in Android system
CN113918195A (en) Application interface updating method and device, electronic equipment and readable storage medium
Oh et al. FLUID: Flexible user interface distribution for ubiquitous multi-device interaction
CN100399264C (en) Apparatus and method for converting the visual appearance of a java application program in real time
CN113419712A (en) Cross-platform application generation method, cross-platform application calling method and development device
US10268647B2 (en) Asset catalog layered image support
KR20140021088A (en) A highly compatible plug-in system for developing hybrid web applications
Zhou et al. Windows Phone 7 programming for Android and iOS developers
CN114090010A (en) Transplanting method and device of X11 system, electronic equipment and readable storage medium
Son et al. Design and implementation of the smart virtual machine on iOS platform for the mobile game portability
KR101213651B1 (en) Method for binarizing initial script on operating system, and operating method of binary script
Jeffery et al. The Implementation of Graphics in Unicon Version 11
Zhao et al. Development of Mobile Games Based on Cocos2d-x

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right

Effective date of registration: 20171206

Address after: 200436 room 287K, No. 668, Baoshan District Road, Shanghai

Applicant after: Shanghai touch technology development Co., Ltd.

Address before: 100102 No. 1, Wangjing SOHO tower, No. 1, Wangjing East Street, Chaoyang District, Beijing

Applicant before: BEIJING CHUKONG TECHNOLOGY CO., LTD.

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200901

Address after: Unit 3, unit 607, 6 / F, Chuangye building, 1302 Jimei Avenue, phase III, Xiamen Software Park, Fujian Province

Applicant after: XIAMEN YAJI SOFTWARE Co.,Ltd.

Address before: 200436 room 287K, No. 668, Baoshan District Road, Shanghai

Applicant before: Shanghai touch technology development Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant