官术网_书友最值得收藏!

Creating a project in Cocos2d-html5

Creating a project in Cocos2d-html5 is as simple as copying a readymade template and renaming it to what you want to call your game. If you've downloaded and extracted the archive of the Cocos2d-html5 source, navigate to the template folder inside it. Your file explorer should show you something like this:

If you run the index.html file you see in the template folder, you'll realize that it is nothing but a hello world project. This is exactly what we need to get us started. To create a new project in Cocos2d-html5, follow these steps:

  1. Copy all the files within the template folder.
  2. Create a folder in the root directory of the Cocos2d-html5 engine. The engine's root with the folder for ColourSmash is shown in the following screenshot:
  3. Now, paste all the files that you copied from the template folder into the folder you just created.

That's it! You have created your first project in Cocos2d-html5. Now, it's time to get acquainted with the different kinds of files located in the project's directory.

主站蜘蛛池模板: 潮安县| 扎兰屯市| 海伦市| 资溪县| 新竹市| 巢湖市| 天峻县| 嘉黎县| 科技| 凭祥市| 连山| 晋州市| 合江县| 高州市| 青州市| 蒲江县| 洪洞县| 如皋市| 台湾省| 宜城市| 平原县| 昌黎县| 虎林市| 泽普县| 黄冈市| 平舆县| 海盐县| 房山区| 上思县| 万年县| 茂名市| 台中县| 新巴尔虎右旗| 三门县| 皋兰县| 都江堰市| 南木林县| 海晏县| 驻马店市| 潮州市| 高尔夫|