Async loading in Cocos2d-js

  • olegkarman
    Likes 0

    Problem Description

    Hello. Is there any solution in Cocos2d to make 

    ccs.load(res.name_of_json);

    async? For example, I have a comix scene and during this comix I want to load some files on background for my game scene.

  • Sonar Systems admin
    Likes 0

    I would say load them on something like a loading or splashscreen


    This reply has been verified.
  • olegkarman
    Likes 0

    Can I use asynchronized (background) functions for loading (ccs.load)?
    Splashscreen – what is that and how it looks like?


  • Sonar Systems admin
    Likes 0

    A splashscreen is shown at the start of the game and usually displays the company logo.

  • olegkarman
    Likes 0

    Is there any example about how create Splash Screen for Android? Because I can’t find any.

  • Sonar Systems admin
    Likes 0

    Use an empty scene in Cocos

  • olegkarman
    Likes 0

    For example, I will create and empty scene. Inside it I will put some Sprite with animation to represent the loading process. But if I call “ccs.load” method it would freeze my scene and animation.

  • Sonar Systems admin
    Likes 0

    Don’t put an animation but just a simple static image.

  • olegkarman
    Likes 0

    Ok, one more question. When I use “ccs.load” method it create nodes using my .plist file and my spritesheet. When I add this nodes on my screen it place a piece of its sprite. Can I, somehow, get a Sprite of a certain node?


  • Sonar Systems admin
    Likes 0

    You want the sprite image of a node that is already created?

  • AnitaJohn
    Likes 0

    2021 Dodge Ram 1500 TRX

    The battle for the best high-performance pickup is becoming interesting, now that the Dodge Ram 1500 TRX 2021 pickup with 702 hp has entered the arena, the Ram 1500 TRX half-tonne powered by a Hellcat engine and is targeting the Ford F-150 Raptor. Ford F-150 Raptor "directly, the new Ram 1500 TRX is 8 inches wider than the regular Ram 1500. Continue with us reading the following report and everything you need to know about the price and specifications of the Ram 1500 2021 TRX."

     

     

     

Login to reply