Code Monkey home page Code Monkey logo

cocos2d-x-docs's Introduction

Cocos Documentation User Manual

Contributing to these docs

Contributions to the Cocos documentation are always welcome. To edit a document, please fork the Cocos docs repository.

Notes:

  • Fork our docs repo
  • The en/ directory contains English contributions. The zh/ directory contains 中文 contributions.
  • code blocks must be wrapped in a markdown codeblock. For Markdown help, please see GitHub Flavored Markdown
  • Changes must be tested using gitbook build and gitbook serve, and must be tested in multiple web browsers. For more information, see the Requirements section below.
  • Submit completed changes via a pull request so they can be reviewed and merged.

Requirements

This documentation site is powered by GitBook. You need Node.js and npm to be able to build it.

To install gitbook:

npm install gitbook-cli -g

To install gitbook plugins:

gitbook install

Preview and Build

To preview the documentation site, run the following command in the cocos2d-x-docs directory:

gitbook serve

This command will build and launch a web server to host the site. It will also enable the livereload plugin, which ensures that changes to the markdown source files automatically trigger a rebuild of the documentation site.

To build the html markdown only, use this command:

gitbook build

cocos2d-x-docs's People

Contributors

b1skit avatar chenruyi avatar drelaptop avatar henryrlee avatar hewenning avatar izzyjm avatar jareguo avatar jonseg avatar leowbattle avatar minggo avatar patricejiang avatar shengoo avatar slackmoehrle avatar stanhome avatar tinkercloud avatar utsavoza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cocos2d-x-docs's Issues

引擎工具 binary模板已被移除 -t binary 参数不再适应

URL : https://github.com/cocos2d/cocos2d-x-docs/blob/master/zh/editors_and_tools/cocosCLTool.md

上面的几个例子,项目都是使用的 Cocos2d-x 的源码,编译的时候会将源码也编译,可能花费较长时间。为获得更快的编译速度,可以使用预编译库。使用时需要在创建项目的时候增加参数 -t binary。示例:

cocos new MyGame -p com.MyCompany.MyGame -l cpp -d ~/MyCompany -t binary

更新中文文档 - 环境搭建

环境搭建

  • Android - Android Studio

  • Win32 - Visual Studio

  • Android - Visual Studio Don't Support

  • macOS 平台

  • iOS 平台

  • Linux 平台

  • Android - Eclipse `` Deprecated

  • Android - Command-line

Shaders and Materials

URL : https://github.com/cocos2d/cocos2d-x-docs/blob/master/en/advanced_topics/shaders.md

- `Material` can have one or more `Technique` objects
- each `Technique` can have one more `Pass` objects
- each `Pass` object has:
  - a `RenderState` object,
  - a `Shader` object including the uniforms

As an example, this is how a material file looks like:

{% codetabs name="JavaScript", type="js" -%}
// A "Material" file can contain one or more materials

The code block is a "Material" file content, but it is marked "JavaScript" codetabs, is it a mistake? @slackmoehrle

Pre-built Libraries

URL : https://github.com/cocos2d/cocos2d-x-docs/blob/master/en/editors_and_tools/prebuilt_libraries.md

I can’t find any useful information of how to work with prebuilt libraries. Not step by step guide.
How can I setup a new project for android with prebuilt libs?
Also, for iOS it's simple, but anyway there should be a guide for any platform.

Moreover, prebuilt libraries should be n1 "feature" while using cocos2d-x.
It saves time considerably and easy to use one cocos2d-x lib for many games.
Also, if source code needed - it's so simple easy to add it into Xcode just by drag and drop cocos2d-x project file(with proper settings before). Well, for me actually, during 1.5 year of development of 1 game - I never needed source code, like for debugging.

Command-Line tool binary template have been removed

URL : https://github.com/cocos2d/cocos2d-x-docs/blob/master/en/editors_and_tools/cocosCLTool.md

In the above examples, a new project is created using the Cocos2d-x source code. If you want to create a new project using the pre-built libraries you need to pass an additional flag of -t binary. Example:
cocos new MyGame -p com.MyCompany.MyGame -l cpp -d ~/MyCompany -t binary

the command above error, see:

▶ cocos new MyGame -p com.MyCompany.MyGame -l cpp -d ~/MyCompany -t binary

Python 2.7.10
Template named 'binary' is not found.
Multiple templates detected!
You can select one via -t arguments.
Or choose one now:

1 default
Select one (input number and press enter):

I suggest this paragraph was removed @slackmoehrle

Docs path is different between cocos.com and cocos2d-x.org

For the creator_to_cocos2d-x docs,

http://docs.cocos.com/cocos2d-x/manual/en/editors_and_tools/creator_to_cocos2dx.html
http://www.cocos2d-x.org/docs/cocos2d-x/en/editors_and_tools/creator_to_cocos2dx.html

One existed manual, another not, so that one link links one doc in both website always be failed.

