20151120 ian cocos2d js
-
Upload
learningtech -
Category
Technology
-
view
192 -
download
0
Transcript of 20151120 ian cocos2d js
Cocos2d-js
Ian
Cocos2d-JSHistoryCocos2d-JSPlatforms and Restrictions
History2008 - Ricardo Quesada, a game developer in Argentina, writes a game framework named Cocos2d2009 - After the iPhone SDK release, Cocos2d rewritten in Objective-C to become Cocos2d-iPhone2010 - Zhe Wang, a developer in China, creates a fork, Cocos2d-xChukong Technologies Inc, Zhe‘s company, develops Cocos2d-JS, -HTML5, and -Lua
Cocos2d-JSCocos2d-x JavaScript versionFull Cocos2d-x functionalitySimplified JavaScript friendly APICode Once, Run EverywhereMobile Native, Desktop, Web
Python 2The cocos command line needs python to run python 2.7.5+It won’t work with python 3https://www.python.org/downloads/
cocos command optionsnew - Creates a new projectcompile - Compiles the current project to binarydeploy - Deploy a project to the targetrun - Compiles & deploy project and then runs it on the targetjscompile - minifies and/or compiles js files
cocos newcocos new -l jscocos new -l js —no-nativecocos new projectName -l js -d ./Projectscocos new projectName -l js
project.jsondebug - the current debug settingshowFPS - whether or not to show the frame rateframeRate - the desired frame ratemodules - cocos2d and potentially pluginsjsList - all of your source code
Demo timehttp://www.cocos2d-x.org/html5-samples/samples/tests/index.html
Referencehttp://www.cocos2d-x.org/wiki/Getting_Started_Cocos2d-JS