How do I store the built parts of my sprites....

  • First, please excuse my English because I am not good at it

    I am creating a mobile game that look likes build your robot. But I don't know how to make "SAVE" the screenshot of your finished robot and how to make a gallery to view the screenshot of your finished robots.

    Thanks.

    Hoping for replies

  • You can take screenshots of the canvas using the system action "Snapshot canvas".

    Otherwise, instead of actual images, you could save the position and animation frame of each sprite composing your robot (in a data structure like an array or something) and display it accordingly in your game.

    For that, I guess you should look into the local storage and existing examples on how to save/load the data, and create some functions to help you saving and displaying the robot accordingly.

    Also no need to bump your topic after one hour.

    Do researches on your own, and if in 24 hours there is nothing new, bump is authorized, not before.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can take screenshots of the canvas using the scirra.com/manual/125/system-actions system action "Snapshot canvas".

    Otherwise, instead of actual images, you could save the position and animation frame of each sprite composing your robot (in a data structure like an scirra.com/manual/108/array array or something) and display it accordingly in your game.

    For that, I guess you should look into the scirra.com/manual/188/local-storage:2dm5d52p]local storage and existing examples on how to save/load the data, and create some [url=https://www.scirra.com/manual/149/function functions to help you saving and displaying the robot accordingly. > > Also no need to bump your topic after one hour. > Do researches on your own, and if in 24 hours there is nothing new, bump is authorized, not before. > I see.. Thanks.. I will try what you said. One question... Screenshots is working on mobile? If yes I humbly asking if you have capx or link for that? Last.. sorry if i bumped it...

  • It works. You use the system action, it takes your whole canvas as a screenshot and there is a "On canvas snapshot" system condition you can use to trigger actions when the snapshot is taken.

    And you have access to your screenshot as an URI using the system expression "CanvasSnapshot".

    Reading the description for all those in the manual do help.

    See this topic. Not exactly the same as what you want, but it shows snapshot in action.

  • It works. You use the system action, it takes your whole canvas as a screenshot and there is a "On canvas snapshot" scirra.com/manual/124/system-conditions system condition you can use to trigger actions when the snapshot is taken.

    And you have access to your screenshot as an URI using the scirra.com/manual/126/system-expressions system expression "CanvasSnapshot".

    Reading the description for all those in the manual do help.

    See scirra.com/forum/how-do-i-create-multiple-snapshots_t177844 this topic. Not exactly the same as what you want, but it shows snapshot in action.

    Thanks! I will look at it

  • It works. You use the system action, it takes your whole canvas as a screenshot and there is a "On canvas snapshot" scirra.com/manual/124/system-conditions system condition you can use to trigger actions when the snapshot is taken.

    And you have access to your screenshot as an URI using the scirra.com/manual/126/system-expressions system expression "CanvasSnapshot".

    Reading the description for all those in the manual do help.

    See scirra.com/forum/how-do-i-create-multiple-snapshots_t177844 this topic. Not exactly the same as what you want, but it shows snapshot in action.

    sadly screenshot didn't work on my android

  • You get an URI, then it is up to you to do something with it.

    You either download it using the Browser plugin.

    Or send it to an online server of your choice using AJAX.

    When you take the snapshot, it is just a line of text you have to do something with.

    When you mention Android, do you mean exported as a Cordova application or executed in a browser on Android ?

    The execution in browser will work as is. Exported as Cordova might require you to add some Cordova plugin to your converting tool.

  • You get an URI, then it is up to you to do something with it.

    You either download it using the Browser plugin.

    Or send it to an online server of your choice using AJAX.

    When you take the snapshot, it is just a line of text you have to do something with.

    When you mention Android, do you mean exported as a Cordova application or executed in a browser on Android ?

    The execution in browser will work as is. Exported as Cordova might require you to add some Cordova plugin to your converting tool.

    yup i exported it to apk using intel xdk 3400.. May I know what cordova plugin may i use.. I am working for this screenshot on android for how many days. and how to add it to my converting tool?

    Thanks a lot for your reply everytime..

  • May I know what cordova plugin may i use.. I am working for this screenshot on android for how many days. and how to add it to my converting tool?

    Thanks a lot for your reply everytime..

    I don't know. I only said it might be required.

    Plugins in XDK are added as indicated in this tutorial's page.

    I'm afraid working on features for days is part of game development.

  • > May I know what cordova plugin may i use.. I am working for this screenshot on android for how many days. and how to add it to my converting tool?

    > Thanks a lot for your reply everytime..

    >

    I don't know. I only said it might be required.

    Plugins in XDK are added as indicated in this tutorial's page.

    I'm afraid working on features for days is part of game development.

    Thanks a lot.. I hope i will figure this out and i will share it here quickly

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