How do I create an in-game brush similar to that in paint?

0 favourites
  • 6 posts
From the Asset Store
Quickly and easily add a Quake-like console to your games
  • Please help! I am trying to make a drawing 'game' in construct 2 by replicating the brush/pencil tool found in other programs such as paint and photoshop. I get the logic behind doing so but am not sure how to implement it into this program. So far I have it so a handful of different coloured circles, depending on what colour the user has clicked on, are spawned it at the tip of the cursor (pencil), which works 'well' if you're moving it slowly (as it creates a straight line.) but whenever the user moves the cursor at a relatively fast pace the game doesn't keep up and, as you can see with the image I have attached, creates a 'line' with gaps which looks shabby. Does anyone know of anyway I can fix this? I am currently happy to try anything as this has stumped me and I cannot seem to find away around it. Thanks! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    Ps. I currently have the different colours running off a global variable that gets modified when the user clicks on the different colours to the right. The 'code'/game language I am currently using to spawn the circles in with is: system; every tick, mouse; left button is down, system; counter = 0 > set position (of the circle) to (mouse.X , mouse.Y), Create object line_pink2 (identical circle) on layer 0 at (Mouse.X , line_pink.Y). Link to download current build: ... sp=sharing

    Pss. I am making this game as an 'add-on' for a website I am creating for my girlfriend.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Check out the Canvas Plugin, this might help you out:

  • Thanks for the advice Allbrotnar! Could you possibly elaborate on how I would use this plugin though? From what I can gather it's already included within construct 2, but I can't seem to find any particular reference to it via the application or off the internet.

  • I haven't used it myself, so I'm not terribly helpful in this regard (sorry), but you'll have a decent chance of understanding it by reading is subforum here. I can't link you to it, but you can find it in the Completed Addons board.

  • The only way to do it is with the Canvas Plugin. It doesn't come with Construct 2 by default.

    Download it here: and install it.

    See how to create line in this amazing example made by XManBG

  • Thank you both so much! I've downloaded the canvas plugin and am currently working to implement it into my project. This already looks much more promising than my original method.

    Thanks again! I'll update my reply later to say how successful this turns out .

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