none
Challenge of the Month - October 2017 RRS feed

  • General discussion

  • These challenges are intended for people who are learning to program for the first time or for those returning to programming who want to start using Small Basic.  Some will be easy, some will be hard - but they will all make you think, and more importantly be GREAT FUN!

    Please post your solutions / partial solutions / questions / feedback etc. into this thread that will remain 'sticky' for the month.  The only rule is that your solution must use standard Small Basic methods (no extensions).

    It would be good if people could post their problems with these challenges so that a discussion can start so that everyone can learn from each other.

    We may extend these challenges over into a second month if solutions and questions are still coming in.

    TextWindow Challenges

    • Write a simple TextWindow based battleships game.
    • Write a program to convert some text to a string of numbers (like a code) - the challenge is to also write a method to convert the number string back to text.


    Graphics Challenge

    • White a program to draw a fairground ride, use animation if you can.  Also, try to do it with native GraphicsWindow shapes and not just display a complete image.

    Carnival Rides Stock Photos, Royalty-Free Images & Vectors ...

    Maths Challenge

    • Write a program to calculate the sum of all numbers less than 1000 (1 to 999) that:

    a) Are divisible by 7

    b) Are perfect squares, 1, 4, 9 etc

    c) That when multipled together equal 1000, eg (1,1000),(2,500),(4,5,50) (only use each number once and summ all the numbers found)

    Community Suggestions (By Papa Lapub)

    1. PaletteViewer
    a.) Write a program to save colors (eg. SB supported HTML colors, websafe colors, ...) to a PDN Palette.txt or GIMP Palette.gpl file.

    b.) Write a program to read this .txt or .gpl palette file and show it's colors visually (perhaps with infos like name, #hex, R,G,B)

    2. RuntimeControls
    Write a program which allows it to add controls like Button, (ML)TB during its own runtime. The added controls also have to work with events.

    Do you have an idea for a future challenge? Please post it here!

    Monday, October 2, 2017 5:37 PM
    Moderator

