Project configuration and environment construction
The first time I opened the Cocos Creator interface, I felt that this is very Unity. Although there are many areas that have not been perfected, it is enough for developing lightweight games such as small games, so students who have used Unity will get started. Very fast. This tutorial will also take care of newbies who have never used Unity, so don't worry~
The first step of environment configuration CocosCreator
This is the official website of Cocos Creator , click to download the installer that suits you, then install it, and then open Cocos Creator to create a project.
Cocos Creator provides different templates in it, the HelloWorld template is js
written using, if you want to use typescript
it, you can create the following TypeScript HelloWorld template.
The second step of environment configuration installs additional tools
Open Preferences to set the path to the required tools.
Install WeChat Developer Tools
first and then install Apache Ant
Fill in the installation directory to the corresponding path option. The WeChat developer tool is a tool officially provided by WeChat, on which you can preview the operation of the mini-game, or upload it to the server, and then preview it on your mobile phone. Apache Ant is used for local preview, and it is used more often.
The third step of environment configuration is to build and run
Click the project construction and release button, and check the release platform as Wechat Game . Note : The Appid is a temporary ID, and it needs to be replaced with the ID you applied for when it is actually released. This is the application website .
Then click Build and wait for its Complete.
Then click Run , it will jump to the WeChat developer tool.
The fourth step of environment configuration is to use the WeChat developer tool to preview the mini game
Select Mini Program....
If there is a mini game you published before in the project, click it, if not, press the + sign in the lower right corner to add it
After clicking the preview button, a QR code will be generated, scan it with your WeChat, and you can preview it on the real machine
The following is the generated QR code, just scan it (this QR code has an effective time, and it cannot be used after the effective time)
The complete long-winded publishing tutorial is over. If you have any questions, please leave a message~