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

Get help using Construct 2

Post » Thu Apr 24, 2014 10:09 pm

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! :D

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: https://drive.google.com/file/d/0By_haR ... sp=sharing

Pss. I am making this game as an 'add-on' for a website I am creating for my girlfriend.
You do not have the required permissions to view the files attached to this post.
B
7
Posts: 4
Reputation: 559

Post » Thu Apr 24, 2014 11:04 pm

Message: Allbrotnar can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Check out the Canvas Plugin, this might help you out: plugin-canvas_t64239
B
5
G
1
Posts: 22
Reputation: 467

Post » Thu Apr 24, 2014 11:26 pm

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.
B
7
Posts: 4
Reputation: 559

Post » Fri Apr 25, 2014 9:29 am

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.
B
5
G
1
Posts: 22
Reputation: 467

Post » Fri Apr 25, 2014 12:57 pm

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

Download it here: https://www.scirra.com/forum/viewtopic.php?f=153&t=64239 and install it.

See how to create line in this amazing example made by @XManBG https://dl.dropboxusercontent.com/s/y9asncfrt721jey/mouseCanvasDraw.capx?token_hash=AAG1GHw-Rje_LPt7R6v14V8GLwW1PJ6kV2xDS7dXH_c0GQ&dl=1
composer - multimedia artist
www.eli0s.com/en/
B
69
S
26
G
5
Posts: 1,146
Reputation: 9,829

Post » Fri Apr 25, 2014 2:30 pm

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 .
B
7
Posts: 4
Reputation: 559


Return to How do I....?

Who is online

Users browsing this forum: Bootfit, Huemerson, jorgmaquoi and 5 guests