Turtle Maze versus Hangman – a case for seamless sharing.


A lot of Small Basic programs use "Assets" in order to work, e.g. images, sound and text files.

Key to Small Basic's effectiveness is our ability to share code and programs. At present the sharing of code is seamless but the sharing of programs may not be.

To demonstrate the difference I use the 2 following games:

 

The Program ID's are:

  1. NFV721-2  (Turtle Maze)
  2. XNF825   (Hangman)

Sharing the code for both these programs is seamless for SB students. You simply:

  1. copy the ID
  2. click on the Import icon in Small Basic
  3. paste the ID as prompted, and
  4. click OK to load

To share the "program" (meaning, running the code from the IDE), is seamless for Turtle Maze:

  1. do the above 4 steps, then
  2. click the Run icon in Small Basic

However sharing the Hangman "program" is NOT seamless:

  1. do the above 4 steps, then
  2. scroll down to line 83 and uncomment it
  3. click the Run icon in Small Basic

Program sharing is predominately done by posting ID's. Seamless sharing of programs is broken at the point where the File object is used. ALL native File members are disabled on publishing.

Having "Introductory Programming" as a part of mandatory school curriculum is becoming ever more popular and I think Small Basic is a top candidate resource.

So I wonder if it's possible and worth while considering if some if not all the File class members be given an extra optional parameter that could set if the operations are using a child of the Program.Directory(). Then these File statements be parsed by the Programs Listing script and exempt any instance that contains the value "True" from security commenting.

Just a thought and a desire for SB to be even more fun.

Comments (10)

  1. anonymouscommenter says:

    XRF562

    use mswheel to adjust gravity/levitation. works only if mouse is on left upper blue box or over flag

    rightclick flag/box to select some of presets flags

    also can paste image from clipboard and make cool flags

    enjoy))

  2. We'll need to get this feature idea written up on the wiki. Great points!

  3. anonymouscommenter says:

    zx spectrum like emulator with 3dcubes and logo turtle code MWB767

  4. Jibba Jabba says:

    Very interesting qwx.

    Your MWB767 is a great example of what I'm trying to put together in this blog.

    The program highlights 2 things:

    1st the File objects were commented out – not too much effort to uncomment, and

    2nd it uses several different extensions which requires finding and installing each extension.

    If the SB V-team could work out a solution for us to share programs without the blocking of File objects working with children files of the ProgramDirectory, then. the native File object might be used more which would find SB coders pushing it to more limits within the native SB landscape.

    Fascinating and thanks for sharing your program.

  5. anonymouscommenter says:

    tx jibb))

    some traffic simulator:

    NHM344

  6. anonymouscommenter says:

    updated version of spectrum emul. now works on sb1.1 and new cool features

    MWB767-1

    new: "for" loop nesting

    print newline by "| "char as arg2

    new init sample

  7. Jibba Jabba says:

    Hey qwx

    Your code is looking good my friend.

    Can you create a thread in the forum and post these programs there. That way others can check them out and post replies and votes.

    If you have any thoughts on what's discussed in this blog article then post those here as I would love to read them.

    Thanks.

  8. anonymouscommenter says:

    sure, i ll have to make a compilation))

    another cool and simple animation sample

    LRZ907

  9. Jibba Jabba says:

    Unfortunately the 2 program id's in this blog wont work anymore. I've uploaded them to:

    Turtle Maze: gallery.technet.microsoft.com/Turtle-Maze-32663dc5

    Hangman: gallery.technet.microsoft.com/Hangman-e4e79d2c

    Thanks.

Skip to main content