Blitz BASIC

From Seo Wiki - Search Engine Optimization and Programming Languages

Blitz BASIC is a commercial compiler for the BASIC programming language. Originally developed on the Amiga, Blitz BASIC compilers are now available on several platforms. The Blitz products are mainly designed for programming games but also feature support for graphical user interfaces and general applications.
The term Blitz BASIC is often used to refer to the general syntax used in the entire range of Blitz languages, as well as the original product that started them.

History

The first Blitz designed by Mark Sibly was for the Amiga computer and published by the Australian company Memory and Storage Technology.

After returning to New Zealand, Blitz2 was published several years later by Acid Software (a local 90's Amiga game publisher).

Blitz Basic

Otherwise known as Blitz2D, Blitz Basic was released in October 2000 for Microsoft Windows and allowed only 2D graphics. It was published by Idigicon.

Recognition of Blitz Basic increased when a limited range of "free" versions were distributed on popular UK computer magazines such as PC Format. This resulted in a legal dispute between the developer and publisher which was eventually amicably resolved.

Blitz3D

Blitz3D was then released later in September 2001 and was also for Microsoft Windows. It was distributed at first by Idigicon. Blitz3D is Blitz Basic with a built in 3D engine and command list allowing the creation of 3D games for the first time in the Blitz range of languages. It kept all of Blitz BASIC's older commands and incorporated an entirely new set for the movement and rendering of three-dimensional objects. It used DirectX7 to create 3D, and competes with other similar PC game-development languages such as Dark Basic.

Blitz Research Limited later signed a deal with Idigicon giving them full rights to distribute Blitz Basic, to clear their stock of copies of Blitz 3D, and to now allow Blitz Research Limited to distribute Blitz3D themselves.

BlitzPlus

In February 2003 Blitz Research Limited released BlitzPlus, also for Microsoft Windows. It does not have the 3D engine of Blitz3D, but does bring new features to the 2D side of the language by implementing limited Microsoft Windows form/widget functionality. Compatibility of the 2D engine as far back as DirectX 1 was also added.

The latest in the range of Blitz languages is BlitzMax which, unlike previous Blitz products, is designed to run on multiple operating systems. It was released for Mac OS X first, in December 2004, and then for Microsoft Windows and Linux in May 2005. BlitzMax brought the largest change of language structure to the modern range of Blitz products by adding object-oriented concepts and switching the graphics layer to favour OpenGL.

BlitzMax is also the first modular version of the language, allowing modules/plugins to be written for the language itself. This opened up new possibilities for programmers to configure the language, as well as to purchase additional components from Blitz Research Limited. For instance, the official BlitzMax cross-platformGUI module (known as MaxGUI) was released by Blitz Research Limited, allowing developers to write GUI interfaces for their applications on Linux (FLTK), Mac (Cocoa), and Windows. Various user-contributed modules extend the use of the language by wrapping such libraries as wxWidgets, Cairo, FontConfig as well as a selection of database modules. In addition, there are many third-party 3D modules available for BlitzMax, including MiniB3D[2] - an open-source OpenGL engine which can be compiled and used on all 3 of BlitzMax's supported platforms.

In October 2007, BlitzMax update v1.26 included the addition of a reflection module [1], which further increased the flexibility of the language. As of BlitzMax update v1.32, BlitzMax ships with new threading and Lua Scripting modules and most of the standard library functions have been updated so that they are unicode friendly [2].

Programs written in BlitzMax require compilation on the target platform since BlitzMax is multi-platform but not entirely cross-platform. Compilation for each target CPU (Mac PPC, Mac x86, Linux x86, Windows x86) requires a hardware computer based on that CPU upon which the BlitzMax compiler is run. This allows the creation of an executable binary for that platform. To compile for more than one platform requires the compiler to be run on that platform, and thus requires as many target computer platforms as systems on which sourcecode is to be deployed. However, BlitzMax as a language itself requires very little modification in order to be fully cross-platform compatible and in many cases requires just a recompilation, making cross-platform development quick and easy.

Blitz3D SDK

The latest product from Blitz Research Limited, a 3D graphics engine based on the engine in Blitz3D. It is designed to be used with C++, C#, BlitzMax and PureBasic, however it can be used with other languages.

Max3D module

Blitz Research is currently working on a next-generation 3D engine which will feature an easy-to-use command API similar to but more advanced than that of Blitz3D. The module will be designed to provide a cross-platform 3D graphics API, bringing official 3D support to Mac and Linux. The module is rumored to be initially based on OpenGL with possibly later support for DirectX on Windows. It is also said to be similar to the Blitz3D SDK in that initially it will provide an interface for the BlitzMax language and later provide access from other languages such as C or a derivative thereof.

Sample code

The following code creates a windowed application that shows the current time in binary and decimal format. This code is written in Blitz Basic, but will compile and run in both Blitz3D and BlitzPlus. See below for the same example written in BlitzMax.

AppTitle"Binary Clock"Graphics150,80,16,3;Copy, modify and redistribute this source as much as you like;#####################################################; MAIN LOOP;#####################################################;create a timer that means the main loop will be ;executed twice a second
secondtimer=CreateTimer(2)Repeat
Hour = Left(CurrentTime$(),2)
Minute = Mid(CurrentTime$(),4,2)
Second = Right(CurrentTime$(),2)If Hour >= 12Then PM = 1If Hour > 12Then Hour = Hour - 12If Hour = 0Then Hour = 12;should do this otherwise your PM dot would be ;left up once the clock rolled past midnight!ClsColor(0,255,0);make the text green for the PM partIf PM = 1ThenText5,5,"PM";set the text colour back to white for the restColor(255,255,255)For bit=0To5
xpos=20*(6-bit)
binaryMask=2^bit
;do hoursIf(bit<4)If(hour And binaryMask)Text xpos,5,"1"ElseText xpos,5,"0"EndIfEndIf;do the minutesIf(minute And binaryMask)Text xpos,25,"1"ElseText xpos,25,"0"EndIf;do the secondsIf(second And binaryMask)Text xpos,45,"1"ElseText xpos,45,"0"EndIfNext;make the text red for the decimal timeColor(255,0,0)Text5,65,"Decimal: " + CurrentTime$();set the text back to white for the restColor(255,255,255);will wait half a secondWaitTimer(secondTimer)Forever