HTML and CSS Reference
In-Depth Information
/root/template/ directory is used for creating new Cocos2d-html5 projects. All of your
game resources, such as images, sounds, background music, and configuration files, should go in
the /root/template/res folder. Your game source code files should go into /root/template/src .
The
/root/Cocos2d/ directory hosts the engine's core module, audio module, and other
modules, and the /root/extension/ directory hosts some useful modules, such as EditBox,
CocosBuilder Reader, and CocoStudio Reader, and so on. These two directories contain
expanded files, while /root/lib/ has a compressed file containing these two directories together.
The
The
/root/externa l directory hosts physics engines, such as box2d and chipmunk.
The
/root/HelloHTML5World/ directory contains a simple “Hello World” demo.
The
/root/license/ directory includes all of the license files in this project and, as mentioned
previously, the license of Cocos2d-html5 is from MIT, and it is the freest open source license.
Within the
Samples directory, you can find the usage of all classes in Tests . It also includes
sample games. All of the tests and games can be run on JSB. This is where you should start.
The
/root/tools/ directory includes the JS Doc tool and closure compiler. The /root/
template/build.xml directory is the configuration file for the closure compiler, and you can
package your game into a single file in advanced mode via ANT. You simply need to add your
game's JS files and then type ant in the console in the directory of /root/template/ directory.
The
AUTHORS.txt contains the core developer and contributor information.
The
CHANGELOG.txt contains the change information for all versions.
The
index.html is the entry file of the engine samples and demos.
The
README.mdown contains an introduction to Cocos2d-html5.
Introduction to the Tiled Editor
There are various tools in the Cocos2d community that can help you to develop your game professionally and
efficiently. In this chapter, you will use the Tiled Editor to build the game map for the live demo, so that's the only tool
I'll be discussing here. Information regarding other tools is available on the Cocos2d web site.
The Tiled Editor is a tool that allows for the easy creation of map layouts. It is versatile enough to allow you to
specific more abstract things, such as collision areas, enemy spawn positions, or power-up positions. It saves all of this
data in a convenient, standardized TMX format.
What is TMX?
The TMX (Tile Map XML) map format used by the Tiled Editor is a flexible way to describe a tile-based map. It can
describe maps with any tile size, number of layers, and number of tile sets, while also allowing custom properties to be
set on most elements. Besides tile layers, it can also contain groups of objects that can be placed freely.
Why Tiled Editor?
The reason I use the Tiled Editor is because it allows you to focus on more important things in your game when you
have a standardized system and a powerful, flexible tool already in place. With the Tiled Editor, you'll be able to take a
few tile sets, create your levels, and then be on your way.
In addition, with the Tiled Editor's help, all of the map layout information is stored in the TMX file. This is
powerful because it allows you to send the TMX file to a player, and then instantly have the layout available without
having to re-download the client (assuming that the TMX map uses textures that are already on the player's computer).
 
Search WWH ::




Custom Search