Cocos2d-X Meta-Project Setup
来源:互联网 发布:淘宝网 返利哪个好 编辑:程序博客网 时间:2024/05/17 09:32
原文:http://paralaxer.com/cocos2d-x-project-setup/
In this chapter we'll discuss how to create your own Cocos2d-X project files from scratch for iOS, Mac, Android and Windows.
If you'd like, you can download the project files to our complete example game, Paralaxer.
What will you need to follow along?
The iOS and Mac sections assert that you have a Mac computer and have already installed a stable release ofXcode with the iOS SDK. Xcode is a free development environment by Apple and much preferred by many a developer.
The Windows section asserts that you have a genuine copy of Windows XP, Vista, 7 or 8 withVisual Studio Express installed (also a free development environment). You can accomplish this setup on a regular PC or a Mac computer withBoot Camp.
The Android section asserts that you have already installed the Android SDK, NDK and Eclipse (which you now get along with the SDK). You can be ready to build for Android on Windows, Mac or Linux.
Note that the NDK we recommend installing is Google's Android NDK. We used to recommend the NDK from CrystaX, but lately there have been some issues with fopen.
Keep in mind that Xcode, Visual Studio, Eclipse and even Cocos2d-X are updated often. There are new options, build settings and sometimes UI elements have been rearranged. If you run into any significant snags, just be a go-getter, solve your riddle and let us all know the new answer in the comments.
According to a recent survey we took, iOS is the most popular deployment target for Cocos2d-X developers, with Android coming in a close second. So that's where we'll start.
iOS Project From Scratch
There are two ways you can create a Cocos2d-X iOS project from scratch:
- Install the Cocos2d-X templates, then do a New Project.
- Make a copy of samples/HelloCpp, then open the project and rename.
We'll take a look at both methods.
New iOS Project via Templates
Cocos2d-X comes packaged with a script which installs Xcode project template files for iOS. Just open Terminal, change to your cocos2d-x directory and run the command to install the templates:
cd Desktop/Paralaxer/Code/cocos2d-x/sudo ./install-templates-xcode.sh -f
Use sudo
if you'd like the templates to be installed for all users.
Use the -f
flag to automatically remove any existing Cocos2d-X template files and replace them with the newest.
Now that you've got the Xcode iOS templates installed, just open Xcode and create a New Project. You'll have the option of choosing one of the Cocos2d-X templates from the iOS category.
- Cocos2d-X Meta-Project Setup
- Create Cocos2D-X HelloWorld Project
- 【cocos2d-x】运行 setup.py 闪退的解决方案
- Railse Project setup by setup
- Web setup project 相关
- VS setup project
- VS.NET setup project
- Week 3: Project Setup
- cocos2d-x mac 环境搭建及新project创建运行
- create a cocos2d-x-3.0 project in Xcode
- Bullet cocos2d-x Creating a project from scratch
- 修改Cocos2d-X-3.2中的setup.py, 使其能用python3
- Create setup project using .net
- WebSetup/Windows Setup Project Summary
- quick-cocos2d-x教程5:程序框架内目录分析之quick-x-setup.app、tool和template目录
- How to migrate a cocos2d v0.8.x project to v0.99
- Android cocos2d-x开发(二)之create-android-project.bat文件的修改
- [Cocos2D 2.x iOS 开发笔记2] 在Project中启用ARC
- 使用java实现自动备份mysql数据库
- nginx下载or呈现静态文件
- cat 命令
- offsetParent的理解
- remap_pfn_range()函数及应用
- Cocos2d-X Meta-Project Setup
- java 调用命令行 备份mysql数据库
- UPC_Shandong muti-university Contest Problem I——The war of 3Q
- Android 开发笔记 动画效果 --Animation
- rac把数据文件创建在不共享的地方
- mmap方法实现物理内存到用户虚拟地址的映射
- windows 批处理
- 8.1 - 8.5 标准IO库
- 教你如何把控版式第五季 (案例)