Blitz Basic 2.1 is the new version of the very popular programming language from New Zealand team, Acid Software. Acid have also written Super Skidmarks and Doom-clone Gloom, which was actually partly written in Blitz, so now we know why it's called "Blitz" Basic.



Many people have moved from the famous Amos to Blitz including me, and speaking from experience it's easy to see why. The one major feature of Blitz, for me at least, was the ability to program for the Amiga environment and not purely the Amos environment. After spending hours calling Dos and Exec libraries through Amos by painstakingly going through hardware manuals, it was a joy to open a screen in Blitz with one line, and pretty soon open a window and attach some Gadtools buttons.
While Blitz is definitely the superior language, this flexibility - as with any kind of flexibility - makes Blitz tougher to learn, and I wouldn't recommend it to any first time programmers. For example, on running an Amos program the default screen will open for you automatically, but in Blitz nothing will happen until you open your own screen or use Workbench, and a fairly detailed knowledge of Amiga screen-modes and bitplanes is a real help. This makes it much more flexible, but trickier to pick up.
One thing that Blitz could benefit from however, is Amos' memory banks, where sprites, sounds and binary information could be stored in "memory banks". This is very handy for keeping pictures and sounds that you don't want people messing with safely stored in the program's code, and Blitz misses this great feature, although there is a third party library with this new version that provides some of these features. Another thing very useful in Amos and QBasic is the Direct Mode, where you can enter commands without interfering with your program. This feature is missing in Blitz, but is probably because it is a compiled language and not an interpreted one, like Amos and QBasic.
On the subject of compiling your programs, this is one thing that Blitz makes remarkably easy - simply select "Create Executable" from the menu - it's as easy as running the program. No messing about with the Amos Compiler, and I've yet to see a compiler designed specifically for QBasic.

Here's some screenshots from my personal Blitz setup - notice the highlighted keywords and the list of labels on the right, very handy for navigating, although there's have no scrollbar if you have millions of labels.


Games programming is what Blitz is probably most famous for, a reputation well deserved - you only have to take a look at Gloom and Worms. That's right - to anyone who doesn't know, Worms was originally written on the Amiga in Blitz.
Of course it all depends on your computer, but Blitz is definitely fast, great for any intensive doom-clones. The best news for games programmers is probably full AGA support - you're no longer stuck with 32 colours even though you can show 256. This is dealt with in the new Display Library, which gives easy access to advanced modes such as 16 colour dual-playfields, super-hires sprites and the very useful AGA fetchmodes, which can make a huge difference to the speed of your programs.
As stated before, all this power comes at a price - you can't simply say "Open a 64 colour screen with hires sprites", and rather have to initialise a copperlist, a palette, and finally a separate command to display it, but then this is what flexibility is all about.


One of the best features of Blitz is the ability to program for Workbench - it's practically the reason why I got it in the first place. Programming for Intuition is actually quite easier than programming a game that disables the operating system, as the Amiga's OS is supposed to take care of opening screens, windows, gadgets, etc.
Full support for Gadtools, the Amiga standard gadget library, is included with Blitz 2.1, and this, combined with the Amiga's excellent operating system, means that Intuition programming is a cinch - all you have to worry about is your program, not resizing of windows and menus. An MUI developer's package for Blitz recently apperared on Aminet, which will let you use the excellent Magic User Interface for your programs. If done properly, this should prove very popular, as MUI provides really professional interfaces, and is quickly becoming installed on every machine. Something to watch out for, then.


As with any good language, BLitz comes supplied with quite a powerful debugger, and Blitz 2.1 comes with a brand new one, with features to examine Blitz "objects" such as windows and buttons, as well as variables and the ability to run your program line to line.
In practice, however, you're likely to experience many crashes while running your programs in Blitz, even with the debugger, and I don't recommend doing any serious programming while doing anything else important. Of course, I can appreciate the difficulties involved in keeping track of a compiled program, but hopefully future releases will be slightly more stable.

This is the preferences window, where you can pick your screenmode (handy for graphic cards), font (although your limited to size 13 and below, probably not so good for high-resolution graphic cards), and customise your screen palette.
Here's the compiler options window, where you can turn the debugger on and off, compress your code, and define the maximum number of bitmaps, sounds, etc. in your program, saving memory.



Blitz supports many features not commonly found in Basics, taking several features from both Assembly and C. Not least of these is the inline assembler, whereby Basic and Assembler subroutines can be mixed. This is the way Gloom was written - "boring" things such as start-up, opening screens, are programmed in Basic, and speed crucial things such as drawing the screen (vital in a doom-clone), are programmed in Assembly. Another equally useful addition to normal Basic is the introduction of Newtypes, a feature unashameadly stolen from C. Newtypes enable to define your own variable types, eg. you are writing a video-tape indexer. You can define a variable like so :
Newtype .tape
tapename.s
description.s
rating.w
End Newtype

From here, you can define an array of tapes, and access them with a backslash like so:
Dim tapes.tape(25)
tapes(0)\tapename="Aladdin"
tapes(0)\description="One of Disney's best animated films of recent years"
tapes(0)\rating=5

The advantage here is that you don't need separate arrays for tape names, tape ratings and tape descriptions, and can be kept neatly, unlike a cetain other language I could name ( and have ). Remarkably handy.
Yet another feature "borrowed" from other languages are statements and functions, similar to subs in QBasic and procedures in Amos. Functions are very useful to any program - they are simply subroutines that return a value, eg.
Function taperating{tapenumber.w}
Shared tapes()
Function Return tapes(tapenumber)\rating
End Function

Here, this function returns the rating of a tape from the tapes array, defined above:
Print taperating{0}
5

This is a very small use of functions, they can of course be much more useful and complicated than this. Statements are simply functions that don't return values, such as the Print command.


In conclusion then, Blitz is definitely the premier Basic language for the Amiga.
It's perfectly suited to games, as anyone who has played Worms will testify, and to Intuition programming, as many shareware programs will prove. The inline assembler and newtypes are terrific additions as are functions and statements, and making standalone programs is easy. It's quite simply the best Basic language I've ever used.
A cliche it well might be, but for £30, any programmer can't afford not to get it.

Return to Amiga Home Page.