How to make a multi-colored ring shape?!

@starcrunch

Sadly, what you said above did not solve the problem… it still occurs.

Also, on top of the ball color being displayed wrong opposed to in the code like I said in my previous reply,

The print codes you gave me before to track things in my console reads that the angle is nil.

May 22 21:07:46.193: QUADRANT COLOR yellow

May 22 21:07:46.193: BALL COLOR purple

May 22 21:07:46.194: ANGLES nil -35.461097717285

 

maybe that could be the problem? Very confused on why I have this error :frowning:

 

Thanks.

 

-Max

Remove the “end” in the line before it, too… that will pair it with the quadrantColor check (as opposed to the phase began one). And as I said, you just want an “else”.

Anyhow, by that point, angle was out of scope. If you aren’t doing so already, you should read up on some Lua details, like locals and their scope.

@starcrunch

What you said above only made it worse :frowning:

Now, no matter the collision, the game will be over on the first collision always.

Any other suggestions?

Thanks for your patience!

-Max

@starcrunch

Any advice for me?  What you said only made it worse… now no matter the collision, the game will be over on the first collision always.

Thanks!

-Max

Did you have any luck with this? I’m afraid I don’t have much more in the way of suggestions, aside from simply doing lots of print () statements or using a debugger, then comparing and contrasting the results against what you expect to see, until finally you have an “Aha!” moment.

As for the shader problem… Couldn’t you just go with an image after all? (When I gave it to you earlier, I didn’t know quite what you needed.) You now have some familiarity with fills, so you could just slap a bitmap paint on the circle and avoid that problem, I would assume. (The shader would make sense, on the other hand, if you later wanted to throw effects onto the quadrants, the center, etc.) I don’t have any Apple products myself, so I have zero idea what that issue might be, unless you just have an older build (Does it work without the isTimeDependent line? I believe one of the updates specifically addressed that.), in which case you could try one of the recent dailies.

Also, in criticism of my own shader… In this line:

 if (len \> .9) return vec4(0.); // "outside", use clear color

I’m not really sure why I used .9 instead of 1. (That might give you a better fit, so you don’t need to scale your circle.) Actually, if it’s just being applied to a circle anyway, you could probably just strike that line.