CN106815002B - Method for realizing cross-platform game development tool - Google Patents

Method for realizing cross-platform game development tool Download PDF

Info

Publication number
CN106815002B
CN106815002B CN201510862453.XA CN201510862453A CN106815002B CN 106815002 B CN106815002 B CN 106815002B CN 201510862453 A CN201510862453 A CN 201510862453A CN 106815002 B CN106815002 B CN 106815002B
Authority
CN
China
Prior art keywords
cross
platform
development tool
game development
platform game
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510862453.XA
Other languages
Chinese (zh)
Other versions
CN106815002A (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
Xiamen Yaji Software 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 Xiamen Yaji Software Co Ltd filed Critical Xiamen Yaji Software 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

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a method for realizing a cross-platform game development tool, which adopts a rendering engine realized by C + + as a bottom structure of the cross-platform game development tool; the C + + is used for realizing complex and efficient rendering and converting the C + + functional packaging class library into a C # functional packaging class library; the simple UI interface and the function logic are realized by using the C #, and the C # function packaging class library is called by using the C #, and the simple UI interface and the function logic are realized by using the C #, so that the rendering efficiency of a cross-platform game development tool is ensured, and the game development cost is reduced. The invention simultaneously uses C + + and C # to develop a cross-platform game development tool so that the software product of the same version can be flexibly applied to a Windows system and a Mac OS system.

Description

Method for realizing cross-platform game development tool
Technical Field
The invention relates to the technical field of online game development, in particular to a method for realizing a cross-platform game development tool.
Background
The Mac OS system is a system dedicated to the apple personal computer, and cannot be normally installed and used in a general PC. The Darwin-based Mac OS X system enhances the stability, performance and responsiveness of the Mac OS system, takes full advantage of dual processors through symmetric multiprocessing, provides unparalleled 2D, 3D and multimedia graphics capabilities, and a wide range of font support and integrated PDA functionality. Mac OS X can support almost all Mac OS 9 applications through the Classic environment, and the intuitive Aqua user interface enables the usability of the Mac OS system to reach a brand new level.
The Windows system developed by Microsoft is the operating system which has the most users and the strongest compatibility in the world at present. The earliest Windows operating systems were introduced in 1985, when the operating system Windows1.0 was a DOS kernel based operating system. Windows1.0 improves Microsoft Disk Operating Systemm (MS-DOS) over the Microsoft past command code system. Microsoft Windows is an operating system of a color interface, supports a keyboard and mouse function, and a default platform consists of a taskbar and a desktop icon. The taskbar consists of a display of running programs, a "start" menu, time, quick launch bar, input methods, and the lower right tray icon. The desktop icon is a way to enter the program, and the default desktop icon is "my computer", "my document", "recycle bin", and the like. In addition, the desktop also displays an "Internet Explorer" icon carried by the system.
With the decrease of the global market share of the Windows system and the increase of the global market share of the Mac OS system, the game software developers at present need to respectively develop different versions for their products on the Windows system and the Mac OS system, which consumes a lot of manpower and material resources, thereby resulting in an excessively high cost of game software development. Therefore, a solution of a cross-platform game development tool is urgently needed to realize the application of the same version of game software in a Windows system and a Mac OS system so as to reduce the development cost of products.
At present, various cross-platform game development tools are available in the market, foreign U3D uses scripts and built-in virtual machines, and domestic technical teams use Flash, JAVA and Html5 to realize the application of the same version of game software in different operating systems. However, the cross-platform game development tools existing in the prior art have the following problems:
firstly, only C + + is used for developing a cross-platform game development tool, the rendering efficiency of the cross-platform game development tool is high, but alternatives for developing the cross-platform game development tool by using C + + are few, the cost is high, and the period is long;
secondly, only C #, JAVA and Html5 are used for developing a cross-platform game development tool, the cost is low, the period is short, and the rendering efficiency of the cross-platform game development tool is low.
Disclosure of Invention
In order to solve the above problems, the present invention provides a method for implementing a cross-platform game development tool, and C + + and C # are used to develop the cross-platform game development tool so that the same version of software product can be flexibly applied to a Windows system and a Mac OS system.
The invention provides a method for realizing a cross-platform game development tool, which comprises the following steps:
a rendering engine realized by C + + is used as a bottom layer structure of the cross-platform game development tool to support the logic and rendering of the cross-platform game development tool;
creating a C + + function packaging class library and realizing the rendering of a cross-platform game development tool;
automatically generating an interface technology/manual handwriting compilation by applying C + + and C #, and converting the C + + function packaging class library into a C # function packaging class library;
the main body interface and the functional logic of the cross-platform game development tool are realized by using C #;
and calling a C # function packaging class library and a main body interface and function logic of the cross-platform game development tool realized by using C # through a P/Invoke technology.
Further, the creating of the C + + function package library and the rendering of the cross-platform game development tool are specifically:
creating a C + + function packaging class library, simplifying and packaging classes of software products aiming at editing functions provided in a cross-platform game development tool, and providing an interface more suitable for developing the cross-platform game development tool;
and creating a visualization rendering area aiming at different platforms by using a cross-platform synchronization method.
Further, the method using cross-platform synchronization creates a visualized rendering area for different platforms, specifically:
the GTK calls an API of an operating system to create a graphical interface window of a game scene in the UI editor;
and calling a cross-platform graphic library by the UI editor, and rendering the game scene in the graphic interface window by the cross-platform graphic library.
Preferably, the cross-platform graphics library is OPENGL.
Preferably, the rendering engine implemented by the application C + + is a cross-platform game engine Cocos2d-x or Orge or KlayGE.
Further, under the MAC platform, the development of C # is supported by mono.net, and the compilation of C + + is supported by LLVM.
Furthermore, the development of C # is supported by using Microsoft.net under a Windows platform, and the compilation of C + + is supported by using VC + +.
The beneficial technical effects of the invention are as follows:
the implementation method of the cross-platform game development tool provided by the invention simultaneously uses C + + and C # to develop the cross-platform game development tool so that the software product of the same version can be flexibly applied to a Windows system and a Mac OS system. The C + + is used for realizing complex and efficient rendering, and the C # is used for realizing simple UI (user interface) and functional logic, so that the rendering efficiency of the cross-platform game development tool is ensured, and the game development cost is reduced.
Drawings
Fig. 1 is a schematic flowchart of an implementation method of a cross-platform game development tool according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and should not be construed as limiting the scope of the invention.
As shown in fig. 1, the embodiment takes a particle special effect system as an example, and provides a method for flexibly applying the same version of particle special effect system to a Windows system and a Mac OS system, which includes the following steps:
firstly, a rendering engine realized by C + + is used as an underlying structure of the cross-platform game development tool to support the logic and rendering of the cross-platform game development tool. And constructing a particle system in a rendering engine, ensuring that the particle system can normally render 2D materials or 3D models, and compiling an engine library.
The rendering engine implemented by C + + here may be cross-platform game engines Cocos2d-x, Orge, KlayGE, or other rendering engines that can be implemented by C + +.
Secondly, creating a C + + function packaging class library and realizing rendering of a cross-platform game development tool, specifically:
creating a C + + function packaging class library, simplifying and packaging classes of the particle special effect system aiming at an editing function provided in a cross-platform game development tool, and providing necessary particle objects and interface methods, such as particle initialization, particle resource loading, particle playing, pausing and stopping;
using a cross-platform synchronization method, creating a visual rendering area for different platforms, specifically:
the GTK calls an API of an operating system to create a graphical interface window of a game scene in the UI editor;
the GTK is a cross-platform graphic cross-platform game development kit, and may also be referred to as a general graphic library with powerful functions and flexible design. It supports the creation of Graphical User Interface (GUI) based applications, from which many ready building blocks for creating a GUI can be found. The method is one of mainstream development cross-platform game development tools for developing the application program of the graphical interface under GNU/Linux, and is also suitable for a Windows system or a Mac system.
Specifically, under the Windows system, the GTK calls an API of the Windows system to create a graphical interface window of a game scene in a UI editor; under the Mac system, the GTK calls an API of the Mac system to create a graphical interface window of a game scene in a UI editor; however, the embodiments of the present invention are not limited to these two operating systems, and the operating systems that can implement the embodiments of the present invention are all suitable.
And calling the cross-platform graphic library by the UI editor, and rendering the game scene in the graphic interface window created by the GTK by the cross-platform graphic library.
In the embodiment of the invention, the cross-platform graphics library is OpenGL.
And thirdly, automatically generating the corresponding C # class from the C + + functional packaging class library by using a C + + and C # automatic generation interface technology, creating a C # packaging project, loading the automatically generated C # class, and compiling into a C # functional packaging class library.
In the embodiment of the invention, manual handwriting compilation can be adopted to replace the C + + and C # automatic generation interface technology.
And fourthly, realizing a main body interface and functional logic of the cross-platform game development tool by using the C #, wherein the main body interface and the functional logic comprise the creation of particles, the editing of particle attributes and the serialization related business logic of particle data files.
And fifthly, calling the C # function packaging class library generated in the third step by using C # through a P/Invoke technology, realizing a main interface and function logic of the cross-platform game development tool by using C # in the fourth step, creating a packaging object of the particle, loading a default particle resource, setting the particle to be in a playing state, and then starting custom editing operation on the particle object.
In this embodiment, for different platforms, different components are used as development and execution environments of the cross-platform game development tool: under the MAC platform, using Mono.net to support the development of C #, and using LLVM to support the compilation of C + +; and the development of C # is supported by Microsoft.net under a Windows platform, and the compilation of C + + is supported by VC + +.
Net is a project hosted by Novell corporation. The goal of this project is to create a series of Net tools that conform to the standards ECMA (Ecma-334 and Ecma-335), including a C # compiler and common Language execution platform CLP (common Language platform). Net projects, unlike microsoft, can run not only on Windows platforms, but also on Linux, FreeBSD, Unix, Mac OS X, Solaris, and other platforms.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, it should be noted that, for those skilled in the art, many modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (6)

1. A method for implementing a cross-platform game development tool, the method comprising:
applying a rendering engine implemented in C + + as an underlying structure of the cross-platform game development tool to support logic and rendering of the cross-platform game development tool;
creating a C + + function packaging class library to realize the rendering of a cross-platform game development tool, wherein the method comprises the following steps:
creating a first C + + function packaging class library, and aiming at the editing function to be provided in the cross-platform game development tool, carrying out simplified packaging on the class realized by using the rendering engine, and providing an interface developed by the cross-platform game development tool;
creating a second C + + function packaging class library, and packaging a cross-platform graphic library, wherein the graphic library uses a cross-platform synchronization method to create a visual rendering area for different platforms;
automatically generating an interface technology/manual handwriting compilation by applying C + + and C #, and converting the first and second C + + function packaging class libraries into C # function packaging class libraries;
the main body interface and the functional logic of the cross-platform game development tool are realized by using C #;
and calling the C # function packaging class library by using a C # through a P/Invoke technology so as to further call the first C + + function packaging class library for graphic rendering, and further calling the second C + + function packaging class library to create a graphic interface window in the cross-platform game development tool, so that a main interface and functional logic of the cross-platform game development tool are realized by using the C # function packaging class library.
2. The method of claim 1, wherein the cross-platform graphics library is a GTK adapted to call an API of an operating system and create a graphical interface window of a game scene in a UI editor; the UI editor is adapted to invoke the first C + + functional packaging class library to render a game scene within the graphical interface window.
3. The method of claim 1, wherein the cross-platform graphics library is OPENGL.
4. The method of claim 1, wherein the rendering engine implemented by C + + application is a cross-platform game engine Cocos2d-x or orange or KlayGE.
5. The method for implementing a cross-platform game development tool according to any one of claims 1 to 4, wherein the MAC platform supports C # development using Mono.net and C + + compilation using LLVM.
6. The method for implementing a cross-platform game development tool according to any one of claims 1 to 4, wherein a Windows platform supports development of C # using Microsoft.
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 CN106815002A (en) 2017-06-09
CN106815002B true 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)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107657154B (en) * 2017-09-18 2018-08-17 北京深思数盾科技股份有限公司 A kind of guard method of target program, device, equipment and storage medium
CN109697060B (en) * 2018-12-29 2022-08-26 广州方硅信息技术有限公司 Video special effect system, generation method, device, equipment and storage medium thereof
CN111408138B (en) * 2019-01-04 2023-07-07 厦门雅基软件有限公司 Rendering method and device based on game engine and electronic equipment
CN110209449B (en) * 2019-05-21 2022-02-15 腾讯科技(深圳)有限公司 Method and device for positioning cursor in game
EP4194067A4 (en) * 2020-08-07 2024-05-08 Xiamen Yaji Software Co Ltd Game engine resource processing method and apparatus, and electronic device and computer-readable storage medium
CN113687879B (en) * 2021-07-22 2023-05-05 成都鲁易科技有限公司 Interaction method and device for cross-platform framework and platform interaction library

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (3)

