A kind of Geart3D game engine
[technical field]
The present invention relates to the development of games technical field, relate in particular to a kind of Geart 3D game engine.
[background technology]
Along with the development of 3G technology and improving constantly with perfect of terminal capabilities, the potentiality of cell phone platform will obtain more deep excavation, and mobile phone games have obtained very fast development especially in 2011.Along with capital to each link in the concern in mobile phone games market, the industry improve gradually with growth, industry in the improving constantly of practitioner's professional standards, the mobile phone games industry will welcome new development peak.At present, domestic in whole mobile phone industry the application software nearly 80% of user's download all be mobile phone games, the mobile phone games industry will become the most beautiful sub-industry of domestic mobile Internet.
Existed various game engines on the market, and be the 3D game engine of serving the desktop platform mostly.BigWorld engine like BigWorld company; The Gamebryo of Emergent company; The unreal 2 of Epic company, unreal 3; The CryEngine1 of Crytek company, CryEngine2 and CryEngine3, the Torque 3D engine of Garage Games company, the external famous special-purpose commercial engine of MMOG (MMO online game) has Hero Engine, the Quantumas engine of Hero company.
In smart mobile phone development of games field, the more famous game engine of several moneys is arranged, like 3D game engine Unreal 3, Unity3D.
Unreal 3 is complete development of games frameworks that a cover is prepared for DirectX9/10PC, Xbox360, PlayStation3 platform; Be transplanted to the iOS platform afterwards; It provides a large amount of core technology array, Edition Contains instrument, supports the elementary item construction of high-end development teams.Its idea of writing is content production and programming development in order to be more prone to; For all fine arts developers can be involved under the situation of minimum program development content; Use the abstract program assistant freely to create virtual environment, and various types of game makings are created, test and accomplished to the high efficiency module of person that provides the programming and extendible exploitation framework.It is its extreme fine and smooth personage and article model that Unreal 3 engines stay the most impressive to the people, and the task model of recreation is made up of hundreds of to several thousand polygon usually, thereby and on model, directly carries out pinup picture and work such as play up obtains final picture.
Unity3D is the game engine of the multi-platform exploitation of a support, comprises Win32, Xbox 360, Windows Phone 7, PS3, iOS, Android etc., only needs to accomplish game content usually and makes, and just can application be outputed to different platform.It also is a 3D game engine, and is more slightly inferior than Unreal 3 on the picture expressive force, but victory is multi-platform in its support, also receives game developer's extensive support.
Also have the 2D development of games engine Cocos2D of iOS platform, accurate, it is the framework of increasing income, and is used to make up 2D recreation, demonstration program and other graphical interfaces interactive application.Cocos2D is very useful storehouse in the iPhone exploitation, and it can let you when the iPhone recreation of creating oneself, save a lot of time.It has a lot of functions, helps very cruel graphical effect, animation effect, physical library, audio engine or the like such as sprite (spirit).
Unreal 3 and Unity3D are no doubt powerful, Cocos2D also of great use, but they also exist some very important shortcomings.
Unreal 3 and Unity3D are the 3D game engines, and they are doomed to give birth to for the 3D development of games, and feature richness can be described as greatly again complete.Exactly because their feature richness; Also just representing and having the use difficulty; The use game engine that wants nimbly and freely comes the exploitation and composition recreation, and inevitable requirement game item developer has suitable skill level to this engine, and this is increasing human cost virtually.And as the 3D game engine, in exploitation 2D recreation, also unavoidably can be unable to do what one wishes.Though the 2D development of games not as good as the 3D recreation, requires higher dirigibility on complexity, and the dirigibility of this 2D recreation is that the 3D game engine is not available, it also can not well be 2D development of games service.
Cocos2D is a 2D game engine of iOS platform, also derives multi-platform version afterwards, and it is absorbed in the 2D development of games, and in other words, it is with being confined to develop the 2D recreation, run into need realize function with the 3D technology in, just can be unable to do what one wishes.Because we can not be strict 2D and 3D are separated fully; In the 3D recreation, be certain to use the 2D display technique, and in the 2D recreation; Possibly also need use the 3D technology; Therefore, two kinds of technology are divided fully keep apart, can't satisfy our demand in the development of games process dirigibility.
[summary of the invention]
The invention provides a kind of Geart 3D game engine, the compatible different operation platform of its ability, and dirigibility can be developed 2D and 3D recreation simultaneously than higher.
Technical scheme of the present invention is:
Geart 3D game engine of the present invention comprises games application layer, engine modules, system layer and compiler, and engine modules is between games application layer and system layer, and compiler is connected with engine modules;
Wherein, said engine modules comprises 3D rendering module and the 2D rendering module that is connected, and said 3D rendering module comprises Direct 3D API and Open GL API;
Compiler is used for the code compile of user's input is become program; And in the process of compiling, detect user's translation and compiling environment; Translation and compiling environment according to the user is selected Direct 3D API or Open GL API; Program after will compiling afterwards sends to the 3D rendering module, plays up corresponding three-dimensional picture by the 3D rendering module according to the program after compiling;
The 2D rendering module is used for when receiving the program compiler that compiler sends, and each summit in the three-dimensional picture of playing up from the 3D rendering module is placed in the plane forms planar graph, and in this planar graph, sticks texture.
Engine modules in the Geart 3D game engine of the present invention comprises 3D rendering module and 2D rendering module, and the 3D rendering module comprises Direct 3D API and two kinds of DLLs of Open GL API, can compatible different operation platform; In addition; The 2D rendering module renders a 2-d plane graph in the three-dimensional picture that can play up from the 3D rendering module when receiving the program compiler that compiler sends, 2D plays up and can on the 3D underlying basis, realize; Its dirigibility can be developed 2D and 3D recreation simultaneously than higher.
[description of drawings]
Fig. 1 is a Geart 3D game engine of the present invention structural principle block diagram in one embodiment.
[embodiment]
Below in conjunction with accompanying drawing specific embodiment of the present invention is done a detailed elaboration.
Geart 3D game engine of the present invention is particularly suitable for developing mobile phone games, the compatible different operation platform of its ability, and dirigibility can be developed 2D and 3D recreation simultaneously than higher.
Like Fig. 1, Geart 3D game engine of the present invention comprises games application layer, engine modules, system layer and compiler, and engine modules is between games application layer and system layer, and compiler is connected with engine modules; Wherein system layer is concrete operating system or hardware layer;
Wherein, said engine modules comprises 3D rendering module and the 2D rendering module that is connected, and said 3D rendering module comprises Direct 3D API and Open GL API; Wherein, Direct 3D API and Open GL API are two kinds of general 3D figure API; When windows platforms such as windows, xbox, windows phone; Use Direct 3D as bottom layer realization, and when other non-windows platform such as ios, android, use OpenGL as bottom layer realization;
Compiler is used for the code compile of user's input is become program; And in the process of compiling, detect user's translation and compiling environment; Translation and compiling environment according to the user is selected Direct 3D API or Open GL API; Program after will compiling afterwards sends to the 3D rendering module, plays up corresponding three-dimensional picture by the 3D rendering module according to the program after compiling;
The 2D rendering module is used for when receiving the program compiler that compiler sends, and each summit in the three-dimensional picture of playing up from the 3D rendering module is placed in the plane forms planar graph, and in this planar graph, sticks texture.
When compiler sends to the 3D rendering module with program compiler; The code that the user is described is to realize three-dimensional graphical effect, and this moment, compiler can detect user's translation and compiling environment, and the code of different translation and compiling environments is inequality; Can detect different translation and compiling environments for this reason; This moment, compiler can be selected to use API according to different translation and compiling environment, and the program after will compiling sends to corresponding API, played up corresponding three-dimensional picture by the 3D rendering module; When compiler sends to the 2D rendering module with program compiler; The code that the user is described is to realize X-Y scheme; This moment, the 2D rendering module rendered an X-Y scheme from the three-dimensional picture that the 3D rendering module is played up; 2D plays up and can on the 3D underlying basis, realize, its dirigibility can be developed 2D and 3D recreation simultaneously than higher.
Can know that to sum up the engine modules in the Geart 3D game engine of the present invention comprises 3D rendering module and 2D rendering module, the 3D rendering module comprises Direct 3D API and two kinds of DLLs of Open GL API, can compatible different operation platform; In addition; The 2D rendering module renders a 2-d plane graph in the three-dimensional picture that can play up from the 3D rendering module when receiving the program compiler that compiler sends, 2D plays up and can on the 3D underlying basis, realize; Its dirigibility can be developed 2D and 3D recreation simultaneously than higher.
Above-described embodiment of the present invention does not constitute the qualification to protection domain of the present invention.Any modification of within spirit of the present invention and principle, being done, be equal to replacement and improvement etc., all should be included within the claim protection domain of the present invention.