Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

What in Carnation - Feedback


I am having a hard time understanding the goal in the “What in Carnation” level.

  • Draw a “3D style” box, using the drawPolygon and drawSpokes functions, centered on the red X and with a size of 10.
    I am really confused what the goal of this exercise is. Am I trying to draw:

  • A transparent cube (two squares, four lines connecting corners)

  • A solid cube (only seeing “outside” of previous example)

  • Some sort of inscribed cube (two squares, one inside the other, with four lines connecting corners)

  • Something else?
    Perhaps a slightly more guided approach (with more examples in the code) would make the goals more apparent.

  • The simplist startAngles to calculate would be either “up” or “down”.
    I cannot determine what this is supposed to guide me to do. What is meant by “up” or “down”? Can you specify more clearly, please?
    Also there is a typo: should be “simplest”

  • drawSpokes(center, sise, number of spokes, start angle)
    Typo: should be “size”

  • Draw the star bib, using the drawStar and drawSpiral functions.
    I do not know what a “star bib” is, and need a little more direction here. Is it a star with two opposing spirals coming out of it? Can you describe this more clearly, please?

  • The spirals have a size of 15. To get a spiral to go the other direction give it a negative number of loops.
    No matter the direction of the spiral or the number of (integer) loops, my hero consistently gets stuck on the rock outcropping at x=75, y=36. Maybe the spiral is supposed to be smaller than size 15? Or perhaps the number of loops should be less than 1?

A General Post About the More Math-ey Levels

Image from Help:


Ah, yes, that would help quite a bit. :stuck_out_tongue:
Maybe a comment somewhere in the example code pointing the player to view the help information would be useful. I know I’ve only ever looked at the help when instructed to do so by the code comments.


Sorry, about that. I never look at the help/guide either, so I really have no excuse for not having had a comment telling everyone to look there. :frowning:

I have added a “see guide for image” (to the bib’s comment).
I also added a degreesToRadians function for those that think in degrees.
(and fixed the typos.)



What is wrong with bib ?


Handling in private message to inspect code…
Didn’t use the provided variable for the whiteX, so the star center and spiral calculated centers were not where they should have been.


Does the bib have to be exactly like that, with the star with seven points? Because when I use the drawStar function to try to draw a seven-pointed star, it just draws a single flower where I am standing, then continues to the loop.

[merged double post]

Also, since I am pathetic with radians, I switched to degrees with the degreesToRadians function, but then I got an error that said "Move to an {x:number, y:number} position in the drawSpiral function, on the self.moveXY(newX, newY) line.


Oops, sorry, I was getting people confused…

I just think of the angles as fractions of the circle. angle halfway around the circle is: angle = 1/2 * twoPi (or angle = Math.Pi, depending on if you want to do the math or have the computer do it…)

It sounds like you have the wrong number of sides, or a very very tiny size, or a skip value that causes it to skip everything…

If you want you can send your code to me privately and I’ll look at it.


Vlevo: I think you should explain ( in Help ? ) skips value …

drawStar(center, size, sides, skips, startAngle)


Hmm, seems to be a bug in my handling of skipping 3 of 6, since 1 and 3 should look the same for 6 points (technically, the image for 3 is correct but doesn’t do all the vertices, you need a second opposite start for that, which the code should have handled.)

I didn’t mention what the different skips did (slightly different between even and odd sided shapes), because I hoped people would play with it and find out, you know, the joy of discovery. But, I don’t mention it at all, so I probably should add a little blurb about it.


I personally did just fine playing around with the code to find out what each parameter did (esp. skips). I feel like it’s fairly important on the drawing levels to encourage the players to explore more-- being creative is definitely helped by understanding what your tools do, and that is often accomplished by exploring. I might put something in the comments about “play around to find out what the different parameters do,” but I don’t know if I’d explicitly define skip.


Yeah, when I’m “bored” and my brain doesn’t want to work on real level stuff this is what I do…


Math.sign() doesn’t seem to work for me. It’s used in drawSpiral() and also doesn’t work when I use it elsewhere. (Language: Python)
It brings up a “fix your code” error that says "‘undefined’ is not a function (evaluating ‘tmp55tmp56)’)"
I eventually completely removed it and used this instead:

if loopNum >= 0:
        direction =1
        direction = -1

No more of that error.

Additionally, there were a few instances where the “self.moveXY(newX, newY)” on line 90 failed. It stopped happening later but I’m not sure why.

The spiral also had to be drawn at a specific coordinate that I had to guess.


Python is the language I did most of the testing in. So I know it does work there. Intermittent errors are lovely (not). (refering to both the Math.sign and the errors with moveXY, that one has happened to others as well.)


the Math.sign should actually be Math.sin, I believe. I used that.


I have same problem. What’s wrong with my bib? It looks exactly like the image from help…


As I said, the python code IS correct. If you are experiencing problems with Python, then you are having a problem and maybe need to clear your cache/localStorage. (“Clojure”, Python and Javascript all work as I wrote it. There is nothing wrong with the code as I tested all of them and they worked with my solution code (which means that any code errors you receive are do to bad loading, memory errors, or bad code on your part.) Therefore there are ZERO coding errors in the given functions. The original’s were written in Coco-Clojure, Python received the most testing, then Javascript. I am sure there are better, more idiomatic, ways to write the code, in each of the languages, but for those three it works without actual code problems.


But did you follow directions? size, center, what ever is given?
Is the spiral center above/on/below the star point? (I don’t tell this one so I guess there are up to three possibilities. I never checked what the “other two” look like so I’m not sure if they look “right” or not…???..)

Scroll back and there is a previous image looks a lot like yours where the person in question didn’t have the correct spot for the center of the star (which is given) and so didn’t succeed (the rest of their code was correct just off center.) (as explained in the reply immediately after the image)

(you’d have to private message me your code for me to check it.)


Thank you for the answer. Yes, I followed directions. Spiral center is above star point.


If everything is where it is supposed to be and it doesn’t work, then try the other two spiral possibilities: on/below star point.