Setting event image to previous CanvasSnapshot

  • Hello again fellow nerds!

    I have made some real progress on my current games project and by jove it's really taking shape!

    I am here again to ask for your help!

    Todays problem involves the CanvasSnapshot feature.

    Scenario

    I am creating a save feature that allows the player to to see their progress from the previous save.

    Once the game has been saved it creates a CanvasSnapshot and then sets an event to that CanvasSnapshot (see images below)

    pasteboard.co/1PDNrFm0.png - menu after saving (shows current level state)

    pasteboard.co/1PDRjygm.png - menu after closing browser and relaunching game (no image)

    pasteboard.co/1PDUQtfG.png - loading the game after closing browser (Loads the game state correctly but does not show image)

    Edit - pasteboard.co/1PE9bu93.png - event sheet for save and load.

    So my question is: what would be the optimal way to save the CanvasSnapshot and load CanvasSnapshot after the player has closed the browser and re-launches it?

    Thanks in advance <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" />

    Chris

  • Hello again fellow Nerds!

    Ok so I feel I may have not explained my goal as clearly as possible first time round.

    So here goes for round 2

    I would like to create a save menu that takes a snapshot of the games current state and displays this image in an event.

    I have achieved this thus far. see image : pasteboard.co/1SCJZEhg.png

    My issue comes when I try to reload/refresh the game client.

    The load file is available but the image is not saved, dispite having the sprite be saved along with most other entities/events etc.

    When you load the game up again (or even refresh the browser) the snapshot disappears and so the sprite that shows the snapshot returns to a white sprite. See Image : pasteboard.co/1SCYrbQx.png

    I have tried a couple of things but don't feel I have gotten anywhere close to the desired function of this.

    I am looking for a way to use the snapshot, created when saving, as a way to show the player they have saved even after closing the browser.

    I would love to include the CapX but unfortunately it is not possible.

    If anyone has any Ideas/suggestions however, please feel free to let me know.

    If there is any other information required by yourself then also, let me know

    I will respond ASAP.

    Thanks in advance

    Chris

  • Quick Bump

  • base64 ?

  • Thanks for your reply!

    I had no idea base64 existed :O I will have a look at that

    Thanks <3

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)