对于Python可能大部分初学者都还搞不明白,本篇教程将教你用Python轻松创建Cocos2d-x项目。
打开cmd命令,进入cocos2d-x/tools/project-creator/目录后,
输入pythoncreate_project.py-projectFirstGame-packagecom.utoo.fg-languagecpp
在这里几个参数的意义为:
-project后面的FirstGame是项目名称
-package后面的是项目包名
-language后面的是开发语言
pythoncreate_project.py-projectone-packagecom.one-languagecpp
pythoncreate_project.py-projecttwo-packagecom.tow-languagecpp
cocos2dx2.x创建项目
2.0之后的创建项目比较easy了
第一步,首先cdcocos2d-x-2.2.1/tools/project-creator/
第二步,./create_project.py-projectHelloWorld-packagecom.example.HelloWorld-languagecpp
第三步,到这里来找你的项目就可以了,cocos2d-x-2.2.1/projects/HelloTest
是不是很简单了啊~!
下面是文件内容,具体也可以参考内容哦~
RunningTests
Select the test you want from Xcode Scheme chooser.
For OSX/iOS
$ cd cocos2d-x/build
$ open samples.xcodeproj
For Linux
$ cd cocos2d-x/build
$ ./install-deps-linux.sh
$ cmake..
$ make
You may meet building errors when building libGLFW.so. It is because libGL.so directs to an error target,
you should make it to direct to a correct one.`install-deps-linux.sh`only has to be run onece.
For Windows
Open the cocos2d-x/build/cocos2d-win32.vc2012.sln
For Android
$ cd cocos2d-x/build
$ python./android-build.pyhellocpp
Import HelloCpp Android project using Eclipse(releasedwithAndroidSDK).The path to be imported is cocos2d-x/samples/Cpp/HelloCpp/proj.android.
Mainfeatures
Scene management(workflow)
Transitions between scenes
Sprites and Sprite Sheets
Effects:Lens,Ripple,Waves,Liquid,etc.
Actions(behaviours):
Trasformation Actions:Move,Rotate,Scale,Fade,Tint,etc.
Composable actions:Sequence,Spawn,Repeat,Reverse
Ease Actions:Exp,Sin,Cubic,Elastic,etc.
Misc actions:CallFunc,OrbitCamera,Follow,Tween
Basic menus and buttons
Integrated with physics engines:Box2dandChipmunk
Particle system
Skeleton Animations:SpineandArmaturesupport
Fonts:
FastfontrenderingusingFixedandVariablewidthfonts
Supportfor.ttffonts
Tile Map support:Orthogonal,IsometricandHexagonal
Parallax scrolling
Motion Streak
Render To Texture
Touch/Accelerometer on mobile devices
Touch/Mouse/Keyboard on desktop
Sound Engine support(CocosDenshion library)based on OpenAL
Integrated Slowmotion/Fastforward
Fast and compressed textures:PVR compressed and uncompressed textures,ETC1 compressed textures,and more
Resolution Independence
Language:C++,with Lua and javaScript bindings
Open Source Commercial Friendly:Compatible with open and closed source projects
Open GL ES 2.0 (mobile)/OpenGL2.1(desktop) based
上一篇:游戏人物造型设计原理总结
下一篇:制作游戏的基本技巧解析