zoukankan      html  css  js  c++  java
  • How to Start a New Cocos2d-x Game for version 3.0


    This documentation will show you how to use cocos console to create and run a new project.

    Runtime Requirements

    • Android 2.3+
    • iOS 5.0+
    • OS X 10.7+
    • Windows 7+
    • Ubuntu 12.04+
    • Cocos2d-x v3.0+

    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 2012 (for Windows)
    • Python 2.7.5

    Create A New Project

    $ cd cocos2d-x
    $ ./setup.py
    $ source ~/.bash_profile # may be ~/.bash_login or ~/.profile, depends on your environemnt
    $ cocos 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 is cppand lua
    • -d ~/MyCompany: directory to hold your project

    new game

    Folder structure of the generated project is as following:

    folder structure

    (Note: The directory may be different when 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 be an absolute path or a relative path.
    • -p: which platform to run on. Options are ios,android,win32,mac and linux.

    (Note: You are a tmux user, you should add reattach-to-user-namespace before the command cocos. For more information, please refer to this link for more information.)

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

    run scree

  • 相关阅读:
    POJ 2661
    POJ 2643
    POJ 2656
    POJ 2612
    POJ 2636
    搭建WordPress个人博客
    【个人笔记】ximo早期发的脱壳教程——手脱UPX壳
    2.1【欢乐向】攻防世界新手逆向刷题被虐哭日常记录
    吾爱破解培训第一课个人笔记
    第五章 计算机组成
  • 原文地址:https://www.cnblogs.com/gcczhongduan/p/4006210.html
Copyright © 2011-2022 走看看