RBuster's Recent Forum Activity

  • As I know, I cannot control the printer and its configuration options, but I need to print the screen and the result needs to be centralised and fit for any orientation. Is it possible? I am using the "execute javascript" action and I am getting a snapshot for that.

    Thanks in advance.

  • RBuster

    I don't apart from duplicating events. The plugin is probably causing a hang due to the family and I'd guess it would happen in other browsers.

    I don't have the canvas plugin installed currently and haven't made any time to work on plugins. However I seem to recall a similar problem with another plugin. The solution as I recall is to find the "typeProto.onCreate" function in the runtime and adding an if to stop the function if it's a family.

    typeProto.onCreate = function()
    	{
    		if (this.is_family)
    			return;[/code:24eup63i]
    Maybe that will fix it.
    

    Thanks, R0J0hound but it not worked. I decided to create an event for each canvas object and now the game is working in the Safari too.

    I am wondering know how can I get the JSON of the canvas. I know that is possible but I really don't know how to get it. Could you give some help with this?

    Thanks in advance.

  • RBuster

    So it doesn't load if the canvas is in a family, and on on safari? I guess I never tested that. I'm not sure I'll get around to finding a fix.

    Yes, R0J0hound

    Do you know other alternative than family I can use with canvas? I am using more than 60 canvas objects and I need to control all of them sometimes.

  • Hi R0J0hound

    Happy new year!

    I am using this amazing plugin that is helping me a lot but I am having some issue when I create a family with canvas: the game does not stop to load the files when I try to access it through the Safari. Do you know something about that? Is it possible to fix it or give some alternative solution to use in place of the canvas family?

    Thanks in advance.

  • I forgot to say that I also have tried in the 241 version.

    I removed the elements form the project, one by one, and I think that I found the issue: a canvas family. When I removed it, the game loads normally. But I don't know if it is an error once the game loads in the Chrome with any problem.

  • some help?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The game is not loading totally in the Safari browser.

    It starts and goes almost to the end but stops and stay inert indefinitely.

    I have published the game with the C2 v240 and the C2 v239.

    I am getting only an error in the panel ("Viewport argument key "minimal-ui" not recognized and ignored.") that I believe that is not the real cause.

    I also get the following messages in the browser's log:

    [Log] [Construct 2] Suspending (c2runtime.js, line 4)

    [Log] [Construct 2] Resuming (c2runtime.js, line 4)

    [Log] [Construct 2] Suspending (c2runtime.js, line 4)

    [Log] [Construct 2] Resuming (c2runtime.js, line 4)

    [Log] [Construct 2] Suspending (c2runtime.js, line 4)

    [Log] [Construct 2] Resuming (c2runtime.js, line 4)

    I have tried to disable the preload sounds but it not worked.

    Just to inform: the canvas plugin is the only different thing I am using.

    Thanks in advance for any help.

  • You could either a)check all the pixels with a loop, or b)set a variable when one of the actions to draw to the canvas is used. The latter is faster.

    Thank you. You really helped me a lot.

  • I haven't tried it in a bit but you may also need to wait a tick after setting the canvas size for scroll to to work.

    Thanks. It worked.

    Taking the opportunity, I wonder it is possible to check if the user drew something in the canvas (plugin)? I would like to allow them to proceed to the next screen after this.

  • I have included the script I am using in my previous post. It's the only code referring to this problem.

    I really need to get this feature working and I will appreciate any possible help.

  • Here's a better approach I found after the link above.

    You set the viewport size to the size you want.

    Next scroll to the center of what you want to capture.

    Then use the snapshot canvas action.

    When it's done you can then set the viewport back to normal and scroll back so it's centered.

    Thanks for the reply.

    Sorry but I did not understand the difference between what I did and what you suggested.

    You have suggested the following in that post:

    You can use the Snapshot action instead. For for a 100x100 image centered on position 50x50 you could do this:

    ---Set canvas size to 100x100

    ---scroll to (50, 50)

    ---Take Snapshot

    on snapshot

    ---set canvas size to 640x480

    ---scroll to (320,240)

    ---invoke download of canvasScreenshot

    The second scroll to is to scroll back to the original scroll location. If the layout isn't using unbounded scrolling you could also use (0,0).

    Is it not the same?

    My code:

    Just to illustrate:

    Obs: The "screen" sprite is the grey rectangle and the canvas plugin is filling all the white area.

  • I am using canvas plugin and I need o get a snapshot from the specific area of the canvas. The canvas plugin is filling the entire screen (1280,720) but I just want an area in the middle of the screen, where is the sprite.

    I am using:

    Set canvas size (screen.width/screen.height)

    Set scroll to (screen.x/screen.y)

    And after take a snapshot I restore de original sizes and positions.

    The issue: I am not getting the area I want. The image seems offset. I have tried to use the values instead the sprite (screen) location/size but it is not working too.

    R0J0hound

    I saw your answer in this topic:

    I followed your instructions exactly but I am still having this issue.

RBuster's avatar

RBuster

Early Adopter

Member since 29 Oct, 2012

Twitter
RBuster has 2 followers

Connect with RBuster

Trophy Case

  • 12-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

21/44
How to earn trophies