* 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

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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 (1)

* Cited by examiner, † Cited by third party
Title
C#与C/C++的交互;遥望星空;《https://www.cnblogs.com/zjoch/p/4147153.html》;20141205;第1页第2段-第15页第3段 *

Also Published As

Publication number Publication date
CN106815002A (en) 2017-06-09

Similar Documents

Publication Publication Date Title
CN106815002B (en) Method for realizing cross-platform game development tool
JP6122493B2 (en) Adaptively portable library
Ohrt et al. Cross-platform development tools for smartphone applications
US9946525B2 (en) Extracting source code
Taivalsaari et al. The death of binary software: End user software moves to the web
CA2796433C (en) Cross-platform application framework
US20210141523A1 (en) Platform-independent user interface system
US20080250325A1 (en) Integrated Development Environment with Object-Oriented GUI Rendering Feature
EP3035191A1 (en) Identifying source code used to build executable files
US8495590B2 (en) User-specific software debugging
Lazar et al. Mastering Qt 5: Create stunning cross-platform applications using C++ with Qt Widgets and QML with Qt Quick
Rischpater Application development with qt creator
US11403074B1 (en) Systems and methods for generating interfaces for callback functions in object-oriented classes
Buttfield-Addison et al. Unity game development cookbook: essentials for every game
Ostrander Android UI Fundamentals: Develop and Design
WO2022257503A1 (en) Translation method and apparatus for game
US9170783B1 (en) Class creation assistant for textual programming languages
CN106126213B (en) A kind of Android exploitation modeling method based on IFML
Lewis et al. Native mobile development: a cross-reference for iOS and Android
Kramer et al. Platform independent, higher-order, statically checked mobile applications
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
Haberl Cross Platform Development Possibilities and drawbacks of the Xamarin platform
Rodkaew The last eternity a 3D role-playing game with a cross-platform development
Shakaev et al. Interactive Graphics Applications Development: An Effect Framework for Directx 11

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