Tetris – Sample of the Week

Sample of this week is Small Basic Tetris, ported by Kenneth Kasajian.  In all, the program is just about 530 lines long, and is listed after the screenshot.   GraphicsWindow.KeyDown = HandleKey GraphicsWindow.BackgroundColor = GraphicsWindow.GetColorFromRGB( 253, 252, 251 ) While “True” BOXES = 4 ‘ number of boxes per piece BWIDTH = 25 ‘ box…


Small Basic communities in Russian, Portuguese and Turkish

Community members around the world have put together blogs and forums in various languages.  It’s great to see all the energy and enthusiasm around Small Basic.  Here’s a list of links in languages other than English:  Russian: http://www.smallbasic.ru/Forums: http://forum.smallbasic.ru/ Blog: http://habrahabr.ru/blogs/smallbasic/ Portuguese:Blog: http://smallbasicdicas.blogspot.com/API reference: http://www.smallbasic.com/wiki/documentacao-Api-portugues-br.ashx Turkish:Blog: http://tr.e-uzman.org/category/yazilim/small-basic If you know of more resources on the web for…


Announcing Small Basic v0.2, again!

Some technical issues with the previous announcement – the blog ended up not showing on RSS feeds, etc.  So, here’s another announcement!  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…


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…


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…


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.


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…


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…


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….


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…