Creator docs use this type link :
[](../../../../cocos2d-x/manual/zh/editors_and_tools/creator_to_cocos2dx.html)

Error markdown format

https://github.com/cocos2d/cocos2d-x-docs/blob/master/en/physics/concepts.md
has this content:

###Material
Materials describe material attributes:

-density:It is used to compute the mass properties of the parent body.

-friction:It is used to make objects slide along each other realistically.

-restitution:It is used to make objects bounce. The restitution value is
usually set to be between 0 and 1. 0 means no bouncing while 1 means perfect
bouncing.

That should be:

Material

Materials describe material attributes:

  • density:It is used to compute the mass properties of the parent body.
  • friction:It is used to make objects slide along each other realistically.
  • restitution:It is used to make objects bounce. The restitution value is
    usually set to be between 0 and 1. 0 means no bouncing while 1 means perfect
    bouncing.

more than one place has the same issue, it should be check when free time

Cocos2d-x Docs Checklist (What work is done and what needs to be done)

Cocos2d-x Documentation

Getting Started

英文 中文 Doc
[x] [x] About Cocos2d-x
[x] [x] Why Cocos2d-x
[x] [x] About
[x] [x] How to learn zh/To Do 补充
[x] [x] Where to get help
[x] [x] How to contribute

Basic Cocos2d-x Concepts

英文 中文 Doc
[x] [x] Main Components
[x] [x] Director
[x] [x] Scenes and the Scene Graph
[x] [x] Sprites
[x] [x] Actions
[x] [x] Sequences and Spawns
[x] [x] Parent Child Relationship
[x] [x] Logging

Sprites

英文 中文 Doc
[x] [x] What are Sprites
[x] [x] Creating Sprites
[x] [x] Using Sprites
[x] [x] SpriteFrame Cache
[x] [x] Sprite Manipulation
[x] [x] Polygon Sprite

Actions

英文 中文 Doc
[x] [x] What are Actions
[x] [x] Basic Actions
[x] [x] Sequences
[x] [x] Sequence Internals

Building and Transitioning Scenes

英文 中文 Doc
[x] [x] What is a Scene
[x] [x] Creating a Scene
[x] [x] Transitioning from Scene to Scene

UI Components

英文 中文 Doc
[x] [x] Widgets, oh, my!
[x] [x] Label
[x] [x] Menu
[x] [x] Buttons
[x] [x] Checkbox
[x] [x] Loading Bar
[x] [x] Slider
[x] [x] TextField

Other Node Types

英文 中文 Doc
[x] [x] More than just a Node
[x] [x] TileMap
[x] [x] Particle System
[x] [x] Parallax

Event Dispatcher

英文 中文 Doc
[x] [x] What is the EventDispatch mechanism
[x] [x] 5 types of event listeners
[x] [x] FixedPriority vs SceneGraphPriority
[x] [x] Touch Events
[x] [x] Keyboard Events
[x] [x] Accelerometer Events
[x] [x] Mouse Events
[x] [x] Creating Custom Events
[x] [x] Registering Events with the Dispatcher

3D

英文 中文 Doc
[x] [x] Terminology
[x] [x] Sprite3D
[x] [x] Animation
[x] [x] Camera
[x] [x] Cubemap Texture
[x] [x] Skybox
[x] [x] Lighting
[x] [x] Terrain
[x] [x] Tools for creating 3D Sprites
[x] [x] Advanced 3D Topics

Scripting

英文 中文 Doc
[x] [x] Script component

Physics

英文 中文 Doc
[x] [x] Physics is scary, do I really need it?
[x] [x] Physics terminology and concepts
[x] [x] Collision
[x] [x] Queries
[x] [x] Debugging/Disabling

Audio

英文 中文 Doc
[x] [x] Getting Started]
[x] [x] Play background music and sounds]
[x] [x] Audio operations
[x] [x] Advanced Audio
[in-progress] [in-progress] SimpleAudio Engine vs Audio Engine

Advanced Topics

英文 中文 Doc
[x] [x] File System Access
[x] [x] Networking with HTTP
[x] [x] Shaders and Materials
[x] [x] Optimizing Graphics
[in-progress] [in-progress] SQLite
[in-progress] [in-progress] Multi-Resolution

VR (virtual reality)

英文 中文 Doc
[x] [deprecated] Getting Started

Installations

英文 中文 Doc
[x] [x] Prerequisites
[x] [x] Android - command-line
[x] [deprecated] Android - Visual Studio
[x] [x] Android - Studio
[x] [x] Android - Eclipse
[x] [x] IOS
[x] [x] Mac OS X
[x] [x]] Linux
[x] [deprecated] Tizen
[x] [x] Windows
[x] [deprecated] Windows Phone

Tools

英文 中文 Doc
[x] [x] Cocos Command-Line tool
[x] [deprecated] Cocos GUI
[x] [x] Pre-built libraries
[x] [x] Creator to Cocos2d-x

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.