Game Reviews 42 RPGs 55 Arcade 34 Puzzle 18 Platform 10 Strategy
Sections QB News Site Archives Game Guides Our Projects Entertainment Awards QB Links
Interact QB Chatroom Mailing List Submissions Link to Us Job Openings
(8/18/2002) As Windows XP continues to take control of the market, an army of Windows/Linux compatible Basics are stepping up to the plate.
It is not hard to tell that Microsoft is in a struggle to rid the world of DOS. And unless a gigantic wave of Linux lovers or some other OS miraculously surges from the heavens, it's pretty likely that the DOS-less Windows XP will become the leading operating system of the 21st century. That means DOS, along with the DOS-based Microsoft QBasic, may become things of the past.
Does this mean the end of BASIC programming? We say "No!" Several new BASIC compilers are now available for the 32-bit Windows and Linux environment, and in this article we'll take a look at some of them.
The Industry Standard - Visual Basic
Microsoft's official "successor" to QBasic, Visual Basic, is currently the most popular BASIC compiler around, thanks to MS's marketing powerhouse. Visual Basic, around since 1991, takes the ease of basic programming one step further by allowing visual design of an application, hence its name. This event driven coding syntax makes Visual Basic the ideal compiler for business applications, hence its popularity among programmers working for accounting firms. Of course, it's usefulness stops there. With large program sizes, required runtimes, it's slowness and lack of graphical abilities (except with the huge Directx sdk), Visual Basic just can't compete with Visual C++, Microsoft's intended game-making compiler. Is this all BASIC has to offer? Of course not. Third parties around the world are creating better, lower-level compilers plowing through BASIC's reputation as a "beginner's" language.
Darkbasic, Blitzbasic and Libertybasic, oh my!
Most QBers are hobbyists. That is, they make fun little indie-games in their spare time. If this is you, and if Basic is your weapon of choice, then these compilers may be for you. All of them are commercial software,attempting to take the simplicity of BASIC to a new level. Since they do not offer much, I won't look too deeply into them. Darkbasic is not much beyond a "Look, mommy! I made a 3D game!" gimmick. While it's suitable for making simple Direct3d games, it doesnt amount to much more, and a Counterstrike mod could produce a much better product.
Blitzbasic is a little better. It can handle 2D and 3D with its own special commands, which makes it suitable for a wider range of applications. The programmers at Master Creating (the makers of the QBRPG Shadow of Power) have used Blitzbasic to make simple commercial games. However, Blitzbasic has one major drawback. The speed of its math operations leave much to be desired, more comparable to Qbasic than any C++ or Delphi compiler. It's a great tool for simple 2D and 3D games, but it's not the best option out there, and it's not worth the 70 dollars it costs.
Liberty Basic is designed to be
a knockoff of early versions of Visual Basic. While it has DLL support,
and is very easy to use, it is extremely slow (in a speed test I performed
it is even slower than Quickbasic) and has the drawback of not being able
to compile programs. It produces an intermediate machine code format that
needs another program to execute.
Of the three third-part Basic compilers, I'd recommend Blitzbasic, but I think Visual Basic with DirectX can outperform all three.
The Realm of Open Source Compilers - XBasic
XBasic is a certainly interesting idea. It has its roots back when Quickbasic was still being produced, in 1988, when the documentation was conceived by a UNIX user. It was designed to be a cross platform compiler capable of producing programs in both UNIX and other platforms. As Unix fell out of the mainstream, however, it was reprogrammed in 1992 for Windows NT and later for Linux. In 1999, it became open source, where it then became available to everyone on Sourceforge.
Since it was conceived at a time when even Qbasic was still in its infancy, XBasic takes some leaps and bounds from the Quickbasic syntax that may take some getting used to. For instance, XBasic does not separate Subs and Functions, but calls all subroutines functions, indiscriminate from each other. SUBs, rather, are used in place of Qbasic's labels, and require an END SUB (in place of return). Also, the main portion of the program can only be used for declaring public variables, and the program starts by calling the first declared function, usually named Entry() to avoid confusion. Its functions convert by value, not reference, Countless syntax differences like these make XBasic a difficult, but worthwhile coding experience for QBasic converts.
As you start XBasic, it becomes painfully obvious that this compiler was designed for true cross-compatibility. XBasic's IDE appears to use its own drawing routines for otherwise standard Objects in the Windows API. It uses its own console in place of a dosbox, and many other conveniences to free itself form any inconvertible code. Instead of producing stand-alone executables, it produces makefiles and assembly code that can be converted to the operating system of your liking.
Because it uses its own libraries for all standard graphics, math and gui functions does not, however prevent the calling of API functions directly. Because of this ability, the possibilities of XBasic are endless for the creative programmer because of its ability to access DirectX, OpenGL, Glide or any other library available. Some of the more restrictive points of XBasic, however, are worth pointing out.
Like Linux or UNIX, XBasic is not user-friendly at all for people who have used Windows all their life. The IDE is not easy to use all, and compiling programs is a difficult process. Furthermore, it's IDE tends to crash on my computer, which uses Windows 98, though it probably would work better on an NT based OS, such as XP or Win2k. But if you can get over it's difficulties, XBasic is a fast and powerful tool, and the best free compiler for the Win32 environment.
The Newcomer - Purebasic
I found this compiler by accident, and when I did, I was amazed. Originally created for the Amiga as a replacement for Blitzbasic, Purebasic was converted to Windows and Linux so that programmers could port code between the operating systems with little effort. Purebasic is a straightforward compiler with DLL support, relying on included standard libraries to simplify access to the Windows and DirectX API. It also has the benefit of being able to create DLL and standalone executables in one step.
Because it was created for the Amiga first, it uses some names for its syntax that may seem strange to some people. For instance, in its standard API library it uses the word "gadget" instead of say, "object." But overall, the libraries built to interface with the Windows and DirectX API make programming in Purebasic both easy and powerful. In my speed tests it outperforms QBasic 4.5 on many levels.
Like I mentioned before, Purebasic has the ability to load libraries. These libraries can be programmed in modules, "residents" (predefined structures), DLLs, and using C++ and assembly. Also, it allows for inline assembly, a luxury now standard in C++ compilers, but quite rare in Basic compilers. Its wide array of add-ons make it able to adapt to advanced APIs with greater ease than some of the other compilers out there.
Its included IDE is simple but good. It has simple syntax highlighting and a built-in debugger not unlike QBs. It also has an extensive help and the help will point to the word the cursor is on in the same way QB's quickhelp does. It's plain looking, which may or may not be to your liking compared to other flashy IDEs like Darkbasic's. Overall, the IDE does what it came to do and that makes it solid and workable.
There's a lot to like in Purebasic. It's fast and extendable, but at the same time its easy to pick up. However, it is also commercial software. It costs 59 Euros ($58 US) to buy, so you may want to hold out on that brand new copy of Warcraft 3 if you find it appealing to you. There is a crippled version available at its website if you'd like to evaluate it first.
A Familiar Name - Powerbasic for Windows
A while back a compiler was released called Powerbasic. With 99% of QB syntax, and a speed that outperformed QB in every way, it seemed like the ultimate DOS basic compiler. However, its user-friendliness could not match QBs, and many Basic programmers were turned off by its lack of support for QLB libraries, which many people were accustomed to. Also, while QBasic 1.1 was free, (and QB 4.5 was becoming abandonware), Powerbasic cost up to $200. But some found it worth it, and most people at least knew of it, the company kept moving on, and recently released "Powerbasic for Windows."
I tried my hardest to find more information on PBFW. There is no demo version and the company was unresponsive to my emails. But here's what I could find out: Powerbasic comes in two flavors, the application friendly Console Compiler and the more game-intensive PB for Windows. Both have many features (such as register variables and huge integers), are fast (or so claimed by the websites own speed tests), and can access DLLs for additional support.
Powerbasic takes much pride in its very QB-like syntax. Almost every QB command works in Powerbasic, except for some of the ones that didnt convert to Windows very well (like SCREEN). If you dont want to learn too many new keywords and syntaxes, then maybe Powerbasic is for you. Powerbasic for Windows, overall, seems like a very professional programming language. However, I cannot supply much more information because I could not obtain a copy to play with. The only major downside to it that I could tell just by overviewing its website is its price. Powerbasic costs $200, just a notch below Visual Basic's hefty $300 tag. But from its reviews, and comments from people who have used it, Powerbasic just might be worth its price for its ease and speed.
I won't pick a "best" compiler, because all 3 of the newer compilers I have reviewed vastly outperform QB and are capable of so much more than QB ever was. Some people claim QB will last forever. But with DOS's glory days over and gone, there is going to be a need for some language to answer the call for a new Basic that offers 32-bit support. Hopefully, with these three compilers competing for power in a new dos-free age, the Basic language will never die.
Article written by Toonski
V Planet! Archive