Cocos2d-X meta-Project setup

Source: Internet
Author: User

Original article: 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
Xcode with the ios sdk. xcode is a free development environment by Apple and much preferred by developers a developer.

The Windows section asserts that you have a genuine copy of Windows XP, Vista, 7 or 8

Visual Studio express installed (also a free development environment). You can accomplish this setup on a regular PC or a Mac computer
Boot 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:

    1. Install the Cocos2d-X templates, then do a new project.
    2. 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 installxcode 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

UseSudoIf you 'd like the templates to be installed for all users.

Use-FFlag 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.