All replies

  • Hi Team,

    This My Solution For Community Suggestions ,

    Solution For RuntimeControls

    Program Code : GDR971

    Thanks,


    Roshan - 7th Grade Student (Age 11) - Learning Small Basic

    Tuesday, October 3, 2017 6:12 AM
  • Hi Team,

    This My Solution For Community Suggestions ,

    Solution For RuntimeControls

    Program Code : GDR971

    Thanks,


    Roshan - 7th Grade Student (Age 11) - Learning Small Basic


    Nice try, RoshanKumarPriya!

    Nonki Takahashi

    Wednesday, October 4, 2017 2:14 AM
    Moderator
  • This is my first step for the graphics challenge: PJX549.

    Screen shot of a program Horse


    Nonki Takahashi

    Wednesday, October 4, 2017 2:42 AM
    Moderator
  • Hi Team,

    This My Solution For Community Suggestions ,

    Solution For RuntimeControls

    Program Code : GDR971

    Thanks,


    Roshan - 7th Grade Student (Age 11) - Learning Small Basic

    Hi Team,

    Solution For RuntimeControls

    Program Code : GDR971-0

    Improvements

    • Bugs Fixed (Textbox (both multi line text box and normal textbox) Can Be Hidden successfully using "clear" button)
    • Removed Unnecessary lines

    Thanks,


    Roshan - 7th Grade Student (Age 11) - Learning Small Basic


    Wednesday, October 4, 2017 11:27 AM
  • Graphics Challenge

        KQC202   Ferris wheel

    Thursday, October 5, 2017 6:57 AM
    Answerer
  • This is my second step for the graphics challenge: PJX549-0.

    Screen shot of a program Carousel 0.1


    Nonki Takahashi

    Friday, October 6, 2017 1:26 AM
    Moderator
  • This is my third step for the graphics challenge: PJX549-1.

    Screen shot of a program Carousel 0.2


    Nonki Takahashi

    Friday, October 6, 2017 4:03 AM
    Moderator
  • Car Moves and Stop by Self ID ZWJ237        mahreen miangul
    Friday, October 6, 2017 5:07 AM
  • This is my fourth step of the graphics challenge: PJX549-2.

    Screen shot of a program Carousel 0.3


    Nonki Takahashi

    Friday, October 6, 2017 8:26 AM
    Moderator
  • nice done nonki! great anim effects

    some update  PJX549-3

    • color changes
    • added z-order and lighting effects
    • speed up anim



    • Edited by Tryhest Friday, October 6, 2017 10:23 AM
    Friday, October 6, 2017 10:22 AM
  • Graphics Challenge

     VSH227  train 

    Friday, October 6, 2017 1:29 PM
    Answerer
  • Graphics Challenge

    MTC753   Ferris wheel and Train 

    Friday, October 6, 2017 3:01 PM
    Answerer
  • nice done nao))

    updated to railway crossing: MTC753-0  

    use  mswheel to zoom in/out


    • Edited by Tryhest Saturday, October 7, 2017 6:50 AM
    Saturday, October 7, 2017 6:49 AM
  • Car Moves and Stop by Self ID ZWJ237        mahreen miangul

    Nice car moving!

    Screen shot of a car moving program ZWJ237


    Nonki Takahashi

    Saturday, October 7, 2017 10:01 AM
    Moderator
  • This is my fourth step of the graphics challenge: PJX549-2.

    Screen shot of a program Carousel 0.3


    Nonki Takahashi



    Wow, it's really coming along!

    Ed Price, Azure Development Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Monday, October 9, 2017 6:22 PM
    Owner
  • Car Moves and Stop by Self ID ZWJ237        mahreen miangul

    Hi Team,

    Some More updates:

    • ZWJ237-0  : Moves front and back
    • ZWJ237-1  : Moves according To GraphicsWindow.MouseX-100 position
    • ZWJ237-2  : Moves according to keys (Left = move car left ; Right = move car right)

    Thanks,


    Roshan - 7th Grade Student (Age 11) - Learning Small Basic


    Wednesday, October 11, 2017 4:45 PM
  • This is my solution for one of community suggestions - RuntimeControls: HDB364.

    Screen shot of a program Controls


    Nonki Takahashi

    Sunday, October 15, 2017 6:49 AM
    Moderator
  • Graphics Challenge   Coffee Cup rotation 

        FQQ398


    Tuesday, October 17, 2017 2:00 AM
    Answerer
  • This is another solution for graphics challenge: flying carpet HVF266.

    Screen shot of a program Flying Carpet


    Nonki Takahashi

    Wednesday, October 18, 2017 4:33 AM
    Moderator
  • One more solution for the graphics challenge: NML535-1.

    Screen shot of a program Pirate Ship 0.2


    Nonki Takahashi

    Friday, October 20, 2017 2:56 PM
    Moderator
  • Hi Nonki,

    oh, there are some Errors:


    Best Regards Martin

    Friday, October 20, 2017 7:04 PM
  • Hi Nonki,

    oh, there are some Errors:


    Best Regards Martin

    Hi Martin,

    Which version of Small Basic are  you using?  Shapes.Rotate() in Shapes_Rotate subroutine (line 410) seems not working except for shape[35], shape[62], shape[63] and shape[64].


    Nonki Takahashi


    Saturday, October 21, 2017 2:16 AM
    Moderator
  • Hi Martin,

    by removing the fine part of angle calculation it looks more better, but not perfect.

    I think it's a decimalpoint/textstring - problem  of the different language regions.

     

    Saturday, October 21, 2017 11:02 AM
  • Thank you for your information, backtothestart.

    I could reproduce the problem Martin reported by changing decimal point from "." to "," with the Control Panel.

    My conclusion is that Shapes.Rotate() doesn't work with angles that have ",".

    Workaround of this problem is to replace "," to "." before calling Shapes.Rotate().

    So in this program, replace line 410 with following code:

        a = angle + shp["angle"]
        a = LDText.Replace(a, ",", ".")
        Shapes.Rotate(shp["obj"], a)


    Nonki Takahashi



    Saturday, October 21, 2017 1:25 PM
    Moderator
  • I added this issue to a TechNet Wiki article: Microsoft Small Basic v1.0: Known Issues.

    29. Decimal + "" becomes 0 when the decimal has a decimal point set as "," in Control Panel.  This issue still remains from SB 1.0 to SB 1.3.

    Thanks.


    Nonki Takahashi



    Saturday, October 21, 2017 2:28 PM
    Moderator
  • I added this issue to a TechNet Wiki article: Microsoft Small Basic v1.0: Known Issues.

    29. Decimal + "" becomes 0 when the decimal has a decimal point set as "," in Control Panel.  This issue still remains from SB 1.0 to SB 1.3.

    Thanks.


    Nonki Takahashi



    I uploaded fixed program (with workaround) as NML535-2.

    Nonki Takahashi

    Tuesday, October 24, 2017 3:26 PM
    Moderator
  • updated to use ldgraphicwindow rotate method:NML535-3.

    • reduced lines to below 150
    • removed unnecessary subs
    • smoothed anim

    also an ultracompacted version: WGV630

    • reduced to just 8kb from initial 17kb
    • Edited by Tryhest Tuesday, October 24, 2017 8:14 PM
    Tuesday, October 24, 2017 7:08 PM
  • Hi all,

    Text Window Challenges

    SBM903 - Solution code

    Question

    Write a program to convert some text to a string of numbers (like a code) - the challenge is to also write a method to convert the number string back to text.

    Thanks,


    Roshan - 7th Grade Student (Age 11) - Learning Small Basic

    Wednesday, October 25, 2017 4:16 PM
  • Graphics Challenge     Jet Coaster 

     NNG420

    Thursday, October 26, 2017 12:20 PM
    Answerer
  • nice done nao! some updates: JBD664

    Wednesday, February 21, 2018 7:11 AM