Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Blitz BASIC

From Wikipedia, the free encyclopedia
(Redirected fromBlitzMax)
Programming language of the first Blitz compilers

BlitzBasic
Developer(s)Blitz Research
Written inCompiled toC++, but the languages are dialects ofBASIC
Operating systemAmigaOS
Microsoft Windows
Available inEnglish
TypeGame creation system
Licensezlib License
Websiteblitzresearch.itch.io

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]

History

[edit]

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]

BlitzBasic

[edit]

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.

BlitzPlus

[edit]

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.

BlitzMax

[edit]
BlitzMax
Paradigmimperative,object-oriented,modular,reflective
Designed byMark Sibly
DeveloperBlitz Research Ltd.
First appeared2004
Final release
1.51 / 21 September 2015; 9 years ago (2015-09-21)
Typing disciplineStatic,Weak,Strong (optional)
OSMicrosoft Windows,Mac OS X,Linux
Websitewww.blitzbasic.com
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

[edit]

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.

Max3D module

[edit]

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.

Open-source release

[edit]

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]

Reception

[edit]

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]

Examples

[edit]

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 versionBlitzMax 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

Software written using BlitzBasic

[edit]

Legacy

[edit]

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]

References

[edit]
  1. ^The word "Blitz" means "lightning" in German.
  2. ^"The Official Blitz Website".blitzresearch.itch.io/.Archived from the original on 3 June 2017.
  3. ^"Blitz Basic 2".AmigaReport. Archived fromthe original on 31 March 2022. Retrieved30 April 2020.
  4. ^"AmiBlitz".GitHub.
  5. ^"Blitz News".www.blitzbasic.com. Archived fromthe original on 26 January 2008. Retrieved12 December 2007.
  6. ^"BlitzMax update 1.26 now available!".www.blitzbasic.com. Archived fromthe original on 26 May 2011. Retrieved11 January 2011.
  7. ^BlitzMax V132 for Windows and MacIntel now up!Archived 26 May 2011 at theWayback Machine on blitzbasic.com
  8. ^BlitzPlus Source Code ReleasedArchived 16 July 2016 at theWayback Machine by simonh (2014-04-29)
  9. ^Blitz3D open sourced!Archived 6 September 2016 at theWayback Machine on Blitz3D Forums by (2014)
  10. ^Blitz3D Now Free and Open Source!Archived 16 July 2016 at theWayback Machine by simonh (2014-08-03)
  11. ^blitz3d on GitHub
  12. ^blitzmax on GitHub
  13. ^Bettinson, Mat (March 1996). "Blitz Basic 2.1".CU Amiga. No. 73. EMAP Images. pp. 69–70.ISSN 0963-0090.
  14. ^Overaa, Paul (April 1996). "Blitz Basic 2.1".Amiga Shopper. No. 61. Future Publishing. p. 41.ISSN 0961-7302.
  15. ^IGN.Worms Blast PreviewArchived 18 February 2007 at theWayback Machine on ign.com
  16. ^GCRedditor136 (12 December 2024)."Mark Sibly, creator of BlitzBasic, has died :(".r/amiga. Retrieved24 March 2025.{{cite web}}: CS1 maint: numeric names: authors list (link)
  17. ^"Mark Sibly (Blitz Basic) passes away". Amiga-News.de. 14 December 2024. Retrieved24 March 2025.

External links

[edit]
Dialects of theBASIC programming language (list)
Classic
Microsoft
Texas Instruments
Hewlett-Packard
Locomotive Software
Microcomputers
Minicomputers
Time-sharing computers
Other
Extenders
Procedure-
oriented
Proprietary
Free and
open source
Withobject
extensions
Proprietary
Free and
open source
RAD
designers
Proprietary
Free and
open source
Defunct
Retrieved from "https://en.wikipedia.org/w/index.php?title=Blitz_BASIC&oldid=1282084368#BlitzMax"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp