HTML and CSS Reference
Getting Started on Built-in Examples
Installing Cocos2d-html5 is as easy as extracting it and running the index.html file. It can be downloaded from the
official Cocos2d-x web site at Cocos2d-x.org/download (see Figure 24-6 ). Just save the downloaded .zip file; you will
extract the code on a web server default path later.
Figure 24-6. Cocos2d-x download page
Cocos2d-html5 releases a new version every six weeks. v2.2.2 was the latest version in use at the time of this
writing, so this topic will use version v2.2.2.
Next, you are going to install a web server. You have several options here:
• XAMPP : Windows, Macintosh, and Linux
• WAMP : Windows
• MAMP : Macintosh
Follow these steps to install the web server.
Download one version of your platform.
Follow the default instructions to install it.
Specify the installation directory.
Copy the extracted Cocos2d-html5 files to the root directory.
Open your browser, and input “ localhost ” in the address bar.