Skip to content
Cocos Creator is a complete package of game development tools and workflow, including a game engine, resource management, scene editing, game preview, debug and publish one project to multiple platforms.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Fix unit test and circle ci (#2858) Jun 14, 2018
.github Update the url links (#3420) Oct 24, 2018
.vscode remove unused code Dec 26, 2017
cocos2d Sync branch v2.1.2 to v2.2.0 May 16, 2019
docs Merge 2.0.10 into v2.1.2 May 7, 2019
editor Improve localization (#4450) May 20, 2019
extensions Merge v2.1.2 into v2.2.0 May 16, 2019
external Fix beta user reported issues (#3004) Jul 23, 2018
gulp Merge branch 'v2.0-release' into v2.1-release Mar 18, 2019
licenses upgrade tslib version (#4000) Mar 12, 2019
polyfill add polyfills (#4096) Mar 26, 2019
test V2.1 release merge v2.0 release (#3995) Mar 11, 2019
.editorconfig add editorconfig file Sep 22, 2016
.eslintrc.json add eslint Jul 27, 2016
.gitignore reimplement debugInfos workflow Mar 26, 2018
.jshintrc Fix JSB issues Feb 3, 2016
AUTHORS.txt Modify README and some docs Mar 24, 2016
CHANGELOG.txt V2.1 release merge v2.0 release (#3995) Mar 11, 2019
EngineErrorMap.md Merge 2.0.10 into v2.1.2 May 7, 2019
MAINTAINERS Integrate lgtm.co Aug 5, 2016
README.md Update README.md Dec 26, 2018
extends.js Update the url links (#3420) Oct 24, 2018
gulpfile.js upgrade del to 3.0 (#3572) Nov 30, 2018
index.js add polyfills (#4096) May 7, 2019
modules.json update modules.json for 2d-tasks/issues/1387 (#4356) Apr 30, 2019
package.json Merge remote-tracking branch 'origin/v2.1-release' Jan 9, 2019
predefine.js V2.1 release merge v2.0 release (#3995) Mar 11, 2019

README.md

stars forks version license twitter

Cocos Creator

image

Cocos Creator is a complete package of game development tools and workflow, including a game engine, resource management, scene editing, game preview, debug and publish one project to multiple platforms. Cocos Creator focused on content creation, which has realized features like thorough scriptability, componentization and data driven, etc. on the basis of Cocos2d-x. With JavaScript, you can scripting your component in no time. The editor and engine extension is also made with JavaScript so you can make games and refine your tool in a single programming language. Cocos Creator is an provides an innovative, easy to use toolset such as the UI system and Animation editor. The toolset will be expanding continuously and quickly, thanks to the open editor extension system.

This repo is the engine framework for Cocos Creator. Cocos Creator's in-editor scene view and web runtime share the same framework, which is the content of this repo. It's originally forked from Cocos2d-html5, we build up an Entity Component architecture on it to meet the needs of Cocos Creator.

This framework is a cross-platform game engine written in JavaScript and licensed under MIT. It supports major desktop and mobile browsers, it's also compatible with Cocos2d Javascript Binding engine to support native platforms like iOS, Android, Win32, macOS.

The framework is naturally integrated with Cocos Creator, so it's not designed to be used independently.

Developer

Prerequisite

Install

In cloned project folder, run the following command to setup dev environment:

# Initialize gulp task dependencies
# npm is a builtin CLI when you install Node.js
npm install

This is all you have to do to set engine development environment.

Build

gulp build

Test

Prerequisite

  • Install express: npm install express
  • Install gulp-qunit: npm install gulp-qunit

Unit Test

Test in CLI
npm test
Test in browser
  1. Build for testing.

    gulp build-test
  2. Start express in cloned project folder.

    node test/qunit/server.js
    
  3. Open http://localhost:8511/bin/qunit-runner.html in your browser.

DebugInfos

View EngineErrorMap.md
All the debug infos are defined in file EngineErrorMap.md.
The file DebugInfos.json will be generated based on EngineErrorMap.md, when run gulp build* command.

For details below:

  1. Define log in EngineErrorMap.md

    example

    ### 1001  
      
    cocos2d: removeAction: Target not found
          
    
  2. Define deprecated log in EngineErrorMap.md The log should be marked as DEPRECATED when then logId is no longer referenced in the project.

    example

    ### 1000
      
    <!-- DEPRECATED -->
    cc.ActionManager.addAction(): action must be non-null  
    
    

Useful links

You can’t perform that action at this time.