Skip to content

Preload game images

username-removed-1496206 requested to merge preload-game-images into master

Created by: Jenselme

  • feat(game): preload images

    • Add the list of images to preload in the configuration of the application
    • Preload images when the create page with the game version is activated
  • feat(utils): use the version of the game when loading images with ImageSource

  • ref(utils): use version from config for ImageSource

  • ref(utils): rename ImageSource into AssetSource

    It will handle all assets for versionning.

  • feat(game): make sure we load game assets from the proper version

    • Update run task to proxy request to /latest/assets to /assets
    • Define a variable $version when building SCSS files and use it to load the proper version of images.
    • Use the AssetSource to load the assets (images and audio files) from the proper version

    HTML files for the site are left untouched: they must use the lastest version anyway. No need to add complexity to these componenents.

  • chore(bitbucket-pipelines): change base image

    The Python script that builds the configuration requires at least Python 3.5. However, the node image we were using only has Python 3.4. We rely on the fedora image to have recent versions of both nodeJS and Python.

  • ref(create,game): preload images as soon as the game route is active

    Since we use the version from config to load the images, we don't need to read it from the URL.

    • Preload the images in the constructor so we are sure to only do it once
    • Move and generalize preloading strategy into AssetSource
  • ref(assets): move sprite for cards into the game folder

    This allows us to preload the sprite.

Merge request reports