puzzle game with 1000's of images

  • I am developing a jigsaw kind of puzzle game which has about 100 puzzle with about 20 puzzle pieces for each puzzle so like 100 x 20 = 2000 puzzle piece images.

    so far i have developed the game by requesting the XML containing puzzle information and "Load Image from URL " method of sprite to create and display the puzzle pieces sprite created out of each frame. The xml and the images of puzzle piece are stored in the project folders.

    This seems to work fine in preview and through local/remote web servers as HTML5 export.

    The problem comes when i export to CocoonJS or appMobi to be able to run on mobile platform. my understanding is , Since there is no local webserver when running as an app , the game doeesn't work by not loading the xml requested through ajax object as my URL is relative to the localhost/domain. if my understading is not correct, please let me know why this doesn't work ?

    So i would like to know how to solve this issue for mobile devices which is a key platform for my game.

    These are my thoughts,

    1) I can load all the 2000 images into a sprite with each image in a frame.

    2) then create each puzzle piece (sprite) by setting the correct frame that belongs to the puzzle.

    will the above work ? ,

    also i have to be careful in loading the frames with images in the right frame and this might be time consuming (since this would be 1 time , i guess this should be ok )

    what will happen during run time , will all the images have to loaded before the game can start ?

    , will there be memory/performance issues since all images has to loaded eventhough i will display only few per puzzle ?

    i prefer to bundle assets/images within the app instead of externally loading it from the server because i guess it might be slow particularly in mobile networks and the user had to be always online and can't play offline.

    Also i think Apple AppStore will reject the app if the app is dependent on any external server for it to work.

    based on the requirement , any suggestion , recommendations, thoughts will be greatly appreciated on how to make this work properly.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hmm. I think cocoonjs will struggle with 2000 sprites. You can try it out but it may be difficult to get it to work.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)