![]() | |
Developer(s) | Blitz Research |
---|---|
Written in | Compiled toC++, but the languages are dialects ofBASIC |
Operating system | AmigaOS Microsoft Windows |
Available in | English |
Type | Game creation system |
License | zlib License |
Website | blitzresearch |
Blitz BASIC is theprogramming language dialect of the first Blitz[1] compilers, devised by New Zealand–based developer Mark Sibly. Being derived fromBASIC, Blitz syntax was designed to be easy to pick up for beginners first learning to program. The languages are game-programming oriented, but are often found general-purpose enough to be used for most types of application. The Blitz language evolved as new products were released, with recent incarnations offering support for more advanced programming techniques such asobject-orientation andmultithreading. This led to the languages losing their BASIC moniker in later years.[2]
The first iteration of the Blitz language was created for theAmiga platform and published by theAustralian firm Memory and Storage Technology. Returning toNew Zealand, Blitz BASIC 2 was published several years later (around 1993 according this press release[3]) by Acid Software, a local Amiga game publisher. Since then, Blitz compilers have been released on severalplatforms. Following the demise of the Amiga as a commercially viable platform, the Blitz BASIC 2 source code was released to the Amiga community. Development continues to this day under the name AmiBlitz.[4]
Idigicon published BlitzBasic forMicrosoft Windows in October 2000. The language included a built-in API for performing basic 2D graphics and audio operations. Following the release of Blitz3D, BlitzBasic is often synonymously referred to as Blitz2D.
Recognition of BlitzBasic increased when a limited range of "free" versions were distributed in popular UK computer magazines such asPC Format. This resulted in a legal dispute between the developer and publisher, which was eventually resolved amicably.
In February 2003, Blitz Research Ltd. released BlitzPlus also for Microsoft Windows. It lacked the 3D engine of Blitz3D, but did bring new features to the 2D side of the language by implementing limited Microsoft Windows control support for creating nativeGUIs. Backwards compatibility of the 2D engine was also extended, allowing compiled BlitzPlus games and applications to run on systems that might only haveDirectX 1.
Paradigm | imperative,object-oriented,modular,reflective |
---|---|
Designed by | Mark Sibly |
Developer | Blitz Research Ltd. |
First appeared | 2004 |
Final release | 1.51 / 21 September 2015; 9 years ago (2015-09-21) |
Typing discipline | Static,Weak,Strong (optional) |
OS | Microsoft Windows,Mac OS X,Linux |
Website | www |
Dialects | |
Official BlitzMax, bmx-ng | |
Influenced by | |
BlitzBasic | |
Influenced | |
Monkey |
The first BlitzMax compiler was released in December 2004 forMac OS X. This made it the first Blitz dialect that could be compiled on *nix platforms. Compilers for Microsoft Windows andLinux were subsequently released in May 2005. BlitzMax brought the largest change of language structure to the modern range of Blitz products by extending the type system to include object-oriented concepts and modifying the graphics API to better suitOpenGL. BlitzMax was also the first of the Blitz languages to represent strings internally usingUCS-2, allowing native-support for string literals composed of non-ASCII characters.
BlitzMax's platform-agnostic command-set allows developers to compile and run source code on multiple platforms. However the official compiler and build chain will only generate binaries for the platform that it is executing on. Unofficially, users have been able to get Linux and Mac OS X to cross-compile to the Windows platform.
BlitzMax is also the firstmodular version of the Blitz languages, improving the extensibility of the command-set. In addition, all of the standard modules shipped with the compiler are open-source and so can be tweaked and recompiled by the programmer if necessary. The official BlitzMaxcross-platformGUI module (known as MaxGUI) allows 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 aswxWidgets,Cairo, andFontconfig as well as a selection of database modules. There are also a selection of third-party 3D modules available namely MiniB3D[5] - an open-source OpenGL engine which can be compiled and used on all three of BlitzMax's supported platforms.
In October 2007, BlitzMax 1.26 was released which included the addition of areflection module.[6] BlitzMax 1.32 shipped newthreading andLua scripting modules and most of the standard library functions have been updated so that they areunicode friendly.[7]
Blitz3D SDK is a 3D graphics engine based on the engine in Blitz3D. It was marketed for use withC++,C#, BlitzMax, andPureBasic, however it could also be used with other languages that follow compatible calling conventions.
In 2008, the source code to Max3D – a C++-based cross-platform 3D engine – was released under aBSD license. This engine focused on OpenGL but had an abstract backend for other graphics drivers (such as DirectX) and made use of several open-source libraries, namelyAssimp,Boost, andODE.
Despite the excitement in the Blitz community of Max3D being the eagerly awaited successor to Blitz3D, interest and support died off soon after the source code was released and eventually development came to a halt. There is no indication that Blitz Research will pick up the project again.
BlitzPlus was released asopen-source on 28 April 2014 under thezlib license onGitHub.[8][9] Blitz3D followed soon after and was released as Open Source on 3 August 2014.[10][11] BlitzMax was later released as Open Source on 21 September 2015.[12]
Blitz Basic 2.1 was well received by Amiga magazines.CU Amiga highlighted its ability to createAmigaOS compliant applications and games (unlikeAMOS Basic)[13] andAmiga Shopper called it a powerful programming language.[14]
A"Hello, World!" program that prints to the screen, waits until a key is pressed, and then terminates:
Print"Hello, World!"; Prints to the screen.WaitKey(); Pauses execution until a key is pressed.End; Ends Program.
Program that demonstrates the declaration of variables using the three main data types (strings,integers andfloats) and printing them onto the screen:
name$="John"; Create a string variable ($)age=36; Create an integer variable (No Suffix)temperature#=27.3; Create a float variable (#)print"My name is "+name$+" and I am "+age+" years old."print"Today, the temperature is "+temperature#+" degrees."Waitkey(); Pauses execution until a key is pressed.End; Ends program.
Program that creates a windowed application that shows the current time in binary and decimal format. See below for the BlitzMax and BlitzBasic versions:
BlitzBasic version | BlitzMax version |
---|---|
AppTitle"Binary Clock"Graphics150,80,16,3;create a timer that means the main loop will be;executed twice a secondsecondtimer=CreateTimer(2)RepeatHour=Left(CurrentTime$(),2)Minute=Mid(CurrentTime$(),4,2)Second=Right(CurrentTime$(),2)IfHour>=12ThenPM=1IfHour>12ThenHour=Hour-12IfHour=0ThenHour=12;should do this otherwise the PM dot will be;left up once the clock rolls past midnight!ClsColor(0,255,0);make the text green for the PM partIfPM=1ThenText5,5,"PM";set the text colour back to white for the restColor(255,255,255)Forbit=0To5xpos=20*(6-bit)binaryMask=2^bit;do hoursIf(bit<4)If(hourAndbinaryMask)Textxpos,5,"1"ElseTextxpos,5,"0"EndIfEndIf;do the minutesIf(minuteAndbinaryMask)Textxpos,25,"1"ElseTextxpos,25,"0"EndIf;do the secondsIf(secondAndbinaryMask)Textxpos,45,"1"ElseTextxpos,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 | ImportBRL.TimerImportBRL.TimerDefaultAppTitle="Binary Clock"Graphics145,85'create a timer that means the main loop will be'executed twice a secondLocalsecondtimer:TTimer=CreateTimer(2)LocalHour:IntLocalMinute:IntLocalSecond:IntLocalPM:Intlocalbit:Intlocalxpos:IntLocalbinaryMask:IntRepeatHour=CurrentTime()[..2].ToInt()Minute=CurrentTime()[4..6].ToInt()Second=CurrentTime()[6..].ToInt()IfHour>=12ThenPM=1IfHour>12ThenHour=Hour-12IfHour=0ThenHour=12'should do this otherwise the PM dot will be'Left up once the clock rolls past midnight!ClsSetColor(0,255,0)'make the text green For the PM partIfPM=1ThenDrawText"PM",5,5'set the text colour back To white For the restSetColor(255,255,255)Forbit=0Until6xpos=20*(6-bit)binaryMask=2^bit'do hoursIf(bit<4)If(hour&binaryMask)DrawText"1",xpos,5ElseDrawText"0",xpos,5EndIfEndIf'do the minutesIf(minute&binaryMask)DrawText"1",xpos,25ElseDrawText"0",xpos,25EndIf'do the secondsIf(second&binaryMask)DrawText"1",xpos,45ElseDrawText"0",xpos,45EndIfNext'make the text red For the decimal timeSetColor(255,0,0)DrawText"Decimal: "+CurrentTime(),5,65'set the text back To white For the restSetColor(255,255,255)Flip'will wait half a secondWaitTimer(secondTimer)IfKeyHit(KEY_ESCAPE)ThenExitForever |
In 2011, BRL released a new cross-platform programming language called Monkey and its first official module called Mojo. Monkey has a similar syntax to BlitzMax, but instead of compiling direct to assembly code, it translates Monkey source files directly intosource code for a chosen language, framework or platform e.g. Windows,Mac OS X,iOS, Android,HTML5, andAdobe Flash.
Since 2015 development of Monkey X has been halted in favour of Monkey 2, an updated version of the language by Mark Sibly.
The developer of Blitz BASIC, Mark Sibly, passed away in early December of 2024.[16][17]
{{cite web}}
: CS1 maint: numeric names: authors list (link)