Drawing with colors

Get help using Construct 2

Post » Sun Sep 09, 2012 5:41 pm

Hi guys!

I'm working on a little webshop and was thinking to integrate a little game on it.

My targetgroup is parents with kids from 1-4 years. Because of that would I like to make a little game that they could play, so I was looking at youtube and found this game: http://www.youtube.com/watch?v=phhyINvLt0c which I think would be perfect.
my question is whether it is possible to make a game like this. A game where you can choose different colors and draw a on a layout?. And how to do it - I don't expect a capx. just a small point of how, so i maybe could do it myself :-)

Have a nice evening!

B
10
S
1
G
1
Posts: 30
Reputation: 1,339

Post » Sun Sep 09, 2012 6:09 pm

As was pointed out to me last month, you can set the bottom layer as transparent "use webgl" off, and "clear background" as no. That way anything that is drawn stays there until it's overdrawn.

Use shaped sprites to draw with, or as stamps on the background.

I haven't actually done it myself yet, but that sounds like a great direction to try.

R0J0hound was explaining how to make a destructable terrain, and posted this example where the ground is "Drawn" and redrawn when bombs hit:
http://dl.dropbox.com/u/5426011/examples13/scanline.capx
B
200
S
51
G
30
Posts: 896
Reputation: 36,494

Post » Sun Sep 09, 2012 6:15 pm

Man, it's really not a beginner game type.

You'll need to learn about arrays, matrix. Then, you'll need to map your canvas with many small dots, the smaller precision, bigger your array.

For example, if you want draw in large pixels, you can div a canvas of 320x240 by 32 slots in the horizontal by 24 in the vertical, so, each slot will have 10x10 pixels of size, so, you'll check if the mouse or touch is over what slot and if clicked or touched, set it's slot with a created object of 10x10 pixels of size.

You'll be able to improve it by changing colors, using the effects, etc.

The sparkling is easy, just setup a particle to follow the mouse/touch and change it's configuration every time the mouse is clicked, for example, the number of particles shot when clicked, and after, returning it's configuration to the standard.

Well, I think you'll need more things, but it's the basic.
ImageImageImageImageImageImage
B
92
S
19
G
12
Posts: 1,190
Reputation: 18,272

Post » Sun Sep 09, 2012 6:19 pm

Hi Paradox!

Thanks for the fast answer and the link, I will check it out immediately :-)

Have a nice evening!
B
10
S
1
G
1
Posts: 30
Reputation: 1,339

Post » Sun Sep 09, 2012 6:23 pm

Hi TELLES0808!

Yeah I see what you mean, thats sounds a bit hard. But thank you for your great explaning, it was every usefull information! :-)

Have a nice evning!
B
10
S
1
G
1
Posts: 30
Reputation: 1,339

Post » Sun Sep 09, 2012 9:58 pm

Hi again!

I have tryed to make a little prototype, and I actually fined out how to do it, so i'm very glad! :D
Its just fast, so the graphic is crap, but I here is the Capx. so someone maybe could be inspired: https://dl.dropbox.com/u/84869704/Drawing%20with%20colours.capx

I will work on the finnish game and share the capx. when its done :-)
B
10
S
1
G
1
Posts: 30
Reputation: 1,339

Post » Sun Sep 09, 2012 11:37 pm

Nice! Just one thing, beware of the performance. When you paint a lot it will probably cause a slow down on the game because it will spawn a lots of sprites. I suggest to find a method where you can destroy a sprite when a new sprite is spawned on the same position of other one. Like an overwrite process.SamCartagenaPR2012-09-10 03:13:14
B
61
S
5
G
5
Posts: 32
Reputation: 6,743

Post » Mon Sep 10, 2012 12:12 am

I would use the Canvas plugin if i were you. It allows for all kinds of drawing, here's an example of how to set up some simple draw and fill tools:

Example: DrawCanvas.capx (r102)
Try it out

Download Canvas plugin here.

How to install plugins.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Mon Sep 10, 2012 12:32 am

I think canvas is a good solution. Here's a couple examples. You might be able to pick apart the code.

http://sketchpad.io/
http://mudcu.be/sketchpad/
B
5
Posts: 25
Reputation: 375

Post » Mon Sep 10, 2012 6:01 am

Good morning guys or what ever the clock is where you are at ;-)

Well, I think you are right about the Canvas Plugin, thats look like a better soulution, so thanks for the advise and links, I really appriciate it! :-)
And thank you SamCartagenaPR for the suggesten about destroying the sprite when a new one is over, I think I will try to complete my version just to learn something new, and then make another game with the Canvas plugin and use that on my website.

Have a nice day everyone! :-D
B
10
S
1
G
1
Posts: 30
Reputation: 1,339

Next

Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], HugeCube, imnotspecial, tomi71, totoe and 19 guests