Announcing Small Basic v0_2!

As promised, we have a new release of Small Basic!  This version contains all the most requested features by the user community.  Thanks everyone for the great suggestions and for making Small Basic better and better!  Please keep the feedback flowing.  We’re listening. For those that are new, Microsoft Small Basic is a project that aims at…

8

Snake in Small Basic

This week’s featured sample is the arcade classic Snake!  And it comes from PlayDeez, who has also written other interesting Small Basic games (check out the Small Basic forums for more such hotness.) Here’s the screenshot, followed by the source listing.  Initialize() While (GameState <> “”) DoGameLoop() EndWhile Program.End() Sub Initialize InitializeVariables() InitializeScreen() EndSub Sub…

14

Code Gallery for Small Basic

I’ve just created a code gallery page for Small Basic (now with a Wiki).  Check it out: http://code.msdn.microsoft.com/smallbasic. In addition to a new link to Small Basic API reference, you can also find information about the upcoming release there.

7

Sample of the Week, II

This week’s featured sample comes from Jeff Sidlosky. It is a star field simulation – you know the one where it appears like you’re moving fast through space, with stars whizzing past you. ‘ Star-field simulation Initialize() Main() Sub Initialize GraphicsWindow.Title = “Super Star Field!” GraphicsWindow.Width = 640 GraphicsWindow.Height = 480 GraphicsWindow.BackgroundColor = “black” GraphicsWindow.PenWidth…

5

Small Basic and the "Goto" keyword

For the past 40 years, there have been on-going debates in the programming world about the utility and usage of the keyword, Goto.  While it’s been generally accepted that uncontrolled (no pun here) usage of Goto leads to unmanageable and spaghetti code, many, including Donald Knuth, believe that Goto is essential and when used with…

9

Using Command Line Arguments

The Arguments object in the standard library allows you to work with Command Line Arguments from inside a Small Basic program.  The Arguments object includes a Count property that gives the total number of arguments passed to the program, and a GetArgument(index) operation that allows you to access each of these arguments using their index….

2

Sample of the Week

This week’s featured sample of the week comes from mcleod_ideafix.  This is a fun little point and shoot game, involving the Turtle in a clever way. ‘Point-and-shoot ‘(C)1989 McLeod/IdeaFix. http://www.zxprojects.com ‘Target size TargetSize=30 winner=0 wanttoplay=1 ‘A vector-screen style window GraphicsWindow.BackgroundColor=”Black” GraphicsWindow.PenColor=”Green” GraphicsWindow.Clear() Game() Sub Game While (wanttoplay=1) GetRnd() DrawTarget() Turtle.PenUp() ‘Game loop While (winner=0) Shoot() EndWhile…

4

Extending Small Basic

The Small Basic compiler is designed to allow external libraries to be plugged in that enable it to be extended in interesting ways.  These libraries can be built using any .Net based language and compiled to a .Net assembly.  There are a few rules that the Small Basic compiler expects for a type to be…

22

Hello World

Welcome to Small Basic Blogs!  After being in part-time development for nearly a year, Small Basic is finally out, and I’m excited to see where this will go from here! History It all happened in August of last year when someone sent me a pointer to the article Why Johnny Can’t Code and it got me…

49