Small Basic – Now with SilverLight

One Program, Two Platforms!

Did you know that with Small Basic v0.8, you can write a program or a game and have it run identically on both your desktop and the browser?  This makes it super easy to share your games with your friends (even those that may be running a Mac).

In fact it is so easy that you can have your program deployed, hosted and running on a browser with just one click of a button!  So easy that it might actually be the fastest and friction free authoring environment for Silverlight.

Here’s an example.  Take this simple program I wrote, which animates a bunch of balls on screen.

For i = 1 To 100
  balls[i] = Shapes.AddEllipse(10, 10)

While "True"
  For i = 1 To 100
    ball = balls[i]
    x = Math.GetRandomNumber(640)
    y = Math.GetRandomNumber(480)
    Shapes.Animate(ball, x, y, 2000)

When you run this program from Small Basic, you’ll see a window like this, running on your desktop:


When you are ready to share this program with the world, you simply hit the “Publish” button and voila the program is deployed to a Silverlight hosted website.  Check it out for yourself here:

Not only can you see your program run on this website, you can also host it on your own website or blog.  Here’s the HTML code to host this little program on your website:

<object id='sbapp' data='data:application/x-silverlight-2,' type='application/x-silverlight-2' width='640' height='480'>
    <param name='source' value=''/>
    <param name='onError' value='onSilverlightError' />
    <param name='background' value='white' />
    <param name='minRuntimeVersion' value='3.0.40624.0' />
    <param name='autoUpgrade' value='true' />
    <param name='initParams' value='programId=HNV340' />

Have fun creating Silverlight apps and games from Small Basic.  And don’t forget to share it with your friends!

Comments (5)

  1. anonymouscommenter says:

    Excellent. It is so fun to see you can create code for desktop and web at the same time. Nice job,

  2. Terayop says:

    Excelente ejemplo, lo tomé y lo modifiqué para entender las líneas y lo publiqué como has dicho aquí y funcionó perfecto

  3. anonymouscommenter says:

    This is soooo awesome!

    Now I can share without my friends having to download and install.

    …now I need to actualy setup a web-site.  lol

    One question, what about Small Basic apps that rely on other files – like say a data file, or graphic files?

  4. anonymouscommenter says:


     I´ve begun with 1.0 release, directly

    Just now I found this combination with SilverLight plattform

    I will learn a little about Silverlight

    I´m teachin ITC at a High School(14/ 15 years old)

    And my own students blog is , where I´m including Small Basic concepts and practise

    thank you very much

  5. anonymouscommenter says:



    [ <param name='initParams' value='programId=HNV340' /> ]

    accept a http URL?

Skip to main content