Why do I need cocos2d.js file



all the cocos2d-html5 tutorials use cocos2d.js file that loads the needed .js files dynamically. I do not understand why I need to load my files dynamically. What is wrong with just linking to them from my markup using

elements? thanks konstantin


2 reasons

in Development:
you might write a lot of game files, you can specify in cocos2d.js file, which is much easier to write your own

tags in html, there are tens of dozens js file for game engine alone. for release: game file (??? kb) + engine file (200kb)\\ +\\ box2d\\ ,\\ which\\ is\\ pretty\\ big\\ to\\ download\\ over\\ the\\ internet. your\\ web\\ page\\ will\\ lockup\\ downloading\\ the\\ js\\ files,\\ which\\ is\\ bad\\ for\\ user\\ experience. by\\ having\\ cocos2d.js\\ which\\ is1-2kb, you wont add too much weight to page loading. and when page loading is done, it then begins downloading the game.