Welcome to MSDN Blogs Sign in | Join | Help

About 20 years ago, Microsoft released MS-DOS 5, and with it shipped a programming language called QBASIC.  One of the samples that came with QBASIC is GORILLAS.BAS.  The game used real-world Physics to make players hit each other with... wait for it... bananas.  Come on, what did you expect from a game where the players are gorillas.

Fast forward to now.  Rushworks has successfully captured the nostalgia with Gorillas for Small Basic.  You can download and play the game by using the ID: NLQ667-2.  The program listing is also available at: http://smallbasic.com/program/?NLQ667-2 


Check out this forum thread for more discussion on this game.

The Russian localized version of Small Basic went live today, as v0.5.1.  No other change has been made and all the remaining functionality is the same as v0.5 (including English, French and Spanish).  So, if you want Russian, go ahead and download Small Basic from the same location (http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx).  As always, please refresh your browser, and clean up the cache if need be to get the new version. 

If you're running English version of the Operating System, you can run:

    %programfiles%\microsoft\small basic\sb.exe /l:ru-ru

to launch the Russian localized version.

Have an English Operating System, but want to run the Spanish version of Small Basic?  Yes, you can do that with your current installation - and you don't even have to install anything extra. 

In your Start Menu (or in your Run prompt), type

  %programfiles%\microsoft\small basic\sb.exe /l:es-es

and hit Enter. This will launch the Spanish version of Small Basic. 

  %programfiles%\microsoft\small basic\sb.exe /l:fr-fr

will launch the French version of Small Basic.

As of v0.5, we support only those two languages, but expect more languages support soon.

Color Picker by Suduadib is an example that shows the usage of arrays in Small Basic.  You can import this program using the id: SGS247.

Program listing is available at: http://program.smallbasic.com/?SGS247

The Small Basic API reference is now available at: http://doc.smallbasic.com/.  With v0.5, you can view the API reference in your choice of English, Spanish or French.

 

With version 0.5, Small Basic implements native support for arrays. This is a significant change from how arrays were used in v0.4 and so I want to write about the syntax and the functionality of the new arrays.

Any variable can be used as an array – no special declaration or setup is necessary. Arrays are indexed using square brackets.

numbers[1] = "One"
numbers[2] = "Two"
TextWindow.WriteLine(numbers[1])
TextWindow.WriteLine(numbers[2])

Arrays can be indexed with either numbers or text. And you can use different types of indexers in the same array.

myarray["one"] = 1
myarray[2300] = "Two thousand three hundred"
myarray["name"] = "Vijaye"

Arrays can be copied over via simple assignment. Modifying one array doesn’t affect the other array.

first[1] = "Uno"
first[2] = "Dos"
second = first
TextWindow.WriteLine(second[2]) ' prints Dos
second[1] = "One"
TextWindow.WriteLine(second[1]) ' prints One
TextWindow.WriteLine(first[1]) ' prints Uno

The values in an array are internally maintained as a string with semicolon separated values:

person["Name"] = "Vijaye"
person["Age"] = 30
person["Address"] = "Redmond"
TextWindow.WriteLine(person)

This prints:

Name=Vijaye;Age=30;Address=Redmond;

You can remove elements in an array by setting them to an empty text.

myarray[1] = "One"
myarray[2] = "Two"
myarray[3] = "Three"
TextWindow.WriteLine(Array.GetItemCount(myarray)) ' prints 3
myarray[2] = ""
TextWindow.WriteLine(Array.GetItemCount(myarray)) ' prints 2

And finally, arrays can be multi-dimensional too

people[1]["Name"]["First"] = "Vijaye"
people[1]["Name"]["Last"] = "Raji"
people[2]["Name"]["First"] = "Carl"
people[2]["Name"]["Last"] = "Fredrickson"
TextWindow.WriteLine(people[2]["Name"])

This prints:

First=Carl;Last=Fredrickson;

Theoretically, you can have as many dimensions as you want. However, the way they are implemented internally, a two dimensional array is 2 times slower than a single dimension array, and a three dimensional array is 4 times slower than a single dimensional array and so on. So, I’d recommend not overdoing multidimensional arrays.

 

You can now download the Spanish version of "Introduction to programming" guide from: http://download.microsoft.com/download/C/E/6/CE66B602-19F7-4FA6-A4D2-E06F8382A7B9/Introduccion a Small Basic.pdf

Diviértete.

Read more about it: http://blogs.msdn.com/smallbasic/archive/2009/06/16/the-newest-leanest-and-the-meanest-is-here.aspx

