[Cocos2d-x v3.x] Mac OX creates a new Cocos2d-x 3.0 project

Source: Internet
Author: User
Tags lua

Article content from: Http://cocos2d-x.org/wiki/How_to_Start_A_New_Cocos2D-X_Game

Mac OS X 10.9


Software Requirements
  • Xcode 4.6 (for IOS or MAC)
  • GCC 4.7 for Linux or Android. For Android NDK-R9 or newer is required.
  • Visual Studio (for Windows)
  • Python 2.7.5

Create A New Project

$ cd cocos2d-x$./setup.py$ Source ~/.bash_profile # May is ~/.bash_login or ~/.profile, depends on your environemnt$ coco s new mygame-p com. Mycompany.mygame-l cpp-d ~/mycompany
  • MyGame: Name of your project
  • -p com.MyCompany.MyGame: Package name for Android
  • -l cpp: programming language used for the project, valid value iscppandlua
  • -d ~/MyCompany: Directory to hold your project


Folder structure of the generated project is as following:


(note:the directory may be different if the project type is LUA.)


Build and Run New Project
$ Cocos run-s ~/mycompany/mygame-p iOS
  • -s: Directory of the New project. This could is an absolute path or a relative path.
  • -p: Which platform to run on. Options areios,android,win32,macandlinux.

(Note:you is a tmux user, you should addreattach-to-user-namespaceBefore the commandcocos. For more information, please refer to this link for more information.)

You can run for more cocos run --help detail information.





[Cocos2d-x v3.x] Mac OX creates a new Cocos2d-x 3.0 project

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.