Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Blitz BASIC
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Programming language of the first Blitz compilers}} {{Use dmy dates|date=January 2016}} {{Infobox software | title = Blitz Basic | name = BlitzBasic <!--space in name needed to match other template names--> | logo = BlitzBasicLogo.gif | logo size = 300px | logo caption = | screenshot = <!-- [[File: ]] --> | caption = | collapsible = | author = | developer = [[Blitz Research]] | released = <!-- {{Start date|YYYY|MM|DD|df=yes/no}} --> | discontinued = Yes | latest release version = | latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} --> | latest preview version = | latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} --> | programming language = Compiled to [[C++]], but the languages are dialects of [[BASIC]] | operating system = [[AmigaOS]]<br />[[Microsoft Windows]] | size = | language = [[English language|English]] | genre = [[Game creation system]] | license = [[zlib License]] | alexa = | website = {{URL|https://blitzresearch.itch.io/}} }} '''Blitz BASIC''' is the [[programming language]] dialect of the first Blitz<ref>The word "[[:de:Blitz|Blitz]]" means "lightning" in German.</ref> compilers, devised by New Zealandβbased developer Mark Sibly. Being derived from [[BASIC]], 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 as [[object-oriented programming|object-orientation]] and [[Thread (computing)#Single-threaded vs multithreaded programs|multithreading]]. This led to the languages losing their BASIC moniker in later years.<ref>{{cite web|url=https://blitzresearch.itch.io/|title=The Official Blitz Website|website=blitzresearch.itch.io/|url-status=live|archive-url=https://web.archive.org/web/20170603205639/http://www.blitzbasic.com/|archive-date=3 June 2017|df=dmy-all}}</ref> ==History== The first iteration of the Blitz language was created for the [[Amiga]] platform and published by the [[Australia]]n firm Memory and Storage Technology. Returning to [[New Zealand]], Blitz BASIC 2 was published several years later (around 1993 according this press release <ref>{{cite web |url=http://www.amigareport.com/ar115/p1-5.html |website=AmigaReport |access-date=30 April 2020 |title=Blitz Basic 2 |archive-date=31 March 2022 |archive-url=https://web.archive.org/web/20220331051337/https://www.amigareport.com/ar115/p1-5.html |url-status=dead }}</ref>) by Acid Software, a local Amiga game publisher. Since then, Blitz compilers have been released on several [[computing platform|platforms]]. 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.<ref>{{Cite web|url=https://github.com/AmiBlitz|title=AmiBlitz|website=[[GitHub]]}}</ref> ===BlitzBasic=== [[Idigicon]] published BlitzBasic for [[Microsoft 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 as ''[[PC Format]]''. This resulted in a legal dispute between the developer and publisher, which was eventually resolved amicably. ===BlitzPlus=== In February 2003, Blitz Research Ltd. released BlitzPlus also for Windows. It lacked the 3D engine of Blitz3D, but did bring new features to the 2D side of the language by implementing limited Windows control support for creating native [[graphical user interface|GUIs]]. Backwards compatibility of the 2D engine was also extended, allowing compiled BlitzPlus games and applications to run on systems that might only have [[DirectX]] 1. ===BlitzMax=== {{Infobox programming language | name = BlitzMax | logo = | paradigm = [[imperative programming|imperative]], [[object-oriented programming|object-oriented]], [[modular programming|modular]], [[reflection (computer programming)|reflective]] | year = 2004 | designer = Mark Sibly | developer = Blitz Research | discontinued = Yes | latest release version = 1.51 | latest release date = {{Start date and age|df=yes|2015|09|21}} | typing = [[Static typing|Static]], [[Weak typing|Weak]], [[Strong typing|Strong]] (optional) | implementations = | dialects = Official BlitzMax, bmx-ng | influenced_by = BlitzBasic | influenced = Monkey | operating_system = [[Windows]], [[Mac OS X]], [[Linux]] }} The first BlitzMax compiler was released in December 2004 for [[Mac OS X]]. This made it the first Blitz dialect that could be compiled on *nix platforms. Compilers for Microsoft Windows and [[Linux]] 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 suit [[OpenGL]]. BlitzMax was also the first of the Blitz languages to represent strings internally using [[UCS-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 first [[modular programming|modular]] 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 BlitzMax [[cross-platform]] [[graphical user interface|GUI]] module (known as MaxGUI) allows developers to write GUI interfaces for their applications on Linux ([[FLTK]]), Mac ([[Cocoa (API)|Cocoa]]) and Windows. Various user-contributed modules extend the use of the language by wrapping such libraries as [[wxWidgets]], [[Cairo (graphics)|Cairo]], and [[Fontconfig]] as well as a selection of database modules. There are also a selection of third-party 3D modules available namely MiniB3D<ref>{{cite web|url=http://www.blitzbasic.com/Community/topics.php?forum=119|title=Blitz News|website=www.blitzbasic.com|access-date=12 December 2007|archive-url=https://web.archive.org/web/20080126114117/http://www.blitzbasic.com/Community/topics.php?forum=119|archive-date=26 January 2008|url-status=dead|df=dmy-all}}</ref> - 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 a [[reflection (computer programming)|reflection]] module.<ref>{{cite web|url=http://www.blitzbasic.com/Community/posts.php?topic=72891#814878|title=BlitzMax update 1.26 now available!|website=www.blitzbasic.com|access-date=11 January 2011|archive-url=https://web.archive.org/web/20110526130312/http://www.blitzbasic.com/Community/posts.php?topic=72891#814878|archive-date=26 May 2011|url-status=dead|df=dmy-all}}</ref> BlitzMax 1.32 shipped new [[thread (computing)|threading]] and [[Lua (programming language)|Lua]] scripting modules and most of the standard library functions have been updated so that they are [[unicode]] friendly.<ref>[http://www.blitzbasic.com/Community/posts.php?topic=83917#947391 BlitzMax V132 for Windows and MacIntel now up!] {{Webarchive|url=https://web.archive.org/web/20110526130325/http://www.blitzbasic.com/Community/posts.php?topic=83917#947391 |date=26 May 2011}} on blitzbasic.com</ref> ===Blitz3D SDK=== Blitz3D SDK is a 3D graphics engine based on the engine in Blitz3D. It was marketed for use with [[C++]], [[C Sharp (programming language)|C#]], BlitzMax, and [[PureBasic]], however it could also be used with other languages that follow compatible calling conventions. ===Max3D module=== In 2008, the source code to Max3D β a C++-based cross-platform 3D engine β was released under a [[BSD 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, namely [[Open Asset Import Library|Assimp]], [[Boost (C++ libraries)|Boost]], and [[Open Dynamics Engine|ODE]]. 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. ===Open-source release=== BlitzPlus was released as [[open-source software|open-source]] on 28 April 2014 under the [[zlib license]] on [[GitHub]].<ref>[http://www.blitzbasic.com/Home/_index_.php BlitzPlus Source Code Released] {{Webarchive|url=https://web.archive.org/web/20160716133612/http://www.blitzbasic.com/Home/_index_.php |date=16 July 2016}} by simonh (2014-04-29)</ref><ref>[http://www.blitzbasic.com/Community/posts.php?topic=102907 Blitz3D open sourced!] {{webarchive|url=https://web.archive.org/web/20160906075242/http://www.blitzbasic.com/Community/posts.php?topic=102907 |date=6 September 2016}} on Blitz3D Forums by (2014)</ref> Blitz3D followed soon after and was released as Open Source on 3 August 2014.<ref>[http://www.blitzbasic.com/Home/_index_.php Blitz3D Now Free and Open Source!] {{Webarchive|url=https://web.archive.org/web/20160716133612/http://www.blitzbasic.com/Home/_index_.php |date=16 July 2016}} by simonh (2014-08-03)</ref><ref>[https://github.com/blitz-research/blitz3d blitz3d] on GitHub</ref> BlitzMax was later released as Open Source on 21 September 2015.<ref>[https://github.com/blitz-research/blitzmax blitzmax] on GitHub</ref> ==Reception== Blitz Basic 2.1 was well received by Amiga magazines. ''CU Amiga'' highlighted its ability to create [[AmigaOS]] compliant applications and games (unlike [[AMOS (programming language)|AMOS Basic]])<ref name="CU Amiga 73">{{cite magazine |last=Bettinson|first=Mat|date=March 1996 |title=Blitz Basic 2.1|magazine=CU Amiga |publisher=EMAP Images|issn=0963-0090|issue=73|pages=69β70}}</ref> and ''Amiga Shopper'' called it a powerful programming language.<ref name="Amiga Shopper 61">{{cite magazine |last=Overaa|first=Paul|date=April 1996 |title=Blitz Basic 2.1|magazine=Amiga Shopper |publisher=Future Publishing|issn=0961-7302|issue=61|page=41}}</ref> ==Examples== A [["Hello, World!" program]] that prints to the screen, waits until a key is pressed, and then terminates: <syntaxhighlight lang="blitzbasic"> Print "Hello, World!" ; Prints to the screen. WaitKey() ; Pauses execution until a key is pressed. End ; Ends Program. </syntaxhighlight>Program that demonstrates the declaration of variables using the three main data types ([[String (computer science)|strings]], [[Integer (computer science)|integers]] and [[Floating-point arithmetic|floats]]) and printing them onto the screen:<syntaxhighlight lang="blitzbasic"> 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. </syntaxhighlight> Program that creates a windowed application that shows the current time in binary and decimal format. See below for the BlitzMax and BlitzBasic versions: <!-- Copy, modify and redistribute these sources with no limit --> {| class="wikitable nowrap" ! BlitzBasic version ! BlitzMax version |-style="vertical-align:bottom" | <syntaxhighlight lang="BlitzBasic"> AppTitle "Binary Clock" Graphics 150,80,16,3 ;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 >= 12 Then PM = 1 If Hour > 12 Then Hour = Hour - 12 If Hour = 0 Then Hour = 12 ;should do this otherwise the PM dot will be ;left up once the clock rolls past midnight! Cls Color(0,255,0) ;make the text green for the PM part If PM = 1 Then Text 5,5,"PM" ;set the text colour back to white for the rest Color(255,255,255) For bit=0 To 5 xpos=20*(6-bit) binaryMask=2^bit ;do hours If (bit<4) If (hour And binaryMask) Text xpos,5,"1" Else Text xpos,5,"0" EndIf EndIf ;do the minutes If (minute And binaryMask) Text xpos,25,"1" Else Text xpos,25,"0" EndIf ;do the seconds If (second And binaryMask) Text xpos,45,"1" Else Text xpos,45,"0" EndIf Next ;make the text red for the decimal time Color(255,0,0) Text 5,65,"Decimal: " + CurrentTime$() ;set the text back to white for the rest Color(255,255,255) ;will wait half a second WaitTimer(secondTimer) Forever </syntaxhighlight> | <syntaxhighlight lang="BlitzMax"> Import BRL.Timer Import BRL.TimerDefault AppTitle = "Binary Clock" Graphics 145,85 'create a timer that means the main loop will be 'executed twice a second Local secondtimer:TTimer = CreateTimer(2) Local Hour:Int Local Minute:Int Local Second:Int Local PM:Int local bit:Int local xpos:Int Local binaryMask:Int Repeat Hour = CurrentTime()[..2].ToInt() Minute = CurrentTime()[4..6].ToInt() Second = CurrentTime()[6..].ToInt() If Hour >= 12 Then PM = 1 If Hour > 12 Then Hour = Hour - 12 If Hour = 0 Then Hour = 12 'should do this otherwise the PM dot will be 'Left up once the clock rolls past midnight! Cls SetColor(0,255,0) 'make the text green For the PM part If PM = 1 Then DrawText "PM",5,5 'set the text colour back To white For the rest SetColor(255,255,255) For bit=0 Until 6 xpos=20*(6-bit) binaryMask=2^bit 'do hours If (bit < 4) If (hour & binaryMask) DrawText "1",xpos,5 Else DrawText "0",xpos,5 EndIf EndIf 'do the minutes If (minute & binaryMask) DrawText "1", xpos,25 Else DrawText "0", xpos,25 EndIf 'do the seconds If (second & binaryMask) DrawText "1",xpos,45 Else DrawText "0",xpos,45 EndIf Next 'make the text red For the decimal time SetColor(255,0,0) DrawText "Decimal: " + CurrentTime(),5,65 'set the text back To white For the rest SetColor(255,255,255) Flip 'will wait half a second WaitTimer(secondTimer) If KeyHit(KEY_ESCAPE) Then Exit Forever </syntaxhighlight> |} ==Software written using BlitzBasic== <!-- Please read [[WP:EL]] and do not add non-notable links here. Spam will be removed and warnings left on user talk pages. --> *''[[Eschalon: Book I]]'' β BlitzMax *''[[Eschalon: Book II]]'' β BlitzMax *''[[Fairway Solitaire]]'' β BlitzMax *''[[GridWars]]'' β BlitzMax *''TVTower (open source clone of MadTV)'' β BlitzMax *''[[Platypus (video game)|Platypus]]'' β Blitz2D (Mac port, BlitzMax) *''[[SCP β Containment Breach]]'' β Blitz3D *''[[Worms (1995 video game)|Worms]]'' β originally titled ''Total Wormage'' and developed in Blitz Basic on the Amiga before its commercial release<ref>IGN. [http://uk.ps2.ign.com/articles/136/136825p1.html Worms Blast Preview] {{Webarchive|url=https://web.archive.org/web/20070218115258/http://uk.ps2.ign.com/articles/136/136825p1.html |date=18 February 2007 }} on ign.com</ref> ==Legacy== In 2011, BRL released a 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 into [[source code]] for a chosen language, framework or platform e.g. Windows, [[Mac OS X]], [[iOS]], Android, [[HTML5]], and [[Adobe 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 2024.<ref>{{Cite web |last=GCRedditor136 |date=2024-12-12 |title=Mark Sibly, creator of BlitzBasic, has died :( |url=https://www.reddit.com/r/amiga/comments/1hciyzy/mark_sibly_creator_of_blitzbasic_has_died/?rdt=64869 |access-date=2025-03-24 |website=r/amiga}}</ref><ref>{{cite news |url=https://www.amiga-news.de/en/news/AN-2024-12-00066-EN.html|title=Mark Sibly (Blitz Basic) passes away|publisher=Amiga-News.de|language=|date= 14 December 2024|access-date=24 March 2025}}</ref> ==References== {{Reflist|30em}} ==External links== *[https://blitzresearch.itch.io/ Blitz Research subsite] on [[itch.io]] (BlitzPlus, Blitz 3D, Monkey X, Monkey 2) **[https://blitzresearch.itch.io/monkeyx Monkey X subsite] (open source) **[https://blitzresearch.itch.io/monkey2 Monkey 2 subsite] *[https://github.com/blitz-research blitz-research (Mark Sibly)] on [[GitHub]] (BlitzPlus, BlitzMax, Blitz3D, Monkey, BlitzMax, Blitz3D for MSVC-CE 2017) *[https://web.archive.org/web/20170603205639/http://www.blitzbasic.com/ Blitz Research website] (archived 3 June 2017) *[https://web.archive.org/web/20170715134814/http://monkey-x.com/ Monkey X website] (archived 15 July 2017) {{BASIC}} [[Category:Amiga development software]] [[Category:Articles with example BASIC code]] [[Category:BASIC compilers]] [[Category:BASIC programming language family]] [[Category:Formerly proprietary software]] [[Category:Free game engines]] [[Category:Object-oriented programming languages]] [[Category:Software using the zlib license]] [[Category:Video game development software]] [[Category:Video game IDE]] [[Category:Video games developed in New Zealand]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:BASIC
(
edit
)
Template:Cite magazine
(
edit
)
Template:Cite news
(
edit
)
Template:Cite web
(
edit
)
Template:Infobox programming language
(
edit
)
Template:Infobox software
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Use dmy dates
(
edit
)
Template:Webarchive
(
edit
)