HTML and CSS Reference
The tests are the best learning resources available. If you make changes to the source file, you will see the result
immediately. It is a much faster way to learn and obtain the features that you need for your game than by trying to
create everything from scratch by yourself.
Taking a Look at the Sample Games
There are two types of full game samples built-in with Cocos2d-html5. All of the source code is completely free and
open to you. The following sections provide a short introduction to these sample games.
The first game listed on the index page is MoonWarriors (see Figure 24-9 ). It is a vertical shooting game. In this sample
game, many useful game techniques are applied, including tile-map, animation, parallax backgrounds, and so on.
You can dive into the source code for more information.
Figure 24-9. MoonWarriors opening screen
This is a matching game. You can swap the position of a nearby fruit, and if there are three or more of the same type of
fruits in a vertical or horizontal direction, you have a match and the same fruits will be cleared (see Figure 24-10 ).