Why is Clear Canvas Not Working?

Not favoritedFavorited Favorited 0 favourites
  • 6 posts
From the Asset Store
Pixel Destruction like in "Worms" (Drawing Canvas based)
  • I've been banging my head against this for ages. I'm trying to prototype a grid-based movement system where the path is rendered on the Drawing Canvas until the player picks a location to move to.

    I am able to successfully clear and re-render the canvas each frame that the preview is active. But when the player clicks, the clear canvas action just doesn't seem to want to work. I can't seem to clear it using any method. Is this a bug or am I missing something really obvious? Any help would be appreciated.

    Screenshot of all my logic and link to project below:

    drive.google.com/file/d/1KORaEjdE2NWwOZWOzvnR_gmTQnDc1ESa/view

  • NedSanders

    I messed with your project and found that it works when WebGPU is OFF!

    Looks like a bug that you need to report...

    Caused by : (WebGPU + Antialiasing on your "DrawingCanvas"); it will also work if Antialiasing is disabled while WebGPU is ON.

  • I thing You can't clear canvas because in the end you are setting variable Mode to Moving, while clean canvas works only when Mode is ChooseMove. If you will disable line (System / Set "Mode" to "Moving") it will start working

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I thing You can't clear canvas because in the end you are setting variable Mode to Moving, while clean canvas works only when Mode is ChooseMove. If you will disable line (System / Set "Mode" to "Moving") it will start working

    This is unfortunately not the case. a) I believe the full line of code still runs even if part of it involves disabling the conditions that start it to run halfway through and b) I've moved the set mode line to the end of the line and it still works. Even setting a on keyboard space pressed > clear canvas line completely outside of this code block didn't work.

    As discussed above, it seems like it's a bug. I'll get around to reporting it when I can.

  • I have reported it and Ashley has already fixed it for the next beta release.

  • I have reported it and Ashley has already fixed it for the next beta release.

    Ah, amazing - thank you

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