How do I show progress bar while loading Terrain?

Hi all. This is my first time posting. My name is Eduwhan. I’ve been using cocos2d-x over 6 months. I am currently busy with a puzzle game for mobile which I hope to release end of this year.

I’m using a cocos2d 3d Terrain object for my map. The problem is it takes a few seconds to load.
When the game starts up, I have a developer logo scene, then it fades into the title scene, then the map loads and the screen freezes on the title scene until the map appears… There is no feedback to the user something is loading. I want to change this.

Is there a way that i can have a Progress bar there asynchronously?
Can I asynchronously load the Terrain while the first 2 scene appear and disappear so the user don;t have to wait?

I have tried to create the Terrain scene on a separate thread but a lot of memory issues spring up when I do that.

‘’’
auto f = &, this {
auto map_scene = TerrainMapScene::create();
Director::getInstance()->getScheduler()->performFunctionInCocosThread(this, map_scene {
this->Set_worldMapScene_pointer(map_scene);
});
};
std::thread thread_obj(f);
thread_obj.detach();
‘’’

Any help would be greatly appreciated.

I think you could create a new Layer and show that on top with the ProgressBar then dispose of it when the map is ready.

Perhaps you can start loading the map in the background while the game is starting, showing developer logo (unless you mean a launch image) and displaying the title screen.