Discuss Scratch

mrspock59
Scratcher
50 posts

Trouble / bug with touch of colors

Hello world,

here I have a problem with my project called GYRO
Eg when the ball blue button in the blue part of the circle, it does not work all the time! And it is the same with the other 2 colors .. So i just tested this way : I colored with vector brush the edges of each color of the circle, and it does not work better (if at all), I think the problem comes from the code, but I'm read it again, I do not see the error ..
I then try to create the main logo (the colored circle) with the vector editor with scratch to have smooth edges but I do not. I made it with Inkscape (I'm on linux, so no illustrator or photoshop), but when I import the SVG file, the logo is completely distorted ..
If anyone can help me on these two problems …

Thank you

Last edited by mrspock59 (Dec. 23, 2013 18:02:56)

turkey3_test
Scratcher
1000+ posts

Trouble / bug with touch of colors

I'm a bit confused with your problem, but remember that vector graphics use anti-aliasing, a gradual change of transparency which fades the edges of objects into the background, to look smoother, so the edges of vector objects are actually different colors than the inner areas.
mrspock59
Scratcher
50 posts

Trouble / bug with touch of colors

turkey3_test wrote:

I'm a bit confused with your problem, but remember that vector graphics use anti-aliasing, a gradual change of transparency which fades the edges of objects into the background, to look smoother, so the edges of vector objects are actually different colors than the inner areas.

Ok so for you the problem is not the code, but from the SVG format.. What can i do ? Please help me i can't continue coding until i fix this problem! Hysteric i'm

Last edited by mrspock59 (Dec. 23, 2013 18:48:59)

GreenConsole
Scratcher
39 posts

Trouble / bug with touch of colors

Eh, I have no clue what the problem is. “Eg when the ball blue button in the blue part of the circle, it does not work all the time!” I don't get that sentence.
mrspock59
Scratcher
50 posts

Trouble / bug with touch of colors

GreenConsole wrote:

Eh, I have no clue what the problem is. “Eg when the ball blue button in the blue part of the circle, it does not work all the time!” I don't get that sentence.

Sorry it's a google translation. I meant that the problem is as follows:
I want that when for example, the small blue ball touches the blue part of the great circle, it adds 1 to the score, otherwise it takes one to life (if it hits one of the other two colors of the circle). The problem is that this condition not always work. Test the game by yourself for understand what i mean ^^
Listen the noises when the balls touch the circle (good or bad). You will see that even if the small blue ball touches the blue part of the circle, it counts as false sometimes !
Hope you'll understand
drmcw
Scratcher
1000+ posts

Trouble / bug with touch of colors

Colour touching colour is an expensive block, better to simplify it. You know the colour of the ball so next step is to try just touching colour.

ifcostume#=1andtouchingcolor?>then hitelseend

Last edited by drmcw (Dec. 23, 2013 20:14:03)

GreenConsole
Scratcher
39 posts

Trouble / bug with touch of colors

mrspock59 wrote:

GreenConsole wrote:

Eh, I have no clue what the problem is. “Eg when the ball blue button in the blue part of the circle, it does not work all the time!” I don't get that sentence.

Sorry it's a google translation. I meant that the problem is as follows:
I want that when for example, the small blue ball touches the blue part of the great circle, it adds 1 to the score, otherwise it takes one to life (if it hits one of the other two colors of the circle). The problem is that this condition not always work. Test the game by yourself for understand what i mean ^^
Listen the noises when the balls touch the circle (good or bad). You will see that even if the small blue ball touches the blue part of the circle, it counts as false sometimes !
Hope you'll understand
I'll try and fix it.
GreenFixes
New Scratcher
1 post

Trouble / bug with touch of colors

I am done fixing, it all works now.
http://scratch.mit.edu/projects/16005028/
mrspock59
Scratcher
50 posts

Trouble / bug with touch of colors

GreenFixes wrote:

I am done fixing, it all works now.
http://scratch.mit.edu/projects/16005028/

Oh yes awesome !! Really many thanks !! You are truly Gifted ! I think not separate for each color… ^^'

Last edited by mrspock59 (Dec. 23, 2013 20:43:46)

letrainbleuetrouge
Scratcher
100+ posts

Trouble / bug with touch of colors

So what ?
1) there was a programming error and a correction is made, or
2) this was a glitch with the anti-aliasing problem and a workaround is made ?
mrspock59
Scratcher
50 posts

Trouble / bug with touch of colors

Mhhh what to say, sometimes the problem returns, but much less than before .. but it is present. Letrainbleuetrouge and turkey3_test you may well be right, too, is also due to the smoothing of the outer circle ?

Last edited by mrspock59 (Dec. 23, 2013 22:01:14)

scubajerry
Scratcher
1000+ posts

Trouble / bug with touch of colors

Why not use math instead of color sensing. It is more reliable. :-) http://scratch.mit.edu/projects/16007885/#player
mrspock59
Scratcher
50 posts

Trouble / bug with touch of colors

scubajerry wrote:

Why not use math instead of color sensing. It is more reliable. :-) http://scratch.mit.edu/projects/16007885/#player
Indeed yes, but it is very complicated to do! Thank you to you too

Powered by DjangoBB