0
\$\begingroup\$

I am new to Cocos Creator and web game programming. I have build a simple game for the web, but I don't know how can I publish it. In the documentation files, it says:

You only need to .zip scripts and resources in the game project and resource library, and then drop them into the designated release path

But I don't understand it. How do I publish a game for the web, using Cocos Creator?

\$\endgroup\$
  • 2
    \$\begingroup\$ You probably have to have a website or a publisher \$\endgroup\$ – Bálint Mar 14 '17 at 8:54
1
\$\begingroup\$

If you want to put something on a website, you need to obviously either create your own site or find a publisher. Both have drawbacks, with a publisher you lose the rights over your IP and with a website you need to pay a certain amount of money every month.

You haven't read the whole site, the important parts are

The construction of Web platform is very easy. You only need to .zip scripts and resources in the game project and resource library, and then drop them into the designated release path. If you need test, the test mode is there for you. The sourcemap is preserved with versions thus constructed.

Click the construct button, then a progress bar will appear on the top of the panel. When the progress bar reaches 100%, the construction is finished.

If you want to release or share your games on the Internet, click the open button next to release path. After opening the release path, copy everything in the constructed web-mobile or web-desktop folders, and drop them into your Web server. Then you can see the game later there.

So, you take your game code and resources, put it into a .zip file (use WinRar or 7zip), then put these in the release path (by default this is build. You can construct the game now. This'll result in some new folders, specifically web-mobile if you target a mobile platform and web-desktop if you target computers. These folders have everything you need.

If you have a publisher, then this is basically where you need to stop. You need to give the folder to the publisher and they will release it for you.

But if you have your own website, then you need to put the files up yourself. You either have an FTP address or an online file manager. If you want to make your website to only have a single page, then you need to put the contents of one of the folders up depending on whether you want a mobile game or a desktop game. If you want multiple pages with a main page and a way to get to other games, then you can simply upload the folders. These have an index.html file in them. In your main html file you need to create a link to this file.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.