1. Deployment environment (environment deployment is not the focus of this article, there are many environmental configuration teaching, here, it should be noted that the first time to open the Cocos IDE code creation Project found no Cocos option, then I tell you this, you are not on the Cocos official web download IDE plug-in installation or IDE plugin not installed successfully [This is a pit I encountered, specially written to prevent the occurrence of similar small mistakes to waste time and energy])
2. Create a project (very simple to create the details can be seen Cocos official website of the relevant documents)
3. Project operation
Take a blank project to do, is a HelloWorld project, here you do not need to control him, we have to pay attention to the IDE directly run this project (ALT+SHIFT+F10), there is no problem, but the curious how we can satisfy this, then the problem comes, How to run the project in the IDE on the browser, it is attentive friends will find that There is a index.html file in the project file, this is not the file we want to run the browser, OK, go to the index.html file, click on the text area above, found that there are several browser icons on the right side, OK you have found, click on your computer support browser can.
4. Project Release
Project release of the tutorial is also a search a bunch, I do not for the online there are a lot of tutorials to write again, I write is not on-line search of things, we frequently encountered problems,
I used Cocos compile-p web-m release as a web version .
After the success of the publication, here we look at our folder directory, more publish folder, Click into the HTML5 folder also has our index.html file, click on it (personal try a lot of browsers, only Firefox can open), just for what, simply too pit, in the IDE perfect run AH (I was this problem tangled for a long time, the internet did not find the right answer, finally through my careful observation, found clues, The game that we open in the IDE runs on the browser URL is http://localhost:63342/YangTuo/index.html this way, we directly click on index.html to open the page is file:///E:/ Cocos2d-jsproject/yangtuo/index.html This look, found nothing, one is the deployment port is 63342 server, the other is local, after my patient study, the problem is here, appears in the Boot.js file, open () method of a request, because we did not deploy, so we can not request the connection, then well, know the reason, we began to deploy, I implemented in the local, using the Tomcat7.0, build the Environment God horse's own Baidu, again to be more careful, Tomcat successfully started, Move the folder to Tomcat's Wtpwebapps directory I move directly to the contents of the HTML5 folder, in the main browser input http://localhost:8082/html5/index.html) perfect operation (need to note I changed the tomcat port by 8082, you should be the default 8080.
5. Summary
At the end of this article, do a summary, that is, the purpose of this blog, is to let me encounter problems, we may also encounter problems have a reference, this article is the key point is that the last no deployment to the server caused by the embarrassing situation of the local cannot open, my writing is poor, technology is rookie, but hope can help you, If you have any questions, you can leave me.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Development COCOS2D-JS Project Summary (js3.6 version)