How to structure a project that contains multiple small games, and resources are only loaded when the user wants to play that game?

Hello,
I’m creating a game that contains some mini games. When the user first selects one of those games, the resources for that game will be checked and downloaded.

I see a topic about hot update:
https://docs.cocos.com/creator/manual/en/advanced-topics/hot-update.html
is that use for this case too ?

Please guide me structure that project.
Thank you

You can package all the mini-games into bundles for loading and unloading. However, there is a problem that you can’t use bundles to load mini-games. For example, nesting of bundles is not supported.

@muxiandong ,

  1. Is that mean I can only package all mini games together, and play must download all resources at the beginning ?
  2. Can we package and allow players to download each resource of each mini-game separately when they really want to play? If so, how would we do it? Should we separate the resources of each game into separate directories and create multiple manifest files?

I still don’t fully understand this mechanism.
Thank you

What I mean is that you package multiple games into multiple separate sub-game bundles, and then load the bundles and run them as needed when you play.

@muxiandong,
I’m afraid that I still don’t understand how to do this.
Do you have any demo code or tutorial about this problem ?

Thank you

You can refer to

https://docs.cocos.com/creator/manual/en/asset/bundle.html?h=bundle

@muxiandong
Thank you!