RBuster's Forum Posts

  • Hi nimos100

    I am having the same issue. I will be following this thread.

    Edited: Because this I cannot access my games through the safari browser, I presume.

  • So, I am doing this:

    Layout 1 (with drawing):

    On Left button clicked > Take snapshot of canvas

    On canvas snapshot > LocalStorage set item snapshot1 to CanvasSnapshot

    On item "snapshot1" set > Go to Layout2

    Layout2 (with another drawing):

    On Left button clicked > Take snapshot of canvas

    On canvas snapshot > LocalStorage set item snapshot2 to CanvasSnapshot

    On item "snapshot2" set > Go to Layout3

    Layout 3 (with sprites used to load the snapshots):

    On start of layout > LocalStorage | Check item "snapshot1" exists

    On start of layout > LocalStorage | Check item "snapshot2" exists

    On item "snapshot1" exists > sprite1 | Load image from LocalStorage.ItemValue

    On item "snapshot2" exists > sprite2 | Load image from LocalStorage.ItemValue

    I don't know if this is the best solution but it works for me. I hope it helps some one.

  • You just need to move each image to a different x/y position and paste into the Canvas/Paster object. They need to be on-screen and visible to paste, so you could write a function to put all required images side by side, then create a Canvas/Paster object and set the size/resolution large enough to cover all of the images, set the viewport to the same size, paste, then save the file.

    When you say "move each image" you mean: move each sprite with the image loaded? I can use Canvas "or" Paster, right? This function uses array? I don't know how to use array to manager positions. Wiil I need to use a new layout to prepare this huge composition? My current layout has only 640x480. This is very hard for me.

  • > Is it possible to save 20 snapshots on disk, load them after into a tilemap and so get a snapshot from this and print or save as image?

    >

    its possible if you dont want to use paster plugin or other complicated thing, you just create a global sprite, and create a instance of it everytime a drawing is made, save the snapshot url to a frame inside the sprite, then when the user wants to print it, use an positioning in screen for x and for y loopindex array kind of thing, then canvassnapshot again, and invoke the browser.execute javascript call .print to print the newly canvassnapshoturl its going to take a while for you to implement it but its the easiest way of doing it and without non-default plugins.

    when you call the print in javascript you use the same javascript you call the print from a html5 website ("javascript:window.print('canvassnapshoturl') ") just you need to change the scripts brackets to single ones ex: "myjavascript code { something 'blob code ,etc' } "

    Could you make a simple example of this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > Is it possible to save 20 snapshots on disk, load them after into a tilemap and so get a snapshot from this and print or save as image?

    >

    You could use the Canvas or Paster plugins to composite all of the snapshots and then save the results to a single file.

    It seems promising. Can I find any example about of how to composite images with Canvas or even Paster (though I have never used this plugin)? Do you have one?

  • Is it possible to save 20 snapshots on disk, load them after into a tilemap and so get a snapshot from this and print or save as image?

  • Thanks guys. But I really need more tips of how to print the drawing and I think I will have a situation here to solve: I need to print all the drawings in same page, like a tile. For example: If the player paint 20 drawing all this drawing should be distributed in the page (1 columns x 6 rows + 2 columns x 7 rows) when they print them. Can I do that?

    Thanks in advance.

  • Thanks for the indication X3M

    Thanks for the reply I have checked the app. Very nice.

    Is it possible to print the colourful drawing at the end?

  • This is not very exciting. Any other opinion/suggestion/help?

  • Hi everybody

    I know that it's possible to create a paint game in the C2 but I need to know if it is possible to do it with all these requirements:

    • the drawings are outline images (probably rasterised vector images)
    • fill the drawings with color including the background (it's not necessary the brush tool)
    • at the end the player can print the drawing

    I know I can use the canvas plugin for this but I don't if it attends all the requirements and if the final quality is good.

    Thanks in advance for any help/demonstration/suggestion?

  • Here's an example of it in action:

    https://dl.dropboxusercontent.com/u/542 ... lists.capx

    Basically look at every pair of lists with two loops like I mentioned above. Families can be used to pick both at once or you can just pick each individually like in the capx. In the capx I copy the list over to an array, and then sort the array. Next if the number of items is the same we can compare each item and see if they're equal, and if they are you can mark those lists as no unique.

    A BIG THANK YOU!!! I will analyse each line of this capx to really understand what I would have to have done to create it. Thanks a lot for each millisecond of the time that you have spent on it.

  • I will create an example for you understand what I am doing in a few minutes.

  • R0J0hound

    Thanks for the reply. My data will be located in 25 lists aprox. (with 1 to 10 items per list) and I don't know why I need to populate an array with this data. Actually, I thought that I did not need to insert this information into the arrays.

  • Up

  • Could someone help me with this issue, please? My project is almost ready and I just need to verify the lists at the end. If the lists are not the best solution, I'm open to suggestions. Just to exemplify: I'm using more than 20 lists with numbers that represent a type of the fruit and its amount (e.g. 1- 4) and I need to check at the end how many lists are equals (same number of items and the same combinations independently of the order) or not. (e.g.: list1(1-4, 2-3) = list2 (2-3, 1-4) but not equal to list3 (1-4,2-3,4-9)). Thanks in advance for any help.