How to show the detail loading percent when preloading a scene?

I mean DETAIL percent, i used version 2.2.2, when i loading a resource group before showing a scene, the percent showed always 0%->25%->50%->75%->100%, why there is no detailed percent such as 10%->11%? I defined the resource like this:
var res_mainmenu = [
{src:res.ui_plist},
{src:res.ui_png}
];

Anybody know the reasons? I found someone using version 2.2.1 did have detailed percent. Maybe there is something i don’t know?

BTW: I think if cocos2d-html5 team could enable user to custom the preloading style especially the logo, that will be a great thing!

Thanks!

It is counted by the number of files.
It looks like you have four files, so it display as 25% (1 file loaded), 50% ( 2 files loaded) …
It is the same between 2.2.1 and 2.2.2.

You can custom the preloading scene. It is defined in the _logoTexture of cc.LoaderScene.
You can change it to whatever you want.

Hi, @ShunLin
Thanks, but i did see someone using version 2.2.1 to show detailed progress percent, that’s what i want.
Is there a way to achieve this?

At last, i researched its code, i found the only distinguish is i packed the files into 4, and he has many single pngs, so it looked the percent is continuous, but actually it showed 6->12->18->24…->100%:frowning:
Anyway, it’s a little pity that we could not show a detailed percent!

Well, maybe it could be “hacked”: if one could get the size of each file to be loaded and take that into account, it still wouldn’t be “smooth”, but it would definately be more accurate.

I guess one could also go to the lenghts of measuring network traffic and try to get an estimated time of download (and even use this rate to increase the percentage manually before the files completely finishes loading), but I wouldn’t even know where to begin for implementing such things…

On the other hand, a loading animation could also be added so the player doesn’t think the game’s hanged and has stopped loading? Or was there any other reason for which you wanted to customize the loader into detailed percentage?

@ZippoLag
You are right, i just want user to see a continuous percent. And i think you give me a good suggestion to solve this issue!

@longyangxi wrote:

@ZippoLag
You are right, i just want user to see a continuous percent. And i think you give me a good suggestion to solve this issue!

Glad to be of help :smiley:

Be sure to let us know if you manage to pull this out! (and how you did it)