Download: http://download.microsoft.com/download/C/A/F/CAF9E062-94D3-4003-80D9-44CDF7EC7BD9/SmallBasic.msi

 

The next installment of the Small Basic Community Previews is now available for download.  Version v0.5 can be downloaded at:  http://download.microsoft.com/download/C/A/F/CAF9E062-94D3-4003-80D9-44CDF7EC7BD9/SmallBasic.msi

This version adds more of the community requested features and bug-fixes, the full list of it is below:

  • Arrays:

    Small Basic now has native support for arrays.  Array keys are not limited to numbers, and the arrays themselves can be multidimensional.  An example is:

people[1]["Name"]["First"] = "Carl"
people[1]["Name"]["Last"] = "Fredrickson"
people[1]["Age"] = 78

  • Uninitialized Variables:

    The Compiler now catches and reports as error, any variable that isn't initialized but is being used in the program.  This makes it much easier to catch misspelt variables.


  • Spanish localization:

    The UI and the API reference have been translated to Spanish, and is now available alongside English and French.  The Guide will follow in a couple days.

  • Environment Features:

    * Find feature: Ctrl+F brings up the new Find dialog, F3 finds the next match
    * Line and column indicator: At the bottom right of the editor is a line and column indicator
    * Save As command + toolbar button
    * Format Program command: Available from the context menu in the editor, this command reformats the entire program with the right indentation.
    * Mouse click and scroll support for Intellisense list box


  • Under the hood:

    * A new attribute "HideFromIntellisense" which hides deprecated operations and properties from the Intellisense list


  • Others:

    * Tons of bug fixes
    * Smaller footprint (installer is now just 3.7MB)
    * Setup now auto-detects presence of .Net framework 3.5 SP1

 

Following the success of Asteroids v1, the community members have made interesting tweaks and improvements to the game, resulting in Asteroids v2.  This version is available for import from your Small Basic IDE with id, ASTEROIDS.

You can see the source code here: http://smallbasic.com/program/?ASTEROIDS

 

This week's sample is Asteroids, written by Jason Jacques.  It's a really fun game with tons of parameters to tweak.  You can download the program directly into Small Basic using the id QFL408.  The source code listing is also available at: http://smallbasic.com/program/?QFL408

Honestly, it never ceases to amaze what cool apps everyone's building on top of Small Basic.  Check out this thread for more inspiration: http://social.msdn.microsoft.com/Forums/en-US/smallbasic/thread/eaacf826-9d12-4e3c-aa10-1b2788f160a6

The French version of "Introducing Small Basic" document is now available for download.  Go get it here: http://www.microsoft.com/downloads/details.aspx?displaylang=fr&FamilyID=61481b74-eb45-42b8-a777-8f3644406787.

Here's a complete list of what's changed in v0.4.  As usual, the fixes and features are based on what the community has requested using the forums.  So, if you would like to see something, feel free to drop a note at: http://social.msdn.microsoft.com/Forums/en-US/smallbasic/threads.

Bug Fixes:

  • Calling GraphicsWindow.Hide() will keep the window hidden until Show() is called.
  • Fixed GetColorFromRGB to properly return White if supplied with 255,255,255.
  • Sound.Play will rewind automatically at the end of playback
  • Text indexes are all now 1-based
  • Fixed crashes in Flickr object and Text object.
  • Clock.WeekDay is now localized

New Features:

  • A Timer object with a Tick event - very useful for building games
  • Clock object now has Milliseconds
  • Text object now has GetIndexOf method
  • Selection highlight marking - you can now easily find your variables.

Localization:

  • French

Here it is, finally, the next installment of Small Basic CTP.  Once again, the new v0.4 version comes with a lot of bug fixes, and a new "Timer" object that makes writing games easier.  What really excites me with this release is that Small Basic is completely localizable, and as a start, we've localized the UI and the Library Help in French!

Go check it out: http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx

The localization was a community driven effort.  Sandra Aldana and Dioni de Morena Morales have been the main co-ordinators behind the effort and I'd like to thank them for all their efforts.  In addition, the French translation was provided by Thierry Huguet (Microsoft) and Fabien Lavocat (Microsoft Intern).  Many thanks to them too!

The localized documentation will be released out of band as and when they arrive.  If you want to participate in the localization efforts, please feel free to contact me.

This week's sample is a "Lights Out" style game, developed by DanAwesome.  The game can be imported using the Program id: VDK353.

The source code listing is also available at: http://smallbasic.com/program/?VDK353

Here's a screenshot of the game:

More Posts Next page »
 
Page view tracker