Discussions

SmileBASIC Community

Erryestherrose123

08/01/2016 1:05 PM ·Spoilers

Open Closed

A game I made!

I made a personality test. Check it out! RXCQ33J4 As I mentioned, only the #up button works. If you could, review my code to see what's wrong. Let me know how accurate this is!

Advertisement

Comment

This post has no comments.

  • Afterwards, you'll increase the percentage sum by an amount relative to 2*PI (a circumference) and the color in respect to the total. Afterwards, draw a line from the center of the circle to the percentage of circumference that corresponds to the division. We can get this value using simple trigonometry. You can also use a similar value to paint in the division. (Code in next comment)

    Yeahs0
    Played
  • INC SUM,2*PI()*RED/TOTAL 'INCREMENT THE PERCENTAGE SUM GLINE 200,120,200+50*SIN(SUM),120-50*COS(SUM) 'DRAW DIVISION LINE ANG=SUM-PI()*RED/TOTAL 'AUXILIARY ANGLE FOR PAINTING GPAINT 200+45*SIN(ANG),120-45*COS(ANG),#RED 'PAINT IN DIVISION You can then simply repeat this above code for every color, replacing RED with the appropriate color.

    Yeahs0
    Played
  • thanks!

    Yeahs1
    Played
  • This code sounds so confusing to me. We never learnt trig in school, the highest level of math was Algebra 1. I would never be able to do it w/o your help!

    Yeahs0
    Played
  • Circular geometric logic can be pretty confusing if you've never learned trigonometry, but if you need help you can always ask!

    Yeahs0
    Played
  • Wow.

    Yeahs0
    Played
  • Being that I didn't understand a word of the code you gave me, I copied it, as you can see in the screenshot. But it's not working.The circle and segments draw, but the color isn't filled in correctly, the yellow just fills the entire screen. Can you please help me out?

    Yeahs0
    Played
  • What color is the background you're drawing on? If it's white, you might want to write GCOLOR #BLACK before the pie chart code to set the default drawing color to something visible.

    Yeahs0
    Played
  • Here's what happens.

    Yeahs0
    Played
  • Strange thing: I copied the entire thing and pasted it to display on the touch screen while the speech about the personality types are on the touch screen, and after scrolling thru all the colors, the pie finally appears as it should.

    Yeahs0
    Played
  • You probably had a white background when drawing the pie chart, which meant that the circle and divisions weren't being drawn properly. A background color other than white will make it work. You could also specify <GCOLOR #BLACK> before the pie chart code or append <,#BLACK> to every graphics instruction that doesn't already specify color.

    Yeahs0
    Played
  • It works! Thanks

    Yeahs0
    Played
  • One more question: when I display the pie graph on the touch screen, it's not centered. How do I center it?

    Yeahs0
    Played
  • The center of Touch Screen is (160,120), so you could center the circle X and Y coordinates and center the start point of lines. ˙˘˙

    Yeahs0
    Played
  • As Xavier said, you must change all center coordinates to that of the touch screen. That includes the circle, as well as all line and paint coordinates/offsets.

    Yeahs0
    Played
  • Here's the updated version! It's the one that's highlighted. You can check out 'multiplication' too, it's a cute quiz with random multiplication examples I made for my 3'rd grade sis. You'll have too download 'my sprites' to the same file to see the graphics.

    Yeahs0
    Played
  • Sorry here's the screenshot

    Yeahs0
    Played
  • Do you still have the problem with the buttons? (only up button works?) I can help I that is still the case

    Yeahs0
    Played
  • nope! it's all fixed now. Thanks for offering anyways.

    Yeahs0
    Played
  • No problem :D

    Yeahs0
    Played

Add a Comment

You must sign in to post a comment.

Sign in using a Nintendo Network ID to connect to users around the world by writing posts and comments and by giving Yeahs to other people's posts. You can create a Nintendo Network ID using your Wii U console or your system in the Nintendo 3DS family.

Use of Miiverse Details about Miiverse

Report Violation to Miiverse Administrators

You are about to report a post with content which violates the Miiverse Code of Conduct. This report will be sent to Nintendo's Miiverse administrators and not to the creator of the post.

Violation Type:

Post ID: 3DB-NBL7-EJ9-9E2A-XKP-4N33

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: